Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Mass cpu unit attack, help please
Mass cpu unit attack, help please
Mar 16 2010, 5:11 pm
By: flagitious  

Mar 16 2010, 5:11 pm flagitious Post #1



I am making a map similar to 20k hydra, 1billion lings, etc. I will be creating tons of various zerg units (including casters: defiler, queen, infested terran, etc). What is the best way to get them to attack the defenders smartly?

Attack/patrol commands will need to have targets calculated (and even then they will favor the left most point with units, which would be non optimal). Random/Strategic suicide missions seem to work well for fighters, but not casters (also is the location in that script the units in that location that are used, or the destination of attacks?).

Is there a simple and good way to do it, or do I just need to brute force it with many triggers/locations/commands? Also this seems like a fairly common thing that people would want to do, but yet search didn't turn up much, has there been previous discussion about this?



None.

Mar 16 2010, 5:17 pm Lethoth Post #2



You can run the AI script: Send all units on random suicide missions, and you can order them to patrol too. If there is a middle of the arena, make a big location in all the arena and make a death counter, add 1 and presserve, when it reaches 30 order them to patrol to the big location and so on. If this is not what you needed please let me know
Here's an example trigger: you need hyper triggers, obviously

Trigger("Player 8"){
Conditions:
Always();

Actions:
Set Deaths("Player 8", "Right Pit Door", Add, 1);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 8"){
Conditions:
Deaths("Player 8", "Right Pit Door", At least, 30);

Actions:
Set Deaths("Player 8", "Right Pit Door", Subtract, 30);
Order("Player 8", "Any unit", "ARENA", "ARENA", patrol);
Preserve Trigger();
}

//-----------------------------------------------------------------//



None.

Mar 16 2010, 5:32 pm NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Spellcasters will only cast their spells if they don't have an order. That means you should order them to attack to the target location to get them to stop and thus lose their order. And even then usually only do something when provoked by being attacked.

Melee AIs help to make them more autonomous but this is still far from perfect results.
Just one thing: Finish your map before starting to test how to improve AIs because different amounts and types of units make the AI to use spells differently.

Quote from Lethoth
you need hyper triggers, obviously
No. You can just adjust the death values. Without hypers just divide the numbers by 16.

Post has been edited 1 time(s), last time on Mar 17 2010, 5:25 am by NudeRaider. Reason: clarification




Mar 16 2010, 7:38 pm flagitious Post #4



Thx Lethoth and Nude. I will experiment with a combination of attack and the aiscripts and report back.

As for finishing the map for first. It is going to be a pretty simple map, basically just up to around 100 levels of various combination of increasingly difficult waves of enemies attacking a team of players in the center. Giving cash for kills/etc. I have written the skeleton and ruby script to generate all the levels automatically, given a text list. So basically all that is left to do is design the levels, balance the mineral rate/difficulty, and make the ai smart (which all seem to go hand in hand).



None.

Mar 17 2010, 9:22 pm flagitious Post #5



Random and strategic suicide missions both made the fighting units behave very nicely for what I need. They make the casters cast pretty well, but for some reason the casters will not move smartly, they will just clump up away from the action. So what I ended up doing was every 5 seconds toggle what all units do between random suicide, strategic suicide, and attack to a destination. The destination is by default the center of the map, but if no one is there (or the unit is already at the center), it chooses a random location (with units) from 19 possible sectors. I made so many (19) because if the sectors were big the center location would favor left most, etc. This worked even better than I had hoped, you can see a sample level here: http://golfscript.com/temp/zergai.scx (play it on single player with show me the money, as protoss or terran).

However I ran into a new problem, haven't searched the forums yet for it. Queens, and defilers worked well, but Hero Queen/Defiler would never cast anything. I wanted to have different levels some with regular defiler and later levels with hero defiler so that regular defiler can only use darkswarm, but hero defiler would be able to use plague too. Any suggestions on getting heroes to cast?



None.

Mar 17 2010, 9:58 pm Lethoth Post #6



Maybe they don't have those spells marked as "researched"



None.

Mar 17 2010, 10:44 pm SelfPossessed Post #7



To my knowledge, it's not possible to get hero units to cast spells via AI scripts. You need to use normal units as hero units lack the same basic AI. It's the same reason why hero burrowed Zerglings will stay burrowed when attacked, while normal Zerglings will unburrow.



None.

Mar 17 2010, 10:55 pm flagitious Post #8



Thanks I guess I will have to make do with normal units. Another question... is it possible to create a building for the CPU and make it research an upgrade using an AI script? (such as melee weapons, or plague, etc?)

Edit: apparently it is possible to get tech settings upgraded by giving them units with the upgrade (this will be useful). Still though I am curious if anyone has had success with the other upgrades?

Post has been edited 1 time(s), last time on Mar 17 2010, 11:03 pm by flagitious.



None.

Mar 18 2010, 5:28 am NudeRaider Post #9

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

http://www.staredit.net/topic/5332/




Mar 19 2010, 12:27 am flagitious Post #10



Thanks, you have been very helpful. That method looks promising, but for now I'll use edited hero ling/hydra etc so that they are the same as if they were fully upgraded (as that method looks a little complex). After I'm done with the rest of the map I can go back and try to get real upgrades (so that units like the lurker have actual upgrades since there is no hero.

The map is coming along good. I added a larva generation system so that zerg don't get screwed (since there is fast build, but hatcheries still cost money and don't produce fast). I am using a flag beacon so that the players can choose where their fast generated larva appear. Since you can only place a flag beacon once, I use inverted locations to determine if it as moved, and if so replace it with a new one. The only problem is if they place it in the exact place that it already is, then they won't be able to move it ever again. Is there any way to detect if the flag beacon has the option to place itself? Maybe with EUD's or similar? This isn't a huge problem but I hate having small imperfections like this.



None.

Mar 19 2010, 5:36 am NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Flag beacons are imperfect anyways since you can only place them the first 5 or so minutes into the game - regardless of when they were created.

And no, there's no way to detect if the player placed it right onto itself.




Mar 19 2010, 6:15 am Apos Post #12

I order you to forgive yourself!

Quote from NudeRaider
Flag beacons are imperfect anyways since you can only place them the first 5 or so minutes into the game - regardless of when they were created.

I wonder is there could be a glitch that allows the flag beacon to work for the whole game. I wouldn't be surprised if there were.

Quote from flagitious
The only problem is if they place it in the exact place that it already is, then they won't be able to move it ever again. Is there any way to detect if the flag beacon has the option to place itself? Maybe with EUD's or similar?

You can place unbuildable terrain under it and have a lot stacked. Or use a different method of doing to same thing.




Mar 19 2010, 2:22 pm flagitious Post #13



Doh I was not aware of that 5 minute thing :( Also apos that works good; the larva generated actually make it implemented by default (but I didn't think of this when I was testing placement).

Edit: Ok what I do instead now is only allow them to place it once (it starts on unbuildable terrain to stop same placement, thx for that idea), but I make sure that the placement is good so they won't need to replace it (place creep under it via a spawning pool)

Edit#2: I've decided to scrap that map. It is decent so far (still needs more levels). But in my opinion it is not that fun or fresh because it lacks a gimmick. If anyone interested you can download it here. However I will be making a map which has some similarity. The basic idea is that everything is free and various waves enemies come and attack you. Most things will be fast build (although possibly not all). All spells except stasis/mc will be 0 energy cost. It starts you off on level 1 with no wait, and there is no wait between levels, so you have to manage to build up an awesome defense for harder levels, all the while dealing with constant attacks. BTW I know this topic has shifted from original question, but I am getting good feedback here so I'll keep all progress and questions posted here.

Post has been edited 2 time(s), last time on Mar 20 2010, 12:15 pm by flagitious.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[01:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
Please log in to shout.


Members Online: NudeRaider, Ultraviolet