Manual:Zone Manual/The Objects Section/More complex objects
Contents
More complex objects
In the last sections you learned all the fields and how to make a basic object. In this section we will use the information from the last sections to create some more unique objects for our dragon station zone There is not a lot of new information here we will be using the DIL functions, fields, and flags to make objects we have only mentioned before.
Making a communication board
In (Link to objdilboard) you learned all there you need to know about the boards DIL to create a board. In this small section we are going to show you the rest of a board and what a finished one looks like.
As with all objects the first step is to fully describe and name your board. We will stick with the space station theme since our goal is to have a complete example zone for you. The boards symbolic, names, title, description and extra turned out like this.
info_board title "a merchant information board" descr "A merchant information Board is mounted on a wall here." names {"merchant information board","information board","merchant board","board"} extra {} "A large flashy black steal board."
Just incase the VME server we have has a spell that can damage inanimate objects we will give this board a material type.
MATERIAL_METAL("A very fine quality black steel")
Now for the special stuff for the board. We need to give the board a type and copy the board DIL to it.
type ITEM_BOARD dilcopy board@boards("info","","rem_res@boards","",100);
There you go nothing to it you have just created your first board. Now lets bring it all together and tag on an end symbol and we are all finished.
info_board title "a merchant information board" descr "A merchant information Board is mounted on a wall here." names {"merchant information board","information board","merchant board","board"} extra {} "A large flashy black steal board." MATERIAL_METAL("A very fine quality black steel") type ITEM_BOARD dilcopy board@boards("info","","rem_res@boards","",100); end
Making a container
I thought it would be cool to have a small weapons locker on the space station not to mention event hough we went over the container macro in (Link to objmacrocontainer), we didn't cover everything you need in fact the macro eaves a few things out because you may or may not want to set them.
As with all objects we start right off by describing the item. There is nothing new here so we will just show it to you and go on.
wpn_locker title "a weapons locker" names {"weapons locker","weapon locker","locker"} descr "a small weapons locker hangs on the wall here." extra {} "It is an ordinary weapons locker that looks like it holds any illegal weapons that are taken on the station."
Now we need to put in all the information that makes this item a container that can't be taken but it can be opened and it is locked.
manipulate {MANIPULATE_ENTER} CONTAINER_DEF(500) open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} key black_key
Notice we didn't make the item 'MANIPULATE_TAKE' because we don't want people to be able to walk off with our weapons locker. One final touch and we are all finished with the weapons locker. It is always nice to put a material type on your items so a spell or a skill can tell if you can do anything with them. So with our material added in the full locker would look like this.
wpn_locker title "a weapons locker" names {"weapons locker","weapon locker","locker"} descr "a small weapons locker hangs on the wall here." extra {} "It is an ordinary weapons locker that looks like it holds any illegal weapons that are taken on the station." MATERIAL_METAL("A very fine quality steel") manipulate {MANIPULATE_ENTER} CONTAINER_DEF(500) open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} key black_key end
Creating drinks
In (Link to objmacroliqcont), we covered how to set the size and weight of the container and its content but now we need to talk about some other special things about a drink container verses other objects.
The drink container is one of the few objects that has rules on how you set the title, description and names fields. The title and description fields should ot have anything to do with the liquid inside the container. This means if you have a barrel full of water you do not put the word water in the title or the description. In our case we have a bag full of wine so we do not put wine in either the title or description. The reason for this is if the player drinks the bag empty and then fills it with water and we had put wine in the title or description it would still be there but the bag would now be full of water.. Our symbolic, title, and description would then look like this.
liq_ration title "a red bag" descr "A red bag has been gently placed here."
The names on the other hand MUST have the drink name as the last name in the name list. The reason it must be the last one is when a player drinks or pours out the liquid the name is removed. If a player then refills the container the name of the new liquid is added to the last name. The bag we are making is full of wine so our names list would look like this.
names {"red bag", "bag", "wine"}
Now we add the liquid define for wine
LIQ_WINE(1,2,2,0)
Finally we add the material type for the bag, the cost to buy the container, an extra players can look at, and finally an identify extra so if a player casts either the identify or improved identify spell on the bag they will se it. with all that added The finished drink container looks like this.
liq_ration names {"red bag", "bag", "wine"} title "a red bag" descr "A red bag has been gently placed here." extra {} "A small label reads Tassel Grove's finest. Year 321" MATERIAL_ORGANIC("a soft plastic") manipulate {MANIPULATE_TAKE} LIQ_WINE(1,2,2,0) cost 2 IRON_PIECE extra {"$identify"} "Its the special wine from Tassel grove a small halfling village on the planet Valhalla. It seems like a great vintage wine." end
Creating food
The food is very simple to make its just a regular item with the macros you learned in (Link to objmacrofood). In fact making food is so simple we almost left it out. I am only adding this to show how simple it is to change a regular item like the dragon head we showed you in (Link to objbasic) into a food item. Now only a sick person would make a dragon head into food but if you wanted to you just add the 'FOOD_DEF(...)' and your all set. here is a basic food that you might find laying around a space station.
beef_stick title "a tough leathery stick" descr "A tough leathery looking stick is laying here." names {"tough leathery stick","tough leather stick","leathery stick", "leather stick","tough stick","stick"} extra {} "This has the word BEEF burnt into it." manipulate {MANIPULATE_TAKE} FOOD_DEF(5,0) weight 1 cost 1 COPPER_PIECE MATERIAL_ORGANIC("tough beef") end
Making a weapon
Whats a game with out some kind of weapon to chop or bash things into little pieces. We examined how to set the weapon fields in (Link to objmacroweapon), the object transfers in (Link to objmacrotransfers), and the restriction DIL functions in (Link to objdilrestrict). Now we will pull all we have learned together and make a pretty nifty little stiletto.
The first part as with all our example objects is to set up the symbolic, names, title, description, object extra, and material type. this is no different from any other object so here is what we ended up with
w_stiletto title "a stiletto" names {"stiletto", "dagger"} descr "A deadly looking stiletto has been left here." extra{} "This looks like a thieves dream come true. " MATERIAL_METAL("A very fine quality steel")
Now lets add the defines and DIL functions that make this a special weapon along with the manipulate flags that makes it able to be wielded. We will give it a bonus in magic and good craftsmanship along with a plus in backstab for all those assassins on the game.
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD} WEAPON_DEF(WPN_DAGGER, 1, 2) SKILL_TRANSFER(SKI_BACKSTAB, 2) dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
to finish it off we will give the weapon a cost, rent, and finally two identifies for the two identify spells. Now that we have it all defined we pull it together and it looks like this.
w_stiletto title "a stiletto" names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"} descr "A deadly looking stiletto has been left here." extra{} "This looks like a thieves dream come true. " MATERIAL_METAL("A very fine quality steel") manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD} WEAPON_DEF(WPN_DAGGER, 1, 2) SKILL_TRANSFER(SKI_BACKSTAB, 2) dilcopy abi_restrict@function (ABIL_DEX,10,0,25,""); weight 2 cost 2 GOLD_PIECE rent 1 COPPER_PIECE extra {"$identify"} "The stiletto looks magical in nature and seems really sharp. You can tell if you wield it you would be able to backstab someone really easy." extra{"$improved identify"} "The stiletto gives you a magical bonus of +1 and has a quality of +2. It also raises your back stabbing skill by 2%. You have to have at least 10% in dex before you can wield this magical weapon." end
Making armour
In (Link to objmacroarmour) we explained how to set the armour fields now we will finish off by adding some more important information about armour in general.
The most important thing to realize is that not all wear positions on the VME server are armour positions. In fact only seven of the wear positions count as armour the rest are non-armour positions which we will cover next in (Link to objnon-armour). The following are the armour positions and their defines.
Position | Define |
---|---|
head | MANIPULATE_WEAR_HEAD |
hands | MANIPULATE_WEAR_HANDS |
arms | MANIPULATE_WEAR_ARMS |
body | MANIPULATE_WEAR_BODY |
legs | MANIPULATE_WEAR_LEGS |
feet | MANIPULATE_WEAR_FEET |
cloak | MANIPULATE_WEAR_ABOUT |
There is one more field that works as armour, 'MANIPULATE_WEAR_SHIELD' but since that uses another define it is not shown here. We will leave that for an exercise for you to do later.
First we do the same as we have for every other item, pick the symbolic, title, description, extra description, and material type for the plate.
pol_plate names {"polished breast plate","polished plate","breast plate","plate"} title "a polished breast plate" descr "A polished breast plate has been left here." MATERIAL_METAL("A high luster silver colored metal")
Now we pick the armour type in this case I want it to be made like plate mail and I want it to have a magical bonus and a high craftsmanship. Obviously since this is a plate we will pick the body position.
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_DEF(ARM_PLATE,5,9)
All that is left is to add the cost, rent, the identify extras, and I felt like putting a 40% strength restriction on the armour. With all that added together we finish up with the following piece of armour.
pol_plate names {"polished breast plate","polished plate","breast plate","plate"} title "a polished breast plate" descr "A polished breast plate has been left here." extra{} "This is one shiny plate it seems to be made out of one perfect piece of metal. There doesn't even seem to be any markings of owner ship." MATERIAL_METAL("A high luster silver colored metal") manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_DEF(ARM_PLATE,5,9) dilcopy abi_restrict@function (ABIL_STR,40,0,25,""); cost 2 GOLD_PIECE rent 3 COPPER_PIECE weight 25 extra{"$identify"} "This is a high quality plate with a magical feeling." extra{"$improved identify"} "The plate has a magical bonus to your defence of a +5 and a quality of +9. You need 40% in strength to be able to wear it." end
Making non-armour worn objects
In the previous section we defined armour that actually protects the char in combat. Here we will learn how to make the clothing and jewelery that may not do anything directly to combat but it can give your characters bonuses that help in combat in the long run. We will start by listing all the non-armour worn positions and their manipulate defines and then we will give a simple ring object.
Position | define |
---|---|
ear | MANIPULATE_WEAR_EAR |
neck | MANIPULATE_WEAR_NECK |
wrist | MANIPULATE_WEAR_WRIST |
finger | MANIPULATE_WEAR_FINGER |
chest | MANIPULATE_WEAR_CHEST |
back | MANIPULATE_WEAR_BACK |
waist | MANIPULATE_WEAR_WAIST |
ankle | MANIPULATE_WEAR_ANKLE |
When giving ability, skill, weapon, or spell bonuses make sure you realize that positions like ear, neck, wrist, and ankle can all have two on a player. This means any bonuses you give can be doubled if the player gets two of them
I don't want to beat a dead horse so since I have already explained armour in (Link to objarmour) the only difference here is there is no 'ARMOUR_DEF' everything else is the same. The following was one of the first items my wife made as a new builder and I have always liked it. I know, I am a lush but this way I don't have to write an example.
maskwa names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"} title "a Maskwa ring" descr "A Maskwa platinum ring is laying here." MATERIAL_METAL("Platinum, and other precious metals") extra {} "The ring has a large bear head. Could this be the legendary head of Maskwa? Any thing formed with its head on it is said to strengthen the wearer." type ITEM_WORN manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER} cost 100 COPPER_PIECE rent 50 IRON_PIECE weight 1 STR_TRANSFER(+1) end
One last thing I forgot to mention. The item type also changes but then that is not hard to understand since this is not armour it should be some other thing. In the case of non-armour worn items the item type is 'ITEM_WORN'.