Staredit Network

Staredit Network -> UMS Assistance -> Running Multiple AI Scripts?
Report, edit, etc...Posted by Staredit.Net Essence on 2005-03-23 at 06:49:05
Hi,

I have problem with my maps.

Normally I make a location above the AI's main building, run there the Insane script and the AI builds, attacks correctly. The problem is, when the AI looses his starting base. Then it is not able to build anything more than (for example) detectors, phylons and drones. So actually if I destroy it's starting base, practically, the game is over, the expansion bases are doing only harvesting... The AI never builds additional gateways, etc in it's expansion bases.

Basicly, I want him to build something sinnful on the expansion and defend it better.

My first idea was, to add one more location (near to resources) and run there the Area Town script. I expected from AI, to play (as before) on Insane level, plus to build the second base on the new location and defend it. But it wasn't like that. The AI played on Insane level, but only it's 4th expansion base was placed on the location, where the Area Town script was running?

Any ideas to solve this?

My second question is, witch AI script do I have to run, if I want to play the most difficult level and both me and the AI starts with 1 main building, 4 harvesers and nothing else (standard start on melee)? The (campagne) "Insane" one or the custom one? When do I have to use which? Any experiences?

Thanx
cumi
Report, edit, etc...Posted by SA_Max71 on 2005-03-23 at 09:43:45
QUOTE
[Expansion] Zerg Custom Level – The computer will build a town, expand that town, and attack any enemies that it encounters on the map.


QUOTE
[Expansion] Zerg Campaign Insane – The computer will build all units, and research all technologies. After doing so, the computer will school you in the art of playing Starcraft.


Considering the above from Blizzard's SC help file, you will want to use the Insane AI scripts. As for the rest, sorry, I can't help you.
Report, edit, etc...Posted by BeeR_KeG on 2005-03-23 at 09:46:18
Read this first:
http://www.staredit.net/index.php?tutorial=22

Try using Campaing Insane.

The problem is that not all AI's do the same thing, some are just for harvesting mienrals and defending themselves more liek a neutral player, and others are very dificult to defeat.
Report, edit, etc...Posted by bajadulce on 2005-03-23 at 18:39:52
QUOTE
The AI never builds additional gateways, etc in it's expansion bases.


This is because of the way the script is written. I've included the actual script here if you would like to take a closer look at what it actually does.-----> [attachmentid=6747]

If you scroll down to about 3/4 of the way you will see this block of code:

expand 99 block4
wait 750
goto block5

this block tells the computer to create a new expansion using "block4" instructions. Block 4 only builds a nexus and then continues to build probes as instructed by block2. Blizzard's insane script, tho a bit "tougher", is still pretty pathetic. No offense to Bob Fitch, the actual coder of these scripts, as his instructions were probably not to build the "toughest" scripts but instead simply a "tougher" one. Here are the rest of the blocks pertaining to expansions.

:block4
start_town
build 1 nexus 80
wait_build 1 nexus
get_oldpeons 8
multirun block2

:block2
build 1 probe 80
wait_build 1 probe
build 2 probe 80
..... etc
wait_build 24 probe
stop

What can you do to correct this? NOTHING without doing one of the 2.

1. Use triggers and locations to "spawn" buildings/units.
2. Use a simple MOD that will work on all your future maps etc.

Both have their pluses/minuses.
with triggers maybe you could "assist" the "insane Ai" by building at his expansoins with the following:

Trigger
Description:
Faking it.... building gateways/cannons at expansion
Players:
¤ insane computer1
Conditions:
¤ if insane computer1 commands at least 1 nexus at location expansionA
Actions:
¤ create 1 pylon at ExpansionA_pylon1

Trigger
Players:
¤ insane computer1
Conditions:
¤ if insane computer1 commands at least 1 pylon at location expansionA_pylon1
Actions:
¤ create 1 gateway at expansionA_pylon1
¤ create 1 cannon/ 2 gateways/ stargate etc at pylon1


I'm not very experienced w/ UMS triggers and maps yet, so this probably is extremely primative and ineffecient.

I am however very adept at custom Ai script writting and If for fun you would like to see your expansions "building" something, I've really quickly written a small cwad MOD you can load before playing your map. In this cwad I have replaced both "custom expansion level" and "custom expansion insane" with Racine's (Only the best Ai scripter in the WORLD!) 3.0Ai Protoss, Zerg, and my own Xel'Naga Terran.

updated correct file blushing.gif
Download this file here -----> Attached File BlizzHard.zip ( 224.49k ) Number of downloads: 1

or visit the topic it is written under here ----> http://www.staredit.net/index.php?act=ST&f=6&t=12604

Hope all this babble helps.

Good luck with your map wheter you use triggers or a MOD!
Report, edit, etc...Posted by l)ark_13 on 2005-03-23 at 19:02:20
Well, you are making a UMS game (melee style) so you can add a trigger that will make this work. Just make a trigger like this:


Trigger
Description:
AI Script Location always on a Nexus.
Players:
¤ Insane Computer
Conditions:
¤ Always.
Actions:
¤ Move location "AI Script Location" on "Nexus" owned by Player "Insane Computer".
¤ Preserve Trigger.


That means that the AI Script Location will always be centered on a Nexus and therefore the comp will never become "sucky" again. I hope this works biggrin.gif
Report, edit, etc...Posted by Ultimo on 2005-03-23 at 19:34:46
QUOTE(l)ark_13 @ Mar 23 2005, 05:02 PM)
Well, you are making a UMS game (melee style) so you can add a trigger that will make this work.  Just make a trigger like this:





Trigger
Description:
AI Script Location always on a Nexus.
Players:
¤ Insane Computer
Conditions:
¤ Always.
Actions:
¤ Move location "AI Script Location" on "Nexus" owned by Player "Insane Computer".
¤ Preserve Trigger.


That means that the AI Script Location will always be centered on a Nexus and therefore the comp will never become "sucky" again.  I hope this works  biggrin.gif
[right][snapback]171133[/snapback][/right]


I doubt that would ALWAYS work, since moving locations probably wouldn't fix the problem. And, what if you have two nexus' Are you screwed?
Report, edit, etc...Posted by chuiu on 2005-03-23 at 19:58:00
And the preserve trigger will make sure the AI doesn't work properly. Great job!
Report, edit, etc...Posted by l)ark_13 on 2005-03-23 at 23:11:23
QUOTE
I doubt that would ALWAYS work, since moving locations probably wouldn't fix the problem. And, what if you have two nexus' Are you screwed?


Well no, because it would center on only one nexux at a time. If the nexus that had the location got destroyed the location would just move to another nexus and stay there until the second nexus got destroyed.
But I had no idea preserve trigger screws up the AI like that, sorry.
Report, edit, etc...Posted by SA_Max71 on 2005-03-25 at 05:28:29
Besides, making the location's name be, say, "give 1,000 minerals to player 1" won't just give 1,000 minerals to player 1. There has to be a trigger that does this. The same thing goes for AI scripts.
Report, edit, etc...Posted by Turin on 2005-03-25 at 22:53:14
You could have locations at the harvesting points that say when the computer brings a nexus to the place it gets extra units. And for the moving the location thing, there is almost always a way to get rid of a constant-firing script. Create the location over the starting base, then a trigger like this:
Trigger
Description:
AI Script Changes Nexus
Players:
¤ Computer
Conditions:
¤ Computer Brings exactly 0 Nexus to Base
¤ Computer Brings at least 1 Nexus to Anywhere
Actions:
¤ Center location Base on Nexus owned by Computer at Anywhere
¤ Run AI script Insane Protoss Campaign at Base
¤ Preserve Trigger

Next Page (1)