Custom Ai results in no players

Started by Darkmapper, March 04, 2010, 10:41:22 AM

Previous topic - Next topic

Darkmapper

Hi guys!

I just downloaded MPQ Editor and opened the easy Ai scripts to modify it. I ectracted a file made some simple changes and putted it back to the mpq (overwrote the old one).
The file was Terran0.galaxy.
All i added was

    AISetStock( player, 3, c_TB_StarportReactor );

and no more.
But when i now load my script with any map, there are no players. No Main building workers. Can any of you guys help me out?

Thanks in Advance: Darkmapper

ProoM

are you sure you are launching it with hacked AI map? This happens to me when I launch it on non-hacked AI map :}.

Darkmapper

Yes im very sure. I run the map first with V5.5 Ai and it worked. After that, i launched it with my onw Ai, and there were no units.

cloak123

Quote from: Darkmapper on March 04, 2010, 11:24:22 AM
Yes im very sure. I run the map first with V5.5 Ai and it worked. After that, i launched it with my onw Ai, and there were no units.

5.5 can load ai even into non ai maps i believe now.

Darkmapper

I tried it with some other maps too, and im 100% sure its not the map...

Darkmapper

bumpedibump

I made another AI, wich didnt work again. Well i also have to say that i didnt "make" one but i modified one. But it didnt work again. I dont get it. I`ve put the teran0.galaxy + another file (attachement upload) in the Triggerlibs in the Starcraft 2 Beta folder. (Another one works).

Can you please take a look at those AIs and possibly test em out on your PC?
Thanks in advance: Darkmapper

sYk0

does the file "TriggerLibs/TerranIAI" exist in the archive? (include "TriggerLibs/TerranIAI")

Can you upload your modified .mpq archive?

Darkmapper

I have no mpq file, since when i modified one, it didnt work.
I downloaded "IAI v0.3" by DarkZeros instead.And so i downloaded Protoss.galaxy and protossIAI.galaxy and just put them in the triggerlibs folder. It worked (or its possible that i didnt realize a change?) Why else would he easily upload only 2 galaxy files and not the hole mpq.

Have you tried it yet?

kblood

#8
Quote from: Darkmapper on March 04, 2010, 04:40:14 PM
I have no mpq file, since when i modified one, it didnt work.
I downloaded "IAI v0.3" by DarkZeros instead.And so i downloaded Protoss.galaxy and protossIAI.galaxy and just put them in the triggerlibs folder. It worked (or its possible that i didnt realize a change?) Why else would he easily upload only 2 galaxy files and not the hole mpq.

Have you tried it yet?
I just read in your custom AI.zip file, and it seems your TerranAIA.galaxy is way too identical to DarkZeros protoss AI. So similar that it might be trying to make protoss units and buildings in its build order. Your AIA scripts needs to be a modified terran script, or DarkZeros scripts with everything protos remade into being similar Terran units and scripts. Even then that might not work.
EDIT: Seems I suck at reading your script. So far I have not really found any errors, all the Protoss to Terran stuff already seems to have been done. I could not find any obvious errors, the script seems included the way it should be. The only thing I can think of is you might be trying to use the protoss AI from DarkZeros at the same time as your Terran AI. I will test the AI to see if that seems to be the problem.
If that is not it, I am guessing syntax problems. Missing a ) somewhere, or something like that.
I just ran a test with this AI script added to the 5.5 script. DarkZeros script runs very well with that one, but when yours is in added instead of his AI, no computers are on the map at all. So I think it must be some kind of syntax error which affects all the AI it seems. Maybe even the placement of buildings and units in the maps when run with this script.

kblood

#9
I just compared your Terran AI some more with his Protoss AI, and I might have found the problem. At least something that is clearly different in these two AI.
Take a look at his Protoss.Galaxy file after, "//  Protoss Init". He made some changes, and made some // to the Blizzard script, and added some scripts of his own instead. Might not be the only thing missing, but there is always the chance that it is :) I might try to see if I can fix it. The AI looks interesting so far.
EDIT: I did some more testing, and looked some more. It is syntax problems and I am quite sure of it. If I take away Terran.Galaxy it works, because it does not use your Terran IAI script. It did not help adding the missing code to Terran.Galaxy either. I am somewhat sure it is a bracket or something like that missing somewhere. I even tried to see what would happen if I removed a bracket on purpose. The exact same effect, no players or anything on the map.
I think someone was making a AI script tool for finding this exact kind of bug in scripts. I guess I might know of one that can do the simple bracket checks. I will try to dig it up.

kblood

Im back again,
I have played a bit against the Protoss AI and it would be very nice if it could work with Terran. If only I could find out why it does not work. It is some very big files to look through, but the thing is very small errors makes the whole thing turn out with player less maps.
I have attached the files again. This time I have fixed all errors I could find. Which was the missing stuff in Terran.galaxy and I found a missing / in the TerranIAI.galaxy, but no luck there either. I fixed one or two places where it was still using protoss terms in terran script that was not disabled with //.
I have been using Notepad++ to help edit the files. Just set the language to C++, since that is basicly what it is. 
http://notepad-plus.sourceforge.net/uk/download.php
It can tell what is what in the file. Unfortunately it cannot tell if a ; is missing it seems, and it is not that good at telling if a { or } bracket is missing either. I had hoped it could just test for missing stuff like that at least, but I think that might not even be possible, because at most it would be able to count the errors, not find them.
I hope some of this helps.

Darkmapper

I thank you alot for your effort. Its not that bad it doesnt work, im not good at such stuff anyway ^^. But thank you for taking so much time to get it working!