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 ➜ new languages

new languages

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


Posted by Vaelarin   USA  (8 posts)  Bio
Date Wed 01 May 2002 05:53 AM (UTC)
Message
Hi, new to the forums - nice site :)

So, the problem I'm having is with adding a new language. I created a language for the drow race, called drow. I'm running Smaug 1.4, linux. I used the gnome language fix as a guide:

In act_comm.c I added LANG_DROW to the lang_array[], and "drow" to lang_names.

In mud.h I added #define LANG_DROW BV21 /* drow language */ , and also added it to the VALID_LANGS section, at the end as ... LANG_GNOMISH | LANG_DROW ).

I did make clean, and make. I created the skill for it, set it as a tongue, set guild -1, saved the skill table, shutdown, and added it manually to each class file. Did make clean, make again, and booted the mud.

Now, the problem I'm having is that I don't know a number for it so I can add it to the drow.race file - and setting it online via "setrace drow language drow" does nothing, even when I "setrace drow save" afterwards. So new drow start with only common. Logged on as my level 65, I tried to "mset bob speaks drow" and I get a system message that says, "Players may not know drow". I can walk the test character north to the language teacher, who I added the language to, and the player can learn it there.

Is there someway to change this so I don't get the system message that players cannot learn the language, and so that I can have drow start with it at creation? Same goes for the preexisting langs such as spiritual - I can change the name, etc, but the same thing happens when I try to give it to a player.

Thanks for any help.
Top

Posted by Vaelarin   USA  (8 posts)  Bio
Date Reply #1 on Wed 01 May 2002 09:30 AM (UTC)

Amended on Sat 04 May 2002 01:12 PM (UTC) by Vaelarin

Message
wow, ok it took me 4 hours but I figured this out. I thought I'd post it here in case anyone else has a problem with this. It also affects the gnome languge fix that is available on the internet.

To create a new language:

in act_comm.c =

find lang_array[ ] add the new language just before LANG_UNKNOWN in: LANG_CLAN, LANG_GITH, LANG_UNKNOWN };
find lang_names[ ] add the new language just after "gith", in "clan", "gith", "" ];

in mud.h =

find #define LANG_GITH BV19 /* Gith language */
and after it, add #define LANG_DROW BV20 /* Drow language */
find #define VALID_LANGS and add LANG_DROW at the end, so that it reads LANG_GITH | LANG_DROW )

ok - this is what the available gnome language fix says to do. but I found that if you do this, when you try to give a new char the language, whether its gnome or drow or whatever, the game bugs and gives them only common. It also sends a "Players are not able to learn drow" message if you try to mset it. You also need to do this:

in mud.h =

find extern sh_int gsn_gith and add extern sh_int gsn_drow beneath it, following the same pattern.

then in build.c around line 2847, find VALID_LANG and add LANG_DROW to the end of the list, just the same as in mud.h
and, do the same in mpxset.c around line 957. There is a third (total) VALID_LANG chart here.

Without these, the language will not be given to players at creation.

******************
Edited to add this
******************
two more places, if you want it all nice and clean:

in db.c =
around line 193 add gsn_drow to the list of other languages,
around line 636, add assign_gsn( gsn_drow, "drow" );

in tongues.dat =
add the new language to the list at the very top

******************

Then, make clean. Then make. Boot the mud, logon, and do:
sset create skill drow
slookup drow
sset (whatever sn it is) type tongue
sset guild -1
sset save skill table

Then you have to add the language to every class file, and change the min level from 0 to 1 in skills.dat.

The language number for the race file is 2 to the power of the BV # of the language.
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.


11,023 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.