Register forum user name 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 ➜ Area Editor ➜ General ➜ Using 'Area Editor' to equip a mobile with objects - An anomaly (I think)

Using 'Area Editor' to equip a mobile with objects - An anomaly (I think)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Nallen   USA  (8 posts)  Bio
Date Fri 28 Sep 2007 02:35 AM (UTC)
Message
Hello,
I searched for this in the forums here, but only found something somewhat related; namely adding and changing wear locations. I don't think that explains this situation because objects work fine for players. Anyhow let me get to the point. So I setup and mobile and place it in a room. I create an object and set the wear flags to take and wield. I then select the room menu, select the room in which the mobile is in, select the mobile in the 'references' box, and then click the 'equip' button. Oddly the object doesn't appear.

I've also tested some other objects with different wear flags and got strange results roughly 75% of the time. Ie. Hats on hands, chestplates on fingers, etc.

Again, the objects work for players, just not for mobiles.

- Any hints?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Fri 28 Sep 2007 02:51 AM (UTC)
Message
Does this happen on any area?

What codebase are you using?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nallen   USA  (8 posts)  Bio
Date Reply #2 on Fri 28 Sep 2007 03:18 AM (UTC)
Message
I'm using SMAUG 1.4a.

This happens in any area that I load.
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #3 on Fri 28 Sep 2007 02:50 PM (UTC)
Message
This, to me, sounds like there are some wear locations missing from the data files or they are in the wrong order or have some other information is missing/incorrect.

Cross reference the wear locations in the dat file with the locations in your source and make sure they match up.
Top

Posted by Hanaisse   Canada  (114 posts)  Bio
Date Reply #4 on Sat 29 Sep 2007 02:28 PM (UTC)
Message
Have you gone through all the steps? You stopped describing after the 'equip' box so not sure what you're doing after that.

1. Select mob in reference box of room
2. Click equip
3. From pop-up - choose object - OK
4. From next pop-up - equip at what location?, choose the location from the drop down box. There are 26 choices of location in stock 1.4a - OK

That done you should see this in reference box:

Mobile: #10361 a brownie
-- Equip: #10313 a finely honed sword (Wield) <-- this indicating the selected location

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
Top

Posted by Nallen   USA  (8 posts)  Bio
Date Reply #5 on Sun 30 Sep 2007 05:08 PM (UTC)
Message
Thanks for your replies. I have in fact checked whether the area editor config file matches what my src has.

Darwin - For the most part everything looks good. I've found that act_info.c, act_obj.c, build.c, grub.c, handler.c, and mud.h all have references to the wear locations and again they look consistent and also in the same order. However, some files have two references to a wear location, such as build.c that has two ankles spots, etc. in the 'cont wear_loc' (roughly line 180) - I'm not sure which files need these dual spots, but then again I haven't altered the code to the point where I would have added extra spots. Since my players can use the equipment effectively, I don't understand why the mobs can't. The area editor config file contains a '#WEAR' reference and a '#WEARLIST.' What are the differences?

Hanaisse - After I've selected the mob in the reference box of a room and clicked equip, only certain objects are available to choose from. Headgear and other armor is usually available to equip, but when I save the area and run the mud, I exam the mob and those equipped objects are typically on the wrong wear location. So the issue is really two-fold; Certain objects do not appear in the said reference box, despite the proper wear flags set (such as wield), and also the objects that can be equipped are typical equipped on the wrong location in-game.
Top

Posted by Darwin   USA  (125 posts)  Bio
Date Reply #6 on Mon 01 Oct 2007 02:34 AM (UTC)
Message
#WEAR
These are the locations where an item can be worn, a very generic location. These can be combined to allow items to be worn in multiple locations. Any item you want a player to be able to pick up must have the TAKE flag. If you want them to be able to wear it then it must also have an appropriate location in addition to it. For room items, such as donation pits, you would probably not want any WEAR flags on it.

#WEARLIST
These are the names of specific wear locations. For instance, a character can wear two rings, but not on the same finger, therefor you have Finger-L and Finger-R. This is the list that you choose where to equip an item on a mob. For instance, you can specifically equip a certain ring on a mob's left and/or right fingers.

Since you say that your players can wear the items in the correct locations, my guess would be that the locations in your #WEARLIST section are in an incorrect order or there is something missing or extra.

Check the order of the list against the order in which they appear in your header file. The list in mine starts like this:
/*
 * Equpiment wear locations.
 * Used in #RESETS.
 */
typedef enum
{
  WEAR_NONE = -1, WEAR_LIGHT = 0,
...
MAX_WEAR
} wear_locations;
Top

Posted by Nallen   USA  (8 posts)  Bio
Date Reply #7 on Sun 07 Oct 2007 07:12 PM (UTC)
Message
Thanks for that information on the config file . . . that was helpful.

The #WEARLIST portion of my config file was indeed off. It was identical to the #WEAR portion of the file oddly. So I modified it and set the order exactly as the #RESETS portion of mud.h is set. Unfortunately this didn't fix the issue. I take it the fields don't have to match letter by letter though, correct? In other words -

mud.h states:
WEAR_L_EAR


and

config.dat states:
EAR-L


The order is the same, but both fields state the 'left ear' differently. Do they have to match verbatim?

Also, along the lines of what Hanaisse stated about the equipping process . . . His step 3 is where I'm hung up. Certain objects with the correct wear attributes don't appear in the 'choose object' box. I have noticed that objects with wear fields up to the ankles are equipable/pickable, but everything after that will not appear in this 'choose object' box. My ITEM_WEAR_MAX is set to 32 as well; which should be enough.

Here is my wear location list used in #RESETS:

WEAR_NONE = -1, WEAR_LIGHT = 0, WEAR_HEAD, WEAR_FACE, WEAR_EYES, WEAR_L_EAR, WEAR_R_EAR, WEAR_NECK, WEAR_L_SHOULDER, WEAR_R_SHOULDER, WEAR_BODY, WEAR_BACK,
WEAR_CHEST, WEAR_TORSO, WEAR_ARMS, WEAR_L_WRIST, WEAR_R_WRIST, WEAR_L_HAND, WEAR_R_HAND, WEAR_L_FINGER, WEAR_R_FINGER, WEAR_WAIST, WEAR_LEGS, WEAR_L_ANKLE,
WEAR_R_ANKLE, WEAR_FEET, WEAR_ABOUT, WEAR_SHIELD, WEAR_WIELD, WEAR_DUAL_WIELD, WEAR_MISSILE_WIELD, WEAR_HOLD,
MAX_WEAR
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 07 Oct 2007 11:45 PM (UTC)
Message
The wording isn't important - it is the number which is. This is the default setting for #WEARLIST from the source of the Area Editor:


static char * wear_table [] =
{
"(none)=-1", "Light", "Finger-L", "Finger-R", "Neck-1", "Neck-2", "Body", "Head", "Legs",
"Feet", "Hands", "Arms", "Shield", "About", "Waist", "Wrist-L", "Wrist-R",
"Wield", "Hold", "Dual Wield", "Ears", "Eyes", "Missile Wield",
"Back", "Face",  "Ankle-L", "Ankle-R",
NULL
};


This has to agree, by position, to mud.h, so for example "Finger-L" will be 1 (from the table) which agrees with this from my copy of mud.h:


/*
 * 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;


In the smaugconfig.dat file the #WEARLIST section is explicitly present:


#WEARLIST

(none)=-1
Light
Finger-L
Finger-R
Neck-1
Neck-2
Body
Head
Legs
Feet
Hands
Arms
Shield
About
Waist
Wrist-L
Wrist-R
Wield
Hold
Dual Wield
Ears
Eyes
Missile Wield
Back
Face  
Ankle-L 
Ankle-R
End


Note that the order is the same as in mud.h.

Based on what you posted as your own mud.h wearlist enum, your config.dat file should have something like this:


#WEARLIST

(none)=-1
Light
Head
Face
Eyes
L-Ear
R-Ear
Neck
L-Shoulder
R-Shoulder
Body
Back
Chest
Torso
Arms
L-Wrist
R-Wrist
L-Hand
R-Hand
L-Finger
R-Finger
Waist
Legs
L-Ankle
R-Ankle
Feet
About
Shield
Wield
Dual Wield
Missile Wield
Hold
End




- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nallen   USA  (8 posts)  Bio
Date Reply #9 on Mon 08 Oct 2007 01:08 AM (UTC)
Message
Thank you Nick. I had a feeling the number was the important aspect.

My config.dat file is exactly as you have stated, but somehow the issue still persists.

Could this have something to do with the setup of the mob? Perhaps the mob cannot equip past a certain number . . .
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #10 on Mon 08 Oct 2007 01:13 AM (UTC)
Message
Have you made sure in the configuration (File menu) that it is actually reading your config.dat file?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nallen   USA  (8 posts)  Bio
Date Reply #11 on Mon 08 Oct 2007 01:08 PM (UTC)
Message
I have selected the file I've modified via the preferences box. I'm almost positive area editor is using the file because certain things I've added are listed. Default object and mobile descriptions appear as I've modified; This should confirm the file is being used.

I renamed that file to 'Andarasmaugconfig.dat' to help me keep track of which config file I need to use. That filename wouldn't make a difference . . . or would it?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #12 on Mon 08 Oct 2007 09:12 PM (UTC)

Amended on Mon 08 Oct 2007 09:31 PM (UTC) by Nick Gammon

Message
The file name won't matter, and you seemed to have confirmed you are using it.

Let's work through this. As a test, I added a new wearlocation to my standard smaugconfig.dat, like this:


#WEARLIST

(none)=-1
Light
Finger-L
Finger-R
Neck-1
Neck-2
Body
Head
Legs
Feet
Hands
Arms
Shield
About
Waist
Wrist-L
Wrist-R
Wield
Hold
Dual Wield
Ears
Eyes
Missile Wield
Back
Face  
Ankle-L 
Ankle-R
Nose
End


The new location is "nose" which is item 26 on the list (Light being zero, and so on).

I then went into the Area Editor and made sure it read this file. I opened manor.are which ships with the Area Editor, went into the Rooms part of the tree control, and selected room 2406 (which already equips mob 2407 - a collie - with 2427 (a gem encrusted dog collar).

I selected the collie and clicked the Equip button. From the list of items I selected 2402 (a wooden spoon) - which was the first in the list - and clicked OK. A second dialog box appears "Equip at which location", and this had "nose" on the list. I selected "nose" as the location. I then saved the file. I edited the file in a text editor and saw this:


#RESETS
D 0 2400 0 1  ; Door: #2400 The Main Gate/north => closed
D 0 2401 0 1  ; Door: #2401 Before the Front Door/north => closed
D 0 2401 2 1  ; Door: #2401 Before the Front Door/south => closed
O 1 2403 1 2403  ; Object: #2403 a well => #2403 West of the Front Door
M 0 2407 1 2406  ; Mob: #2407 a collie => #2406 The Foyer
E 1 2402 1 26  ; -- Equip: #2402 a wooden spoon (nose)
E 1 2427 1 3  ; -- Equip: #2427 a gem encrusted dog collar (neck-1)
D 0 2406 2 1  ; Door: #2406 The Foyer/south => closed
D 0 2406 5 1  ; Door: #2406 The Foyer/down => closed


It appears to have correctly equipped the item 2402 onto mob 2406 at location 26. So as far as I can see, everything is working. Maybe if items are not showing up correctly ingame there is a problem at the server side.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #13 on Mon 08 Oct 2007 09:34 PM (UTC)
Message
I would also check the "wear flags" for the object. In my test case selecting the object "wooden spoon" (in the Objects section of Area Editor) - nose is not on the list of wear flags. I suspect this may be a contributing factor.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nallen   USA  (8 posts)  Bio
Date Reply #14 on Mon 08 Oct 2007 11:21 PM (UTC)
Message
I confirmed your test too.

I'm beginning to think the issue is not with the #WEARLIST because when I can in fact select an object to equip, the correct wearlist appears and the object is equipped accordingly.

I believe the issue is in #WEAR. I found that when comparing the standard config file to my config file, I see this:
smaugconfig.dat
#WEAR

Flag01    Take
Flag02    Finger
Flag03    Neck
Flag04    Body
Flag05    Head
Flag06    Legs
Flag07    Feet
Flag08    Hands
Flag09    Arms
Flag10    Shield
Flag11    About
Flag12    Waist
Flag13    Wrist
Flag14    Wield
Flag15    Hold
Flag16    Dual
Flag17    Ears
Flag18    Eyes
Flag19    Missile
End

Andarasmaugconfig.dat
#WEAR

Flag01    Take
Flag02    Light
Flag03    Head
Flag04    Face
Flag05    Eyes
Flag06    Ear
Flag07    Neck
Flag08    Shoulder
Flag09    Body
Flag10    Back
Flag11    Chest
Flag12    Torso
Flag13    Arms
Flag14    Wrist
Flag15    Hand
Flag16    Finger
Flag17    Waist
Flag18    Legs
Flag19    Ankle
Flag20    Feet
Flag21    About
Flag22    Shield
Flag23    Wield
Flag24    Dual_Wield
Flag25    Missile_Wield
Flag26    Held
End 

Notice that my list is longer by 7 lines. The ultimate problem I'm having is that all objects with a wear flag after 'flag19' do not appear in the 'Choose object' box after clicking the equip button. Maybe this is built into area editor? I hope I explained that fully. Please let me know if you'd like step by step.
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.


64,320 views.

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

It is now over 60 days since the last post. This thread is closed.     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.