home » builders » builder's lessons » object resets
Object resets
Objects put into a mobiles inventory and worn by mobiles are covered in Mobile Resets Lesson.
Loading an object into the room
This defines the room that object is loaded into and how many. The syntax to do this follows:
O 0 obj-vnum 0 room-vnum ; comment
The following is a sample of this:
O 0 QQ00 1 QQ78 ; Chest into room 78
O - This tells the game that an object is to be loaded.
0 - This is unused by the game but needs to be here in order for the game to load.
QQ00 - This is the vnum of the object to be loaded.
1 - This is how many of this object can be in the game before it can loaded.
QQ78 - This is the room that the object will be loaded into.
; Chest into room 78 - This is the comment.
The object is not loaded if the target room already contains any objects with this vnum. The object is also not loaded if any players are present in the area.
Place an object into a container
This reset can be fiddly. Be sure to test this part in your area when it is loaded onto the testport to make sure you have it correct.
P 0 obj-vnum 1 obj-vnum ; comment
Our sample places a gem into the chest that we loaded into the room sample above.
O 0 QQ00 1 QQ78 ; Chest into room 78 P 0 QQ01 10 QQ00 ; Placing gem into chest
P - This tells the game that this is going to be a 'PUT' reset.
0 - 0 is the default state. If this field is set to 1, then the object will be hidden inside the container, and will need to be searched for to be found, or seen with detect hidden.
QQ01 - This is the vnum of the object being placed into the chest.
1 - This is the number of gems that can be in the game before it wont load.
QQ00 - This is the vnum of the container that the gem is going to be put into.
; Placing gem into chest - This is the comment.
For the P reset, the second obj-vnum is the vnum of a container object where the object will be loaded. The actual container used is the most recently loaded object with the right vnum; for best results, there should be only one such container in the world. The object is not loaded if no container object exists, or if someone is carrying it, or if it already contains one of the to-be-loaded object.
Hiding an object in a room
The object will be hidden untill the player "searches" for it. Our sample below is a key that is hidden in the room.
H 0 obj-vnum 0 ; comment
H 0 QQ04 5 QQ03 ; Key Hidden in the room
H - This tells the game that this is a Hidden reset.
0 - This is unused, but needs to be there in order for the game to load.
QQ04 - This is the vnum of the object to be hidden.
5 - This is total number of the object that can be in the game before it stops loading.
QQ03 - This is the vnum of the room that the object will be hidden in.
; Key Hidden in the room
Burying an object in a room
The object will be buried untill the player "digs" for it. Our sample below is a key that is buried in the room.
U 0 obj-vnum 0 ; comment
U 0 QQ04 5 QQ03 ; Key Buried in ground
U - This tells the game that this is a Buried reset.
0 - This is unused, but needs to be there in order for the game to load.
QQ04 - This is the vnum of the object to be buried.
5 - This is total number of the object that can be in the game before it stops loading.
QQ03 - This is the vnum of the room that the object will be buried in.
; Key Buried in the room