Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Bing, Yahoo!

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Equipment_Wear_Locations
Forum Rules | Mark all | Recent Posts

Equipment_Wear_Locations
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 25, 2008, 2:38 am
Go to the top of the page
Go to the bottom of the page

Crow
Fledgling
GroupMembers
Posts3
JoinedMay 25, 2008

Alright, I'm probably just missing something small or not, but I've edited mud.h and acct_info.c.
Both of these places had what I saw as an importance to re-do/edit of wear locations. I'm trying to arrange it more to suit the human body Light, head, eyes, ears, face, etc... So, here's the code and let's see if ya'll see something I wasn't quite capable of catching. Thanks!

  
/*
 * Wear flags.
 * Used in #OBJECTS.
 */
#define ITEM_TAKE		BV00
#define ITEM_WEAR_HEAD     	BV01
#define ITEM_WEAR_EYES		BV02
#define ITEM_WEAR_EARS		BV03
#define ITEM_WEAR_FACE		BV04
#define ITEM_WEAR_NECK		BV05
#define ITEM_WEAR_ARMS		BV06
#define ITEM_WEAR_WRIST		BV07
#define ITEM_WEAR_HANDS		BV08
#define ITEM_WEAR_FINGER	BV09
#define ITEM_HOLD		    BV10
#define ITEM_WIELD		    BV11
#define ITEM_DUAL_WIELD		BV12
#define ITEM_MISSILE_WIELD  BV13
#define ITEM_WEAR_SHIELD 		    BV14
#define ITEM_WEAR_BODY		BV15
#define ITEM_WEAR_BACK		BV16
#define ITEM_WEAR_ABOUT		BV17
#define ITEM_WEAR_WAIST 	BV18
#define ITEM_WEAR_LEGS		BV19
#define ITEM_WEAR_ANKLE		BV20
#define ITEM_WEAR_FEET		BV21
#define ITEM_WEAR_MAX		21


/*
 * Equipment wear locations.
 * Used in #RESETS.
 */
typedef enum
{
   WEAR_NONE = -1, WEAR_LIGHT = 0, WEAR_HEAD, WEAR_EYES, WEAR_EARS, WEAR_FACE,
   WEAR_NECK_1, WEAR_NECK_2, WEAR_ARMS, WEAR_WRIST_L, WEAR_WRIST_R, WEAR_HANDS,
   WEAR_FINGER_L, WEAR_FINGER_R, WEAR_HOLD, WEAR_WIELD, WEAR_DUAL_WIELD,
   WEAR_MISSILE_WIELD, WEAR_SHIELD, WEAR_BODY, WEAR_BACK, WEAR_ABOUT,
   WEAR_WAIST, WEAR_LEGS, WEAR_FEET, WEAR_ANKLE_L, WEAR_ANKLE_R, MAX_WEAR
} wear_locations;


So those were the edited versions, and here's what I edited them from(original):
/*
 * Wear flags.
 * Used in #OBJECTS.
 */
#define ITEM_TAKE		BV00
#define ITEM_WEAR_FINGER	BV01
#define ITEM_WEAR_NECK		BV02
#define ITEM_WEAR_BODY		BV03
#define ITEM_WEAR_HEAD		BV04
#define ITEM_WEAR_LEGS		BV05
#define ITEM_WEAR_FEET		BV06
#define ITEM_WEAR_HANDS		BV07
#define ITEM_WEAR_ARMS		BV08
#define ITEM_WEAR_SHIELD	BV09
#define ITEM_WEAR_ABOUT		BV10
#define ITEM_WEAR_WAIST		BV11
#define ITEM_WEAR_WRIST		BV12
#define ITEM_WIELD		BV13
#define ITEM_HOLD		BV14
#define ITEM_DUAL_WIELD		BV15
#define ITEM_WEAR_EARS		BV16
#define ITEM_WEAR_EYES		BV17
#define ITEM_MISSILE_WIELD	BV18
#define ITEM_WEAR_BACK		BV19
#define ITEM_WEAR_FACE		BV20
#define ITEM_WEAR_ANKLE		BV21
#define ITEM_WEAR_MAX		21


/*
 * Equpiment wear locations.
 * Used in #RESETS.
 */
typedef enum
{
   WEAR_NONE = -1, WEAR_LIGHT = 0, WEAR_FINGER_L, WEAR_FINGER_R, WEAR_NECK_1,
   WEAR_NECK_2, WEAR_BODY, WEAR_HEAD, WEAR_LEGS, WEAR_FEET, WEAR_HANDS,
   WEAR_ARMS, WEAR_SHIELD, WEAR_ABOUT, WEAR_WAIST, WEAR_WRIST_L, WEAR_WRIST_R,
   WEAR_WIELD, WEAR_HOLD, WEAR_DUAL_WIELD, WEAR_EARS, WEAR_EYES,
   WEAR_MISSILE_WIELD, WEAR_BACK, WEAR_FACE, WEAR_ANKLE_L, WEAR_ANKLE_R,
   MAX_WEAR
} wear_locations;


Now, here's the acct_info.c modified, then original:
char *const where_name[] = {
   "<used as light>     ",
   "<worn on head>    ",
   "<worn on eyes>    ",
   "<worn on ears>  ",
   "<worn over face>  ",
   "<worn around neck>      ",
   "<worn around neck>      ",
   "<worn on arms>      ",
   "<worn around wrist>      ",
   "<worn around wrist>     ",
   "<worn on hands>      ",
   "<worn on finger>    ",
   "<worn on finger>   ",
   "<held>  ",
   "<wielded> ",
   "<dual wielded> ",
   "<missile wielded>           ",
   "<worn as shield>              ",
   "<worn on body>      ",
   "<worn on back>      ",
   "<worn on about>      ",
   "<worn on waist>   ",
   "<worn on legs>  ",
   "<worn around ankle>  ",
   "<worn around ankle>  ",
   "<worn on feet>  ",
   "<BUG Inform Nivek>  ",
   "<BUG Inform Nivek>  ",
   "<BUG Inform Nivek>  "
};


Here's the Original:
char *const where_name[] = {
   "<used as light>     ",
   "<worn on finger>    ",
   "<worn on finger>    ",
   "<worn around neck>  ",
   "<worn around neck>  ",
   "<worn on body>      ",
   "<worn on head>      ",
   "<worn on legs>      ",
   "<worn on feet>      ",
   "<worn on hands>     ",
   "<worn on arms>      ",
   "<worn as shield>    ",
   "<worn about body>   ",
   "<worn about waist>  ",
   "<worn around wrist> ",
   "<worn around wrist> ",
   "<wielded>           ",
   "<held>              ",
   "<dual wielded>      ",
   "<worn on ears>      ",
   "<worn on eyes>      ",
   "<missile wielded>   ",
   "<worn on back>  ",
   "<worn over face>  ",
   "<worn around ankle>  ",
   "<worn around ankle>  ",
   "<BUG Inform Nivek>  ",
   "<BUG Inform Nivek>  ",
   "<BUG Inform Nivek>  "
};


So, the issue's that arise are:

1) A guard's ring for example is doned on the head now, being that's where the slot is, but I changed the "bv" number?

2) This is the only case I know of, but a pair of iron bracers that I wore before editing this code now are not recognized and create a bug(Log: [*****] BUG: wear_obj: uknown/unused item_wear bit 12 You can't wear, wield, or hold that), but I've looked at the slot and the item_wear are both fine to me.. so I'm missing something.

3) Just a visual aid to see what issue(s) I'm talking about I.E.

The guard is using:
<used as light> a torch
<worn on head> (Magical) (Glowing) a ring of the city guard
<worn on ears> an iron guard
<worn around neck> a crested breastplate
<worn around neck> an iron helm
<worn on arms> mail leggings
<worn around wrist> black boots
<worn around wrist> iron gauntlets
<worn on hands> chain sleeves
<wielded> an iron bracer
<missile wielded> a longsword
<worn as shield> the key to the northern gate of Darkhaven
<worn on about> an iron visor

This is all I got, thanks again!
       
Post is unread #2 May 25, 2008, 6:59 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

You will have to reset all of the equipment's wear locations using oset to get them to be worn in the correct spot now.
For example:
oset <ring> wear head finger
that should remove the head wear location and add the finger wear location.
       
Post is unread #3 May 25, 2008, 7:40 am
Go to the top of the page
Go to the bottom of the page

Crow
Fledgling
GroupMembers
Posts3
JoinedMay 25, 2008

All the equipment is on the correct wear flag, I.E. ring being finger and helm being head.
Now, when I was toying with it and switched ring to head, it went into the right slot, being <worn on finger>.
Yet, still says "You don a ring of the city guard upon your head."

Hm, It's closer though. A little.. lol.

The end result should be wearflag finger and "You wear a ring of the city guard on your <left/right> finger."
       
Post is unread #4 May 25, 2008, 12:12 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

The path of least resistance typically prevails, force the guard to remove all, and then wear all again. If they flags are all right like you say, he should put it on in the right order, if he does, All you need to do is install him in the right room again, and he'll spawn every time wearing the proper clothes. If that doesn't work something else is going on, and we'll need to investigate further.
       
Post is unread #5 May 25, 2008, 12:15 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

after replying, I realized what's going on.

You forgot to update the flag array in build.c to reflect the reordered flags.

Build.c near the top should be an array of names for the wear locations, make sure they all match up to your lists in mud.h
They should be called:
char *const w_flags[] = {
char *const item_w_flags[] = {
       
Post is unread #6 May 25, 2008, 1:40 pm
Go to the top of the page
Go to the bottom of the page

Crow
Fledgling
GroupMembers
Posts3
JoinedMay 25, 2008

Alright, I edited those two files in build.c and it completely mixed up the order of wearing. So, I replace my modified version with the original to see if there was something else I can do, but even after "make" in putty and "hotboot" in the game, the equip remains the same as the modified version. Is there a better command to reset/restart things to where they are default?

Code wise, I did this:
char *const w_flags[] = {
   "take", "finger", "neck", "body", "head", "legs", "feet", "hands", "arms",
   "shield", "about", "waist", "wrist", "wield", "hold", "_dual_", "ears", "eyes",
   "missile", "back", "face", "ankle", "r4", "r5", "r6",
   "r7", "r8", "r9", "r10", "r11", "r12", "r13"
};

char *const item_w_flags[] = {
   "take", "finger", "finger", "neck", "neck", "body", "head", "legs", "feet",
   "hands", "arms", "shield", "about", "waist", "wrist", "wrist", "wield",
   "hold", "dual", "ears", "eyes", "missile", "back", "face", "ankle", "ankle",
   "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13"
};


Here's the modified(my) version:
char *const w_flags[] = {
   "take", "head", "eyes", "ears", "face", "neck", "arms", "wrist", "hands",
   "finger", "hold", "wield", "_dual_", "missile", "shield", "body", "back", "about",
   "waist", "legs", "feet", "ankle", "r4", "r5", "r6",
   "r7", "r8", "r9", "r10", "r11", "r12", "r13"
};

char *const item_w_flags[] = {
   "take", "head", "eyes", "ears", "face", "neck", "neck", "arms", "wrist",
   "wrist", "hands", "finger", "finger", "hold", "wield", "dual", "missile",
   "shield", "body", "back", "about", "waist", "legs", "feet", "ankle", "ankle",
   "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13"
};


Earlier, I posted from mud.h where it has the "BV#" and Item_Wear_example. I was trying things and switched the numbers around, so I'm working with this now:
/*
 * Wear flags.
 * Used in #OBJECTS.
 */
#define ITEM_TAKE		BV00
#define ITEM_WEAR_HEAD     	BV04
#define ITEM_WEAR_EYES		BV17
#define ITEM_WEAR_EARS		BV16
#define ITEM_WEAR_FACE		BV20
#define ITEM_WEAR_NECK		BV02
#define ITEM_WEAR_ARMS		BV08
#define ITEM_WEAR_WRIST		BV12
#define ITEM_WEAR_HANDS		BV07
#define ITEM_WEAR_FINGER	BV01
#define ITEM_HOLD		    BV14
#define ITEM_WIELD		    BV13
#define ITEM_DUAL_WIELD		BV15
#define ITEM_MISSILE_WIELD  BV18
#define ITEM_WEAR_SHIELD 		    BV09
#define ITEM_WEAR_BODY		BV03
#define ITEM_WEAR_BACK		BV19
#define ITEM_WEAR_ABOUT		BV10
#define ITEM_WEAR_WAIST 	BV11
#define ITEM_WEAR_LEGS		BV05
#define ITEM_WEAR_ANKLE		BV21
#define ITEM_WEAR_FEET		BV06
#define ITEM_WEAR_MAX		21


End Result: I can't really fix the screw now due to the "make" issue and/or "hotboot", but it definantly affects things and I need to look more at which it affected and what should be done about it. Staying positive and keepin' the faith :P Thanks!
       
Post is unread #7 May 25, 2008, 1:45 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I'm pretty sure that when I rearranged mine, I didn't touch the order of the flags. I can look at how I did it a little later on, and get back to you. :)
       
Post is unread #8 May 25, 2008, 2:43 pm
Go to the top of the page
Go to the bottom of the page

eldhamud
Fledgling
GroupMembers
Posts45
JoinedFeb 16, 2006

This wont be much of a help to fixing the problem, tho, changing of wear locations n a MUD with zones is something not to be taken lightly, i know i did this in an early incarnation of eldhamud and found that every mob in the game was wearing things in the wrong spot. The only fix for that as i remember is to goto each mob, force them to remove all and wear all and then instaroom the resets back into place.

In all, this is going to be a whole lot of pain for very little gain. Actually i think i hacked up the load_mob func to do the rem,wear thing then i folded each zone.
       
Post is unread #9 May 25, 2008, 3:04 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Been awhile since I did this in LoP, but I went with changing how the area file format was saved etc... before I changed them (I think) and it auto set all the wear locations and all back up correctly etc... Didn't really have any areas so not sure if I would have had to fix the resets like eldhamud did or not. I don't think it would really be worth it to just change the locations around, I added alot etc... so figured why not since I'm already in there messing with it anyways lol.
       
Post is unread #10 May 25, 2008, 4:44 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

That's why I did it on MW as well, Remmy. I was adding some, renaming others, getting rid of some, and I figured I'll just move them around to make logical sense while I'm at it.
       
Pages:<< prev 1 next >>