Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Languages and Races and Extending Bitvectors (http://www.topmudsites.com/forums/showthread.php?t=4788)

Shoie13 03-02-2008 01:02 AM

Languages and Races and Extending Bitvectors
 
This topic involves races and languages and bitvectors, and how to extend them. I'm using a modified version of SWRFUSS.

Anyway, I wanted to extend races and languages so I could have more than 32, since bitvectors stop at 32. I tried putting them in a typedef enum table, and while it seemed to work for races, languages had several problems, such as not showing up on the LANGUAGES command, and mobs reporting that they were trying to speak a null language.

I think the problem originated somewhere around LANG_UNKNOWN.


Here's how it originally looks:
Here is how I had it:
[/font]

I also tried commenting out the define for LANG_UNKNOWN and tried putting it in the table:
That stopped most of the bug spam about null languages, although most mobs then spoke several languages, and one mob was still reporting a null language, and my ch->speaking and ch->speaks was negative. Anyway, my question is, is there any other way to easily extend the bitvectors so I can have virtually unlimited race and language creation abilitites, or a way to fix the languages to work in a typedef enum table? Thanks in advance.

Samson 04-11-2008 09:40 PM

Re: Languages and Races and Extending Bitvectors
 
The enum you have defined will work for the flags, but you need to keep that VALID_LANGS listing as well. In the code where languages are actually set on the player, they need to be switched from SET_BIT to xSET_BIT in order to pass 32. But that also means you'll need to get extended bitvector support coded into SWR to begin with since it doesn't usually have it.


All times are GMT -4. The time now is 07:05 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022