(December 28th, 2015, 15:58)kyrub Wrote: (December 28th, 2015, 13:05)Seravy Wrote: (December 28th, 2015, 12:37)Tiltowait Wrote: Only kyrub can answer that.
That would be the best, ofc.
Hi, once you gather a few things, I will try to look into the code. I still have very little time on my hands.
Quick opinion, these things look like complete garbage, that could have been inserted into the file accidentally, or when I experiemented to find out several problems. But I have to look and see, without it nothing is sure.
I'm done reading through all of the code, well mostly. Skipped some procedures where I observed nothing questionable during playing the game at all, I assume if everything works now I don't really need to spend hours on finding out what bugs were there before.
This is the full list of questions I have :
1. Location : $898A5
Removes a huge part of combat AI unit movement code.
In particular the tactic for the case when the AI has ranged superiority.
As far as I can tell the AI does not use any unit abilities and this code is far less advanced than the normal one.
I've already used the space found here to add a bunch of features, like the AI randomly moving to find invisible enemies,
so restoring it is not an option, but I wonder what exactly was in here?
Was it really that bad? Or did it at least do something useful occasionally?
2. "Sorcery Floating Island" without Death Immunity.
Any reason for changing this? Did it need to be a "normal" unit for some reason?
3. Did you manage to find out what is in word_3FD34 and word_3FD36?
You fixed the realms check where this value is added to the priority of casting resist elements type spells,
but I haven't been able to actually find where these variables are filled.
I think they should contain a number related to how powerful enemy spells are, but no idea where and how it is calculated,
if at all?
They are loaded at $B9D1E.
Nevermind this one, I decided to drop the use of those unknown variables and made all "resist type" spells gain a fixed priority if the player has the appropriate realm instead. Variable priority for that isn't a good idea, just because the player has access to, for example, Nature and is excellent at spellcasting, does not mean resist elements is a better choice than...most other spells, actually.
Variable priority is only working well against the elemental attacks units have, as those are guaranteed to be relevant.
4. Location : $9BAD8
As far as I can tell, this makes units consider something "in range" for an attack if it is
fewer cells away than our remaining movement.
Original code was equal or fewer, which is the correct behavior. If the unit can move 1, and the enemy is 1 away,
it can be attacked.
This just makes any unit with a movement of 1 never consider anything "close enough" to prefer attacking it.
Units just walk around and ignore even sleeping targets right next to them. Really easy to abuse, just watch any of
Hadriex's videos.
Why this change, I don't get it?
5. Location : $72884
Makes human controlled units not "bump" into AI units before the destination.
However it seems to make AI units prefer bumping into human units? Does that really set the
movement cost of tiles occupied by the human player to 0? The relation needed seems to be less restrictive for it than
originally. Is it safe to disable the whole thing and make any unit not bump into another unit of anyone else,
like the human player's units do?
Edit : Just a guess, but did you do this to force AI ships to go through player stacks to initiate an attack? I didn't find any way for the AI to willingly attack on sea, I had to write a new procedure to do it, but your patch notes did say something like the AI attacks more on sea I believe.
6. Location : $7ECD4
I think you wanted to make heroes receive the "1" low priority of taking a hit during strategic combat?
I did make it do that already but I wonder if I guessed right?
Your code checked defense instead of unit type and there is no way a unit has defense>=32h.
7. Location : $82916
Changed Runemaster to only be 4x as effective when casting "True" type disenchant and dispel instead of 3*2=6x on extra mana.
Any other reason for that, or is it just because 6x is too powerful?
I didn't find any change for Disjunction nor the base cost of the spell, only the extra mana, so is it to make them all work the same?
8. Location : $8B532
No idea what this one is, it's a one byte change related to...loading resources from SPELLSCR.LBX?
Probably not very important I guess.
That's all at the moment, I haven't checked magic.exe yet but I assume there isn't anything big changed there, aside from what everyone already knows?
oh, and a question not directly related to insecticide, but you might know it, did you find any location where the AI uses the Planar travel ability/movement type/enchantment on units to shift planes? The procedure I found only works with towers and astral gate, out of which the AI can't use the latter (when I enabled it, the game crashed, and on top of that, shifting an entire garrison out of the city would leave it undefended ). I made the AI target Settlers with Planar Travel but it's pointless if they can't use the ability.