Fighting Prompt damage display?

Posted by Wrath on Tue 13 Jul 2004 04:22 AM — 7 posts, 29,161 views.

USA #0
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... :-)
USA #1
Yep. Just display the 'dam' variable in the function where it sends the hit txt to the char.
Australia Forum Administrator #2
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.


Amended on Tue 13 Jul 2004 04:54 AM by Nick Gammon
USA #3
Thanks for the info you guy rock.
#4
What about for Windows?
What file do I edit?
USA #5
You need the source, and a Windows compiler to do that.

Once you have those, just do the same.
USA #6
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.