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

Create an account  

 
Insecticide changes

As 1.5 will be containing all of insecticide code (except the parts I further improved already), and I prefer to actually know what is in the files I release, I started processing the list of changed bytes between 1.31 and 1.40n.
Here I will list what questionable, or unknown purpose changes I found, when I need advice what to do with them.
I hope there won't be much of these, so far there is only one, but I only started today.

Probably some of you noticed "Sorcery Floating Islands" instead of just "Floating Islands". The unit gained the "Normal unit" flag which makes the race show up on it. Like Halfling Spearmen, that thing.
That's not the only one change to them however, they also lost Death Immunity.

Does this serve any actual purpose I'm not aware of, or is this an accident and the correct flag was replaced by another somehow?
Reply

Certainly nothing that I can think of.
Reply

Only kyrub can answer that.
Reply

(December 28th, 2015, 12:37)Tiltowait Wrote: Only kyrub can answer that.

That would be the best, ofc.

Found one more.
At 72884h there is a change. A few changes to be more exact.
If I understand properly, this is the procedure that marks map cells already containing too many, or enemy units, as "impossible to move on" for automoving.
He changed it so that when the player is moving, any enemy units always counts as "impassable". Which is a great thing and I love that.

However, when the AI is moving, if the relationship between the two players is low, the enemy army is ignored by the procedure (original effect).
What's also new, is the needed amount of relationship is -20 or lower, not -60, which actually makes this a huge potential conflict source.
When the army in the way of the AI's movement is owned by the human player, it marks the map spot "0" instead of the "-1" of impassable. I believe that makes the movement cost of this cell "0".
Is it to force the AI to go that way, provoking more conflict? Is it related to the bug of AI units not moving? I don't know.

I do know one thing, though. The AI should never, ever just randomly walk into another army, unless they decided to attack it. Doing so means disregarding the strength of the army, and is a very likely way to slaughter their own units, like settlers, engineers, and the like. This might explain why those keep attacking the player for no reason at all sometimes.
Another thing about this is that if movement is not possible due to a peace treaty, the unit will probably just get stuck instead of trying to move around the player.

I would love to have some information on this, because if it does what I think it is, it should be disabled immediately.

Third one : Pre-insecticide Disenchant Area with Runemaster was 3*2 = 6* stronger. Insecticide changed it to 4* stronger. Not so sure about this one...maybe the other spells add up this way and this was the exception, I wonder.
Edit : nope, same change on Dispel Magic found
Reply

(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.
Reply

(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.

Okay, thanks, I'll keep looking around, about 40% done. You changed a ton of stuff, takes a while.
Reply

(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.
Reply



Forum Jump: