OpenXcom Forum
Modding => OpenXcom Extended => OXCE Support => Topic started by: Nord on June 10, 2020, 11:26:43 am
-
Like i see, damage dealt to unit's shield brings no expirience. Because of final damage=0, i think. At least no mana expirience. Dont know what can be done here, though.
-
One way I see this could be fix by allowing scripts manually access current exp stats. This will have some quirks and need some custom scripts to recreate logic that now is in code.
Alternate we could expand exp grain to have more info what exactly happened before.
-
This could also be solved by a script to keep track of number of hits that didn't get through the shield, then read that number at the end of battle and award stat gains to mana as if it was experience.
-
Like i see, damage dealt to unit's shield brings no expirience. Because of final damage=0, i think. At least no mana expirience. Dont know what can be done here, though.
I don't see any reason why this wouldn't work.
Damage is completely irrelevant for experience, only hit or miss counts.
I tried this using shields in piratez, and a shield hit is perfectly capable of giving standard experience and also mana experience.
How can I test your case Nord?
-
I noticed it when try my new mod, using magic staff against shielded enemy. Staff have mana expirience rate at 150, so use of it must add at least one point. But on mission end was no mana increade.
I shall check twice, though.
-
I noticed it when try my new mod, using magic staff against shielded enemy. Staff have mana expirience rate at 150, so use of it must add at least one point. But on mission end was no mana increade.
I shall check twice, though.
1 mana experience point can still result in 0 mana stat increase (50% chance)... if mana is configured as a primary stat
(same for all other 6 primary stats, see: https://www.ufopaedia.org/index.php/Experience#How_Experience_Points_Are_Applied)
here's the conversion formula:
/**
* Converts the number of experience to the stat increase.
* @param Experience counter.
* @return Stat increase.
*/
int BattleUnit::improveStat(int exp) const
{
if (exp > 10) return RNG::generate(2, 6);
else if (exp > 5) return RNG::generate(1, 4);
else if (exp > 2) return RNG::generate(1, 3);
else if (exp > 0) return RNG::generate(0, 1);
else return 0;
}
-
Oh, like that. Thank you then. Will know.