|
Thread: Week 2, Day 4 - AI Pondering | |
|
Gidoza
Famous Hero
|
posted June 04, 2020 07:19 PM |
|
|
Week 2, Day 4 - AI Pondering
So here's a curious thing.
The game was working well for me for ages (H5.5) and now, suddenly...it isn't. Consistently, on Week 2, Day 4 of the game, the AI begins pondering and doing nothing at all.
I'm not sure what is special about this day. Here is the only information that might be pertinent to why this happened.
1. My computer crashed at one point and weirded itself out even more than just a crash, so maybe something got corrupted?
I completely re-installed everything after this - but I saved the data files in the data folder because I had made some of my own adjustments, and the AI was still pondering. So if there was corruption - would the data files themselves have become corrupted somehow?
2. I did some creature adjustments the day before. This amounted to nothing more than stats changes, so I'm not sure why this would cause it - but I'm noting it because it's something I did.
That's all I got. Any thoughts at all?
|
|
Gidoza
Famous Hero
|
posted June 04, 2020 11:32 PM |
|
|
Hi everyone - I found the problem. You'll find this really interesting.
I went through the creature files and narrowed the problem down to one file - Imp.xdb. Just to be clear - in the files, Imp and Familiar are inverted, so this file actually refers to the upgraded Imp, which is the Familiar.
I went through line by line and found nothing wrong, so I reverted some values back until I un-broke the AI and got the answer.
Here's what's causing the AI to break: if Imp.xdb is given a Gold value of 36, it breaks the game. I'm not joking. A value of 37, or 35, or seemingly any other value will work fine - but a value of 36 kills the AI. What's curious about this is that the same value of 36 Gold used in Quasit.xdb works perfectly fine.
(if you want to know why I was using 36, I was thematically making Inferno have lots of values that end in 6, just for fun)
Can anyone do a test themselves and changing the Gold value of Imp.xdb to 36 and see what happens? It ALWAYS kills the AI on precisely Week 2, Day 4, after you end your turn.
Any theories on what the heck is happening are most welcome. I'm not a programmer to be sure, but I know enough programming to say that this doesn't make any intuitive sense to me at all.
|
|
lokiseto
Hired Hero
|
posted June 12, 2020 08:52 AM |
|
|
Heroes 5
Itself was quite buggy, although lots of updates came out since 2006
(guess Nival? was in quite a hurry to finish) I guess this still holds true to this day.
Some speculations that I guess could explain some of the behavior
- low effort pseudo-random generator implementation
- some odd memory storage and type declarations and
- buggy calculations made during function calls
I guess some pointer arithmetic errors are left in the codebase as well.
Not to badmouth the game, but I guess the game had a pretty rough release schedule.
|
|
|
|