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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Mysterious Wearloc issues

Mysterious Wearloc issues

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


Posted by Dralnu   USA  (277 posts)  Bio
Date Wed 04 May 2005 08:59 PM (UTC)

Amended on Wed 04 May 2005 09:00 PM (UTC) by Dralnu

Message
I added three wearlocs (sheath, float, and over shoulder), changed the names of some of the previous wearlocs (fingers, ankles, wrist) to add in left and right. I modified everything I should have, I'm sure, but in the game I still get
<worn on finger>
<worn on finger>
<worn on wrist>
<worn on wrist>
I modified act_info and the list there, the race files have no wearlocs, nor do classes. Help?
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #1 on Wed 04 May 2005 10:35 PM (UTC)
Message
Also, I added the flags to build.c, and you cann't add the new wearlocs to anything, either...
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #2 on Tue 31 May 2005 11:58 PM (UTC)
Message
For future refrence, anyone using Windows with Cygwin to compile, don't copy the smaug.exe. Instead, as Nick's FAQ says, from Smaug/area

../src/smaug &

That will help because the whole thing won't change on remake.
Top

Posted by Kasji   (35 posts)  Bio
Date Reply #3 on Thu 02 Jun 2005 02:03 AM (UTC)
Message
the where_location array that contains wear_loc strings for show_char_to_char and do_eq is connected to the wear_loc enumeration in mud.h

IE: typedef enum {..., wear_holster=25, ...};

is connected to the where_location array.
so where_location[25] should hopefully be "<holster>"

As for the wear_flag, in build.c...

w_flag[x] is used as 1 << x...
so if w_flag[8] = "holster", then 1 << 8 is my holster BV, and in mud.h I need to have my ITEM_HOLSTER wear flag set as BV08

#define ITEM_HOLSTER BV08

I assume you're not using extended bitvectors...

Once you have this, you need to modify wear_obj to know how to handle your ITEM_HOLSTER wear flag, and depending on how different this piece of equipment is, you might just be able to copy an already existant segment from wear_obj and modify it to your desire.

I hope this was helpful.
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #4 on Sun 05 Jun 2005 08:18 PM (UTC)
Message
Not really, and it was really late. Only thing with wearlocs I might deal with now is an actual use for sheaths, and I think I know where to get that kind of thing
Top

Posted by Gatewaysysop2   USA  (146 posts)  Bio
Date Reply #5 on Mon 06 Jun 2005 01:55 AM (UTC)
Message
Quote:

Not really, and it was really late.


Heh. And people wonder how they earn the moniker of "ingrate".

"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
Top

Posted by Orik   USA  (182 posts)  Bio
Date Reply #6 on Mon 30 Jul 2007 04:32 AM (UTC)
Message
Sorry to dredge this up, but I have questions on this.

Quote:

the where_location array that contains wear_loc strings for show_char_to_char and do_eq is connected to the wear_loc enumeration in mud.h

IE: typedef enum {..., wear_holster=25, ...};

is connected to the where_location array.
so where_location[25] should hopefully be "<holster>"

As for the wear_flag, in build.c...

w_flag[x] is used as 1 << x...
so if w_flag[8] = "holster", then 1 << 8 is my holster BV, and in mud.h I need to have my ITEM_HOLSTER wear flag set as BV08

#define ITEM_HOLSTER BV08

I assume you're not using extended bitvectors...

Once you have this, you need to modify wear_obj to know how to handle your ITEM_HOLSTER wear flag, and depending on how different this piece of equipment is, you might just be able to copy an already existant segment from wear_obj and modify it to your desire.

I hope this was helpful.


What's the difference between w_flags and item_w_flags?

w_flags correspond to ITEM_WEAR_loc and item_w_flags correspond to wear_locations in mud.h? Then you have to have your where_name in act_info to match up exactly to wear_locations in mud.h correct?
Top

Posted by Orik   USA  (182 posts)  Bio
Date Reply #7 on Tue 31 Jul 2007 03:32 AM (UTC)
Message
Ok, so i believe I've figured it all out. But now the only problem is in the writing of the race file. Whenever a new wear location or if I switch the locations around for a better top down list, it doesn't change in the race files. Whenever I load the game, it doesn't delete the old wherenames in the race file and rewrite the new list.


            if( !str_cmp( word, "WhereName" ) )
            {
               if( ra < 0 || ra >= MAX_RACE )
               {
                  char *tmp;

                  bug( "%s: Title -- race bad/not found (%d)", __FUNCTION__, ra );
                  tmp = fread_string_nohash( fp );
                  DISPOSE( tmp );
                  tmp = fread_string_nohash( fp );
                  DISPOSE( tmp );
               }
               else if( wear < MAX_WHERE_NAME )
               {
                  DISPOSE( race->where_name[wear] );
                  race->where_name[wear] = fread_string_nohash( fp );
                  ++wear;
               }
               else
                  bug( "load_race_file: Too many where_names" );
               fMatch = TRUE;
               break;
            }
 


So I open up one of my race files and it has the old where locations in it. I load up the game and then open up the race file and the wear locations are the same. The only time I can make the changes is when I go into the race file and manually delete the wherenames before I load the game up. Anyone else have this problem? Is there a fix to it? I believe this has been a problem since 1.4 FUSS, I believe. I know I've had the problem in the past with the update wherenames not showing up.
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.


25,417 views.

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.