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 ➜ combat system question

combat system question

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


Posted by Addrodoc   (15 posts)  Bio
Date Fri 03 Oct 2003 04:05 AM (UTC)
Message
I started working with smaug a few months ago.. this is my first mud so i guess i'm still kind of a newbie but everything went great so far.... untill the last few days..
I'm trying to change smaug combat system messages to another language, but I cant seem to find out how to change the 'Your' in "Your slash cuts someone" and the 'you!'in "someone hits you!".

Example:

Your slag mist Puff.
Puff parries your attack.
You parry Puff's attack.
Puff's slash krabt you.
You parry Puff's attack.
Puff grijpt you.

As you can see I changed a few generic combat messages already but I'm having a real hard time finding the rest..

Help would be greatly appreciated, thanks in advance.

oh and if anyone knows where to locate "dodges your attack" and "parries your attack" that would be great :)

-Addrodoc-
Top

Posted by Rob Harper   (108 posts)  Bio
Date Reply #1 on Fri 03 Oct 2003 05:16 AM (UTC)
Message
Grep the specific messages, and then...you might have to edit the actual variables as in $n off hand I dont know where those are but it wouldnt be too hard to do a search and find them.
Top

Posted by Addrodoc   (15 posts)  Bio
Date Reply #2 on Fri 03 Oct 2003 07:38 AM (UTC)
Message
I found the dodge and parry messages.. I'm still trying to find the 'You, Your, and you!' messages.. :(
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #3 on Fri 03 Oct 2003 08:32 AM (UTC)

Amended on Fri 03 Oct 2003 08:33 AM (UTC) by Greven

Message
Look for something like the following:
Quote:
if ( dt == TYPE_HIT || dam==0 )
{
sprintf( buf1, "$n %s $N%c", vp, punct );
sprintf( buf2, "You %s $N%c", vs, punct );
sprintf( buf3, "$n %s you%c", vp, punct );
}
Quote:
sprintf( buf1, "$n's %s %s $N%c", attack, vp, punct );
sprintf( buf2, "&c&CYour %s %s $N%c", attack, vp, punct );
sprintf( buf3, "&c&C$n's %s %s you%c", attack, vp, punct );


Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Addrodoc   (15 posts)  Bio
Date Reply #4 on Fri 03 Oct 2003 05:00 PM (UTC)
Message
Thanks, that really helped.. I still havent worked it out though.. I found what I was looking for and changed the messages but after compiling I get a Error..

This is what it looks like:

fight.c: In function 'Damage':
fight.c:1845: too few arguments to function 'is_safe'
fight.c: At top level:
fight.c:2502: conflicting types for 'is_safe'
mud.h:4705: previous declaration of 'is_safe'
make[1]: ***[fight.o]*** Error 1

I've been trying to get this to work for days now and I wont stop untill I've made it.... so if I dont reply It's probably because I died because of a lack of sleep :P

I hope someone knows how to get rid of the error.

Thanks!

-Addrodoc-
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #5 on Fri 03 Oct 2003 09:09 PM (UTC)
Message
Quote:
fight.c:1845: too few arguments to function 'is_safe'
This means that you are not puting enough information into the check, it should be in the format of
 if ( is_safe( ch, victim ) )

Quote:
fight.c:2502: conflicting types for 'is_safe'
mud.h:4705: previous declaration of 'is_safe'

This looks like you may have made a bad call to the function, or that you have a ";" at the end of the is_safe check. The compiler seems to think that you are declaring a new prototype, I beleive. Check to make sure that it is in the proper format, but if your still having troubles, can you post the code that is giving the errors? This might help us figure out whats wrong.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Addrodoc   (15 posts)  Bio
Date Reply #6 on Sat 04 Oct 2003 02:17 AM (UTC)
Message
I guess I've been looking at the same files for too long... I dont know what I did wrong but I couldnt find the error so I took a clean version of the fight.c file and started all over... and voila I got it to work almost exactly as I wished. :))

Thanks for the help, I would not have been able to do this on my own.. so thanks a 100 times!
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.


23,757 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.