The Images.dat Iscript ID used here is classified Backed By Code in eud_book - not simple data, but a value the game's own code works with, which is where the side effects come from. The source is also 2020 era material. If there is another way, look at it first.
A unit with no cast animation plays nothing when it uses a skill. Point its image at an iscript that has a CastSpell animation and the motion appears.
Before any of that: three spells skip the problem entirely. Scanner Sweep, Defensive Matrix and Stim Pack do not go through the spell-cast orders at all, so they can be handed to a unit with no cast animation as they are. If the effect you want can be built out of one of those three, everything below is unnecessary.
And the requirement is slightly stricter than "has a cast animation". Slot 7, CastSpell, existing is not enough: it has to actually contain the castspell opcode. A script with the slot but no path to that opcode fails exactly as one without the slot does.
The catch is that an iscript does not hold one animation. Walking, attacking, dying - every motion that unit has lives in the same script, so you gain a cast animation by taking somebody else's everything.
There are fewer candidates than you would expect. Measured out of iscript.bin: of the 398 scripts, 206 have no slot 7 at all because their type is too short, and of those that have it only 14 actually reach a castspell opcode.
9 디파일러 20 감염된 케리건 27 퀸 70 고스트 77 사라 케리건 88 사이언스 베슬 146 아비터 152·372 다크 템플러 158 하이템플러 360 메딕 365·366 다크 아콘 369 커세어
And five have the slot and still do not work: 89 (the Science Vessel's turret), 290, 291 and 370 (engine and glow overlays), and 66, the Battlecruiser. The first four are not unit bodies at all, but the Battlecruiser is exactly the one somebody would reach for - and an earlier version of this lesson listed it among the ones with no reported side effect. That was wrong.
// 배틀크루저의 CastSpell 전체 / the Battlecruiser's entire CastSpell imgolorig 31 2 // 야마토 오버레이를 얹는다 / lay the Yamato overlay on goto 0x79BA // 대기 모션으로 / back to idle
| 9 Defiler | Crashes. |
|---|---|
| 70 Ghost · 20 · 77 Kerrigan | Later framesets strip images while the unit walks. |
| 360 Medic · 88 · 89 Science Vessel | Cannot attack any more. |
| 158 Templar | Ground only. |
| The rest | Queen, Arbiter, Dark Templar, Dark Archon and Corsair have the animation and no reported side effect - which means nobody wrote one down, not that there is none. Test before relying on one. |
Extended animations - reaching past 27 up to 255 - are not taught here. The source itself marks them as undefined behaviour outside the iscript header. Know only that people do it, and why the map breaks.
That list says what is possible. Choosing among them is a different question, and the answer is: match the borrowed script's frame references to the image's frame count. Borrow a script that asks for frames the image does not have and the unit DISAPPEARS for those frames - no crash, no dolmen, just a gap.
| A caster out of a non-caster | Arbiter or Corsair. Both carry ground attack, air attack and spell, so one swap covers every motion the unit might need. |
|---|---|
| A caster out of a Zerg flyer | Queen - similar frame counts to the Zerg flyers, and it too has all three. |
| A building-looking unit that attacks | Wraith or Battlecruiser - they attack with NO attack motion. Scout and Corsair have one, and an image with no attack frames blinks out and back while it plays. |
| A spell graphic as an instant weapon effect | Arclight Shock Cannon - the most frames, so a long effect (a Stasis Field forming, say) plays out fully. |
| A spell graphic as a travelling projectile | Phase Disruptor - but you inherit its impact effect. |
- Do not borrow a ground unit's script for a building image. Ghost and Marine have movement motions, which a building has no frames for, so the gap appears while it moves rather than while it attacks. A flyer's script is the safer shape.
- The iscript carries the sound. Borrow Arclight Shock Cannon and the explosion sound comes with it. Sometimes that is the point and sometimes it is a bug; there is no separating them at the script level.
- A building that now attacks still cannot move: the iscript was only half of it, and movement comes from the flingy data. Copy the whole flingy record of the unit whose speed you want, except its sprite.
One dead end worth knowing before you try it: flingy 172, “White Circle”, is invisible by design. Spell projectiles have no graphic because the visual comes from the EXPLOSION TYPE, not the projectile - so pointing a weapon at 172 and expecting to see a spell effect shows nothing. Take an unused flingy instead (or Trap, if the map has no traps), copy a real projectile's flingy record onto it, point its sprite's image at the effect, and only then fix the iscript.
The iscript ID list