Staredit Network > Forums > Modding Assistance > Topic: Flying Marines
Flying Marines
Mar 30 2009, 10:44 pm
By: HailFire  

Mar 30 2009, 10:44 pm HailFire Post #1



As part of my entry for Super StarCraft Modders Brawl, I'm trying to convert the Terran Marine into a flying unit.

Thus far, I've made the following changes:

units.dat: Modified basic stats (hp, shields, armor), gave it Flyer, Regenerate, and Spellcaster properties.
flingy.dat: Set Move Control to flingy.dat control, modified settings to mimic the dropship.

iscript.bin:
Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 239 Marine (terran\marine.grp)
.headerstart
IsId               78
Type               12
Init               MarineInit
Death               MarineDeath
GndAttkInit         MarineGndAttkInit
AirAttkInit         MarineGndAttkInit
Unused1             [NONE]
GndAttkRpt         MarineGndAttkRpt
AirAttkRpt         MarineGndAttkRpt
CastSpell           [NONE]
GndAttkToIdle       MarineGndAttkToIdle
AirAttkToIdle       MarineGndAttkToIdle
Unused2             [NONE]
Walking             MarineWalking
WalkingToIdle       MarineGndAttkToIdle
SpecialState1       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

MarineInit:
    imgul               240 0 0     # MarineShad (terran\tmaShad.grp)
    imgol               249 0 0     # SCVGlow (thingy\tscGlow.grp)
    playfram           0x00     # frame set 0
    goto         MarineGndAttkToIdle

MarineDeath:
    playsndbtwn         296 298     # Terran\Firebat\TFBDth00.WAV, Terran\Firebat\TFBDth02.WAV
    imgol               332 0 0     # TerranBuildingExplosionsmall (thingy\tBangS.grp)
    wait               3
    end                

MarineGndAttkInit:
    playfram           0x00     # frame set 0
    wait               1
    playfram           0x11     # frame set 1
    wait               1
    playfram           0x22     # frame set 2
MarineGndAttkRpt:
    wait               1
    nobrkcodestart    
    playsnd             69     # Bullet\TMaFir00.wav
    attackwith         1
    playfram           0x33     # frame set 3
    wait               1
    playfram           0x22     # frame set 2
    wait               1
    playfram           0x33     # frame set 3
    wait               1
    playfram           0x22     # frame set 2
    wait               1
    playfram           0x33     # frame set 3
    wait               1
    playfram           0x22     # frame set 2
    wait               1
    nobrkcodeend      
    gotorepeatattk    
    ignorerest        
MarineGndAttkToIdle:
    setvertpos         1
    waitrand           8 10
    setvertpos         2
    waitrand           8 10
    setvertpos         1
    waitrand           8 10
    setvertpos         0
    waitrand           8 10
    goto               MarineGndAttkToIdle

MarineWalking:
    playfram           0x00     # frame set 0
    setvertpos         0
    goto               MarineGndAttkToIdle



When I build a marine, the game crashes. WHAT THE EFF AM I DOING IT WRONG



None.

Mar 30 2009, 10:48 pm Biophysicist Post #2



Try taking out the SCV glow. Just a hunch, but I think that might be the problem...



None.

Mar 30 2009, 10:53 pm HailFire Post #3



Quote from name:TassadarZeratul
Try taking out the SCV glow. Just a hunch, but I think that might be the problem...

I did, and it works perfectly fine now, what the fuck.

Should I add it as an underlay? Also, how would I go about displacing it's shadow?

By which I mean, liek how all air units have their shadows some ways 'below' them, to give the illusion of flight.

Post has been edited 1 time(s), last time on Mar 30 2009, 11:02 pm by HailFire.



None.

Mar 30 2009, 11:02 pm IskatuMesk Post #4

Lord of the Locker Room

The reason it crashes is because it wouldn't have the same headers the marine is calling, and image overlays inherit animations. You'll have to edit the scvglow iscript.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Mar 30 2009, 11:03 pm ForTheSwarm Post #5



I remember trying to give units SCV glows... eventually I gave up and had someone add it into the unit grp.



None.

Mar 30 2009, 11:09 pm HailFire Post #6



Quote from IskatuMesk
The reason it crashes is because it wouldn't have the same headers the marine is calling, and image overlays inherit animations. You'll have to edit the scvglow iscript.

There are only two references in iscript.bin for SCVGlow; one in the SCV script that calls it up as an overlay, and the other here:

Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 943 ValkyrieAfterburners (thingy\tbmAfter.grp)
# 942 ValkyrieOverlay2 (thingy\tbmGlow.grp)
# 941 ValkyrieOverlay (thingy\tbmGlow.grp)
# 249 SCVGlow (thingy\tscGlow.grp)
# 225 DropshipGlow (thingy\tdrGlow.grp)
# 220 BattlecruiserGlow (thingy\tbaGlow.grp)
# 132 ArbiterGlow (thingy\pabGlow.grp)
.headerstart
IsId               291
Type               15
Init               Engines_GlowHeaderInit
Death               Engines_GlowHeaderDeath
GndAttkInit         Engines_GlowHeaderDeath
AirAttkInit         Engines_GlowHeaderDeath
Unused1             [NONE]
GndAttkRpt         Engines_GlowHeaderDeath
AirAttkRpt         Engines_GlowHeaderDeath
CastSpell           Engines_GlowHeaderDeath
GndAttkToIdle       Engines_GlowHeaderDeath
AirAttkToIdle       Engines_GlowHeaderDeath
Unused2             [NONE]
Walking             Engines_GlowHeaderInit
WalkingToIdle       Engines_GlowHeaderDeath
SpecialState1       [NONE]
SpecialState2       [NONE]
AlmostBuilt         Engines_GlowHeaderDeath
.headerend
# ----------------------------------------------------------------------------- #

Engines_GlowHeaderInit:
    engset             0
    wait               1
    engset             1
    wait               1
    goto               Engines_GlowHeaderInit

Engines_GlowHeaderDeath:
    wait               1
    end                


What the hell am I supposed to do with that?



None.

Mar 30 2009, 11:12 pm IskatuMesk Post #7

Lord of the Locker Room

Make a new ISID and clone the scv glow to it then make your changes.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Mar 30 2009, 11:17 pm Biophysicist Post #8



Quote
By which I mean, liek how all air units have their shadows some ways 'below' them, to give the illusion of flight.
imgul 240 40 0



None.

Mar 30 2009, 11:20 pm HailFire Post #9



Quote from IskatuMesk
Make a new ISID and clone the scv glow to it then make your changes.

Fuck that.

Also, I can jack the wraith's glow overlay perfectly fine, the marine just has this giant jet of fire out the back of his head. Thus, it's just a matter of finding one that looks good and isn't going to be a dick.



None.

Mar 30 2009, 11:38 pm HailFire Post #10



Scout glow is serving my purposes, I just have to edit it so that it doesn't vanish when the unit moves and stops, and edit its position so that it's coming out of the marine's back, and not the air behind him.

Need to edit the shadow so it doesn't look retarded, and TZ got it on the wrong axis; using his method displaced it to the right, not down.

Following that, implimenting the .grp and making it's weaponry.



None.

Mar 30 2009, 11:40 pm IskatuMesk Post #11

Lord of the Locker Room

lol isid is as simple as making an images.dat entry have a new number and changing isid in the iscript. Lets you fuck with the glow without breaking all of the others that use the default entry.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Mar 30 2009, 11:42 pm HailFire Post #12



Quote from IskatuMesk
lol isid is as simple as making an images.dat entry have a new number and changing isid in the iscript. Lets you fuck with the glow without breaking all of the others that use the default entry.

Yeah, but I don't feel like dicking around with more iscript than I need to.

Besides, the scout's engine overlay's cooler.



None.

Mar 31 2009, 5:14 am HailFire Post #13



Ran into another hurdle:

In order to fix the bug wherein the scout's engine overlay would disappear when the marine stopped (and then not turn back on), I gutted pscGlow.grp's iscript;

Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 142 ScoutGlow (thingy\pscGlow.grp)
.headerstart
IsId               162
Type               12
Init               ScoutEnginesInit
Death               ScoutEnginesInit
GndAttkInit         ScoutEnginesInit
AirAttkInit         ScoutEnginesInit
Unused1             [NONE]
GndAttkRpt         [NONE]
AirAttkRpt         [NONE]
CastSpell           [NONE]
GndAttkToIdle       ScoutEnginesInit
AirAttkToIdle       ScoutEnginesInit
Unused2             [NONE]
Walking             ScoutEnginesInit
WalkingToIdle       ScoutEnginesInit
SpecialState1       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

ScoutEnginesInit:
    wait               1
    engframe           0
    wait               1
    engframe           17
    goto               ScoutEnginesInit


This was intended to make the overlay loop infinitely, and it works- to a point. When the marine attacks (after 2-3 repeats), the overlay freezes and an odd line appears on the screen, flashing in time to the marine's attacks. If the marine moves or stops attacking, the line fades away (and the overlay resumes looping as normal). If the marine attacks while drifting to a stop, however, the game crashes.

Oh, also; due to the scout's architecture, the overlay doesn't seem to be inclined to match the marine on all frames simultaniously when using the iscript coordinates. Is it possible to specify the location of the overlay in relation to each frame/direction, or would it be easier to do that ISID mojo for the SCV overlay?

Post has been edited 1 time(s), last time on Mar 31 2009, 5:23 am by HailFire.



None.

Mar 31 2009, 12:22 pm ForTheSwarm Post #14



Quote from HailFire
Oh, also; due to the scout's architecture, the overlay doesn't seem to be inclined to match the marine on all frames simultaniously when using the iscript coordinates. Is it possible to specify the location of the overlay in relation to each frame/direction, or would it be easier to do that ISID mojo for the SCV overlay?

Modify the .lo? file used.



None.

Mar 31 2009, 5:56 pm HailFire Post #15



Quote from ForTheSwarm
Quote from HailFire
Oh, also; due to the scout's architecture, the overlay doesn't seem to be inclined to match the marine on all frames simultaniously when using the iscript coordinates. Is it possible to specify the location of the overlay in relation to each frame/direction, or would it be easier to do that ISID mojo for the SCV overlay?

Modify the .lo? file used.

I'll keep that idea in reserve, since I don't know how to use LoEdit.

In the meantime, I've been experimenting; trying Mesk's ISID idea, wherein I make an entirely new iscript header for tscGlow.grp, so that I can bend it to my will without fucking up any/everything else. I'm pretty sure I'm on the right track here...

What I did: Copy/pasted pscGlow.grp's (scout engines) iscript entry to the bottom of a new .txt file, removed SCVGlow from the list of dependants on IsId 291 and pasted it in it's appropriate position in the new iscript entry, gave the entry IsId 412 (unused, 411 is MaelstromHit), proceeded to make changes.

iscriptc.txt
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Tue Mar 31 11:56:08 2009
# ----------------------------------------------------------------------------- #

[cut marine's iscript entry to conserve space; no changes were made]

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 943 ValkyrieAfterburners (thingy\tbmAfter.grp)
# 942 ValkyrieOverlay2 (thingy\tbmGlow.grp)
# 941 ValkyrieOverlay (thingy\tbmGlow.grp)
# 225 DropshipGlow (thingy\tdrGlow.grp)
# 220 BattlecruiserGlow (thingy\tbaGlow.grp)
# 132 ArbiterGlow (thingy\pabGlow.grp)
.headerstart
IsId               291
Type               15
Init               Engines_GlowHeaderInit
Death               Engines_GlowHeaderDeath
GndAttkInit         Engines_GlowHeaderDeath
AirAttkInit         Engines_GlowHeaderDeath
Unused1             [NONE]
GndAttkRpt         Engines_GlowHeaderDeath
AirAttkRpt         Engines_GlowHeaderDeath
CastSpell           Engines_GlowHeaderDeath
GndAttkToIdle       Engines_GlowHeaderDeath
AirAttkToIdle       Engines_GlowHeaderDeath
Unused2             [NONE]
Walking             Engines_GlowHeaderInit
WalkingToIdle       Engines_GlowHeaderDeath
SpecialState1       [NONE]
SpecialState2       [NONE]
AlmostBuilt         Engines_GlowHeaderDeath
.headerend
# ----------------------------------------------------------------------------- #

Engines_GlowHeaderInit:
    engset             0
    wait               1
    engset             1
    wait               1
    goto               Engines_GlowHeaderInit

Engines_GlowHeaderDeath:
    wait               1
    end                

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 249 SCVGlow (thingy\tscGlow.grp)
.headerstart
IsId               412
Type               12
Init               MarineEnginesInit
Death               MarineEnginesInit
GndAttkInit         MarineEnginesInit
AirAttkInit         MarineEnginesInit
Unused1             [NONE]
GndAttkRpt         [NONE]
AirAttkRpt         [NONE]
CastSpell           [NONE]
GndAttkToIdle       MarineEnginesInit
AirAttkToIdle       MarineEnginesInit
Unused2             [NONE]
Walking             MarineEnginesInit
WalkingToIdle       MarineEnginesInit
SpecialState1       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

MarineEnginesInit:
    engset             0
    wait               1
    engset             1
    wait               1
    goto               MarineEnginesInit      


Unfortunately, SCVs seem unaffected by these changes (I would think that the overlay would loop infinitely after the SCV moves/stops, but it acts normally), and the Marine still crashes on build.

I'm pretty sure I'm making some obvious fuck-up here, but I have no idea what. Help plz?



None.

Mar 31 2009, 6:55 pm TriggR_HappE Post #16



Wow, you're making this way harder than it is. Abandon everything you've done with the glow and just simply add
" imgol 142 0 0 # ScoutGlow (thingy\pscGlow.grp)"
under each header thingy in the iscript file for the marine like so:

Collapse Box


The scout glow now plays on the marine all the time no mater what it's doing (idle/walking/attacking). I tested it myself and it works fine. You can also just do this with the scv glow if that's what you're going for.


If you don't care to .lo edit the glow to the right spot, you could always just manually move the glow in each frame closer to the center and recreate the glow grp. Of coure this is far more tedious and time consuming though.

Post has been edited 1 time(s), last time on Mar 31 2009, 7:13 pm by TriggR_HappE.



None.

Mar 31 2009, 8:17 pm Biophysicist Post #17



But then you'd be spamming images and hit the image limit and get lolfuckups... Right?



None.

Mar 31 2009, 8:27 pm TriggR_HappE Post #18



Quote from name:TassadarZeratul
But then you'd be spamming images and hit the image limit and get lolfuckups... Right?

Umm, I'm not really sure, I don't have a full understanding of this. I guess it might be spamming images in a sense that you're constantly playing the glow grp, but I don't think you'd hit the image limit. SC already plays the glow grp like this while its moving, you're just telling it to also play it while standing still and attacking. I have multiple units in the mod I'm working on use this glow method and I've never had any lolfuckups.

Post has been edited 1 time(s), last time on Mar 31 2009, 8:33 pm by TriggR_HappE.



None.

Apr 3 2009, 6:04 pm HailFire Post #19



Update:

units.dat and flingy.dat editing should be done.

iscript is done to the point that the unit and overlay (no lolfuckups; it does stack, but not to a harmful degree) work as they should; still need to iscript weapons and change frame opcodes to better match the .grp.

Need to firegraft any planned spells/abilities; should be easy.

.lo* editing = not yet done; which .lo* file do I need to edit? There don't seem to be any relevant .lo* files in unit\protoss\, and there are only .grps in unit\thingy\



None.

Apr 4 2009, 1:17 am ForTheSwarm Post #20



Quote from HailFire
.lo* editing = not yet done; which .lo* file do I need to edit? There don't seem to be any relevant .lo* files in unit\protoss\, and there are only .grps in unit\thingy\

You can steal another unit's .lo? file (I don't think the marine has one) and give it to the marine.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[2024-5-16. : 3:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: 1madisonc1291rh3, 6madisone1185rb4, 9madisonc6491wh7, 4harpere47100er4