[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Deleting/Creating new races with SWR 1.0
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Deleting/Creating new races with SWR 1.0

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


Posted by VIVIX   (16 posts)  [Biography] bio
Date Tue 05 Nov 2002 03:57 AM (UTC)
Message
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.
[Go to top] top

Posted by Typhon   USA  (112 posts)  [Biography] bio
Date Reply #1 on Tue 05 Nov 2002 02:41 PM (UTC)
Message
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
[Go to top] top

Posted by VIVIX   (16 posts)  [Biography] bio
Date Reply #2 on Tue 05 Nov 2002 09:45 PM (UTC)
Message
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?
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #3 on Sun 12 Jan 2003 12:15 PM (UTC)

Amended on Tue 03 Feb 2009 01:56 AM (UTC) by Nick Cash

Message
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:

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.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Zayne   (2 posts)  [Biography] bio
Date Reply #4 on Wed 30 Jul 2003 02:50 AM (UTC)
Message
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?
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #5 on Sat 02 Aug 2003 01:28 AM (UTC)
Message
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


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.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Miked   USA  (30 posts)  [Biography] bio
Date Reply #6 on Sat 09 Jul 2005 01:21 PM (UTC)
Message
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.
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #7 on Sat 09 Jul 2005 10:31 PM (UTC)
Message
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.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Miked   USA  (30 posts)  [Biography] bio
Date Reply #8 on Sat 09 Jul 2005 10:56 PM (UTC)
Message
I already did that. I have tried everything AND the kitchen sink (through it did not help).
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #9 on Sun 10 Jul 2005 05:24 AM (UTC)
Message
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.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Miked   USA  (30 posts)  [Biography] bio
Date Reply #10 on Sun 10 Jul 2005 05:29 AM (UTC)
Message
I think tommorow I will just start over from the stock source.
[Go to top] 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.


8,793 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]