But the scripts are all the way on my other computer. It happens when a label is called after the label is stated. I think your editor just thinks its unused since its not called before it was stated. However, for some odd reason, everything works just fine.
Corruption occurs when I open an editted AI script more than two times and there are less scripts than the original.
PyMS and ProTRG developer
What version are you using? The label problem is the exact one I fixed (or should of if you have the latest version).
I'll look into the corruption problem. Just to make sure I understand correct, I can recreate it with these steps:
1) Open default aiscript and bwscript
2) Delete some scripts
3) Save As a different file, close
4) Open and close twice
5) Receive error
Correct?
What version are you using? The label problem is the exact one I fixed (or should of if you have the latest version).
I'll look into the corruption problem. Just to make sure I understand correct, I can recreate it with these steps:
1) Open default aiscript and bwscript
2) Delete some scripts
3) Save As a different file, close
4) Open and close twice
5) Receive error
Correct?
Pretty much. I did add some scripts though
. I'll need to check which version Im using then.
PyMS and ProTRG developer
I can't recreate either problem. I think you might have an older version, which is causing the first error, and possibly the second one though it might still be here. The only way I can figure out this bug without a way to recreate it is if you can send me one of the corrupt files, which is the harder way to go about it.
Edit for Updates:
I've started to do a more in depth testing of PyDAT (something I never really did before), and have found some issues. Currently PyDAT will corrupt units.dat and weapons.dat when saving. This is a result of incorrect loading and compiling of the entries: StarEditPlacementBoxWidth, StarEditPlacementBoxHeight, AddonHorizontal, AddonVertical, UnitSizeLeft, UnitSizeUp, UnitSizeRight, and UnitSizeDown for units.dat, and MinimumRange, and MaximumRange for weapons.dat. There also seem to be some issues related to the dropdown boxes. All these issues have been fixed for the next release along with various improvements such as icon, unit size, and healthbox previews, plus disabling of things such as Infestation which are restricted to certain unit id's.
Updates for PyTRG are that the next version will support TrigPlug (actually it will be the only editor that supports TrigPlug). TrigPlug is a new FireGraft plugin being developed by FaRTy1billion which adds custom conditions and actions for custom map makers. These will range from changing the speed of the game IN game, to doing math with death counters. Check out TrigPlugs topic
here.
Post has been edited 1 time(s), last time on Jul 9 2008, 4:46 am by poiuy_qwert.
Sleeping wolves wake hungry.
Hm.
I was using PyTBL, and I deleted a few entries because the delete key doesn't work in the editing fields =P
Also, the up and down keys on the keyboard both move an entry down.
And I think it crashed when I tried saving. Can't remember, though lol.
Yeah, mainly minor bugs.
PyMS and ProTRG developer
Wow, I don't know how those got passed me in the first place, but they are fixed now. Thanks for the report!
Sleeping wolves wake hungry.
Yeah, neither do I. I guess because I wasn't thoroughly testing anything properly.
I'll keep you posted if I find anything.
I can't recreate either problem. I think you might have an older version, which is causing the first error, and possibly the second one though it might still be here. The only way I can figure out this bug without a way to recreate it is if you can send me one of the corrupt files, which is the harder way to go about it.
Erm... TRY AGAIN
. Maybe it was fixed, I dunno. I'll check later.
I have a question about the debug command though...
The setup is something like this: debug(blah,"");, but does it jump to section "blah"? Or does it merely check it?
Post has been edited 1 time(s), last time on Jul 10 2008, 3:23 am by A_of-s_t.
PyMS and ProTRG developer
Yes, the debug command is exactly like a goto() with the exception of the computer saying something.
I also forgot to mention. If someone has used PyDAT to edit a units.dat or weapons.dat, you can send it to me and I will check them for corruption and fix them.
On macs when you save the setting file last path goes to this: 'lastpath':'missile.grp',\ or such and then when you hit open again it has an error cause this is not a path.
None.
PyMS and ProTRG developer
Does that happen with every program?
Edit: I found the problem. Thanks for the report, its fixed for next version.
Post has been edited 1 time(s), last time on Jul 12 2008, 6:01 pm by poiuy_qwert.
A lot of self.settings.get('lastpath', '') have to be changed to self.settings.get('lastpath', BASE_DIR)
None.
PyMS and ProTRG developer
Actually to fix it there is one line in every program:
self.settings['lastpath'] = os.path.basename(file)
which should actually read:
self.settings['lastpath'] = os.path.dirname(file)
(basename should be dirname)
Edit: wait... did you mean UNIX doesn't like the empty path name? I think i get what you mean, I'll do that too. Thanks.
Post has been edited 1 time(s), last time on Jul 13 2008, 4:30 pm by poiuy_qwert.
PyMS and ProTRG developer
Just a little update. Not only am I adding support for TrigPlug to PyTRG, I have also finished the GUI for PyTRG. This shot shows the GUI and an example of TrigPlug actions:
Its beautiful. I almost cried.
Esp. the location and string display functions that I saw.
PyMS and ProTRG developer
I also would like to mention that, like PyAI, it has full tab-completion on Regular/TrigPlug Condition/Action names, Keywords (like At Least), Unit names, AI Script ID's, AI script names, and variables. It also has hover info, so when you hover over a Regular/TrigPlug Condition/Action a tooltip shows the command, parameters, a description of what it does, then a list of what each type of parameter is. I'm also looking into adding code collapsing, but it will most likely take a large re-write of my code displaying textbox, so it might not happen till a later version.
PyAI w/GUI v1.7 tells me that every .bin script is invalid or corrupted. Which is really bugging me... and I mean EVERY script.
PyMS and ProTRG developer
Actually yeah that was just pointed out to me by ashara. It seems I left some debugging code in when i released that version and it has taken till now to be noticed (and no its not even random, its pretty much every file will not work). Since noone else has really been affected by it (as far as i know), i chose to wait to update the download, and give manual fix instead (which is very easy). To fix it just:
1) Go into the Libs folder in the main PyMS folder
2) Open AIBIN.py
3) Delete line 520 and save
Thats it. The area to edit will look like:
for fo in findoffset[curoffset]:
raise
ais[id][4][fo[0]] = len(cmdoffsets)
fo[1][fo[2]] = len(cmdoffsets)
but it should be:
for fo in findoffset[curoffset]:
ais[id][4][fo[0]] = len(cmdoffsets)
fo[1][fo[2]] = len(cmdoffsets)
Sorry for the inconvenience.
I demand you fix it for me
PyMS and ProTRG developer
I've started working on an iscript editor for PyMS. I have finished loading files and pretty much finished decompiling files, just need to test it more and have extra info printed in comments like IceCC. Here is an example decompile:
# ----------------------------------------------------------------------------- #
.headerstart
IsId 18
Type 26
Init HydraliskInit
Death HydraliskDeath
GndAttkInit HydraliskGndAttkInit
AirAttkInit HydraliskGndAttkInit
Unused1 [NONE]
GndAttkRpt HydraliskGndAttkRpt
AirAttkRpt HydraliskGndAttkRpt
CastSpell [NONE]
GndAttkToIdle HydraliskGndAttkToIdle
AirAttkToIdle HydraliskGndAttkToIdle
Unused2 [NONE]
Walking HydraliskWalking
WalkingToIdle HydraliskWalkingToIdle
SpecialState1 [NONE]
SpecialState2 HydraliskSpecialState2
AlmostBuilt [NONE]
Built [NONE]
Landing [NONE]
LiftOff [NONE]
IsWorking [NONE]
WorkingToIdle [NONE]
WarpIn [NONE]
Unused3 [NONE]
InitTurret [NONE]
Disable [NONE]
Burrow HydraliskBurrow
UnBurrow HydraliskUnBurrow
Enable [NONE]
.headerend
# ----------------------------------------------------------------------------- #
HydraliskInit:
imgul 30 0 0
HydraliskWalkingToIdle:
playfram 85
HydraliskLocal0:
waitrand 63 75
randcondjmp 25 HydraliskLocal1
randcondjmp 128 HydraliskLocal2
goto HydraliskLocal0
HydraliskLocal1:
playfram 0
wait 1
playfram 17
wait 1
playfram 34
wait 1
playfram 51
wait 25
playfram 34
wait 1
playfram 17
wait 1
playfram 0
wait 1
goto HydraliskWalkingToIdle
HydraliskLocal2:
randcondjmp 128 HydraliskLocal3
playfram 102
wait 1
turnccwise 1
playfram 119
wait 1
turnccwise 1
playfram 136
wait 1
turnccwise 1
playfram 153
wait 1
turnccwise 1
playfram 170
wait 1
turnccwise 1
playfram 187
wait 1
turnccwise 1
goto HydraliskWalkingToIdle
HydraliskLocal3:
playfram 102
wait 1
turncwise 1
playfram 119
wait 1
turncwise 1
playfram 136
wait 1
turncwise 1
playfram 153
wait 1
turncwise 1
playfram 170
wait 1
turncwise 1
playfram 187
wait 1
turncwise 1
goto HydraliskWalkingToIdle
HydraliskDeath:
playsnd 867
setfldirect 0
playfram 204
wait 2
playfram 205
wait 2
playfram 206
wait 2
playfram 207
wait 2
playfram 208
wait 2
playfram 209
wait 2
playfram 210
wait 2
playfram 211
wait 2
lowsprul 147 0 0
wait 1
end
HydraliskGndAttkInit:
playfram 0
wait 1
nobrkcodestart
playfram 17
wait 1
playfram 34
wait 1
playfram 51
wait 1
HydraliskGndAttkRpt:
wait 1
playfram 68
playsnd 64
sproluselo 332 9728
wait 1
playfram 51
wait 1
nobrkcodeend
gotorepeatattk
ignorerest
HydraliskGndAttkToIdle:
playfram 34
wait 1
playfram 17
wait 1
playfram 0
wait 1
goto HydraliskWalkingToIdle
HydraliskWalking:
move 2
wait 1
playfram 102
move 2
wait 1
playfram 119
move 2
wait 1
playfram 136
move 6
wait 1
playfram 153
move 6
wait 1
playfram 170
move 6
wait 1
playfram 187
move 2
wait 1
playfram 85
goto HydraliskWalking
HydraliskSpecialState2:
playfram 280
goto HydraliskLocal4
HydraliskLocal4:
wait 125
goto HydraliskLocal4
HydraliskBurrow:
imgol 423 0 0
playfram 212
wait 1
playfram 229
wait 1
playfram 246
wait 1
playfram 263
wait 1
playfram 280
wait 1
sigorder 4
goto HydraliskLocal4
HydraliskUnBurrow:
waitrand 1 5
imgul 423 0 0
playfram 263
wait 1
playfram 246
wait 1
playfram 229
wait 1
playfram 212
wait 1
sigorder 4
goto HydraliskWalkingToIdle
(the commands and header labels should be aligned but the site doesn't like the tabs)