BigPig2

 

Hired Hero
|
posted June 08, 2026 06:31 PM |
|
Edited by BigPig2 at 18:41, 08 Jun 2026.
|
Ive been studying this function: SetSpellInfluence - starting (4)44610h and if I understand correctly it can be edited to calculate the hero specialty bonus before jumping to a specific spell case to update the corresponding value from there? this will probably also release enough space to do what i want with the duration. Its a bit of an extensive edit but I will post it when I get it done.
In the meantime I was wondering if anyone has any clues as to the following:
1) On the subject of spells, I thought the AI values in SPtraits are used when the AI decides which spell to cast but they do not appear to be mentioned in the function I understand to be responsible for making this choice (as per AlexSpl on page 116 in the "how to edit hota" thread): get_enchantment_function at (4)3B2E0h. I really have 2 questions here:
1a) Why do uncastable spells like poison, disease, age have their own value calculating functions written up if they cant ever be cast actively by heroes? This is very unlike the developers who didnt even bother implementing unused hero spell specialties despite the fact that thatd be actually more efficient.. Are these routines used elsewhere for some other purpose? IDA only shows cross-references to the above mentioned function and that one appears to only be called during active AI spellcasting (+genies use).. Could this possibly be free real estate? and;
1b) What are the AI values in SPtraits for then? I saw them mentioned in stuff like quest and similar rewards but that seems like a very niche purpose to have them for? I notice they only ever go as low as 1, never 0, why?
2) Is it correct that the AI necromancy bug is an issue with the DoVictory function at (4)76DA0h? What exactly is the problem? I vaguely remember somebody mentioning it deletes the armies before calculating the raised creatures or something similar? But isnt it the same function for both human and AI players? I appreciate any descriptive answer. This has supposedly been fixed in hota so I know the answer is out there..
3) Similar question, but I am not sure if hota fixes this or not.. The tower targetting bug, the wiki says the AI considers the tower damage to be equal to 1 for the purposes of targetting, is it an issue with the Find_AI_targets function at (4)22CA0h? I can see the arrow tower is mentioned for its own bit of code but I dont yet understand what it does.
edit: 4) This one is more general. Does AI even consider the attributes of the artifacts its heroes wear or does it just put them on as long as the slot is open? Does it share the artifacts across its heroes? There usually seems to be one carrying much much more than others. I was thinking to let the necromancy artifacts work without the skill, and I know how to fix the problem with the necro building and grail applying as well but I am worried it will hinder ai heroes with tiny skeleton stacks that will ruin their movement and morale.. Do AI heroes ever disband unneeded armies?
|
|