Page 1 of 1

AI refuses to tech and build buildings.

Posted: Sat Dec 24, 2011 6:50 pm
by mark_009_vn
Ok, I'm working on my campaign, and it seems like no matter what kind of AI script I tried to run, the AI (Zerg) would refuse to do anything more than to pump out Zergling (since I gave it a Spawning Pool, otherwise it wouldn't do nothing at all). Does the AI simply soft locks the moment the map run? because it kinda looks like it.

I really need help here, as my campaign is in all sorts of shit with this calamity.

Re: AI refuses to tech and build buildings.

Posted: Sat Dec 24, 2011 11:35 pm
by Taeradun
wtf. that's not normal behaviour (hence why normal campaign maps actually work), must be something in the way you've set it up or something else in your campaign/mod that's causing it; I dunno what though :(

Re: AI refuses to tech and build buildings.

Posted: Sun Dec 25, 2011 6:21 am
by mark_009_vn
Took some observations with the scripts. The AI would only build peons properly if it have no peons at all in the beginning, the AI will not build buildings (however will upgrades and build addons) and will only build units if it have access to the tech tree. The AI seems to be in a state of constant soft locking and will only build units when attacked. Is this normal or am I missing something here? All I wanted to do is to make the AI plays like it is a melee map (like expanding and teching up).

Re: AI refuses to tech and build buildings.

Posted: Sun Jan 01, 2012 4:45 pm
by Pr0nogo
Try using 'Expansion Zerg Campaign Custom Level'. From what I understand, that script uses what it has and expands upon it.

Re: AI refuses to tech and build buildings.

Posted: Mon Jan 02, 2012 5:21 am
by mark_009_vn
Pr0nogo wrote:Try using 'Expansion Zerg Campaign Custom Level'. From what I understand, that script uses what it has and expands upon it.
I don't see "Expansion Zerg Campaign Custom Level" in the selection, I presume you mean the "Expansion Zerg Custom Level". In that case then disappointingly I've tried and failed. :nosebleed:

I'm using a non-standard version of Starcraft, it has almost everything normal Starcraft had (including music and campaign, no dialogue sounds and cutscene for the campaign though), compatible with Iccup and a whole lot more emulated Battle Net servers. I don't know if this would affect the AI script in anyway. Also I've tried many other versions of Starcraft, even with different patches, non works.

Re: AI refuses to tech and build buildings.

Posted: Mon Jan 02, 2012 6:20 am
by Pr0nogo
That is what I meant, and that's strange. I'm experiencing similar issues with my map. I'll keep trying to solve the issue.

Re: AI refuses to tech and build buildings.

Posted: Tue Jan 10, 2012 3:03 am
by Eredalis
The only way to fix that sort of issues is to write your own AI script.
This little tutorial is maybe a bit helpful for all participants of the Contest.

http://www.broodwarai.com/index.php?page=tools

- Download SCAIEdit v3.1 and click Open HDD Navigator
- Open the directory default and you found two files called aiscript.bin (SC) and bwscript.bin (Brood War)
- Since most people create Brood War .scx maps, choose bwscript.bin
- Check the Script ID with the Brood War levels, which you should have opened in StarEdit, for comparison
- For example, BW Protoss Level 2, uses only one script: PB2A
- Open this script and edit the values like you need (use Syntax check for errors)
- After you finished, save and open your SEMPQ, then import this modified bwscript.bin to your archive.
- Then go back to the editor and use the PB2A script in your map for your computer opponent.

Re: AI refuses to tech and build buildings.

Posted: Sat Jan 14, 2012 1:08 pm
by Pr0nogo
Alright, thanks a bunch. Hopefully that'll work.

Re: AI refuses to tech and build buildings.

Posted: Sat Feb 18, 2012 6:41 pm
by mark_009_vn
Sorry for bumping/reviving this old thread but I just found out how to get the AI to work!

Apparently, the AI will only build in the center of the location where the AI script is running. (For example, In "Run AI Script At Location("TSUx", "Bridge");", the AI will build IN THE CENTER of the location "Bridge" and not anywhere else). Because of this, the location where the AI script should run must be buildable, pathable, and close enough to it's peons so it could build properly. I don't know if this has already been posted on the forums before, but I'll just post it here anyway.

Re: AI refuses to tech and build buildings.

Posted: Wed Feb 22, 2012 10:46 am
by Eredalis
Uhm... This is basic requirement. I thought you knew that already.
Nevertheless, this awareness won't solve your problem with the inflexible AI.