Can you tell me which line defines the exp gained from a mob's death. i want to make some adjustments.
Thanks
I feel there is a bit of information missing from here. From where are we to obtain this information?
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.
Amended on Wed 21 Sep 2022 02:16 PM by Oblisgr
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.
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.