im using smaugfuss but im havcing trouble adding a wear spot but it doesnt show up and i cant add stuff to it.
heres the stuff i added from the file itself
First, in mud.h approx. line 1424 where object ITEM_WEAR_ fields are
defined, add your new ITEM_WEAR_NEW such as:
#define ITEM_WEAR_NEWSPOT BV19
Then, in mud.h approx. line 1589, add the eq. wear location in the typedef:
WEAR_NEWSPOT
*Make sure* you add it BEFORE MAX_WEAR. This is an enum, so MAX_WEAR being
at the end of the items is one more than the item before.
Then in build.c, approx. line 168 where the array wear_locs[] is populated,
add your new wear location how you would like the builder to have to type
it to add it on an obj:
"newspot"
Add it at the end, after "missile_wield", don't forget the comma after
missile_wield".
Now do a make clean, make sure that all went in correctly. Now you have
your new wear location, but you should also add the following things:
In act_obj.c, in the wear_obj function (search for wear_obj and then search
for ITEM_WEAR_FINGER)
This is the switch statement you need to add a new case for your new wear
loc. Continue down the list of cases and take a look at case
ITEM_WEAR_HEAD. This is pretty simple:
It first sees if you can remove the obj, if not it returns. Then if there
is no object prog on it, it gives the message that you wear or remove the
item on your head. Then it equips the char and makes a call to
oprog_wear_trigger to catch any obj wear progs.
So you can add your new case statement after this one similar to this:
case ITEM_WEAR_NEWSPOT:
if( !remove_obj(ch, WEAR_NEWSPOT, fReplace) )
return;
if( !oprog_use_trigger(ch, obj, NULL, NULL, NULL ) )
{
act.. msg
act.. msg
}
equip_char( ch, obj, WEAR_HEAD );
oprog_wear_trigger....
return;
If you want this new wear loc to be a layered location, take a look at the
other cases, like ITEM_WEAR_LEGS.
In handler.c, approx line 1037 there is the apply_ac function. Add your new
case there.. however you like it.
case WEAR_NEWSPOT: return obj->value[0]
Then in act_info.c, approx line 28, add to the where_name array how you
want your new wear loc to appear when someone looks at you.
If you add it at the end of the array, don't forget the comma after
"<missile wielded>"
"<worn on newspot>"
That should cover it I hope. I don't think I missed anything.... The safest
bet is not to add the whole whack of code at once.. compile as you go
because if you get a silly little parse error in the code you modify.. it's
not always fun :)
what do i need to add to it to get it to work.
heres the stuff i added from the file itself
First, in mud.h approx. line 1424 where object ITEM_WEAR_ fields are
defined, add your new ITEM_WEAR_NEW such as:
#define ITEM_WEAR_NEWSPOT BV19
Then, in mud.h approx. line 1589, add the eq. wear location in the typedef:
WEAR_NEWSPOT
*Make sure* you add it BEFORE MAX_WEAR. This is an enum, so MAX_WEAR being
at the end of the items is one more than the item before.
Then in build.c, approx. line 168 where the array wear_locs[] is populated,
add your new wear location how you would like the builder to have to type
it to add it on an obj:
"newspot"
Add it at the end, after "missile_wield", don't forget the comma after
missile_wield".
Now do a make clean, make sure that all went in correctly. Now you have
your new wear location, but you should also add the following things:
In act_obj.c, in the wear_obj function (search for wear_obj and then search
for ITEM_WEAR_FINGER)
This is the switch statement you need to add a new case for your new wear
loc. Continue down the list of cases and take a look at case
ITEM_WEAR_HEAD. This is pretty simple:
It first sees if you can remove the obj, if not it returns. Then if there
is no object prog on it, it gives the message that you wear or remove the
item on your head. Then it equips the char and makes a call to
oprog_wear_trigger to catch any obj wear progs.
So you can add your new case statement after this one similar to this:
case ITEM_WEAR_NEWSPOT:
if( !remove_obj(ch, WEAR_NEWSPOT, fReplace) )
return;
if( !oprog_use_trigger(ch, obj, NULL, NULL, NULL ) )
{
act.. msg
act.. msg
}
equip_char( ch, obj, WEAR_HEAD );
oprog_wear_trigger....
return;
If you want this new wear loc to be a layered location, take a look at the
other cases, like ITEM_WEAR_LEGS.
In handler.c, approx line 1037 there is the apply_ac function. Add your new
case there.. however you like it.
case WEAR_NEWSPOT: return obj->value[0]
Then in act_info.c, approx line 28, add to the where_name array how you
want your new wear loc to appear when someone looks at you.
If you add it at the end of the array, don't forget the comma after
"<missile wielded>"
"<worn on newspot>"
That should cover it I hope. I don't think I missed anything.... The safest
bet is not to add the whole whack of code at once.. compile as you go
because if you get a silly little parse error in the code you modify.. it's
not always fun :)
what do i need to add to it to get it to work.