In this lesson you will learn how to add your newly scripted Pyrite platemail to sphere_d_skillmenu.scp so players can craft it with blacksmithy. I won't script the whole armor for you, you should be able to do it yourself using examples given in
sphere_d_item_color_armor.scp and things learned from the previous lesson making the ore and ingots. One example I will give is the pyrite platemail. I'll leave it up to you to make the rest of the armor suit.
[ITEMDEF i_Pyrite_platemail]
NAME="Pyrite Platemail"
ID=i_platemail_chest
WEIGHT=10.0
ARMOR=65
REQSTR=60
RESOURCES=25 i_ingot_Pyrite
SKILLMAKE=BLACKSMITHING 108.0
CATEGORY=Provisions - Armor - Colored
SUBSECTION=Pyrite
DESCRIPTION=Platemail
ON=@Create
HITPOINTS=51
COLOR=color_o_Pyrite
Now first thing we will want to do is find the blacksmithy section in
sphere_d_skillmenu.scp. It'll look something like this:
[SKILLMENU sm_blacksmith]
Blacksmithing
ON=i_ANVIL Repair
TEST=BLACKSMITHING 1.0
REPAIR
ON=i_shield_round_bronze Shields
SKILLMENU=sm_shields
ON=i_platemail_chest Armor
SKILLMENU=sm_armor
ON=i_sword_viking Weapons
SKILLMENU=sm_weapons
ON=i_decorative_armor Colored Armor
SKILLMENU=sm_colored_armor
What each of these lines mean are pretty much what they look like. You'll double click your hammer and target the ingot and a menu will pop up with these 5 images (an anvil, a bronze shield, a platemail chest, a sword, and a decorative armor statue). Double clicking these in the menu will take you to new submenus. This is scripted as shown below.
ON=i_whatever Name Goes Here open
SKILLMENU sm_whatever. Since we are going to be adding in new colored armor, we won't need to make a whole new section for it, but if you wanted to, you'd just add in your own like is done above.
Now scroll down to the
SKILLMENU sm_colored_armor since this is the area we'll be adding our armor to. It will start out something like this:
[SKILLMENU sm_colored_armor]
Colored Armor & Shields
ON=i_platemail_chest Bronze Plate Armor
SKILLMENU=sm_bronze_armor
ON=i_decorative_armor Rusty Armor
SKILLMENU=sm_rusty_armor
ON=i_decorative_armor Old Copper Armor
SKILLMENU=sm_old_copper_armor
What these lines do is exactly the same as the main menu. When you double click, for example, the image for Bronze Plate Armor, it is going to take you to a new
SKILLMENU called
sm_bronze_armor. You want to add a new entry here for your pyrite armor at the bottom of the
sm_colored_armor menu like so:
ON=i_decorative_armor Pyrite Armor
SKILLMENU=sm_pyrite_armor
Now when you get to the colored armor submenu, your pyrite submenu option will be displayed. But first, you need to script it :) Scroll down a ways to one of the
sm_whatever_armor> menus, Golden Armor is the first by default I believe. Take a look at it to see how this is done. Then script in your own for Pyrite like so:
[SKILLMENU sm_pyrite_armor]
Pyrite Armor
ON=i_pyrite_plate_helm <name> (<resmake>)
MAKEITEM=i_pyrite_plate_helm
ON=i_pyrite_platemail_gorget <name> (<resmake>)
MAKEITEM=i_pyrite_platemail_gorget
ON=i_pyrite_platemail_gauntlets <name> (<resmake>)
MAKEITEM=i_pyrite_platemail_gauntlets
Continue on for each piece in the pyrite set you have scripted. Change these names of course if your items are scripted with different names. What this says to do is: put an image of a plate helm with the name of the item (which would be something like "pyrite helm" or whatever). The (
<resmake>) line will test the
RESOURCES and
SKILLMAKE lines from the armor item script, if they do not have the materials required, or the skill required to craft it, it will not show this option for them in the crafting menu. The
MAKEITEM line will create the item and place it in their backpacks.
That's all there is to it. Not as scary as it looked, right?