Miscellaneous Notes
Nuggets of wisdom, with technical details accurate for version 1.16.1
Text Formatting and Colors
Courtesy of DarkenedFantasies
<01> : Mimic
Duplicates the second-last used color on current line/string. Otherwise, duplicates last color on previous line/string.
<0C> : Page break
Invisible in briefing room, line break in-game. Can be used for compact formatting when using many line breaks in the string editor, as it isn't displayed as a new line in it.
<0D> : Carriage return
Used in conjunction with <0A> to denote a line break, which produces the same result as simply pressing the enter key.
Treated as a zero-width character in the map editor and in the game, but otherwise does nothing; makes it a compact option for increasing the on-screen time of display texts (see footnote).
<12> : Right align
Aligns all subsequent text to the right side of the screen, and overrides subsequent center align tags, until new line.
<13> : Center align
Aligns all subsequent text to the center of the screen until new line.
<14> : Invisible
Renders text as such. Overrides all subsequent color tags on the string in the briefing room, or until new line in-game.
<02> : Periwinkle (Default text color.)
<03> : Yellow
<04> : White
<05> : Grey (Overrides all subsequent color tags until new line.)
<06> : Red
<07> : Lime
<08> : Red (Player 1)
<0E> : Blue (Player 2)
<0F> : Teal (Player 3)
<10> : Purple (Player 4)
<11> : Orange (Player 5)
<15> : Brown (Player 6)
<16> : White (Player 7)
<17> : Yellow (Player 8)
<18> : Green (Player 9)
<19> : Lemon (Player 10)
<1B> : Peach (Player 11)
<1C> : Royal Blue (Player 12)
<1D> : Asparagus (Player 13)
<1E> : Deep Periwinkle (Player 14)
<1F> : Cyan (Player 15)
<02> : Periwinkle (Default text color.)
<03> : Lime-Green
<04> : Yellow-Green
<05> : Grey (Overrides all subsequent color tags on the string.)
<06> : White
<07> : Red
(Other colors yield unpredictable results.)
<00> : End string
Null character; automatically changes to <01>.
<09> : Tab
Can also be inserted by pressing CTRL+Tab or CTRL+I.
<0A> : Newline
Marks a line break. Treated as a zero-width character in the map editor text area, but displays a new line in the game. Same as simply pressing the enter key.
<0B> : Invisible
Identical to <14>.
<1A> : End of file
Treated as a zero-width character in the game, but otherwise does nothing.
<20> : Space
Same as simply pressing the spacebar.
<7F> : Delete character
Displays a character with various appearances in briefing & in-game, as well as between SD and HD graphics. Can also be inserted by pressing CTRL+Backspace.
Audio Formats
courtesy of DarkenedFantasies
Starcraft can use 8-bit audio but it won't be compressed.
Title music and sounds from iscript/unit responses can be mono or stereo (tested up to 48000hz, higher may work fine).
Sounds from triggers, briefings, and in-game music must be mono 32000hz or stereo 22050hz to avoid issues.
Pylon Doodad State
Disabling a pylon’s doodad state does not prevent it from powering other structures. Instead, it causes a game-crashing doodad sprite to spawn and the pylon’s graphic vanishes.
Neutral Units
Units owned by neutral (player 12) can respond to orders issued by triggers, but will not accept ally statuses and can not receive AI scripts. Units given to neutral from another player retain the ally statuses their original owners had, meaning their enemies will automatically acquire them as targets. Neutral units will never attack or react to being attacked in any way, regardless of the previous owner.
Burrowed Units
Burrowed units will not be rescued if owned by a rescuable player and approached by a human. It is still possible to rescue them immediately upon rescuing a town hall, but the circle won't flash below them. If you want to create rescuable units without them 'popping into existence', you can circumvent this by creating the unit as burrowed for a computer player, ordering them to move, and immediately giving them to the rescuable player.
Alternative Player Colors -
a non-issue if using custom player colors
138 is the only solid black color. Most, if not all, of the other extended player colors don’t function properly or have noise/graphical corruption associated with their use. Some may cause crashes.
End of Briefing
The standardized ‘End of briefing’ formatting can be achieved by pressing enter twice, followed by ten spaces on the third line.
Text Timing
In game, text created with the 'display text message' trigger action behave thusly: messages 80 characters or shorter remain 4 seconds on screen, +50 milliseconds per additional character when longer.
The default length of transmissions is identical to the duration of the wav associated with them. 'Set to' overrides this duration; 'Add' and 'Subtract' modify that default duration.
In-game, transmission trigger actions owned by non-human players (computer/neutral) do not pause their triggers.
iscript types
Courtesy of DarkenedFantasies
For brevity, each entry omits headers shared with previously-listed types. Types 27 through 29 allow every header to be used.
Type 0, 1 (e.g. Basic overlays and sprites like shadows, trails, etc.)
Init
Death (Use Type 0 if NONE)
Type 2 (e.g. domissiledmg animations)
GndAttkInit
AirAttkInit
Type 12 (e.g. Most men, engine overlays); Type 13 (e.g. Zerg birth, Muta bouncing attack)
Unused1
GndAttkRpt
AirAttkRpt
CastSpell
GndAttkToIdle
AirAttkToIdle
Unused2
Walking
WalkingToIdle
SpecialState1 (Use Type 12 if NONE)
Type 14, 15 (e.g. Building construction stages, engine overlays)
SpecialState2
AlmostBuilt (Use Type 14 if NONE)
Type 20 (e.g. Most buildings); Type 21 (Protoss unit warping)
Built
Landing
LiftOff
IsWorking
WorkingToIdle
WarpIn (Use Type 20 if NONE)
Type 23 (e.g. Placing turreted units, traps, doors, etc. in the editor)
Unused3
StarEditInit
Type 24 (e.g. Powered units & overlays)
Disable
Burrow
Type 26 (e.g. Unburrowable units); Type 27 (e.g. Powered units); Type 28 and 29 have no usage examples.
UnBurrow
Enable (Use Type 26 if NONE)
iscript headers
Courtesy of Voyager7456
This information has not been vetted!
Init - Initial animation
Death - Death animation
GndAttkInit - Initial ground attack animation
AirAttkInit - Initial air attack animation
Unused1 - Unknown/unused animation
GndAttkRpt - Repeated ground attack animation
AirAttkRpt - Repeated air attack animation
CastSpell - Spell casting animation
GndAttkToIdle - Animation for returning to an idle state after a ground attack
AirAttkToIdle - Animation for returning to an idle state after an air attack
Unused2 - Unknown/unused animation
Walking - Walking/moving animation
WalkingToIdle - Animation for returning to an idle state after walking/moving
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
AlmostBuilt - An animation for one part of the building process
Built - Final animation before finishing being built
Landing - Landing animation
LiftOff - Lifting off animation
IsWorking - Animation for when researching an upgrade/technology or training/building units and some other animations for some sort of work being done
WorkingToIdle - Animation for returning to an idle state after IsWorking
WarpIn - Warping in animation
Unused3 - Unknown/unused animation
StarEditInit - Previously called InitTurret, this is actually an alternate initial animation for StarEdit a.k.a. the Campaign Editor
Disable - Animation for becoming disabled, either through the "Set Doodad State" trigger action or by not being in the psi field of any pylons
Burrow - Burrowing animation
UnBurrow - Unburrowing animation
Enable - Animation for becoming enabled, either through the "Set Doodad State" trigger action or by being in the psi field of a pylon
iscript commands
courtesy of Voyager7456
This information has not been vetted!
playfram - <frame#> - displays a particular frame, adjusted for direction.
playframtile - <frame#> - displays a particular frame dependent on tileset.
sethorpos - <x> - sets the current horizontal offset of the current image overlay.
setvertpos - <y> - sets the vertical position of an image overlay.
setpos - <x> <y> - sets the current horizontal and vertical position of the current image overlay.
wait - <#ticks> - pauses script execution for a specific number of ticks.
waitrand - <#ticks1> <#ticks2> - pauses script execution for a random number of ticks given two possible wait times.
goto - <labelname> - unconditionally jumps to a specific code block.
imgol - <image#> <x> <y> - displays an active image overlay at an animation level higher than the current image overlay at a specified offset position.
imgul - <image#> <x> <y> - displays an active image overlay at an animation level lower than the current image overlay at a specified offset position.
imgolorig - <image#> - displays an active image overlay at an animation level higher than the current image overlay at the relative origin offset position.
switchul - <image#> - only for powerups. Hypothesised to replace the image overlay that was first created by the current image overlay.
__0c - no parameters - unknown.
imgoluselo - <image#> <x> <y> - displays an active image overlay at an animation level higher than the current image overlay, using a LO* file to determine the offset position.
imguluselo - <image#> <x> <y> - displays an active image overlay at an animation level lower than the current image overlay, using a LO* file to determine the offset position.
sprol - <sprite#> <x> <y> - spawns a sprite one animation level above the current image overlay at a specific offset position.
highsprol - <sprite#> <x> <y> - spawns a sprite at the highest animation level at a specific offset position.
lowsprul - <sprite#> <x> <y> - spawns a sprite at the lowest animation level at a specific offset position.
uflunstable - <flingy#> - creates an flingy with restrictions; supposedly crashes in most cases.
spruluselo - <sprite#> <x> <y> - spawns a sprite one animation level below the current image overlay at a specific offset position. The new sprite inherits the direction of the current sprite. Requires LO* file for unknown reason.
sprul - <sprite#> <x> <y> - spawns a sprite one animation level below the current image overlay at a specific offset position. The new sprite inherits the direction of the current sprite.
sproluselo - <sprite#> <overlay#> - spawns a sprite one animation level above the current image overlay, using a specified LO* file for the offset position information. The new sprite inherits the direction of the current sprite.
end - no parameters - destroys the current active image overlay, also removing the current sprite if the image overlay is the last in one in the current sprite.
setflipstate - <flipstate> - sets flip state of the current image overlay.
playsnd - <sound#> - plays a sound.
playsndrand - <#sounds> <sound#> <…> - plays a random sound from a list.
playsndbtwn - <firstsound#> <lastsound#> - plays a random sound between two inclusive sfxdata.dat entry IDs.
domissiledmg - no parameters - causes the damage of a weapon flingy to be applied according to its weapons.dat entry.
attackmelee - <#sounds> <sound#> <…> - applies damage to target without creating a flingy and plays a sound.
followmaingraphic - no parameters - causes the current image overlay to display the same frame as the parent image overlay.
randcondjmp - <randchance#> <labelname> - random jump, chance of performing jump depends on the parameter.
turnccwise - <turnamount> - turns the flingy counterclockwise by a particular amount.
turncwise - <turnamount> - turns the flingy clockwise by a particular amount.
turn1cwise - no parameters - turns the flingy clockwise by one direction unit.
turnrand - <turnamount> - turns the flingy a specified amount in a random direction, with a heavy bias towards turning clockwise.
setspawnframe - <direction> - in specific situations, performs a natural rotation to the given direction.
sigorder - <signal#> - allows the current unit's order to proceed if it has paused for an animation to be completed.
attackwith - <ground = 1, air = 2> - attack with either the ground or air weapon depending on a parameter.
attack - no parameters - attack with either the ground or air weapon depending on target.
castspell - no parameters - identifies when a spell should be cast in a spellcasting animation. The spell is determined by the unit's current order.
useweapon - <weapon#> - makes the unit use a specific weapons.dat ID on its target.
move - <movedistance> - sets the unit to move forward a certain number of pixels at the end of the current tick.
gotorepeatattk - no parameters - signals to StarCraft that after this point, when the unit's cooldown time is over, the repeat attack animation can be called.
engframe - <frame#> - plays a particular frame, often used in engine glow animations.
engset - <frameset#> - plays a particular frame set, often used in engine glow animations.
__2d - no parameters - hypothesised to hide the current image overlay until the next animation.
nobrkcodestart - no parameters - holds the processing of player orders until a nobrkcodeend is encountered.
nobrkcodeend - no parameters - allows the processing of player orders after a nobrkcodestart instruction.
ignorerest - no parameters - conceptually, this causes the script to stop until the next animation is called.
attkshiftproj - <distance> - creates the weapon flingy at a particular distance in front of the unit.
tmprmgraphicstart - no parameters - sets the current image overlay state to hidden.
tmprmgraphicend - no parameters - sets the current image overlay state to visible.
setfldirect - <direction> - sets the current direction of the flingy.
call - <labelname> - calls a code block.
return - no parameters - returns from call.
setflspeed - <speed> - sets the flingy.dat speed of the current flingy.
creategasoverlays - <gasoverlay#> - creates gas image overlays at offsets specified by LO* files.
pwrupcondjmp - <labelname> - jumps to a code block if the current unit is a powerup and it is currently picked up.
trgtrangecondjmp - <distance> <labelname> - jumps to a block depending on the distance to the target.
trgtarccondjmp - <angle1> <angle2> <labelname> - jumps to a block depending on the current angle of the target.
curdirectcondjmp - <angle1> <angle2> <labelname> - only for units. Jump to a code block if the current sprite is facing a particular direction.
imgulnextid - <x> <y> - displays an active image overlay at the shadow animation level at a specified offset position. The image overlay that will be displayed is the one that is after the current image overlay in images.dat.
__3e - no parameters - unknown.
liftoffcondjmp - <labelname> - jumps to a code block when the current unit that is a building that is lifted off.
warpoverlay - <frame#> - hypothesised to display the current image overlay's frame clipped to the outline of the parent image overlay.
orderdone - <signal#> - most likely used with orders that continually repeat, like the Medic's healing and the Valkyrie's afterburners (which no longer exist), to clear the sigorder flag to stop the order.
grdsprol - <sprite#> <x> <y> - spawns a sprite one animation level above the current image overlay at a specific offset position, but only if the current sprite is over ground-passable terrain.
__43 - no parameters - unknown.
dogrddamage - no parameters - applies damage like domissiledmg when on ground-unit-passable terrain.
Tileset File Documentation
courtesy of DarkenedFantasies
Tileset files are modified only if the following is true:
- CV5
If new MegaTile Group IDs have been added, or MegaTile Group settings have been edited for Tiles (Flags, Buildable, Buildable 2, Has Up, Has Down, Edges, Misc, Unknowns, MegaTile ID) or Doodads (Doodad ID/Width/Height, Has Overlay, Overlay ID, Buildable, Unknowns, Misc, Group String).
- VF4
If Height, Walkable, Block View, or Ramp flags have been edited.
- VR4
If new MiniTile graphic entries have been imported, or have been created by importing MegaTile or MegaTile Group graphics.
- VX4
If a MegaTile's MiniTile IDs or Flip flags have been edited.
- WPE
If tileset palette has been edited.
- DDDATA.BIN
If Doodad Placeability flags have been edited.
The following notes are courtesy of DarkenedFantasies
"Set Alliance Status" trigger action
Setting players to "Ally" or "Allied Victory" acts similarly to a switch. For example, if Player 1 is set to "Allied Victory" with Player 2, and subsequently Player 1 is set to "Ally" with Player 3, Player 1 will remain allied to Player 2 but no longer share allied victory with them. Think of it as the diplomacy screen in-game; the Allied Victory checkbox is global and cannot be turned on or off for individual players.
Player Groups
"Foes" are players the trigger owner has set to Enemy, regardless of their alliance status with the owner.
"Neutral Players" are players the trigger owner has set to Ally, regardless of their alliance status with the owner.
"Allies" are players the trigger owner has set to Allied Victory, regardless of their alliance status with the owner.
"Non Allied Victory Players" are players who do not share Allied Victory with the trigger owner, and/or the trigger owner does not share Allied Victory with.
Note: A player cannot have both "Neutral Players" and "Allies" at the same time, due to Allied Victory being a global switch, as explained in the previous point.
"Opponents" trigger condition
This condition counts how many players are unallied and/or do not share allied victory.
For example, on a map with two players: Player 1 has Player 2 set to Allied Victory, but Player 2 has Player 1 set to Enemy. Both players have 1 opponent.
On a map with three players: Player 1 has all players set to Enemy, while Player 2 and 3 have all players set to Allied Victory. Player 1 has 2 opponents, while Player 2 and 3 have 1 opponent.
"Defeat/Draw/Victory" trigger actions
"Defeat" ends the game as such for the trigger owner. Other players continue the game as normal.
"Draw" and "Victory" end the game as such for all players performing the action on the same trigger cycle, regardless of alliance status. All players not running the trigger are defeated, even if sharing Allied Victory with one of the victors. The only differences between "Draw" and "Victory" actions appear to be the text and the ability to continue playing for the "Victory" action (in the case of victorious players).
Player-owned triggers vs Force-owned triggers
Triggers owned by Forces will be executed in the same sequence as if they were owned by their respective players, based in the order the triggers are sorted (i.e. as they appear in the text trigedit or when all owners are selected in the classic trigger editor). Therefore, Force triggers are functionally not different from individually ticking multiple player owners and amount simply to organizational preference.