Conversation
…tectionNoFight` and `ShowTargetProtectionInFight`
…L`. Value `MAX` is shown when target has immunity, but color stays same
|
I am wondering about |
|
Another thing came into my mind. Idk if it would be an overkill xD |
|
Don't know if const int SPELL_GOOD = 0;
const int SPELL_NEUTRAL = 1;
const int SPELL_BAD = 2;0 is never used, 1 is used for no charm spells like (heal/light), 2 is used for all kind of damaging/transformation. |
|
Seems like engine (at least G2A) is transforming |
IIRC some mods or Ninja FreeAim allows for dealing different types of damage. I don't think there would be any universal solution for this so maybe it would be good to check for actual damage type dealt at runtime and flag whether dmg matches the weapon or the arrow or the fixed point damage type and save the flag to ini. On mismatch overwrite the flag. |
So I'd have to hook |
Before the hit show in default way and then correct, but save in ini so that after restarting the game, we show already the right way. After that the flag in ini would be only overwritten if for eg. player changes the mod and dmg is treated differently there. Random idea, but should work in theory |
|
Okay so I build this system like this: |
Removed `NpcHelper`
added `isInFightMode` and `TargetProtectionMode` to it
Cache for `protView->FontY()` Removed unused `GetProtSize`, `GetProtStartX`, `GetProtStartY`
Removed unused `IsShowTargetProtectionDisabled`
|
I rewrote the entire Main changes
Impact
Performance notesBenchmarking was done in a simple way:
Observations:
Class structure improvements
|








I've extended
ShowTargetProtectionfunctionality.Split
ShowTargetProtectioninto two separate settingsShowTargetProtectionNoFightandShowTargetProtectionInFight.Why? When I am playing Gothic I've found that current settings does not me freedom to choose what I want to see on my screen.
For example: When I wandering around the game world talking with NPCs etc. I'd rather see their
Allprotection info or see the ones that mattersAllButZeros. In fight mode I want to be focused onCurrentWeapononly.Players now will able to choose what fits them :)
System looks more consistent now. When NPC has
NPC_FLAG_IMMORTALthere is no point in showing all icons, justShieldin gray color. When target is immune to some damage type then corresponding icon and valueMAXis shown.There is another option to choose icon types. "New" ones are the same as
DamagePopupicons as suggested in #40 . Second option is to useShieldicons those that have been used so far.Last but not least. System is now checking for all equipped weapon/spells damage types. Not only for
GetTopDmgIndex.For example Uriziel in G1 has magic and fire damage type. So for this weapon and
CurrentWeaponsetting both fire and magic protection icons will be shown.