Language Creation Issues (SMAUG FUSS 1.6)

Posted by DaiusStryker on Fri 04 Aug 2006 06:44 AM — 14 posts, 46,794 views.

#0
As hard to admit as it is.. I seem to have a problem creating a language and I can't seem to find the help i'm looking for.

** What I have done **
act_comm.c
I added LANG_DEMONIC before LANG_UNKNOWN.

Then added LANG_DEMONIC go to the lang_names which is just below lang_array and right before ""

Then in mud.h
I added the #define and the number and | LANG_DEMONIC |

Then I recompiled the mess.
I logged into the game and from my Wizard account

sset create skill demonic
sset demonic type tongue
sset demonic guild -1
sset demonic code spell_null
sset save skill table
setrace demon language daemonic
but here is there the error is. After the setrace line it gives me "Player races may not speak demonic.
Racial language set."

and i'm at a loss at why this would be!
USA #1
I'm not sure offhand, but you can look at the code where it says "Player races may not speak" and see what the ifcheck is.
#2
ok, i found another section with languages in MUD.h they were around line 2850

/* Language gsns. -- Altrag */
extern short gsn_common;
extern short gsn_elven;
extern short gsn_dwarven;
extern short gsn_pixie;
extern short gsn_ogre;
extern short gsn_orcish;
extern short gsn_trollish;
extern short gsn_goblin;
extern short gsn_halfling;

and so I added
extern short gsn_demonic;
extern short gsn_angelic;

but this didn't help either.....
I attempted to put the built in language of "God" in as the racial language.. but I got the same problem. BUT! if I use the basic languages of the normal races I get no such error.

The if statement for is located in act_wiz.c around line 7973 reads as such

 {
         if( !( value &= VALID_LANGS ) )
            ch_printf( ch, "Player races may not speak %s.\n\r", arg3 );
      }


The only valid section for the VALID_LANGS I could locate was in MUD.h after the languages are given their BV Numbers (around line 845 in my code).


#define VALID_LANGS    ( LANG_COMMON | LANG_ELVEN | LANG_DWARVEN | LANG_PIXIE  \
| LANG_OGRE | LANG_ORCISH | LANG_TROLLISH | LANG_GOBLIN \
| LANG_HALFLING | LANG_GITH | LANG_GNOME | LANG_GOD )


USA #3
You'll need to add LANG_DEMONIC in that define statement then.
#4
I'm sorry, I didn't make my self clear... I had demonic in there and with no success changed over to tryin to add the language "god" to the system. I had hoped that since it was prebuilt into the code system it would go a little easier and I could then reverse engineer my self into adding my other languages again.
USA #5
What exactly went wrong then? It shouldn't be saying "Player races may not speak" anymore.
#6
I'm not sure what went wrong but once again it gave that same error

Player races may not speak god.
Racial language set.


In my MUD.H at line 838 I have

#define LANG_GOD BV15 /* Clerics possibly?  God creatures */ 


and then 845 - 847 is

#define VALID_LANGS    ( LANG_COMMON | LANG_ELVEN | LANG_DWARVEN | LANG_PIXIE  \
| LANG_OGRE | LANG_ORCISH | LANG_TROLLISH | LANG_GOBLIN \
| LANG_HALFLING | LANG_GITH | LANG_GNOME | LANG_GOD )


because its a built in language act_comm.c already has god in
int const lang_array[] = {
char *const lang_names[] = {

so i'm completely lost at this point...
If anyone thinks they can help you can IM me on AIM at "shattersonimpact" or on MSN at my nickname of "Jim HV AQ"
USA #7
Are you remembering to do clean compiles after touching mud.h? (That is: 'make clean', followed by 'make all'). Not doing that can cause some issues like this.

And by the way, generally we don't really help over IM; we try to keep things here so that everybody benefits from the discussion and eventual solution.
#8
I had just been updating code with make, not a make clean. So I made clean and recompiled and by the grace of SysAdmins and SrWizards it freakin worked...

ROCK! thanks guys
USA #9
Excellent! The reason this is a problem is that the SMAUG makefile does not have dependencies on mud.h for the various source files. So it will recompile a file if the source changed, but if the source didn't change but mud.h changed, it won't recompile the file.

By doing a make clean, you are forcing it to recompile everything.

More advanced make files do this kind of thing for you, but it's rather tricky to set that up and requires a fair amount of knowledge on how make works.

Glad that your problem is solved, though. :) Basically, whenever you change mud.h, you should do a make clean, followed by a make.
USA #10
Honestly, I'd recommend doing a make clean after changing any .h file, not just mud.h. It may take an extra minute or two, but it's much safer practice given the way smaug code is setup.
USA #11
Quote:
More advanced make files do this kind of thing for you, but it's rather tricky to set that up and requires a fair amount of knowledge on how make works.


Smaug FUSS 1.7 uses makefile dependencies, using the Perl script that was posted here awhile back. So just using a more recent version of FUSS would have solved this :)

Either way, when in doubt, "make clean" will always recompile everything.
#12
after you compile all the fixes into the new version I'll update again. I'm one of the wierd people who only update every other version.
USA #13
Not sure which particular fixes you're waiting on. They get added as each post is made to the forum. There is no version number change when this is done unless something very significant happens, like when the reset system changed, or when MCCP and dlsym were added for 1.7.