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 ➜ Fighting Prompt damage display?

Fighting Prompt damage display?

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


Posted by Wrath   USA  (25 posts)  Bio
Date Tue 13 Jul 2004 04:22 AM (UTC)
Message
Ok I've been reading all over hre and some people have posted certain things almost regarding my question but not really answering it.

1. Can the damage be displayed when you hit a mob like in rom 2.4?

Example of the rom 2.4 mud fight display.

Your wrath *** DEVASTATES *** the Crested Gibbon! [71]
The Crested Gibbon is poisoned by the venom on the Blade of Denmark.
Your wrath *** DEVASTATES *** the Crested Gibbon! [65]
The Crested Gibbon is poisoned by the venom on the Blade of Denmark.
Your wrath misses the Crested Gibbon.
Your wrath *** DEVASTATES *** the Crested Gibbon! [72]
Your wrath *** DEVASTATES *** the Crested Gibbon! [74]
Your wrath *** DEVASTATES *** the Crested Gibbon! [64]
The Crested Gibbon is DEAD!!
You receive 0 experience points.
The Crested Gibbon's heart is torn from his chest.

Also when they hit you it displayes the damage done.

I have gotten it to display the exp gained per hit from one of the posts I read but can't seem to find any help to make this display.

I have smaug 1.4a original I think but it does have most of the updates I've seen in the fuss but it just says smaug 1.4a. I haven't used the smaugfuss because it causes my colors to go nuts and rip nolonger works.

PLease any help would be great I have little codeing exp but I'm picking up fast.

Thanks for any help... :-)

Always remember he who increses knowledge increses sorrow.
And he who thinks mudding is easy is allways sorry.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Tue 13 Jul 2004 04:53 AM (UTC)
Message
Yep. Just display the 'dam' variable in the function where it sends the hit txt to the char.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Tue 13 Jul 2004 04:53 AM (UTC)

Amended on Tue 13 Jul 2004 04:54 AM (UTC) by Nick Gammon

Message
For a start, I would look in fight.c, function new_dam_message:

Change:


    if ( dt == TYPE_HIT )
    {
        sprintf( buf1, "$n %s $N%c",  vp, punct );
        sprintf( buf2, "You %s $N%c", vs, punct );
        sprintf( buf3, "$n %s you%c", vp, punct );
    }


to:


    if ( dt == TYPE_HIT )
    {
        sprintf( buf1, "$n %s $N%c [%i]",  vp, punct, dam );
        sprintf( buf2, "You %s $N%c [%i]", vs, punct, dam );
        sprintf( buf3, "$n %s you%c [%i]", vp, punct, dam );
    }


And a bit further down, change ..


        sprintf( buf1, "$n's %s %s $N%c",  attack, vp, punct);
        sprintf( buf2, "Your %s %s $N%c",  attack, vp, punct);
        sprintf( buf3, "$n's %s %s you%c", attack, vp, punct);


to:


        sprintf( buf1, "$n's %s %s $N%c [%i]",  attack, vp, punct, dam);
        sprintf( buf2, "Your %s %s $N%c  [%i]",  attack, vp, punct, dam );
        sprintf( buf3, "$n's %s %s you%c [%i]", attack, vp, punct, dam );


You probably also want to change the nearby part for poisoned weapons too.

Once you have done that, it should look like this:


<840hp 100m 102mv>
You scratch the guard. [5]
You dodge the guard's attack.
The guard's slash cuts you! [31]
The guard's slash hits you! [37]
You dodge the guard's attack.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Wrath   USA  (25 posts)  Bio
Date Reply #3 on Tue 13 Jul 2004 05:04 AM (UTC)
Message
Thanks for the info you guy rock.

Always remember he who increses knowledge increses sorrow.
And he who thinks mudding is easy is allways sorry.
Top

Posted by Siza-13   (1 post)  Bio
Date Reply #4 on Sun 25 Jul 2004 03:22 AM (UTC)
Message
What about for Windows?
What file do I edit?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Sun 25 Jul 2004 03:55 AM (UTC)
Message
You need the source, and a Windows compiler to do that.

Once you have those, just do the same.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #6 on Sun 25 Jul 2004 03:56 AM (UTC)
Message
Regardless of what version you are running, the modification will be to the damage display in fight.c - this of course requires you be able to recompile the code after you've edited the source code.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
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.


22,605 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.