Staredit Newtork
Community
StarCraft
Games
Site
Favourites
about iceCC, about two units in one egg, iscript in flingy and so on...

Creator: Xeno814
Time: May 29 2008, 7:40 am

Post #1     Xeno814 May 29 2008, 7:40 am

[Avatar]
 offline contact
whenever i checked the 2 units in 1 egg button in DataEdit(ex. Hydralisk). the SC crashes. i look in the iceCC yet i dont know what will i do in iceCC?

also what will i do to hasten the move speed of units whose flingy are under iscript?

next now that i can manage to make siege tanks to attack air, can i now edit their weapons?(ex. change article cannon to burst laser)

lastly the Glave Wurm(again! that bouncy thing!) i cant see that in iceCC(iv'e look decompiled mutalisk but i cant see any keword that resembles to Glave Wurm so i dont know where this bouncy behavior lies.

and one more thing in replacing GRP files. i tried some GRP from other mods and use it on my own mod yet SC crashes(the good example is in my avatar. The Gundam ZZeta GRP from GundamCentury. it works fine yet if it moves SC crashes).
This post was edited 2 times, last edit by Xeno814: May 29 2008, 4:56 pm.
Top

Post #2     DiscipleOfAdun May 29 2008, 6:13 pm

[Avatar]
 offline contact
1. The 2 in 1 needs a .lo? file set. Check the zergling images.dat entry, the .lob file is what it needs to work.

2. To make iscripted units move faster, increase the number for the move x command in the script. IceCC to compile/decompile them. ;)

3. Yes

4. This is the script:

Code

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 511 Unknown511 (bullet\spores.grp)
.headerstart
IsId               264
Type               13
Init               GlaveWurmInit
Death               GlaveWurmDeath
GndAttkInit         GlaveWurmGndAttkInit
AirAttkInit         [NONE]
Unused1             [NONE]
GndAttkRpt         [NONE]
AirAttkRpt         [NONE]
CastSpell           [NONE]
GndAttkToIdle       [NONE]
AirAttkToIdle       [NONE]
Unused2             [NONE]
Walking             [NONE]
WalkingToIdle       [NONE]
SpecialState1       GlaveWurmSpecialState1
.headerend
# ----------------------------------------------------------------------------- #

GlaveWurmInit:
    playfram           0
    wait               1
    sigorder           1
    wait               1
GlaveWurmGndAttkInit:
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           0
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           1
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           2
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           3
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           4
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           5
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           6
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           7
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           8
    wait               1
    sprol               367 0 0     # Unknown513 (thingy\SpoTrail.grp)
    playfram           9
    wait               1
    goto               GlaveWurmGndAttkInit

GlaveWurmDeath:
    playsnd             93     # Bullet\ZQuHit02.wav
    sprol               365 0 0     # Unknown512 (thingy\SporeHit.grp)
    domissiledmg      
    wait               1
    end                

GlaveWurmSpecialState1:
    playsndbtwn         91 92     # Bullet\ZQuHit00.wav, Bullet\ZQuHit01.wav
    sprol               365 0 0     # Unknown512 (thingy\SporeHit.grp)
    domissiledmg      
    goto               GlaveWurmGndAttkInit


Bouncing weapons are determined by the headers they have. That's what you'll need to mimic in your weapon for it to bounce.

5. They normally crash SC when a non-existant frameset is called by playfram. You'll need to edit the iscript to play the proper frames when walking.
Top

Post #3     Xeno814 May 29 2008, 7:55 pm

[Avatar]
 offline contact
I've tried the guide by BSTRhino but his guide is kinda outdated(the ex. values are "Unknown511GndAttkInit" and so on). By following his guide and changing the outdated values, here it is(i used phase disruptor of dragoon):

Yet it still doesn't work...i wonder whats wrong(i also changed the phase disruptor behavior to "bounce")

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 523 PhaseDisruptor (bullet\dragbull.grp)
.headerstart
IsId 234
Type 13
Init PhaseDisruptorInit
Death PhaseDisruptorDeath
GndAttkInit PhaseDisruptorGndAttkInit
AirAttkInit [NONE]
Unused1 [NONE]
GndAttkRpt [NONE]
AirAttkRpt [NONE]
CastSpell [NONE]
GndAttkToIdle [NONE]
AirAttkToIdle [NONE]
Unused2 [NONE]
Walking [NONE]
WalkingToIdle [NONE]
SpecialState1 BounceCode
.headerend
# ----------------------------------------------------------------------------- #

PhaseDisruptorInit:
playsnd 99 # Bullet\DragBull.wav
wait 1
sigorder 1
wait 1
PhaseDisruptorGndAttkInit:
playfram 0
wait 1
playfram 1
wait 1
playfram 2
wait 1
playfram 3
wait 1
playfram 4
wait 1
goto PhaseDisruptorGndAttkInit

PhaseDisruptorDeath:
imgol 427 0 0 # Unknown427 (thingy\HKexplod.grp)
domissiledmg
wait 1
end

GlaveWurmSpecialState1:
playsndbtwn 91 92 # Bullet\ZQuHit00.wav, Bullet\ZQuHit01.wav
sprol 365 0 0 # Unknown512 (thingy\SporeHit.grp)
domissiledmg
goto GlaveWurmSpecialState1

BounceCode:
domissiledmg
goto PhaseDisruptorGndAttkInit

PS: i don't know how you make that "code box" thing.
Top

Post #4     DiscipleOfAdun May 29 2008, 9:30 pm

[Avatar]
 offline contact
That iscript looks correct. However, iscript isn't my strongest suit in terms of modding.

There might be other things to do with the dat editing...compare against the glave wurm is my suggestion.
Top

Post #5     Xeno814 May 30 2008, 10:19 am

[Avatar]
 offline contact
at last! i finally finished the iscript for bouncing phase disruptor(it works)

now on to the next problem. this is the iscript of a firebat that can attack both air and ground but whenever i change the weapon of firebat(ex. longbolt for air) it still fires its flamethrower that doesn't reach its target(it follows the range of longbolt so flamethrower attack is afar from its reach);

Code

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 226 Firebat (terran\firebat.grp)
.headerstart
IsId               69
Type               12
Init               FirebatInit
Death               FirebatDeath
GndAttkInit         FirebatGndAttkInit
AirAttkInit         FirebatGndAttkInit
Unused1             [NONE]
GndAttkRpt         FirebatGndAttkRpt
AirAttkRpt         FirebatGndAttkRpt
CastSpell           [NONE]
GndAttkToIdle       FirebatGndAttkToIdle
AirAttkToIdle       FirebatGndAttkToIdle
Unused2             [NONE]
Walking             FirebatWalking
WalkingToIdle       FirebatWalkingToIdle
SpecialState1       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

FirebatInit:
    imgul               227 0 0     # FirebatShad (terran\tfbShad.grp)
FirebatWalkingToIdle:
    playfram           0x22     # frame set 2
FirebatLocal03:
    waitrand           63 75
    randcondjmp         25 FirebatLocal00
    randcondjmp         128 FirebatLocal02
    goto               FirebatLocal03

FirebatLocal00:
    playfram           0x00     # frame set 0
    wait               1
    randcondjmp         192 FirebatLocal01
    turnccwise         2
    wait               3
    turnccwise         2
    wait               3
    turnccwise         2
    wait               3
    turnccwise         2
    wait               3
    turnccwise         2
    wait               3
    wait               6
    turncwise           2
    wait               3
    turncwise           2
    wait               3
    turncwise           2
    wait               3
    turncwise           2
    wait               3
    turncwise           2
    wait               3
    wait               6
    turnccwise         2
    wait               3
    turnccwise         2
    wait               3
    turnccwise         2
    wait               3
    goto               FirebatWalkingToIdle

FirebatLocal02:
    playfram           0x33     # frame set 3
    wait               1
    playfram           0x44     # frame set 4
    wait               1
    turnrand           3
    wait               1
    playfram           0x33     # frame set 3
    wait               1
    goto               FirebatWalkingToIdle

FirebatLocal01:
    wait               13
    goto               FirebatWalkingToIdle

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

FirebatGndAttkInit:
    playfram           0x00     # frame set 0
FirebatGndAttkRpt:
    wait               1
    nobrkcodestart    
    imgol               421 0 0     # FlameThrower (thingy\flamer.grp)
    playfram           0x11     # frame set 1
    attkshiftproj       24
    wait               1
    attkshiftproj       52
    wait               1
    attkshiftproj       80
    wait               5
    playfram           0x00     # frame set 0
    wait               2
    ignorerest        
FirebatGndAttkToIdle:
    goto               FirebatWalkingToIdle

FirebatWalking:
    move               6
    wait               1
    playfram           0x33     # frame set 3
    move               6
    wait               1
    playfram           0x44     # frame set 4
    move               6
    wait               1
    playfram           0x55     # frame set 5
    move               6
    wait               1
    playfram           0x66     # frame set 6
    move               6
    wait               1
    playfram           0x77     # frame set 7
    move               6
    wait               1
    playfram           0x88     # frame set 8
    move               6
    wait               1
    playfram           0x99     # frame set 9
    move               6
    wait               1
    playfram           0x22     # frame set 2
    goto               FirebatWalking


next is the broodling that can spawn broodling as it attacks(from BSTRhino) whenever i compile this script errors occur. i wonder whats wrong?

Code

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 005 Broodling (zerg\brood.grp)
.headerstart
IsId               4
Type               12
Init               BroodlingInit
Death               BroodlingDeath
GndAttkInit         BroodlingGndAttkInit
AirAttkInit         [NONE]
SpAbility1         [NONE]
GndAttkRpt         BroodlingGndAttkInit
AirAttkRpt         [NONE]
SpAbility2         [NONE]
GndAttkToIdle       BroodlingGndAttkToIdle
AirAttkToIdle       [NONE]
SpAbility3         [NONE]
Walking             BroodlingWalking
Other               BroodlingGndAttkToIdle
BurrowInit         [NONE]
.headerend
# ----------------------------------------------------------------------------- #

BroodlingInit:
    imgul09             6 0 0     # BroodlingShad (zerg\zbrShad.grp)
BroodlingGndAttkToIdle:
    playfram           0x11     # frame set 1
    waitrand           25 30
    playfram           0x22     # frame set 2
    waitrand           25 30
    goto               BroodlingGndAttkToIdle

BroodlingDeath:
    playsnd             785     # Zerg\BROODLING\ZBrDth00.WAV
    sprul11             134 0 0     # BroodlingDeath (zerg\zbrDeath.grp)
    wait               1
    end                

local00:
    move               8
    wait               1
    playfram           0x11     # frame set 1
    move               8
    wait               1
    playfram           0x22     # frame set 2
    move               8
    wait               1
    playfram           0x33     # frame set 3
    move               8
    wait               1
    playfram           0x44     # frame set 4
    move               8
    wait               1
    playfram           0x55     # frame set 5
    move               8
    wait               1
    playfram           0x66     # frame set 6
    move               8
    wait               1
    playfram           0x00     # frame set 0
    __36              
BroodlingGndAttkInit:
    playfram           0x77     # frame set 7
    wait               1
    nobrkcodestart    
    playfram           0x88     # frame set 8
    wait               1
    playfram           0x99     # frame set 9
    trgtrangecondjmp 16 WithinRangeForBroodling
    goto NormalAttack
   
WithinRangeForBroodling:
    __1e_condjmp 96 SpawnBroodling
NormalAttack:
    attack1c           1 786     # Zerg\BROODLING\ZBrAtt00.WAV
    wait               1
    playfram           0xaa     # frame set 10
    wait               1
    playfram           0xbb     # frame set 11
    wait               1
    nobrkcodeend      
    gotorepeatattk    
    goto               BroodlingGndAttkToIdle
   
SpawnBroodling:
    useweapon 57
    wait 2
    playsnd             785     # Zerg\BROODLING\ZBrDth00.WAV
    sprul11             134 0 0     # BroodlingDeath (zerg\zbrDeath.grp)
SuicideLoop:
    useweapon 88
    wait 3
    goto SuicideLoop

BroodlingWalking:
    __35_condjmp       local00
    __35_condjmp       local00
    waitrand           3 6
    __35_condjmp       local00
    waitrand           3 6
    __35_condjmp       local00
    __35_condjmp       local00
    __35_condjmp       local00
    waitrand           3 6
    goto               BroodlingWalking


# ============================================================================= #


i make my own version of this yet m the broodlings easily spawn themselves in just a single bite compare to BSTRhino

Code

BroodlingInit:
    imgul               6 0 0     # BroodlingShad (zerg\zbrShad.grp)
BroodlingGndAttkToIdle:
    playfram           0x11     # frame set 1
    waitrand           25 30
    playfram           0x22     # frame set 2
    waitrand           25 30
    goto               BroodlingGndAttkToIdle

BroodlingDeath:
    playsnd             785     # Zerg\BROODLING\ZBrDth00.WAV
    lowsprul           134 0 0     # BroodlingDeath (zerg\zbrDeath.grp)
    wait               1
    end                

BroodlingGndAttkInit:
    playfram           0x77     # frame set 7
    wait               1
    nobrkcodestart    
    playfram           0x88     # frame set 8
    wait               1
    playfram           0x99     # frame set 9
    attackmelee         1 786     # Zerg\BROODLING\ZBrAtt00.WAV
    wait               1
    playfram           0xaa     # frame set 10
    wait               1
    playfram           0xbb     # frame set 11
    wait               1
    randcondjmp 15 Broodling
    nobrkcodeend      
    gotorepeatattk    
    goto               BroodlingGndAttkToIdle

BroodlingWalking:
    call               BroodlingLocal00
    call               BroodlingLocal00
    waitrand           3 6
    call               BroodlingLocal00
    waitrand           3 6
    call               BroodlingLocal00
    call               BroodlingLocal00
    call               BroodlingLocal00
    waitrand           3 6
    goto               BroodlingWalking

BroodlingLocal00:
    move               8
    wait               1
    playfram           0x11     # frame set 1
    move               8
    wait               1
    playfram           0x22     # frame set 2
    move               8
    wait               1
    playfram           0x33     # frame set 3
    move               8
    wait               1
    playfram           0x44     # frame set 4
    move               8
    wait               1
    playfram           0x55     # frame set 5
    move               8
    wait               1

Broodling:
wait            1
useweapon 57
wait            1
gotorepeatattk
    playfram           0x66     # frame set 6
    move               8
    wait               1
    playfram           0x00     # frame set 0
    return            

Top

Post #6     DiscipleOfAdun May 30 2008, 7:56 pm

[Avatar]
 offline contact
Okay, the firebat is a question that isn't too hard to answer. It requires looking closely at the attack script.

Code

FirebatGndAttkRpt:
   wait               1
   nobrkcodestart    
   imgol               421 0 0     # FlameThrower (thingy\flamer.grp)
   playfram           0x11     # frame set 1
   attkshiftproj       24
   wait               1
   attkshiftproj       52
   wait               1
   attkshiftproj       80
   wait               5
   playfram           0x00     # frame set 0
   wait               2
   ignorerest        


The first important part that most people miss is the lack of a nobrkcodeend. This is because it is contained in the flamethrower graphic. That graphic is created with the imgol 421 0 0 # FlameThrower (thingy\flamer.grp) line. Remove that line and it'll get rid of that flamethrower, but you'll also remove the nobrkcodeend that is keeping the script working properly. To fix that, you place it back in before ignorerest in the firebat script. I'd also add a gotorepeatattk before ignorerest too, just to be sure. It doesn't hurt to have it.

The rest is toying around with the attkshiftproj commands. The way things sound, you may only want them as a single attack. If so, your iscript may end up looking like this(presented as an example, but you should work this out on your own...)

Code

FirebatGndAttkRpt:
   wait               1
   nobrkcodestart
   playfram           0x11     # frame set 1
   wait               1
   attack
   wait               2
   playfram           0x00     # frame set 0
   wait               2
   nobrkcodeend
   gotorepeatattk
   ignorerest


Of course stuff like the waits and frames is all dependent on how you want it to look, but you should get the idea.

the broodling, bst's doesn't compile because it uses old opcode names. as for yours, I don't see why and noticeable problems. didn't look over it super carefully though.
Top

Post #7     Xeno814 May 31 2008, 6:51 am

[Avatar]
 offline contact
the problem about the broodling is whenever it kills a unit it reproduce itself like a virus and whenever theres a enemy nearby it will reproduce itself until SC crashes and also is can see the sprite of spawn broodling(the tiny dot explosion that queen fires if you use the said skill) while the broodlings are walking. all i wanted is that broodlings can reproduce themselves in a very small chances not everytime and when it already spawn himself to enemy units, that said broodling's iscript will be disabled(even tough i don't know if it is possible to do that.

another one is this battlecruiser iscript. i placed a random attack that it fires hellfire missiles but it has error:
error final instuction does not terminate

Code

BattlecruiserInit:
    imgul               219 0 42     # BattlecruiserShad (terran\BattleCr.grp)
    playfram           0x00     # frame set 0
    goto               BattlecruiserGndAttkToIdle

BattlecruiserGndAttkToIdle:
    wait               125
    goto               BattlecruiserGndAttkToIdle

BattlecruiserDeath:
    playsnd             177     # Terran\BATTLE\tbaDth00.wav
    imgol               333 0 0     # TerranBuildingExplosionmedium (thingy\tBangL.grp)
    wait               3
    end                

BattlecruiserGndAttkInit:
    imgol               446 0 0     # BCLaserFireOverlay (thingy\elbBat.grp)
    goto               BattlecruiserLocal00

BattlecruiserLocal00:
    wait               1
    attackwith         1
    gotorepeatattk    
    goto               BattlecruiserGndAttkToIdle

BattlecruiserAirAttkInit:
    imgol               446 0 0     # BCLaserFireOverlay (thingy\elbBat.grp)
    goto               BattlecruiserLocal01

BattlecruiserLocal01:
    wait               1
    randcondjmp 25 Hellfire
    attackwith         2
    gotorepeatattk    
    goto               BattlecruiserGndAttkToIdle

BattlecruiserCastSpell:
    imgolorig           543     # Unknown543 (thingy\eycBlast.grp)
    goto               BattlecruiserGndAttkToIdle

BattlecruiserWalking:
    imgol               220 0 0     # BattlecruiserGlow (thingy\tbaGlow.grp)
    goto               BattlecruiserGndAttkToIdle

BattlecruiserWalkingToIdle:
    setvertpos         1
    waitrand           8 10
    setvertpos         2
    waitrand           8 10
    setvertpos         1
    waitrand           8 10
    setvertpos         0
    waitrand           8 10
    goto               BattlecruiserWalkingToIdle

Hellfire:
wait            1
useweapon 10
wait            1
gotorepeatattk


is there a way to compile BSTRhino's iscripts(cause there are more brilliant iscript from his mod) and what are code generators? its the files in Jscript format that also included in BSTRhino's mod.
Top

Post #8     A_of-s_t May 31 2008, 9:06 pm

[Avatar]
Master of Temptation, Ruler of Aeronotics, and Secret Lover
 online contact
BSTRhino's code is outdated. You are going to either have to update the code or uncompile from his iscript.
(user posted image)
Top

Post #9     DiscipleOfAdun May 31 2008, 9:23 pm

[Avatar]
 offline contact
The problem is the gotorepeatattk opcode doesn't immediately goto the repeat header. You'll need a direct goto after it to allow it to compile. If you goto the idle script, you should be okay.
Top

Post #10     ShadowFlare Jun 1 2008, 2:21 am

[Avatar]
 offline contact
It is a common misconception that opcode is a goto, but it is not one, so don't treat it as such. It only signals to SC that the attack should repeat after the cooldown if the unit still has a target.


Quote from Xeno814
is there a way to compile BSTRhino's iscripts(cause there are more brilliant iscript from his mod)
Yes, with IceCC 1.3 use classic_icecc.exe instead of just icecc.exe to compile the script. If you are using IceCCUI, configure it to use classic_icecc.exe instead of icecc.exe for the compiler. I created that version at IskatuMesk's request (either that, or just because that was why he wasn't using 1.3).
This post was edited 1 time, last edit by ShadowFlare: Jun 1 2008, 2:27 am.
Top

Post #11     Xeno814 Jun 1 2008, 1:46 pm

[Avatar]
 offline contact
but whenever i open that said file, it just open in a blink of an eye(i can somewhat see that it is a MS-Dos program)
w8 a sec..are you the ShadowFlare the creator of WinMpq?
Top

Post #12     A_of-s_t Jun 1 2008, 5:15 pm

[Avatar]
Master of Temptation, Ruler of Aeronotics, and Secret Lover
 online contact
I believe so, she also created the .dlls that most people use to make their programs for SC.

Make sure you are opening the .jar file. There are tons of .exes, but they dont do anything.
(user posted image)
Top

Post #13     ShadowFlare Jun 2 2008, 3:47 am

[Avatar]
 offline contact
How are you currently using IceCC? If it is through IceCCUI, then change the configuration to use classic_icecc.exe

If you do not have a classic_icecc.exe file, download the current version at http://sfsrealm.hopto.org/dwnload.html#IceCC
Top

Post #14     Xeno814 Jun 2 2008, 6:11 am

[Avatar]
 offline contact
AH! now i understand. theres a bunch of .exe there that confuse me a bit :D

now about code generators. what are those files do in SC?
Top

Post #15     A_of-s_t Jun 2 2008, 6:16 am

[Avatar]
Master of Temptation, Ruler of Aeronotics, and Secret Lover
 online contact
Quote from Xeno814
AH! now i understand. theres a bunch of .exe there that confuse me a bit :D

now about code generators. what are those files do in SC?
Nothing, those are javascript files that you use to output code and put into a unit's iscript:

http://www.staredit.net/wiki/Tips_for_Tedious_Coding
(user posted image)
Top

Post #16     Xeno814 Jun 2 2008, 11:56 am

[Avatar]