Page 1 of 1

Double experience for fear-based attack methods

Posted: Wed Apr 07, 2010 1:15 am
by Sophia
While investigating some issues for DSB, I noticed that AdjustSkills is called both at the end of WarCryEtc, as well as in the main attack method handler function, _Attack. This means that fear-causing attack methods essentially give experience twice. Testing confirms there is indeed an issue as warcrying a screamer gives priest levels much faster in CSBwin than in DSB. I wonder if this was intentional, a bug in DM or what...

Other attack methods, like physical attack methods, also call AdjustSkills both in their own handler and in _Attack, but with a different purpose-- for physical attacks, the call inside of the attack filter gives experience based on the damage done to the monster (and gives nothing if you miss) where the main one in _Attack gives a fixed amount of experience for executing the attack method.

What makes the case of WarCryEtc curious is that there isn't this sort of thing going on, the values are essentially the same thing...

EDIT: Actually, they're not. Further investigation reveals one xp bonus is being pulled from the attack method table, the other one is hardcoded in the game engine, and the only fear-causing attack method that actually gives any xp just for executing the method is a war cry. I think this is intentional, and is a weird trick to make war cry give more experience if it fails than the other fear-causing methods. Maybe the designers had the warcrying screamers on level 2 trick in mind... the more I dig into it the more subtle, interesting things emerge that DM is actually doing under the surface.

Re: Double experience for fear-based attack methods

Posted: Wed Apr 07, 2010 10:06 am
by Adamo
Testing confirms there is indeed an issue as warcrying a screamer gives priest levels much faster in CSBwin than in DSB. I wonder if this was intentional, a bug in DM or what...
What was the "level XP multiplier" value you were warcrying at screamer in DM/CSB - 1 (DM 2nd level) or 4 (CSB 1st level)?

Code: Select all

    * Experience = Experience Gain associated to the action you perform (see table below)
    * If the Improved Skill associated to the action you perform is between 04 and 11 (hidden Fighter and Ninja skills) and if no creature has attacked the party for at least 150 clock ticks (25 seconds), then Experience is divided by 2.
    * If the Experience Multiplier of the current level is not 0, then Experience is multiplied by the Experience Multiplier
    * If the Improved Skill associated to the action you perform is above 04 (any hidden skill) and if a creature has attacked the party less then 25 clock ticks ago (about 4.17 seconds), then Experience is multipled by 2.
from: http://dmweb.free.fr/?q=node/692
Further investigation reveals one xp bonus is being pulled from the attack method table, the other one is hardcoded in the game engine, and the only fear-causing attack method that actually gives any xp just for executing the method is a war cry.
I`m not sure if I understand you well. What is the "hardcoded table"? Attack method table differs in DM and CSB. Sometimes the same actions taken in DM and CSB gives different results (warrior/ priest XP).
Do you mean this list:
http://dmweb.free.fr/?q=node/690
Warcry gives eiter "parry" (fighter skill) or "influence" (priest skill).
only fear-causing attack method that actually gives any xp just for executing the method is a war cry.
War cry gives an XP even if this attack failed and blowing horn doesn`t? Might be a bug.

EDIT: Some "influence" attacks, like Blow Horn, Calm and Brandish has "Experience Gain" value = 0. Other "influence" attacks are warcry = 7 and Freeze life = 22.

Re: Double experience for fear-based attack methods

Posted: Fri Apr 09, 2010 1:03 am
by Sophia
Adamo wrote:What was the "level XP multiplier" value you were warcrying at screamer in DM/CSB - 1 (DM 2nd level) or 4 (CSB 1st level)?
It was a custom test level with xp multiplier of 5.
Adamo wrote:I`m not sure if I understand you well. What is the "hardcoded table"?
I mean, it was written directly into the CSB program code, not saved in any sort of data file.
Adamo wrote:War cry gives an XP even if this attack failed and blowing horn doesn`t? Might be a bug.
I thought it was a bug at first, too, but it seems intentional!