Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Possible soruce of memory corruption bug

Procedure $6AEA4 (ovr89:0C95)
This procedure is supposed to check, when a unit is lost due to not paying upkeep, if it was a windwalker over sea. If yes, it returns a list, which contains unit IDs that need to also die (because they can't swim). I've confirmed this isn't working in game, losing a Djinn to 0 MP did not hurt the walking units in the stack.
The procedure contains two uninitialized variables, var_2 and var_1E. Based on the code, I assume var_2 should have been the size of the stack, and var_1E the list of units in it. However, both variables are never set in the procedure, so the call to get the units stacked together into the list is completely missing. If this is true, and everything points to that, this checks random memory addresses (outside the range of valid unit IDs, even) and might, in theory, found what "looks like" a unit that needs to drown, in which case returns these IDs for disbanding, which will overwrite memory there.
If anyone who knows assembler code has time, please take a look at that procedure. For the time being, I will remove it entirely as it doesn't work anyway to be on the safe side but it would be nice if someone confirmed my theory.
Reply

In related news, I suppose it might be nice to make drowning consistent. If you turn off water walking, flight, etc. on a walking unit who's over water, that unit drowns. If your boat gets destroyed, you drown. But if you get water walking dispelled during combat, you're fine.
Reply

(January 12th, 2016, 19:19)spottedshroom Wrote: In related news, I suppose it might be nice to make drowning consistent. If you turn off water walking, flight, etc. on a walking unit who's over water, that unit drowns. If your boat gets destroyed, you drown. But if you get water walking dispelled during combat, you're fine.

I was thinking about that, but not sure what to do. The current system allows the player to at least recast the spell to avoid losing units. While I like it when the game is hard, losing units or stacks without chance of recovery to...something like Dispel Magic is far too unforgiving and would make spells like Flight or Water Walking a suicide tactic (remember, the AI can now attack you over water with ships or even flying or waterwalking units, they weren't able to before!)
Additionally, someone could cast Great Unsummoning and all your heroes and great wyrms on the Floating Island being transported die.

There actually is a procedure for checking for drowning in the game code, but it seems to be unused, nothing calls it. AI units only "drown" because the AI disbands them if they stand on water since they wouldn't be able to go anywhere anyway. (which btw I think also gets rid of heroes with flight items, the check for that seems to be missing, added it an hour ago)

So long story short, I most likely could add a drowning check after units move, or at end of turn, but having doubts about doing it. It's been way too long ago to remember, but I think earlier versions of MoM actually made units drown and it was horrible so it got disabled. I might be wrong on this, though.
Reply



Forum Jump: