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, 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.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Exp gained on mob's death

Exp gained on mob's death

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


Posted by Oblisgr   (123 posts)  Bio
Date Wed 21 Sep 2022 07:00 AM (UTC)
Message
Can you tell me which line defines the exp gained from a mob's death. i want to make some adjustments.

Thanks
Top

Posted by AdInfinitum   (74 posts)  Bio
Date Reply #1 on Wed 21 Sep 2022 01:56 PM (UTC)
Message
I feel there is a bit of information missing from here. From where are we to obtain this information?
Top

Posted by Oblisgr   (123 posts)  Bio
Date Reply #2 on Wed 21 Sep 2022 02:12 PM (UTC)

Amended on Wed 21 Sep 2022 02:16 PM (UTC) by Oblisgr

Message
Somewere in smaug code there is a formula that defines the exp the player gains from killing an npc/mob. I want to make some edjustments. Isnt it clear?

i have found

int get_exp_worth( CHAR_DATA * ch )

but i m not sure it is for players or npcs.
Top

Posted by AdInfinitum   (74 posts)  Bio
Date Reply #3 on Wed 21 Sep 2022 02:48 PM (UTC)
Message
From my limited experience, I think what you may be looking for is in the 'fight.c' file, specifically this line:


int xp_compute( CHAR_DATA * gch, CHAR_DATA * victim )


located on line 3546.
Top

Posted by Oblisgr   (123 posts)  Bio
Date Reply #4 on Wed 21 Sep 2022 04:53 PM (UTC)
Message
well yes this is the function. but the xp ism filtered by so many factors that make the code rewriten if you have to set it just on a value.

i just changed

xp = ( get_exp_worth( victim ) * URANGE( 0, ( victim->level - gchlev ) + 10, 13 ) ) / 10;

to

xp = get_exp_worth( victim );

in order to take higher values. now I have to make tests to see if it is balanced.
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.


6,360 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.