I don't see why you should want to keep AI codes for ship/system tasks running if you ignore and alter the orders (unneeded calculations). There is some AI diplomacy codes reading some ships tasks, but this could be handled just like the player ships on the map.
Anyway sub_407250 AI_control_major is your friend for specifc features(+ the extra codes for minors & monster) or sub_403750 AIProcessTurn for global process (@4037E7 insert extra call / extern feature hook before the 'retn').
IDA database: https://workupload.com/file/ZUbaFLytzw7
Economic and Military Score (Overflow Fix)
Moderator: thunderchero
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
Re: Economic and Military Score (Overflow Fix)
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- BORG Trouble Maker
- Posts: 3258
- Joined: Sun Apr 27, 2008 2:00 am
- Location: Hamburg, Germany
Re: Economic and Military Score (Overflow Fix)
I just don't like to analyse and hook each specific feature, nor replace the whole calculation at once. E.g. I could leave all the calculations but just add some special case like detect enemy threats by my own calculation and do something different but leave the rest of the ship movements.
Lateron I ofc hope to replace it all. That case again all the special sub-routines aren't of interest either. Just the modified data and MP is of interest.
Lateron I ofc hope to replace it all. That case again all the special sub-routines aren't of interest either. Just the modified data and MP is of interest.
-
- BORG Trouble Maker
- Posts: 3258
- Joined: Sun Apr 27, 2008 2:00 am
- Location: Hamburg, Germany
Re: Economic and Military Score (Overflow Fix)
Already some while back, while fixing the UE stats, I also checked on the iteration pointer again. It indeed iterates the 1-250 entry indexes. But other than turning back to zero, every 250 turns each 2nd entry is removed, and the iteration pointer (index) is shrinked by half. That way a buffer overflow is prevented, while the graph still shows progress from first turn onwards.Flocke wrote: ↑Tue May 31, 2022 3:59 ama logic assumption I need to checkSpocks-cuddly-tribble wrote: ↑Sun May 29, 2022 9:19 am Offset 0x02AC current turn -> iteration pointer 1-250?
In addition to that, at offset 0x0C7C the shrink increment is stored to determine the stats resolution and how many turns need to pass till next added statistical score entry.