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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  to compile new classes
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

to compile new classes

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Pages: 1 2  3  4  

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Fri 30 Jan 2004 12:23 PM (UTC)  quote  ]

Amended on Fri 30 Jan 2004 05:08 PM (UTC) by De Martino

Message
Ciao a tutti!!! :)

I desire to unite mage+cleric+vampire in name class: mentale.class
and to unite paladin+warrior+thief in name class: fisica.class

when a new player is created, the file server will owe' to ask:
* No * you Choose a class or you write help [class] to know more' on the type of class.
[Mage Cleric Thief Warrior Vampire Druid Ranger]
* Yes * you Choose a class or you write help [class] to know more' on the type of class.
[Mental or Physics]

please help me.

De Martino
[Go to top] top

Posted by Nick Gammon   Australia  (19,469 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Fri 30 Jan 2004 08:49 PM (UTC)  quote  ]
Message
In the classes folder have you edited the file class.lst to remove the classes you don't want?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #2 on Fri 30 Jan 2004 11:26 PM (UTC)  quote  ]
Message
Nick writes:
In the classes folder have you edited the file class.lst to remove the classes you don't want?


yes Nick i remove all class, and i rename Mage.class to Mentale.class and Warrior to Fisica, in Mage.class i vrite spell of Cleric, and in Fisica.class i copy spell of Thief.

mushclient: You choose a class or you write help [class] to know better a type of class.
[Fisica]

but no in list [Mage] and [Vampiro] i write manually
in comm.c ?

Tanks
De Martino
[Go to top] top

Posted by Nick Gammon   Australia  (19,469 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sat 31 Jan 2004 09:28 PM (UTC)  quote  ]
Message
In comm.c, at line 2086 (in my version) is this:


case CON_GET_NEW_SEX:
    switch ( argument[0] )
    {
    case 'm': case 'M': ch->sex = SEX_MALE;    break;
    case 'f': case 'F': ch->sex = SEX_FEMALE;  break;
    case 'n': case 'N': ch->sex = SEX_NEUTRAL; break;
    default:
        write_to_buffer( d, "That's not a sex.\n\rWhat IS your sex? ", 0 );
        return;
    }

    write_to_buffer( d, "\n\rSelect a class, or type help [class] to learn more about that class.\n\r[", 0 );
    buf[0] = '\0';

    /*
     * Take this out SHADDAI
     */

  for ( iClass = 0; iClass < MAX_PC_CLASS-2; iClass++ )
      {


The line I am doubtful about is in bold. It appears to show 2 less classes than you actually have.

Try changing to:


for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #4 on Sun 01 Feb 2004 12:18 AM (UTC)  quote  ]

Amended on Sun 01 Feb 2004 12:21 AM (UTC) by De Martino

Message
i vrite in mud.h:
#define CLASS_NONE -1 /* For skill/spells according to guild */
#define CLASS_FISICA 0
#define CLASS_MENTALE 1
#define CLASS_VAMPIRO 2

i vrite in class.list:
Fisica.class
Mentale.class
Vampiro.class
$

i vrite in mentale.class:
Name Mentale~
Class 1
Attrprime 3
Weapon 10312
Guild 3018
Skilladept 95
Thac0 18
Thac32 10
Hpmin 6
Hpmax 8
Mana 1
Expbase 1250

i vrite in Fisica.class:
Name Fisica~
Class 0
Attrprime 1
Weapon 10313
Guild 3022
Skilladept 85
Thac0 18
Thac32 6
Hpmin 24
Hpmax 30
Mana 0
Expbase 1150

in Vampiro (no Vampire)
Name Vampiro~
Class 2
Attrprime 2
Weapon 10312
Guild 3036
Skilladept 95
Thac0 18
Thac32 7
Hpmin 9
Hpmax 14
Mana 0
Expbase 1500

i change in comm.c
for ( iClass = 0; iClass < MAX_PC_CLASS-2; iClass++ )
to
for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )

after i make
$ make
make smaug
make[1]: Entering directory `/cygdrive/c/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comm.c
comm.c: In function `nanny':
comm.c:2344: error: `CLASS_PALADIN' undeclared (first use in this function)
comm.c:2344: error: (Each undeclared identifier is reported only once
comm.c:2344: error: for each function it appears in.)
comm.c: In function `default_fprompt':
comm.c:3372: warning: implicit declaration of function `IS_VAMPIRE'
make[1]: *** [comm.o] Error 1
make[1]: Leaving directory `/cygdrive/c/smaug/dist/src'
make: *** [all] Error 2

***********************
I desire to unite
Mage.class and Cleric.class in Mentale.class
and
Warrior.class and Thief.class in Fisica.class
and rename
Vampire.class, in Vampiro.class

but I am a landslide, I don't succeed there. Excuse me
Nick, but I am not good, I have a saved copy
of old classes I can refer everything.
If you help me I refer everything.

De Martino
[Go to top] top

Posted by Nick Gammon   Australia  (19,469 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sun 01 Feb 2004 03:55 AM (UTC)  quote  ]
Message
You are referring to this:


  for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
  {
    if ( class_table[iClass]->who_name &&
         class_table[iClass]->who_name[0] != '\0' )
    {
      if ( toupper(arg[0]) == toupper(class_table[iClass]->who_name[0])
      &&   !str_prefix( arg, class_table[iClass]->who_name ) )
      {
          ch->class =  iClass;
      if ( ch->class == CLASS_PALADIN )
        ch->alignment = +500;
          break;
      }
    }
  }


You do not have a Paladin class so those two lines do not apply. Remove the lines in bold.

Ditto for other cases.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #6 on Sun 01 Feb 2004 05:19 PM (UTC)  quote  ]

Amended on Sun 01 Feb 2004 05:39 PM (UTC) by De Martino

Message
if ( ch->class == CLASS_PALADIN )
is in comm.c

where is all class?
in comm.c
+++++++++++++++++++++++++++++++++++++++++
Nick I do again all
I have cancelled everything.

I have original smaug,
I desire to eliminate thief.class;cleric.class;thief.class
druid.class;augurer.class;paladin.class;ranger.class

and i desire when I create new player
to choose only 3 possible classes [mage varrior vampire]
and not only [mage].

what do I have to do?
can you write me the complete procedure?

Excuse me but and' better referring everything.
Excuse me for my incapability and my not competence.
Also excuse me for my way of writing
I don't speak the English


De Martino
[Go to top] top

Posted by Nick Gammon   Australia  (19,469 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Sun 01 Feb 2004 08:14 PM (UTC)  quote  ]

Amended on Sun 01 Feb 2004 08:15 PM (UTC) by Nick Gammon

Message
I don't want to do a step-by-step for this problem, because then you will need the same thing for the next one.

I understand your English, it is better than my Italian. :)

You need to become familiar with the tools, so you can do it for yourself. I can guide you in the general idea, but then you need to work it out.

My page http://www.gammon.com.au/smaug/howtocompile.htm describes the general idea of searching for things and recompiling.

In your case, you have removed CLASS_PALADIN so you need to remove references to it. Use "grep" if you are using Cygwin or Linux to find things, or if you are using Windows use a editor with "find in files".

For example:


$ grep -n CLASS_PALADIN *.c
act_info.c:103:    if (  (IS_AFFECTED(ch, AFF_DETECT_EVIL) || ch->class==CLASS_PALADIN)
act_info.c:106:    if ( ch->class==CLASS_PALADIN
act_info.c:109:    if ( ch->class==CLASS_PALADIN
act_info.c:112:    if ( ch->class==CLASS_PALADIN
act_info.c:117:    if ( ch->class==CLASS_PALADIN
act_info.c:120:    if ( ch->class==CLASS_PALADIN
act_info.c:123:    if ( ch->class==CLASS_PALADIN
act_info.c:562:    &&   (  IS_AFFECTED(ch, AFF_DETECT_EVIL) || ch->class==CLASS_PALADIN)     ) 
                          strcat( buf, "(Red Aura) "   );
act_info.c:564:    &&   ch->class==CLASS_PALADIN  ) strcat( buf, "(Grey Aura) "   );
act_info.c:566:    &&   ch->class==CLASS_PALADIN  ) strcat( buf, "(White Aura) "   );
act_obj.c:1493:        && ch->class == CLASS_PALADIN                                            )
act_wiz.c:5103:         (victim->class == CLASS_PALADIN) )
comm.c:1860:            if ( ch->class == CLASS_PALADIN )
comm.c:2068:        if ( ch->class == CLASS_PALADIN )
update.c:596:      if(ch->class == CLASS_PALADIN){


The -n option says to show line numbers. So you can see above both the file names and line numbers tha you need to edit to find each case.

In the above example, we see a whole batch. Taking the last one (update.c:596) we can see the sort of thing.

Edit update.c (vi update.c) and go to line 596 (596G):


     /* Paladins need some restrictions, this is where we crunch 'em -h */
     if(ch->class == CLASS_PALADIN){
        if(ch->alignment<250){
            set_char_color( AT_BLOOD, ch );
            send_to_char( "You are wracked with guilt and remorse for your craven actions!\n\r", ch );
            act( AT_BLOOD, "$n prostrates $mself, seeking forgiveness from $s Lord.", ch,
                 NULL, NULL, TO_ROOM);
            worsen_mental_state( ch, 15 );
            return;
        }
        if(ch->alignment<500){
            set_char_color( AT_BLOOD, ch );
            send_to_char( "As you betray your faith, your mind begins to betray you.\n\r", ch );
            act( AT_BLOOD, "$n shudders, judging $s actions unworthy of a Paladin.", ch,
                 NULL, NULL, TO_ROOM);
            worsen_mental_state( ch, 6 );
            return;
       }
    }


Now if you are using vi, and you put the cursor on the last "{" on the first line, and press the % key it will take the cursor to the matching end brace. This shows how many lines need to be deleted, or commented out.

Delete those, and that file should now compile OK.

If you are using Windows then MUSHclient has a "find matching brace" function in its internal notepad, that does the same thing.

Now do the same thing for the other files. Don't forget to "make" afterwards to recompile everything.

You may wish to use the FUSS (Fixed Up Smaug Source) code which is now in the downloads area of this site. That fixes the problem with the "-2" in the class list, so you will see 3 classes if you have 3 classes and not just 1.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #8 on Mon 02 Feb 2004 12:15 AM (UTC)  quote  ]
Message
Dear Nick, thanks the same but not and' this' that I wanted
I hoped all it took is cancelling classes paladin.class
and to cancel paladin from list.class

I know executable make but not me and' easy to do all that
what you have written, thanks however, my problem remains. :o(

You have been very kind.
You are e very friend.

De Martino
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #9 on Sat 07 Feb 2004 12:58 PM (UTC)  quote  ]

Amended on Sat 07 Feb 2004 01:01 PM (UTC) by De Martino

Message
Hi to everybody,
dear friends, dear Nick
I have found a solution to eliminate some classes, but I desire to be sure
what a the solution from me found, it doesn't create crash or bug.

Don't see the class Paladin, have renamed
"paladin ~ " in "~ "
I have practically removed the name. Now to the creation of a new pg, is not able
anymore' to choose the class paladin. Is correct solution or is not correct?
Is a big problem for me, to eliminate the classes. I hope to have succeeded there.

I desire to know a thing:
in Italy they say that the version smaug1.4a_mxp.tar, is not correct, they say
what this version is with many bugs. I have chosen this version, but they tell me
to change her, some friends of mine dissuade me her. I have preferred to hold the version
smaug1.4a_mxp.tar, has worked also there for 200 hours, and I desires to hold her.
As can I correct the bugs? Thin to I have not now used any Patch.
As always an embrace and a great graces!

Grazie!!!
De Martino
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #10 on Sat 07 Feb 2004 04:18 PM (UTC)  quote  ]
Message
There are various list of bug fixes available. One can be found at http://forums.mudplanet.org/index.php?showtopic=9 for major bug fixes(there are alot) and one with minor fixes can be found at http://forums.mudplanet.org/index.php?showtopic=20. These are not all of the bugs, but the vast majority, I think. Try those out.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #11 on Sat 07 Feb 2004 05:54 PM (UTC)  quote  ]
Message
Greven:
recommend me to correct the bugs :o((, or a version correct of smaug already exists'
for download

Could I migrate my translations on another version without bug, it exists?

Tank you!

De Martino
[Go to top] top

Posted by Nick Gammon   Australia  (19,469 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Sat 07 Feb 2004 08:25 PM (UTC)  quote  ]
Message
I am inclined to agree, having looked at SMAUG FUSS, that you should use that instead (it is now at this site), plus you can incorporate MXP into it with the patch file there.

Patching MXP back into SMAUG FUSS is easy enough, there is one command to type, which is on the downloads page here.

If you change to a different SMAUG, make sure you keep your area files, class files etc. Unless you have changed the source you only really want the new "src" directory, if you keep the other directories all your translations will stay.

In other words, backup (copy) your existing SMAUG directories (files).

Then get the SMAUG FUSS files, un-tar it, apply the MXP patch, compile it, then copy back all the classes, areas, etc. that you have changed.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (19,469 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Sat 07 Feb 2004 08:30 PM (UTC)  quote  ]
Message
If you have changed the source too (eg, made some words into Italian) then you can still keep them.

What you want is a "diff" of the changes between what you did, and the original. That will give you a file that you can patch into the corrected version. Most or all of your changes should survive.

Eg.

Have 2 directories: orig_src, src

The "orig_src" directory is SMAUG before you changed things.

Then at the level *above* the src directory, type this:


diff orig_src src > diffs.txt


That will put *your* changes into diffs.txt.

Then get the newer SMAUG (the FUSS one).

Then put your changes back. Go into the src directory and type:


patch < diffs.txt


Just be careful that the diffs.txt file only contains the changes you really want. You can edit it and check that.

Warning - make a backup of everything before trying this in case things go wrong.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by De Martino   Italy  (54 posts)  [Biography] bio
Date Reply #14 on Sat 07 Feb 2004 11:42 PM (UTC)  quote  ]

Amended on Sat 07 Feb 2004 11:51 PM (UTC) by De Martino

Message
smaug14afuss
this is smaug 1.4a without bug
and' a smaug 1.4a corrected by errors?
do I perform it with Cygwin?

this command not found:


$ tar xzf smaug14afuss


De Martino

[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.


13,876 views.

This is page 1, subject is 4 pages long: 1 2  3  4  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [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.

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]