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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  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] Refresh page


Posted by Oblisgr   (123 posts)  [Biography] 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
[Go to top] top

Posted by AdInfinitum   (74 posts)  [Biography] 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?
[Go to top] top

Posted by Oblisgr   (123 posts)  [Biography] 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.
[Go to top] top

Posted by AdInfinitum   (74 posts)  [Biography] 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.
[Go to top] top

Posted by Oblisgr   (123 posts)  [Biography] 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.
[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.


4,448 views.

It is now over 60 days since the last post. This thread is closed.     [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.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]