Skip to content

SPS and SHP Effects

Tirlititi edited this page Aug 8, 2024 · 5 revisions

SPS are little visual effects, used:

  • in fields for eg. the flames of Fire spells in cutscenes or as part of teleportation effects in Desert Palace or Pandemonium
  • in world maps with the same purpose: smoke when Moguo moves, splashes when flying above the sea or even the forest movements
  • in battles for the visual effect of many statuses, like Poison, Sleep, Berserk...
SHP are similar to SPS but are only used for statuses in battles and are restricted to animated textures (Slow, Haste, Trouble and Silence).

Table of Contents

Examples of SPS


FieldMaps/fbg_n02_alxc_map858_ac_qrm_0/8.sps
The SPS used when Kuja sends Garnet to sleep



FieldMaps/fbg_n02_alxc_map858_ac_qrm_0/1963.sps
A part of the SPS used when Beatrix wakes Garnet up from her sleep



FieldMaps/fbg_n55_dglo_map775_dg_ent_0/1933.sps
A SPS used in Daggerreo's entrance when transforming Ores into Aquamarines



FieldMaps/fbg_n15_kuin_map315_km_red_0/1180.sps
The texture of the SPS used when moving in Qu's Marsh brushes
It is one of the few SPS for which the colour is in the texture itself



FieldMaps/fbg_n41_brbl_map700_bb_thl_0/570.sps
The texture of one of the SPS used by Terran teleporters (such as when Garland meets Zidane on arrival)
It is used as an intensity map: the white parts gets coloured frame by frame with different colours


Use any SPS in any event scripts

It's not very convenient because it uses the native API for SPS. So mostly it would be copy-paste existing code from a field script to somewhere else. Also, it's required to specify the SPS's orgin. So for example, you would use this code:

// The SPS index picked there is 15 because it's usually not used by native code
RunSPSCode( 15, 129, 2800, 0, 0 ) // Specify the SPS's origin: it's the field 2800
RunSPSCode( 15, 130, 1933, 0, 0 ) // Load the SPS 1933
RunSPSCode( 15, 131, 8, 1, 0 ) // Enable the flag "Unload on finish", so it disappears instead of looping
RunSPSCode( 15, 145, 18000, 0, 0 ) // Increase the SPS's size
RunSPSCode( 15, 150, 255, 0, 0 ) // Attach the SPS to the entry in which the code is copied
RunSPSCode( 15, 156, 1, 0, 0 ) // Setup ABR
// The best is to re-init the SPS origin to the current field ID, so the native SPS can load correctly
//RunSPSCode( 15, 129, ???, 0, 0 )
World map SPS can be loaded with RunSPSCode( spsIndex, 129, 9000, 0, 0 ) (there are 40 world map SPS, with IDs from 0 to 39). Other SPS, including battle status SPS, can be loaded with RunSPSCode( spsIndex, 130, spsID, 1, 0 ). These SPS are the ones defined in StreamingAssets/Data/SpecialEffects/Common/SPS.csv.

So, these are very niche usage, but still it could be interesting to have some of these cool FF9 effects without restriction.

Configure custom SPS and SHP

There are now two new CSV files in the folder StreamingAssets/Data/SpecialEffects/Common/, the files SPS.csv and SHP.csv. They define the battle status SPS and SHP by default and can be used to create new ones, either to be used for statuses, or custom SFX sequences or in scripts.

SHP effects are very simple: you use a collection of PNG images and these icons loop like a GIF (placed in a 3D environment). Just add an entry in SHP.csv with the filename of the texture you want to use with a % in the filename in place of the frame number. For example:

Power Up;4;CustomTextures/PowerUp_%.png;3;0;6
This line will look for the 3 textures FF9_Data/CustomTextures/PowerUp_1.png, PowerUp_2.png and PowerUp_3.png, use the ABR 0 (opaque; you can also use 1 for textures with semi-transparence) and use them as a kind of GIF that lasts 6 frames per loop in total.

A SPS is more complicated: it uses both a binary file that you cannot really create yourself (it's a custom binary format) and a single texture with possibly multiple parts as the SPS can have a texture animation. SPS work a lot like "particle emitters" for which all the frames were already compiled. You can use a custom texture to change the look of the SPS but the movement and the colour of the particles are coded inside the binary part. You can use a field SPS as a basis with a line like that:

Whirling magic;8;FieldMaps/fbg_n55_dglo_map775_dg_ent_0/1933.sps;ExportedSPSTextures/1933.png;1;4;5
The model viewer helps there because you'll be able to browse the existing SPS and export their texture, which also gives up the path you must use for the binary.

Use SPS and SHP in custom SFX sequences

It is now possible to display these small visual effects in SFX sequences. They are much lighter than SFX effects and don't have a camera constraint. For that, use a line like that in a SFX .seq:

CreateVisualEffect: SPS=0 ; Char=Caster ; Bone=Weapon ; Offset=(0, 300, 0) ; Size=3 ; Time=30 ; Speed=-1
This will create the SPS effect registered with ID 0 in SPS.csv (the effect of Poison by default) 300 units above the caster's weapon, with a size 3 times bigger than usual and in reverse animation speed for 30 frames. You may use Time=-1 (or don't specify Time at all) in order to display the SPS for a single loop. The keywords for Bone will be documented in the wiki at some point.

You can also use CreateVisualEffect: SHP=0 ; ... in order to use a SHP effect instead.

Using the Model Viewer

You can also use the key C to change the background to a brighter colour (needed to see a couple of SPS).

You can also export the SPS's texture from there with the key E. It will be saved in the folder StreamingAssets/EffectSPS/[MapName]/[ID].png so you know that you can refer to its binary file with FieldMaps/[MapName]/[ID].sps inside SPS.csv.