Staredit Network

Staredit Network -> Modding Chat -> IScript preview
Report, edit, etc...Posted by SI on 2007-01-11 at 21:34:42
I'm not going to write an iscript compiler.
What this may have, is a text dump of what is being run. (so basicly a decompiler).

Added a few ideas to the UI, most of this isn't functional tho...

user posted image
Report, edit, etc...Posted by nirvanajung on 2007-01-11 at 22:14:32
aight~! that's fine i don't mind waiting for iscript compiler so badly
if u don't have mind

as for new image, that looks near to my expectation for IScript preview
that really come to my mind
btw, dropdown lists which located in near [play] button
is that animation headers list of each scripts ?
those are seems looks like that
Report, edit, etc...Posted by SI on 2007-01-11 at 22:24:40
dropdown next to play has the animation headers, probably also will accept raw offset.

the 3 dropdowns + text boxes at the bottom are to choose images (like underlays / overlays) which are currently active, for example a unit normally has a shadow underlay. those will show current iscript code at the position, if I get that done.
Report, edit, etc...Posted by fatimid08 on 2007-01-12 at 17:10:37
QUOTE
I'm not going to write an iscript compiler.


I know that, I meant actual file specs, how the headers work, what does it point to, how the different entries are organized, how long a tick is, etc. Basically stuff on reading the file. I guess I communicated somewhat unclearly.
Report, edit, etc...Posted by BroodKiller on 2007-01-12 at 19:38:41
The format is quite easy. You can devise most of it from what ICE gives you.
Report, edit, etc...Posted by SI on 2007-01-12 at 19:44:06
isn't the iscript format online somewhere? its fairly simple, the only complicated part is understanding the opcodes
Report, edit, etc...Posted by BroodKiller on 2007-01-12 at 22:09:59
I don't think there is a spec for it. I learned what I know from SCEB and hexing.
Report, edit, etc...Posted by TheNomad on 2007-01-13 at 07:16:51
QUOTE(fatimid08 @ Jan 13 2007, 01:10 AM)
I know that, I meant actual file specs, how the headers work, what does it point to, how the different entries are organized, how long a tick is, etc. Basically stuff on reading the file. I guess I communicated somewhat unclearly.
[right][snapback]612919[/snapback][/right]

Well the headers are pretty self-explanatory. The "type" is basically the number of extra headers (apart from Death and Init) that it will use (in a certain order, of course). They are accessed only if "use full IScript" is enabled in Images.dat, though. As for the "custom" headers, they get linked between eachother with call, return and goto. The opcodes are known (most of them). The Wait are dependent on the game speed.

I don't think the theory goes anywhere beyond that (that is in simple terms and not go through the whole exe thing). Personally, I'd prefer the compiler and the preview to be a 2-in-1 (not decompiler though), that is to actually know how the unit will look like in-game, but if it won't, it's no problem.

I just don't like having 6-7 programs running when 3-4 are enough tongue.gif
Anyway, I look forward to this since atm, the best we have is CV5 to preview IScript, and let's face it, it's as buggy as ICE.
Report, edit, etc...Posted by SI on 2007-01-13 at 10:15:27
QUOTE(TheNomad @ Jan 13 2007, 07:16 AM)
Well the headers are pretty self-explanatory. The "type" is basically the number of extra headers (apart from Death and Init) that it will use (in a certain order, of course).  They are accessed only if "use full IScript" is enabled in Images.dat, though. As for the "custom" headers, they get linked between eachother with call, return and goto. The opcodes are known (most of them). The Wait are dependent on the game speed.

I don't think the theory goes anywhere beyond that (that is in simple terms and not go through the whole exe thing). Personally, I'd prefer the compiler and the preview to be a 2-in-1 (not decompiler though), that is to actually know how the unit will look like in-game, but if it won't, it's no problem.

I just don't like having 6-7 programs running when 3-4 are enough tongue.gif
Anyway, I look forward to this since atm, the best we have is CV5 to preview IScript, and let's face it, it's as buggy as ICE.
[right][snapback]613159[/snapback][/right]

(in a certain order, of course) <- not sure what you mean with that. Do you mean used in different situations, because afaik the iscript itself wont execute other subscripts.

and I dont even know what CV5 is.
Report, edit, etc...Posted by Ojan on 2007-01-13 at 10:20:55
CV5 is a program for compiling and decompiling Blizzard's graphics format files, written by Telamon. Don't think his site is up anymore, but you try to google it if you are curious.

Had .grp support, but the whole program was kinda buggy IIRC
Report, edit, etc...Posted by TheNomad on 2007-01-13 at 13:34:18
QUOTE(SI @ Jan 13 2007, 06:15 PM)
(in a certain order, of course) <- not sure what you mean with that. Do you mean used in different situations, because afaik the iscript itself wont execute other subscripts.

and I dont even know what CV5 is.
[right][snapback]613197[/snapback][/right]


I mean, although the IScript types seem to be hardcoded for the compiler, as they don't allow some numbers, I think SC is OK with it. The order is important in terms that ... I'll show you my opcode list (it is similar to SF's except I use a bit of different names):

CODE
- 0x00   0 Initialization
- 0x01   1 Death
- 0x02   2 GroundAttackInit
- 0x03   3 AirAttackInit
- 0x04   4 Unused1
- 0x05   5 GroundAttackRepeat
- 0x06   6 AirAttackRepeat
- 0x07   7 UseAbility
- 0x08   8 GroundAttackToIdle
- 0x09   9 AirAttackToIdle
- 0x0A  10 Unused2
- 0x0B  11 Walking
- 0x0C  12 WalkingToIdle
- 0x0D  13 SpecialState1
- 0x0E  14 SpecialState2
- 0x0F  15 AlmostBuilt
- 0x10  16 Built
- 0x11  17 Landing
- 0x12  18 Lift-Off
- 0x13  19 IsWorking
- 0x14  20 WorkingToIdle
- 0x15  21 WarpIn
- 0x16  22 Unused3
- 0x17  23 StarEditInit
- 0x18  24 Disabled
- 0x19  25 Burrow
- 0x20  26 Unburrow
- 0x21  27 Enabled


A Type 12 IScript will run these:

CODE
- 0x02   2 GroundAttackInit
- 0x03   3 AirAttackInit
- 0x04   4 Unused1
- 0x05   5 GroundAttackRepeat
- 0x06   6 AirAttackRepeat
- 0x07   7 UseAbility
- 0x08   8 GroundAttackToIdle
- 0x09   9 AirAttackToIdle
- 0x0A  10 Unused2
- 0x0B  11 Walking
- 0x0C  12 WalkingToIdle
- 0x0D  13 SpecialState1


This is because these Death and Init are executed for ANY Iscript, including those of Type 0. The order is specific, meaning even though, say UseAbility has [NONE], it won't skip it and go to 0x0E. Hmm let me rephrase, the type will determine which animations will be "accessible" so to speak, ONLY in the header code order. I don't think if you input The "Build" animation to replace UseAbility it'd work. This is an assumption made on the fact that buildings are usually type 20+. Since they don't use some opcodes they could in theory just skip the [NONE] animations and use a lower Type. But they don't which leads me to believe I'm right. Hope I clarified it smile.gif

This is CV5 - buggy as hell, but with a few fun stuff smile.gif
Report, edit, etc...Posted by SI on 2007-01-13 at 13:53:33
oh, that I knew about then, I have a big switch to limit which scripts can be run here somewhere wink.gif
btw, script 24 is enable doodad and 23 is disable doodad (doors etc).
What do you mean with staredit init?
Report, edit, etc...Posted by TheNomad on 2007-01-13 at 15:39:52
QUOTE(SI @ Jan 13 2007, 09:53 PM)
btw, script 24 is enable doodad and 23 is disable doodad (doors etc).
What do you mean with staredit init?
[right][snapback]613270[/snapback][/right]


I tend to disagree and that is cos SF and I tested (independently though) and we both reached the conclusions the op codes are as listed. StarEditInit is the Init executed in StarEdit. For example turrets (not subunits but missile turrets), Goliaths and Tanks don't have subunits in StarEdit. They have a dummy sprite that is drawn to make it look sexy. SF even tested what I told her and she executed some turning anims which worked in SE.

Anim 24 is Disable Doodad and Anim 27 is Enable Doodad. Half of the scritps that were described in ICE by CamSys were labeled wrong.
Report, edit, etc...Posted by SI on 2007-01-13 at 18:01:24
Those are the 2 indexii I use to open / close doors and missile traps and all that in scmdraft and it looks right enough to me wink.gif

btw, 13 seems to be the one to put buildings into the air if they are set to lifted on map load wink.gif
Report, edit, etc...Posted by TheNomad on 2007-01-13 at 18:11:16
QUOTE(SI @ Jan 14 2007, 02:01 AM)
Those are the 2 indexii I use to open / close doors and missile traps and all that in scmdraft and it looks right enough to me wink.gif

btw, 13 seems to be the one to put buildings into the air wink.gif
[right][snapback]613358[/snapback][/right]


LiftOff is 18. Wait, are you talking in hex or dec ? Cos if you start from 1 and talk in hex, then yes 0x13 (which should be 0x12 in SC) is LiftOff.
If you mean dec, then it can't be... unless SE (or in your case SCMDraft?) must interpret it differently from SC, which shouldn't be happening...

You can easily tell LiftOff is 18 from IScript itself:

CODE
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 266 Barracks (terran\TBarrack.grp)
.headerstart
IsId            96
Type            24
Init            BarracksInit
Death           BarracksDeath
GndAttkInit     [NONE]
AirAttkInit     [NONE]
Unused1         [NONE]
GndAttkRpt      [NONE]
AirAttkRpt      [NONE]
CastSpell       [NONE]
GndAttkToIdle   [NONE]
AirAttkToIdle   [NONE]
Unused2         [NONE]
Walking         BarracksWalking
WalkingToIdle   BarracksWalking
SpecialState1   BarracksSpecialState1
SpecialState2   [NONE]
AlmostBuilt     BarracksAlmostBuilt
Built           BarracksBuilt
Landing         BarracksLanding
LiftOff         BarracksLiftOff
IsWorking       BarracksIsWorking
WorkingToIdle   BarracksBuilt
WarpIn          [NONE]
Unused3         [NONE]
InitTurret      [NONE]
Disable         BarracksDisable
Burrow          [NONE]
.headerend

BarracksLiftOff:
nobrkcodestart  
playsnd         471 # Misc\LiftOff.WAV
playfram        5
wait            8
playfram        2
wait            8
playfram        3
wait            8
playfram        4
sigorder        16
nobrkcodeend    
goto            BarracksWalking
Report, edit, etc...Posted by SI on 2007-01-13 at 18:31:54
I dont mean the liftoff animation, I mean what is run for buildings created as lifted off wink.gif
Report, edit, etc...Posted by TheNomad on 2007-01-13 at 18:59:46
Ah, I get you... Right, SF said it is also used as the first phase of a construction (terran) or finishing morphing (zerg) and for in-transit.

Then 14 should be called for having them burrowed by default, correct ?
Report, edit, etc...Posted by ShadowFlare on 2007-01-13 at 19:59:24
QUOTE(SI @ Jan 13 2007, 05:31 PM)
I dont mean the liftoff animation, I mean what is run for buildings created as lifted off wink.gif
[right][snapback]613369[/snapback][/right]

That animation, and the next one, are each used for about 4 different things, so I couldn't really give them a specific name; thus the 'SpecialState1' and 'SpecialState2' names. I have a list of the 4 things for each one; mostly just in my code, but I did post it somewhere.

The lines from my code, with the comments:

"SpecialState1", // Some sort of category of special animations, in some cases an in-transit animation, sometimes used for special orders, sometimes having to do with the animation when something finishes morphing, or the first stage of a construction animation
"SpecialState2", // Some sort of category of special animations, in some cases a burrowed animation, sometimes used for special orders, sometimes having to do with the animation when canceling a morph, or the second stage of a construction animation

No other animations in the iscript have so many different uses.
Report, edit, etc...Posted by SI on 2007-01-13 at 20:36:43
sure the missile turret needs the staredit init code? because its animation 16 (dec) which is always run after animation 0 for creating buildings spawns a rotating turret sprite...
Report, edit, etc...Posted by SI on 2007-01-13 at 20:37:10
sure the missile turret needs the staredit init code? because its animation 16 (dec) which is always run after animation 0 for creating buildings spawns a rotating turret sprite...
Report, edit, etc...Posted by SI on 2007-01-13 at 20:37:53
sure the missile turret needs the staredit init code? because its animation 16 (dec) which is always run after animation 0 for creating buildings spawns a rotating turret sprite...
Report, edit, etc...Posted by TheNomad on 2007-01-13 at 21:06:08
Well, for example, SE Xtra doesn't load the StarEditInit opcode, so Turrets, Gols and Tanks don't have turrets. There is no major difference in this, so you won't have to load it in your IScript Prev, unless you want a pulldown with 2 entries, "load StarCraft Init" and one "load StarEdit Init". Although I doubt it'll be used since ppl will mostly want to see the stuff work in-game not in the editor. (maybe IF someone does want to test the StarEdit one you can add a VERY VERY optional unsupported checkbox somewhere like "jump to opcode 0x17 when Initializing IScript" or something like that...
Report, edit, etc...Posted by SI on 2007-01-13 at 21:21:30
according to icecc missile turret doesn't have one of those scripts...
Report, edit, etc...Posted by ShadowFlare on 2007-01-13 at 22:05:52
Yeah, I think it is only the goliath, siege tank, and some of the doodad units. Heh, I don't know why so many people think of the missile turret as having a units.dat turret; it is only an overlay that is shown through its iscript. Because of this, it shouldn't need a special StarEditInit animation.
Report, edit, etc...Posted by TheNomad on 2007-01-14 at 04:44:17
Hmm you're right, it doesn't have a SEInit. This is strange, I assume it has one since SE Xtra didn't add it. (but I didn't assume it's units.dat tongue.gif I know that much smile.gif )
Next Page (2)