Help. PyAI not working as it did in older version?

Help - Resources - Discussion
User avatar
SilverG
Posts: 10
Joined: Wed Feb 06, 2013 4:35 pm

Help. PyAI not working as it did in older version?

Postby SilverG » Wed Feb 06, 2013 4:44 pm

Hello all,
I'm relatively new to the forums, but not to SC BW.

What's with the new version of PyMS? Each time I make my own AI (edit the things needed, so that the AI script wouldn't need a location - which has been working with the older version of PyAI) and as soon as I add it to the MOD that's I've made ie. Starcraft Clonewars (using either PyMPQ or WinMPQ) the game won't apply the AI. It has worked so far with the older PyMS versions.

And another thing why does the program not recognize the unit/building/upgrade/tech names? I must write down their codes in PyAI, and then after I've saved it the PyAI automatically corrects it to the specified building name, but incorrectly, example:

build(1, 106, 200) = where 106 would be command_center in the old PyAI, but here it's corrected to Terran Command Center (every 1st letter caps and space between the words) SC BW , at least mine doesn't recognize this string, and any other for that matter.

I would appreciate if someone would help me out with this issue, and/or maybe upload an older version of PyMS. Thank you.
User avatar
bajadulce
Posts: 52
Joined: Fri Feb 01, 2013 7:02 pm

Re: Older version?

Postby bajadulce » Wed Feb 06, 2013 5:17 pm

I'm just getting Starcraft installed again on my machine as well as all the modding programs setup. I will try to check out these things when I can.

@ As for SCraft not recognizing your script: Try putting your script (.txt form w/o errors) into one of the BWAILauncher's folders and see what happens. If it runs in BWAILauncher, then you might not be indexing the file in your MPQ correctly. (possibly the wrong language or directory). Just a quick test to isolate that variable.

@ PYAI renaming. It's been awhile, but the compiled script shouldn't matter what form it is in. There is a x=y or some button like that if I recall that will use an external list command. Again, I'll be able to answer your question more thoroughly after I get my modding folders set back up.

We also are in desperate need of building some tutorials for the use of PyAI. I know how frustrating it can be not to have simple examples to follow along with to check your own code/steps. Ashara had put together something and am in the process of organizing something so that we can reupload it soon.

Stay patient and we'll get your issues straightened out.
User avatar
Taranok
Posts: 256
Joined: Tue Sep 07, 2010 9:41 pm

Re: Older version?

Postby Taranok » Wed Feb 06, 2013 9:37 pm

You can add external definition files by hitting the x=y button in the main PyAI window.

Make sure you dump aiscript.bin in the scripts/ directory of the .exe. If it still doesn't work try what bajadulce suggested.
User avatar
SilverG
Posts: 10
Joined: Wed Feb 06, 2013 4:35 pm

Re: Older version?

Postby SilverG » Wed Feb 06, 2013 10:06 pm

I am putting it in the scripts/ section of the *.exe file.

The problem is that PyAI doesn't recognize the string that BWAI is using for example in the older version it was easy just to put Build(1, hatchery, 200). . . in the new 2.4 PyAI I have to switch the "hatchery" or any other building with it's respective numeric code, like in this case 131 (from the unitdef.txt). I have done so for all buildings/units/upgrades and tech, because PyAI just says cannot find "hatchery" : "Parameter Error: unit "hatchery" was not found Line:xx Build(1, hatchery, 200)"

Once I've made ALL the changing (which took me 2 hours to learn :) ), I save the AI to a different directori as AIscript.bin or aiscript.bin
And the next time I open it via PyAI (2.4) the program changes the codes to as in example 131 = "Zerg Hatchery" when it should only be "hatchery" - which BWai does recognize.

Now did I make the problem that I'm struggling with more clearer?

Oh, and thanks for all the help you've given me so far :)
User avatar
Taranok
Posts: 256
Joined: Tue Sep 07, 2010 9:41 pm

Re: Older version?

Postby Taranok » Wed Feb 06, 2013 10:24 pm

maybe I'm missing something, but what is it you're referring to as BWAI?

EDIT: baja probably knows more about PyAI, I usually use PyAI for checking syntax errors.
User avatar
SilverG
Posts: 10
Joined: Wed Feb 06, 2013 4:35 pm

Re: Older version?

Postby SilverG » Wed Feb 06, 2013 10:30 pm

As BWAI I was referring to the game itself sorry. . . . :)

Anyway did some tweaking here and there. . and after a couple of minutes everything is as it should be. . . Thank you for your help and understanding :)
User avatar
bajadulce
Posts: 52
Joined: Fri Feb 01, 2013 7:02 pm

Re: Older version?

Postby bajadulce » Wed Feb 06, 2013 10:45 pm

Glad to hear you got it working as you needed.

Just curious what you had to do to get working (or what you might have been doing incorrectly)? Somebody else might stumble on the same problem and your solution might be able to help them as well.
User avatar
SilverG
Posts: 10
Joined: Wed Feb 06, 2013 4:35 pm

Re: Help. PyAI not working as it did in older version?

Postby SilverG » Thu Feb 07, 2013 6:27 am

True :)

Well I've did the X->Z (xibbit :P ) and put in the Unitdef.txt in the Manage External Definition. Since the programe PyAI didn't do it at installation/unpacking.
So this is a must do "objective" :) for all of you who are unpacking the PyMS.exe and want to edit PyAI's.

Cheers!
User avatar
SilverG
Posts: 10
Joined: Wed Feb 06, 2013 4:35 pm

Re: Help. PyAI not working as it did in older version?

Postby SilverG » Thu Feb 07, 2013 7:21 pm

The problem still persists . . . .

I've moved my edited aiscript.bin the the desired mod's *.exe via WinMPQ, under scripts\aiscrip.bin, and the game doesn't use it. I've even edited the flags in the ai, such as clearing the "broodwar only", "requires a location" and "invisible in staredit" boxes.

Can anybody tell me what's wrong here?
I can even send you the aiscript.bin that I've made, should you require it.
User avatar
bajadulce
Posts: 52
Joined: Fri Feb 01, 2013 7:02 pm

Re: Help. PyAI not working as it did in older version?

Postby bajadulce » Thu Feb 07, 2013 7:28 pm

you should post the first few lines of your script (i.e. headers).

Code: Select all

# baja T v1.1
TMCx(1342, 101, aiscript):

    start_town()
    farms_notiming()
    transports_off()
...


Does your script work if you put it into the bwailauncher?

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: No registered users and 1 guest