How do I delete all of the current races in stock SWR 1.0 code and replace them with my own? I am building a Stargate MUD and for now all I want is just Human, Gou'ald, and Tokra.
Deleting/Creating new races with SWR 1.0
Posted by VIVIX on Tue 05 Nov 2002 03:57 AM — 11 posts, 40,712 views.
just looking at the code quick it looks like you'd have to change mud.h and get rid of all the races and in const.c edit the race table to suit your 3 new races.. you might want to change the language section also :p those look like th e2 major sections taht need to be changed
I just tried editing mud.h and const.c, what happened was a bunch of errors out of control. I also tried replacing all RACE_WOOKIE, wookie, LANG_WOOKIE with TOKRA. It compiled completely with everything changed and then I logged onto the mud with a new char to see if I could choose tokra, but wookie was still there?!? Any body tried this or know what to do?
I've done this on my own and what you really need to do is change them in const.c, but don'y forget to change the NPC races along with the other ones because otherwise when you type score then it will still come up with wookiee (its a few lines down below the race table). Then you need to go into comm.c and change nanny.c. In the first for loop right under "You may choose from the following races:" you need to change the loop from:
to:
After that go down a ways and find ch->race = iRace;
Above that (a few lines up) will be another for loop looking just like the other one. So just change if from:
to
Then go down a little and find:
and change that to:
Of course you could always just change MAX_RACE to 4 instead of that. Another thing to be aware if is the whole hutt's don't wear pants and everything. I don't really remember where that is but you may want to comment it out. Also be sure that if you want eveyone to start off knowing the same language then change the language in const.c from LAN_(whatever) to LANG_COMMON.
If you need further help then just ask me because I would be more then happy to help you.
for ( iRace = 0; iRace < MAX_RACE; iRace++)
to:
for ( iRace = 0; iRace < 3; iRace++)
After that go down a ways and find ch->race = iRace;
Above that (a few lines up) will be another for loop looking just like the other one. So just change if from:
for ( iRace = 0; iRace < MAX_RACE; iRace++ )
to
for ( iRace = 0; iRace < 3; iRace++ )
Then go down a little and find:
if ( iRace == MAX_RACE
and change that to:
if ( iRace == 4
Of course you could always just change MAX_RACE to 4 instead of that. Another thing to be aware if is the whole hutt's don't wear pants and everything. I don't really remember where that is but you may want to comment it out. Also be sure that if you want eveyone to start off knowing the same language then change the language in const.c from LAN_(whatever) to LANG_COMMON.
If you need further help then just ask me because I would be more then happy to help you.
i am doing the same thing he has done, but i have changed the all the original races.. and changed all there languages to different ones but the languages aint working.. i changed the languages in act_comm.c where it says lang_names but it aint working to well, i keep getting [*****] BUG: Nanny: invalid racial language.
any suggestion?
any suggestion?
Heh, been there done that. :)
Make sure you change EVERY instance of any language code in all the files. And make sure you changed it all in mud.h too. Let me whip out my code here and find some places that might need to be changed.
Note: My codebase might have it in different spots then yours.
Alright, now, all I did is search for the languages I've got.
grep -i "LANG_SENTRAN" *.c *.h
Note: I would suggest not changing LANG_COMMON, that could lead to some nasty problems.
So by the looks of it, you need to change mud.h so that you have each one defined right, the VALID_LANGS so it has every one that you need. Make sure all races on const.c have the right language set to it. Make sure you change it in build.c so you can set your mob's correctly. And then you've already changed act_comm.c, so just recheck everything. For simplicity in my code, I made all valid_lang's and lang_array (mud.h/build.c/act_comm.c) follow the same order (common/sunrunner/sentran/nevekian). Don't forget that you must NOT delete LANG_CLAN and LANG_UNKOWN. They are vital to the whole language process. Anyways, hope that helpped, if that didn't I'll just explain the entire process on how to change languages in SWR 1.0. Also make sure you change the for loops in comm.c to fit your mud, not just whats described here.
Make sure you change EVERY instance of any language code in all the files. And make sure you changed it all in mud.h too. Let me whip out my code here and find some places that might need to be changed.
Note: My codebase might have it in different spots then yours.
Alright, now, all I did is search for the languages I've got.
grep -i "LANG_SENTRAN" *.c *.h
act_comm.c:int const lang_array[] = { LANG_COMMON, LANG_SUNRUNNER, LANG_SENTRAN, LANG_NEVEKIAN, LANG_CLAN, LANG_UNKNOWN };
build.c: int valid_langs = LANG_COMMON | LANG_SUNRUNNER | LANG_SENTRAN | LANG_NEVEKIAN;
const.c: "Sentran", 0, 1, 4, 1, 6, -1, -1, 0, 0, 15, 0, 0, 0, 0, LANG_SENTRAN
[odis@percy src]$ grep -i "LANG_SENTRAN" *.c *.h
act_comm.c:int const lang_array[] = { LANG_COMMON, LANG_SUNRUNNER, LANG_SENTRAN, LANG_NEVEKIAN, LANG_CLAN, LANG_UNKNOWN };
build.c: int valid_langs = LANG_COMMON | LANG_SUNRUNNER | LANG_SENTRAN | LANG_NEVEKIAN;
const.c: "Sentran", 0, 1, 4, 1, 6, -1, -1, 0, 0, 15, 0, 0, 0, 0, LANG_SENTRAN
mud.h:#define LANG_SENTRAN BV02 /* Sentrans */
mud.h:#define VALID_LANGS ( LANG_COMMON | LANG_SUNRUNNER | LANG_SENTRAN | LANG_NEVEKIAN )
Note: I would suggest not changing LANG_COMMON, that could lead to some nasty problems.
So by the looks of it, you need to change mud.h so that you have each one defined right, the VALID_LANGS so it has every one that you need. Make sure all races on const.c have the right language set to it. Make sure you change it in build.c so you can set your mob's correctly. And then you've already changed act_comm.c, so just recheck everything. For simplicity in my code, I made all valid_lang's and lang_array (mud.h/build.c/act_comm.c) follow the same order (common/sunrunner/sentran/nevekian). Don't forget that you must NOT delete LANG_CLAN and LANG_UNKOWN. They are vital to the whole language process. Anyways, hope that helpped, if that didn't I'll just explain the entire process on how to change languages in SWR 1.0. Also make sure you change the for loops in comm.c to fit your mud, not just whats described here.
I have changed all the languages and all it is showing is the first one in the MUD. The races work good, but only common shows up in the list.
Did you add them to the skills list? You need to do that. Go in and copy common or just do it online. There is a special setting...tongue or language or some such I believe.
I already did that. I have tried everything AND the kitchen sink (through it did not help).
Make sure you do a full recompile. They can fix quirky things like this. And reboot, obviously. Beyond that, maybe you missed something code wise, I'm not really sure.
I think tommorow I will just start over from the stock source.