Staredit Network > Forums > Modding Assistance > Topic: Creating custom AI for sc2-coop-like map.
Creating custom AI for sc2-coop-like map.
Jul 21 2018, 12:05 pm
By: SPyro_Malin  

Jul 21 2018, 12:05 pm SPyro_Malin Post #1



Hello, i intend on creating couple of custom AIs for my map. Nothing fancy really, just some tweaked build orders, forcing ai to actually upgrade over time (it would be awesome if i could force them to upgrade to 4/4/4). I would like to have 3 opponnets: 1 with base that will build armies from time to time and attack with waves of my choice and rebuild buildings, 2 that will just have units on map and not attack with them, just defending couple of spots but upgrade units over time and repair units and buildings with scv, 3 with no base (well only buildings that will allow it to upgrade) it will get some units with triggers from time to time, which i would like to attack me but not just like sending them with order: patrol, rather like AI do this: travveling and stopping before reaching my base and waiting for most units to group up and then attack (can i do this with AI harass here?).
I would like to have scripts for every race with couple of variations.
I can't find it with google, I really tried. Can someone help me making mini mod like this?
Or maybe i can just force AI to upgrade with triggers?
Or maybe ai that will make upgrades to 3/3/3 but does not attack with preplaced units already exists among those made by Blizzard?

Post has been edited 4 time(s), last time on Jul 21 2018, 12:22 pm by SPyro_Malin.



None.

Jul 21 2018, 1:43 pm UEDCommander Post #2

Sic Semper Tyrannis

First of all, what "SC2 coop like" has to do with the topic? Coop mode doesn't have macro AI.
Second of all, 4/4/4 upgrades are doable (i think StarEdit/SCMDraft's tools are enough for that) but automatically disregard usage of excisting Blizz scripts.
Third of all, you will need certain tools to work on that, in your case it's PyMS. If we're talking about SCR, you will also need Samase.
As for actual scripts:

1) For the attacker with base, it will be sufficient to, using PyAI (part of PyMS), open any existing Blizz script which begins with this:
Quote
start_campaign
wait(1)
start_town
(better BW ones) and work with it. I think it's pretty easy to understand how to change attack waves and add upgrades from and example (if not, feel free to ask), as for rebuilding - just build requests basically (the ones excisting in the beginning of each script).

2) Basically same as 1, cut out attack waves. Not sure what you ment by "couple of spots" though.

3) Take any campaign script as example like in 1, cut out any build requests for any buildings you don't need. You will have to calculate precise moment for trigger to spawn units just before attack_add requests start firing. Alternatively, use action create_unit - example for it's usage can be found in Brood Wars Terran 2 - Town A script. This action requiers XY coordinates instead of location - they can be taken via SCMDraft by pointing cursor on needed position and writing down two numbers in bottom-left corner of screen - theese will be your coordinates.

Post has been edited 2 time(s), last time on Jul 21 2018, 4:49 pm by UEDCommander.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
Please log in to shout.


Members Online: Roy, Ultraviolet