Staredit Network > Forums > Modding Assistance > Topic: Adding a unit to AI use
Adding a unit to AI use
Feb 4 2026, 5:49 pm
By: NimoStar  

Feb 4 2026, 5:49 pm NimoStar Post #1



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" broodling

It 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?



Ultimate StarCraft: Age of Darkness stand-alone no-cd download (no false positives)

Feb 5 2026, 6:57 pm DarkenedFantasies Post #2

Roy's Secret Service

At file offset 0xA289B, change 0x28 (Broodling unit id) to your new unit id (0x5B for Cargo Ship).




Feb 8 2026, 8:40 pm NimoStar Post #3



But wont that make the original broodling itself passive?

Original broodling is still generated when Zerg (including ai) cancels buildings



Ultimate StarCraft: Age of Darkness stand-alone no-cd download (no false positives)

Feb 9 2026, 12:46 am DarkenedFantasies Post #4

Roy's Secret Service

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.




Feb 9 2026, 2:48 am NimoStar Post #5



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?



Ultimate StarCraft: Age of Darkness stand-alone no-cd download (no false positives)

Mar 16 2026, 3:54 am NimoStar Post #6



Alright, I actually solved this one in that, even if the unit is not paret of any AI groups, with appropriate orders, and settings, it can be used by the AI to attack

Important to keep in mind these settings :

- Battle Reactions
- Full auto attack

Orders:

- Guarding in general, except for "attack unit"

0- [DO] become a guard (unchecked "don't become a guard")
0- [Don't] ignore strategic suicide missions (unchecked "ignore strategic suicide missions")

Attachments:
2026-03-16 00_49_37-PyDAT Veeq.png
Hits: 0 Size: 15.38kb
2026-03-16 00_50_31-PyDAT Veeq.png
Hits: 0 Size: 9.47kb



Ultimate StarCraft: Age of Darkness stand-alone no-cd download (no false positives)

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:21 pm]
lil-Inferno -- POOPY!!!! PEEPEE!!!!!!! BALLSACK!!!!!!!!!!!!!
[12:50 am]
O)FaRTy1billion[MM] -- ya
[2026-10-14. : 3:20 am]
Symmetry -- Dang I'm up to 155 minerals gambling really pays off guys
[2026-10-11. : 6:02 am]
Donald -- Samase
[2026-10-09. : 2:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[2026-10-09. : 2:47 am]
Symmetry -- I'll check it out this weekend!
[2026-10-09. : 2:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[2026-10-09. : 2:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[2026-10-09. : 1:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
Please log in to shout.


Members Online: lil-Inferno, NudeRaider