without using self executable MPQs as in firegraft, i'd like the AI to use a new unit
Not like building it or anything, just to use it when they already have it
You see, I have changed the unused "cargo ship" into a sort of mini-kerrigan, a self-cloaked temporary Broodling that now appears instead of the regular one when the Queen uses its Spawn Broodling ability
(the old broodling appears when cancelling a Zerg building or pre-placed in maps)
Yet there is a problem. Though the AI obviously uses the ability to kill,
It will never use the spawned "Princess of Blades" broodlingIt just stands there cloaked without moving.
As a player, you can use it just fine though (even though it doesn't have buttins it responds to commands)
So, how can I "teach" the AI to use this unit based on file editing/hex editing?
None.
At file offset 0xA289B, change 0x28 (Broodling unit id) to your new unit id (0x5B for Cargo Ship).
But wont that make the original broodling itself passive?
Original broodling is still generated when Zerg (including ai) cancels buildings
None.
Yeah. If you want to have the unit AI assignment done for both the Broodling and Cargo Ship unit IDs, you'll have to write new code over an unused area of the exe (such as the sections with 0xCC bytes) and insert a replace a section of the function with a jump or call to your new code.
MMmhm. I think I can overwrite some hero AI, since many are unused in campaigns even.
I reckon that will work without having to remove another regular unit.
For example, say I replace the AI of gui montag (firebat
That should be 0a (unit N°10), but where to find the offset?
None.