Native limits in UNION_ABI.DLL: FUN_1014c9f0(float* value)
Its relevant logic is approximately:
C++:
if (*value > 200.0)
*value = 200.0;
if (RoadOfTrials && UKS && *value > 40.0)
*value = 40.0;
if (realmode && *value > 100.0)
*value = 100.0;
Patch all three instructions:
to:
Resets and clamps in GOTHIC.DAT -> The relevant Daedalus functions are:
Код:
RX_LOADDIFFSETTINGS_EXP1
RX_LOADDIFFSETTINGS
SHOWDIFFICULTY
Removing only the 40% cap is not enough. ASNC is limited in two places:
- UNION_ABI.DLL — native 200%, 40%, and 100% caps.
- GOTHIC.DAT — Daedalus functions reset or clamp the coefficient to 200/50/40/100%.
Applying the item-affix bonus correctly could probably be done somewhat in this manner, but I didn't do any testing, just an idea.
The item-affix bonus should not be added directly to the current value of
RX_FULLSNC_KOEF every frame or during every equipment update.
Incorrect implementation:
Код:
RX_FULLSNC_KOEF += AffixBonus;
This causes the bonus to accumulate every time the function is executed. For example, a 5% affix applied repeatedly could produce 5%, 10%, 15%, 20% and so on.
Keep the base ASNC value and the total affix bonus in separate variables:
Код:
var int NB_ASNC_Base;
var int NB_ASNC_AffixBonus;
Then recalculate the effective value from scratch whenever the player's equipment or difficulty configuration changes.
Additive implementation:
Код:
func void NB_RecalculateAffixASNC()
{
RX_FULLSNC_KOEF = NB_ASNC_Base + NB_ASNC_AffixBonus;
};
Example:
Код:
Base ASNC: 40%
Affix bonus: 6%
Effective ASNC: 46%
If the affix is intended to increase the existing ASNC value proportionally, use a multiplicative calculation instead:
Код:
func void NB_RecalculateAffixASNC()
{
RX_FULLSNC_KOEF =
NB_ASNC_Base
+ ((NB_ASNC_Base * NB_ASNC_AffixBonus) / 100);
};
Example:
Код:
Base ASNC: 40%
Affix bonus: 15%
Effective ASNC: 46%
The effective value should be recalculated after:
- equipping an item;
- unequipping an item;
- changing or rerolling an affix;
- loading a saved game;
- changing the difficulty level;
- changing the ASNC profile;
- executing RX_LOADDIFFSETTINGS;
- executing RX_LOADDIFFSETTINGS_EXP1;
- executing SHOWDIFFICULTY.
The difficulty functions can overwrite
RX_FULLSNC_KOEF, so the affix bonus must be reapplied after they finish.
Important:
Do not use the already modified
RX_FULLSNC_KOEF as the base for the next calculation. Always calculate the final value from the stored, unmodified base value. Otherwise, the bonus may accumulate repeatedly or disappear when the difficulty settings are refreshed.