Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Wear locations...

Wear locations...

Posting of new messages is disabled at present.

Refresh page


Pages: 1 2  

Posted by Ithildin   USA  (262 posts)  Bio
Date Thu 17 Jun 2004 06:07 AM (UTC)

Amended on Thu 17 Jun 2004 06:11 AM (UTC) by Ithildin

Message
ok, i've searched for any information on wear locations, there was a few, but not waht i needed. i've come across something strange. or so i think? I added new wear locs in my mud. they all work fine and dandy. i ordered them head to toe. fine and dandy. works great. but now, i forgot to add two wear locs taht i am going to put in. so i put them in. and now, nothing will set right. i put those other wear locs in a couple months ago, and now i just tried the two new ones. and i can't get them to work properly, everything gets misaligned from the new wear loc down and i don't know how to fix it. so here's what i've got. see if you can all find anything:
***amended*****
I put in bicep
***************

build.c

char *	const	w_flags	[] =
{
"take", "over", "head", "ears", "face", "eyes", "neck", "r1", "shoulder", 
"body", "about", "waist", "r2", "r3", "shield", "bicep", "arms", 
"wrist", "hands", "finger", "wield", "_dual_", "missile", "hold", "legs", 
"ankle", "feet", "r4","r5","r6", "lodge_rib", "lodge_arm", "lodge_leg",
"r10","r11","r12","r13"
};

char *	const	item_w_flags	[] =
{
"take", "light", "over", "over", "over", "head", "ears", "face", "eyes",  "neck", 
"neck", "strap", "strap", "shoulder", "body", "about", "waist", "attach", 
"sheath", "sheath", "sheath", "sheath", "sheath",						
"shield", "bicep", "arms", "wrist", "wrist", "hands", "finger",					
"finger", "wield", "dual", "missile" "hold", "legs", "ankle", "ankle", "feet", 
"lodge_rib", "lodge_arm", "lodge_leg","r7","r8","r9","r10","r11","r12","r13"
};

further down...

char *	const	wear_locs [] =
{
"light", "finger1", "finger2", "neck1", "neck2", "body", "head", "legs",
"feet", "hands", "arms", "shield", "about", "waist", "wrist1", "wrist2",
"wield", "hold", "dual_wield", "ears", "eyes", "missile_wield", "back",
"face", "ankle1", "ankle2", "strap1", "strap2", "attach", "sheath1",
 "sheath2", "sheath3", "sheath4", "sheath5", "over1", "over2", "over3", "shoulder",
 "bicep"
};

mud.h

#define ITEM_WEAR_WAIST		BV11
#define ITEM_WEAR_ATTACH	BV12
#define ITEM_WEAR_SHEATH	BV13
#define ITEM_WEAR_SHIELD	BV14
#define ITEM_WEAR_BICEP		BV15
#define ITEM_WEAR_ARMS		BV16
#define ITEM_WEAR_WRIST		BV17
#define ITEM_WEAR_HANDS		BV18
#define ITEM_WEAR_FINGER	BV19
#define ITEM_WIELD			BV20

further down...

...
  WEAR_SHOULDER, 
  WEAR_BODY, 
  WEAR_ABOUT, 
  WEAR_WAIST,
  WEAR_ATTACH,
  WEAR_SHEATH_1,
  WEAR_SHEATH_2,
  WEAR_SHEATH_3,
  WEAR_SHEATH_4,
  WEAR_SHEATH_5,
  WEAR_SHIELD, 
  WEAR_BICEP, 
  WEAR_ARMS, 
  WEAR_WRIST_L, 
  WEAR_WRIST_R,
  WEAR_HANDS,
  WEAR_FINGER_L, 
...


act_obj.c

	case ITEM_WEAR_BICEP:
	    if ( !remove_obj( ch, WEAR_BICEP, fReplace ) )
		return;
            if ( !oprog_use_trigger( ch, obj, NULL, NULL, NULL ) )
            {
		act( AT_ACTION, "&w$n wear $p &won $s bicep.",   ch, obj, NULL, TO_ROOM );
		act( AT_ACTION, "&wYou wear $p &won your bicep.", ch, obj, NULL, TO_CHAR );
            }
	    equip_char( ch, obj, WEAR_BICEP );
	    oprog_wear_trigger( ch, obj );
	    return;

act_info.c

char * const    where_name [] =
{
	"&w<used as light>        ",
    "&w<worn over head>       ",
    "&w<worn over head>       ",
    "&w<worn over head>       ",
    "&w<worn on head>         ",
    "&w<worn on ears>         ",
    "&w<worn over face>       ",
    "&w<worn on eyes>         ",
    "&w<worn around neck>     ",
    "&w<worn around neck>     ",
    "&w<strapped>             ",
    "&w<strapped>             ",
    "&w<worn over shoulders>  ",
    "&w<worn on body>         ",
    "&w<worn about body>      ",
    "&w<worn on waist>        ",
    "&w<attached to belt>     ",
    "&w<sheathed>             ",
    "&w<sheathed>             ",
    "&w<sheathed>             ",
    "&w<sheathed>             ",
    "&w<sheathed>             ",
    "&w<worn as shield>       ",
    "&w<worn on bicep>        ",
    "&w<worn on arms>         ",
    "&w<worn around wrist>    ",
    "&w<worn around wrist>    ",
    "&w<worn on hands>        ",
    "&w<worn on finger>       ",
    "&w<worn on finger>       ",
    "&w<wielded, Primary>     ",
    "&w<wielded, Secondary>   ",
    "&w<missile wielded>      ",
    "&w<held>                 ",
    "&w<worn on legs>         ",
    "&w<worn around ankle>    ",
    "&w<worn around ankle>    ",
    "&w<worn on feet>         ",
    "&w<lodged in a rib>      ",
    "&w<lodged in an arm>     ",
    "&w<lodged in a leg>      ",
    "&r<BUG Inform Nivek>     ",
    "&r<BUG Inform Nivek>     ",
    "&r<BUG Inform Nivek>     "

};



i'll put in what it's doing.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #1 on Thu 17 Jun 2004 06:09 AM (UTC)
Message
here's what it's doing:


vnum 21088  
|    |ostat gauntlets
Name: iron gauntlets
Vnum: 21063  Type: armor  Count:  1  Gcount: 1
Serial#: 1274  TopIdxSerial#: 1274  TopSerial#: 1306
Short description: iron gauntlets
Long description : Some iron gauntlets have fallen here.
Wear flags : take bicep
Extra flags: 
Magic flags: none
Number: 1/1   Weight: 4/4   Layers: 0   Wear_loc: -1
Cost:  4 Gold,  0 Silver,  0 Copper
, 0, Platinum
Rent: 40  Timer: 0  Level: 14
In room: 0  In object: (none)  Carried by: Ithildin
Index Values : 5 5 0 0 0 0.
Object Values: 5 5 0 0 0 0.

vnum 21088  
|    |wear gauntlets
You wear iron gauntlets on your bicep.

vnum 21088  
|    |eq
You are using:
<used as light>        a torch
<worn on head>         an iron helm
<worn over face>       an iron visor
<worn around neck>     an iron guard
<worn over shoulders>  chain sleeves
<worn on body>         a crested breastplate
<worn on arms>         iron gauntlets



all the above is fine. but everything below gauntlets gets thrown off. i've tried so many different things. i just don't know what is going on since i put in those other locations no problem. max_where_name is also +1 as well. so that's no problem t here.

any one see anything?
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #2 on Sun 20 Jun 2004 11:19 PM (UTC)
Message
ok, so i tried something different and tried to add a floating object for the player to set floating about the body. i was going to put this at the end to just see if i could get it to work right. as it turns out, i don't think i'm compiling my act_info right. here's how i tested it.

i took out "lodged in a rib" where name and put two floating in there like this.


before...

   "&w<worn around ankle>    ",
    "&w<worn on feet>         ",
    "&w<floating about body>  ",
    "&w<lodged in a rib>      ",
    "&w<lodged in an arm>     ",
    "&w<lodged in a leg>      ",
    "&r<BUG Inform Nivek>     ",
    "&r<BUG Inform Nivek>     ",
    "&r<BUG Inform Nivek>     "

after...

   "&w<worn around ankle>    ",
    "&w<worn on feet>         ",
    "&w<floating about body>  ",
    "&w<floating about body>  ",
    "&w<lodged in an arm>     ",
    "&w<lodged in a leg>      ",
    "&r<BUG Inform Nivek>     ",
    "&r<BUG Inform Nivek>     ",
    "&r<BUG Inform Nivek>     "


and when i compile and restart the mud, here's what i have still:



<worn on legs>         mail leggings
<worn on feet>         black boots
<lodged in a rib>      chain sleeves


so for some reason it's not compiling right and i don't know what's goin on. but when i changed something else in act info and recompiled it showed the changes in the mud. it just never shows the changed in the char const where name. i don't understand why it's doing this.

Top

Posted by Dace K   Canada  (169 posts)  Bio
Date Reply #3 on Sun 20 Jun 2004 11:41 PM (UTC)
Message
You have to keep the order in all the tables the same, and you should align them to the bitvectors in mud.h =P.

..and you *really* don't need to keep those reserved locs in there, they're just confusing things.

See what I mean?

ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com

Drop by the area archives and find something for your mud. http://areaarchives.servegame.com
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #4 on Mon 21 Jun 2004 01:17 AM (UTC)
Message
they were all aligned correctly. it's just my where_name const in act info just isn't compiling correclty. i have no idea what's wrong. everything compiles ok. like i said earlier, i changed something in actinfo and it showed up when i restarted the mud. then i changed the wear location lodged in rib to floating and then after compiling i still get lodged in rib. there's no other place where that is. but everything is in correct order. the bv's the w-flags and so forth. all in the same order, just my char *const where_name is the only problem.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #5 on Tue 22 Jun 2004 04:39 AM (UTC)
Message
This is frustrating me to know end. has this ever happened to anyone? i just don't know why it would do that?
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #6 on Tue 22 Jun 2004 05:05 AM (UTC)
Message
ok to give you more examples:

i changed this:

	  act( AT_PLAIN, "You're not much to look at...", ch, NULL, NULL, TO_CHAR );


to this:


	  act( AT_PLAIN, "&rYou're not much to look at...", ch, NULL, NULL, TO_CHAR );


in act_info.c. same place as where_name stuff. i made clean and recompiled. all the while my where_name was this:


    "&w<worn around ankle>    ",
    "&w<worn around ankle>    ",
    "&w<worn on feet>         ",
    "&w<floating about body>  ",
    "&w<floating about body>  ",
    "&w<lodged in an arm>     ",
    "&w<lodged in a leg>      ",


notice there is no lodged in rib.

after i had made clean and recompiled i logged back on and when i "l self" it's in red text, just as it should be, yet my eq still says


<worn on feet>         black boots
<lodged in a rib>      chain sleeves


does anyone have any idea why it would do that? or has anyoen seen that?
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #7 on Tue 22 Jun 2004 06:07 AM (UTC)
Message
Did you do a make clean first, as in, did you recompile every source file?

~Nick Cash
http://www.nick-cash.com
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #8 on Tue 22 Jun 2004 06:09 AM (UTC)
Message
yep. did it about 10 times
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #9 on Tue 22 Jun 2004 06:12 PM (UTC)
Message
Very strange. I'm not quite sure why its still there then. Sorry :(

~Nick Cash
http://www.nick-cash.com
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #10 on Tue 22 Jun 2004 10:45 PM (UTC)
Message
K, lemme see if I understand this: You added another wear loc. Did you replace one of the reserve ones, or add it in place of others? If you look at all the lists of names for the locations, do they all synch up ( ie. Spot 5 is wrist in defines, flag names, wearloc names, etc )? Is this the same for all players, or is there criteria for this to happen? Are other pieces changing places after the items are being worn?

There are a couple possibilities: a memory leak would make sense here, if numbers are changing by them selves, but are you getting crashes? You could have flags/wearlocs/wearloc names mixed up. There might even be something inheirently wrong with older changes that haven't surfaced until this time.

You might want to step through the wearing process in GDB and see where the numbers are getting screwed up.

Hope that helps.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #11 on Wed 23 Jun 2004 04:59 AM (UTC)
Message
I have just added some wear locs too, then re-ordered them all into the way i want to see them listed, making sure all the spots were in the same place in each table, made clean and rebooted, looked at self eq everything was not lined up, remove and re-wear eq and all was dandy, for you i hope its as simple as removeing and rewearing the eq as i did.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #12 on Wed 23 Jun 2004 07:25 AM (UTC)
Message
i already know how to change wear loc's i've done it before. i know what i'm doing with that. it's just that my where name is not changing when i recompile. yes. i've made clean, and recompiled. nothing is working. once again. i changed something in actinfo and it showed up in the mud with the changes. everything except tkaing out the lodged in rib which should have been taken out. for some reason that isn't compiling right. i don't know what i'm doing wrong with that.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #13 on Fri 25 Jun 2004 10:59 PM (UTC)
Message
this is to Greven, i must have skipped over his post.

Yea, i made sure everything was aligned correctly. everything works fine when i haven't changed wear_loc's. but once i change them, put it in exactly the same place, everything compiles correctly EXCEPT the where_name in act_info.c i had never seen a compile to get part of a file but not all of it? can it even do that?

would a memory leak or something cause my char *const where_name to be overlooked when recompiling?

i had already added many new locations before and it worked just fine. i haven't went over my BV's either. so i don't know what's up still...i can't figure it out.
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #14 on Sun 27 Jun 2004 02:23 AM (UTC)
Message
Ok, here check this out:

http://www.geocities.com/ty39etc/page1.html

it shows my problem. i'm probably just not being clear on what's going on.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


52,543 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.