SPMod Script File

Introduction


The biggest feature of the SPMod is the SSF file format. This file allows you to create up to 33 custom roadbook entries, label up to 32 episode flags, set pawn-o-matic's stocks and prices... The file can be created with SSFEdit, a small software provided with the SPMod package.

The format is chunk-oriented (groups of datas identified with a code number) and shouldn't be too hard to read and modify. The idea behind the chunk system is that you can create extra chunks if you need to, and you won't have to recode the whole SSF opening procedure.

SSFEdit


Start the application as "SSFEdit [filename(.ssf)]" (or drag and drop the SSF to SSFEdit.EXE) to edit or create a new file. The interface is divided in two columns. The left column displays all the chunks contained in the SSF, the right column displays settings for the currently selected chunk.
Key, left column, right column
Pg Up/Pg DownPrevious/Next chunk in the list (faster)-
Up/Down arrowPrevious/Next chunk in the listPrevious/Next setting
InsertCreate a new chunk-
Left/Right arrowChange chunk IDEnable/disable setting
EnterEdit currently selected chunk, go to right columnEdit current setting, confirm changes
DeleteRemove currently selected chunk-
EscapeQuitCancel in edit mode, go to left column otherwise
Home/EndMove the chunk higher or lower in the list-

Specifications

Header
Signaturechar[3]Must be SSF
Versionunsigned byteMust be 1
Chunksunsigned shortNumber of chunks stored (at least 1)

Each chunk starts with an unsigned byte, which defines the type of data the chunk contains.
Chunks ID, Data type
1Episode flags
2Log entries
3Shop stocks (always 9 bytes long)
4Shop prices (always 129 bytes long)
16Misc string, displayed if "spmod_debug" is not null
Chunks ID = 1
Entriesunsigned byteAmount of defined flags (1 to 32)
FlagNumberunsigned byteFlag # number, the FlagValue is "2^(FlagNumber-1)" (1 to 32)
LabelSizeunsigned byteSize (in byte) of Flag # Label (1 to 48)
LabelStringchar[LabelSize]Flag # Label
Chunks ID = 2
Entriesunsigned byteAmount of defined logs (1 to 33)
BindToFlagunsigned byteBind log entry # to flag [BindToFlag] (0 to 32 -- 0 sets the default log entry)
MessageSizeunsigned byteSize (in byte) of Message # String (1 to 255)
MessageStringchar[MessageSize]Message #
Chunks ID = 3
ShopIdNumberunsigned byteShop_ID, matches pawn_o_matic's "count" value
Weaponsunsigned byteWeapons available (bitmapped)
Modsunsigned byteMods available (bitmapped)
Ammo1unsigned byteAmmo1 available (bitmapped)
Ammo2unsigned byteAmmo2 available (bitmapped)
Healthunsigned byteHealth available (bitmapped)
Armorunsigned byteArmor available (bitmapped)
Slot7unsigned byteUnused (bitmapped)
Slot8unsigned byteUnused (bitmapped)
Chunks ID = 4
ShopIdNumberunsigned byteShop_ID, matches pawn_o_matic's "count" value
Price_S1_I1unsigned short Price for Pistol (default: 50)
Price_S1_I2unsigned shortPrice for Shotgun (default: 150)
Price_S1_I3unsigned short Price for Tommygun (default: 250)
Price_S1_I4unsigned shortPrice for HMG (default: 750)
Price_S1_I5unsigned short Price for Grenade Launcher (default: 200)
Price_S1_I6unsigned shortPrice for Bazooka (default: 350)
Price_S1_I7unsigned short Price for Flamethrower (default: 500)
Price_S1_I8unsigned shortUnused
Price_S2_I1unsigned short Price for Silencer (default: 10)
Price_S2_I2unsigned shortPrice for Rate of Fire (default: 25)
Price_S2_I3unsigned short Price for Magnum Mod (default: 50)
Price_S2_I4unsigned shortPrice for Reload (default: 25)
Price_S2_I5unsigned short Price for Cooling Mod (default: 50)
Price_S2_I6unsigned shortPrice for Accuracy (default: 60)
Price_S2_I7unsigned short Price for Slowburn (default: 100)
Price_S2_I8unsigned shortUnused
Price_S3_I1unsigned short Price for Bullets (default: 5)
Price_S3_I2unsigned shortPrice for Shells (default: 25)
Price_S3_I3unsigned short Price for .308 (default: 20)
Price_S3_I4unsigned shortPrice for Grenades (default: 100)
Price_S3_I5unsigned short Unused
Price_S3_I6unsigned shortUnused
Price_S3_I7unsigned short Unused
Price_S3_I8unsigned shortUnused
Price_S4_I1unsigned short Price for Rockets (default: 100)
Price_S4_I2unsigned shortPrice for Gas (default: 25)
Price_S4_I3unsigned short Unused
Price_S4_I4unsigned shortUnused
Price_S4_I5unsigned short Unused
Price_S4_I6unsigned shortUnused
Price_S4_I7unsigned short Unused
Price_S4_I8unsigned shortUnused
Price_S5_I1unsigned short Medical Kit (default: 25)
Price_S5_I2unsigned shortLarge Med Kit (default: 50)
Price_S5_I3unsigned short Unused
Price_S5_I4unsigned shortUnused
Price_S5_I5unsigned short Unused
Price_S5_I6unsigned shortUnused
Price_S5_I7unsigned short Unused
Price_S5_I8unsigned shortUnused
Price_S6_I1unsigned short Helmet (default: 100)
Price_S6_I2unsigned shortHeavy Helmet (default: 200)
Price_S6_I3unsigned short Jacket (default: 150)
Price_S6_I4unsigned shortHeavy Jacket (default: 300)
Price_S6_I5unsigned short Leg Armor (default: 100)
Price_S6_I6unsigned shortHeavy Leg Armor (default: 200)
Price_S6_I7unsigned short Unused
Price_S6_I8unsigned shortUnused
Price_S7_I1unsigned short Unused
Price_S7_I2unsigned shortUnused
Price_S7_I3unsigned short Unused
Price_S7_I4unsigned shortUnused
Price_S7_I5unsigned short Unused
Price_S7_I6unsigned shortUnused
Price_S7_I7unsigned short Unused
Price_S7_I8unsigned shortUnused
Price_S8_I1unsigned short Unused
Price_S8_I2unsigned shortUnused
Price_S8_I3unsigned short Unused
Price_S8_I4unsigned shortUnused
Price_S8_I5unsigned short Unused
Price_S8_I6unsigned shortUnused
Price_S8_I7unsigned short Unused
Price_S8_I8unsigned shortUnused
Chunks ID = 16
MessageSizeunsigned shortSize (in byte) of MessageString (1 to 1024)
MessageStringchar[MessageSize]Message