INT File Format

INT files are compiled Fallout and Fallout 2 scripts. The source language is usually called SSL. The game does not execute SSL directly: the compiler turns it into an INT bytecode program, and the engine interpreter runs that program when a map, object, critter, item, spatial trigger, dialogue, or timed event asks for one of the script procedures.

Most paths below are relative to master.dat, critter.dat, patch000.dat, or an unpacked Fallout data directory. Runtime scripts are normally loaded from scripts\*.int through scripts\scripts.lst. The matching source, when available to modders, is normally *.ssl; the matching dialogue text is often text\ \dialog\*.msg.

Format Properties

PropertyDescription
File typeBinary bytecode program.
Magic/versionNo separate magic header. Normal Fallout scripts start with a known bootstrap instruction sequence.
Byte orderBig-endian for 16-bit opcodes and 32-bit integer fields.
Entry pointThe procedure table always starts at file offset 0x2A / decimal 42.
Instruction sizeOpcodes are 16-bit words. Some opcodes, especially typed literal pushes, consume a following 32-bit operand.
StringsLength-prefixed, null-terminated, even-aligned byte strings in identifier and static-string tables.
CompressionThe INT file itself is not compressed. It may be stored inside a compressed DAT entry.

High-Level Layout

A normal INT file is best understood as a small bootstrap, a set of tables, and executable bytecode blocks whose addresses are absolute file offsets.

OrderSectionHow the runtime finds it
1Script bootstrap codeFixed-size block at 0x0000..0x0029.
2Procedure tableFixed start at 0x002A.
3Identifier tableprocedure_table + 4 + procedure_count * 24.
4Static string tableidentifier_table + identifier_table_size + 4.
5Initialization code and procedure bodiesReached by jumps and by procedure record offsets.
program.procedures    = file + 42
procedure_count       = be32(program.procedures + 0)
program.identifiers   = program.procedures + 4 + procedure_count * 24
program.staticStrings = program.identifiers + be32(program.identifiers + 0) + 4

The runtime keeps the entire file in memory and uses file-relative instruction pointers. Procedure body_offset and condition_offset therefore point into the full INT file, not into a sliced code section.

Bootstrap Code

The first 42 bytes are executable interpreter code emitted by the compiler. Traditional documentation calls this "script initialization code". The important practical point is that old engine code assumes the procedure table begins immediately after these 42 bytes.

OffsetSizeTypical valueMeaning
0x000020x8002Enter critical section.
0x000220xC001Typed integer push.
0x000440x00000012Return address used by the startup wrapper.
0x000820x800DMove data-stack value to return/address stack.
0x000A20xC001Typed integer push.
0x000C4variesAbsolute file offset of object-initialization code.
0x001020x8004Jump to the initialization code.
0x001220x8010Exit program helper target.
0x0014..0x002822pop/return helper opcodesSmall helper targets used by procedure-return paths.

The exact bootstrap bytes are useful for recognizing normal compiler output, but a loader should still derive section positions the same way the engine does: the procedure table starts at byte 42.

Procedure Table

The procedure table starts with a 32-bit big-endian procedure count. It is followed by that many 24-byte records.

OffsetSizeFieldDescription
0x004name_offsetOffset into the identifier table. It points to the first character of the procedure name.
0x044flagsProcedure flags.
0x084timeScheduled time for timed procedures.
0x0C4condition_offsetAbsolute file offset of condition code for conditional procedures.
0x104body_offsetAbsolute file offset of the procedure body.
0x144arg_countNumber of procedure arguments.

Compiler output traditionally includes a dummy first procedure named with periods. This keeps normal procedure indexes starting at 1. Fallout 2 CE's execution path still treats a resolved procedure index of 0 specially and substitutes procedure index 1, which matches the old dummy-slot convention.

Procedure Flags

FlagNameDescription
0x01P_TIMEDProcedure is run later by the interpreter's timed procedure event scan.
0x02P_CONDITIONALProcedure has condition code that is evaluated before the body runs.
0x04P_IMPORTProcedure is imported from another running/exporting program.
0x08P_EXPORTProcedure is exported for external lookup.
0x10P_CRITICALProcedure runs inside the interpreter's critical-section mechanism.

Timed and conditional procedure records exist in the interpreter, but old notes warn that conditional procedure compilation was unreliable in the original BIS tooling. Treat those flags as real VM features, not necessarily as common Fallout content.

Identifier Table

The identifier table stores procedure names and script-level variable names. It does not store local variable names declared inside procedure bodies; those are lost at compilation time unless a decompiler invents names.

OffsetSizeFieldDescription
0x004total_sizeByte length used by the runtime to find the next table.
0x042length0Length of the first stored string, including its null terminator and any padding.
0x06length0string0Null-terminated bytes, padded to an even length.
......more stringsRepeated uint16 length plus bytes.
after table data40xFFFFFFFFTraditional end marker. The runtime mainly relies on total_size for locating the static-string table.

Procedure-record name_offset values are relative to the beginning of this identifier table and point at the first character, not at the 16-bit length word. For the first string in a normal table, that means an offset of 6.

Static String Table

The static string table stores string constants used by the script. It uses the same length-prefixed, even-aligned physical structure as the identifier table. A script with no string constants can still have an empty table.

Typed static-string literals in bytecode use 0x9001 followed by a 32-bit offset. The runtime resolves those offsets as staticStrings + 4 + offset, so string literal offsets are relative to the bytes after the table's 32-bit total_size field. Like identifier offsets, they point at the first character of the stored string, not at the preceding length word.

Initialization Code

After the tables, the compiler emits script-object initialization code. This code sets up exported variables, external variables, exported procedures, global script storage, and the transfer to start if the script has one. It is ordinary bytecode reached by the bootstrap jump at 0x000C.

Traditional docs describe this block as starting with O_SET_GLOBAL (0x802C) and then a sequence of typed values plus export/store opcodes. In practice, tools should not assume a single fixed length. Follow the bootstrap jump and procedure offsets instead.

Imports and Exports

INT programs can export procedures and variables during initialization. Other scripts can then import those names and call or access them through the interpreter's external lookup system. This is separate from normal built-in map/object procedure dispatch: talk_p_proc and map_enter_p_proc are found inside one script, while imported/exported names are looked up across loaded programs.

FeatureBytecode markerRuntime consequence
Export variable0x8016Registers a named external variable supplied by this program.
Export procedure0x8017Registers a named procedure and its argument count for external calls.
Import procedureP_IMPORT on a procedure recordProcedure execution resolves the name through the external procedure registry instead of jumping to a local body.
Store/fetch external0x8015 / 0x8014Writes or reads an exported variable by name.

Imported calls are fragile when viewed as a file-format feature because successful execution depends on runtime state, not only on bytes in the INT file. If the exporting program has not been loaded or has not run its initialization code, the imported procedure or variable may not exist even though the importing INT parses correctly.

Instruction Encoding

The interpreter reads a 16-bit big-endian opcode word. Opcode dispatch uses the lower opcode index; the high bits can also carry a value type. This is why a typed integer literal appears as 0xC001: it is a typed form of the push opcode.

ValueNameMeaning
0x8001OPCODE_PUSHUntyped/raw push opcode index.
0xC001VALUE_TYPE_INTPush following 32-bit value as an integer.
0xA001VALUE_TYPE_FLOATPush following 32-bit value as a float value.
0x9001VALUE_TYPE_STRINGPush following 32-bit offset into the static string table.
0x9801VALUE_TYPE_DYNAMIC_STRINGRuntime-only dynamic string value. Normal file bytecode should not need to store this directly.
0xE001VALUE_TYPE_PTRRuntime pointer/object value. This is interpreter state, not a portable file reference.

Most non-literal opcodes are standalone 16-bit words. Branches, calls, procedure lookups, and many game built-ins consume or produce values on the interpreter stack rather than carrying all arguments inline. A disassembler therefore needs to model stack effects, not just parse bytes sequentially.

Opcode Reference

The tables below list the vanilla opcode numbers registered by Fallout 2 CE's interpreter sources. They are a useful compatibility baseline for disassemblers, decompilers, and documentation tools: 0x8000..0x804B are core VM instructions, 0x804C..0x80A0 are generic interpreter-library helpers, and 0x80A1..0x8155 are Fallout game operations. sfall opcodes are documented separately after the vanilla tables.

Opcode words are stored big-endian in the file. Literal pushes often combine OPCODE_PUSH with a value type in the high bits, so a disassembler should decode typed push forms before falling back to the raw opcode number.

Core VM Opcodes

OpcodeNameRole
0x8000OPCODE_NOOPNo operation.
0x8001OPCODE_PUSHPushes an immediate value; usually appears with a value-type tag.
0x8002OPCODE_ENTER_CRITICAL_SECTIONEnters an interpreter critical section.
0x8003OPCODE_LEAVE_CRITICAL_SECTIONLeaves an interpreter critical section.
0x8004OPCODE_JUMPTransfers control to a bytecode address.
0x8005OPCODE_CALLCalls a local procedure or procedure address.
0x8006OPCODE_CALL_ATSchedules a call at a specified time.
0x8007OPCODE_CALL_WHENSchedules a call when a condition becomes true.
0x8008OPCODE_CALLSTARTBegins call setup.
0x8009OPCODE_EXECExecutes another program/procedure context.
0x800AOPCODE_SPAWNSpawns another program context.
0x800BOPCODE_FORKForks execution.
0x800COPCODE_A_TO_DMoves a value from the address stack to the data stack.
0x800DOPCODE_D_TO_AMoves a value from the data stack to the address stack.
0x800EOPCODE_EXITExits the current procedure context.
0x800FOPCODE_DETACHDetaches the current program from its caller/scheduler context.
0x8010OPCODE_EXIT_PROGRAMTerminates the current program.
0x8011OPCODE_STOP_PROGRAMStops a program.
0x8012OPCODE_FETCH_GLOBALReads a global interpreter variable slot.
0x8013OPCODE_STORE_GLOBALWrites a global interpreter variable slot.
0x8014OPCODE_FETCH_EXTERNALReads an exported variable by name.
0x8015OPCODE_STORE_EXTERNALWrites an exported variable by name.
0x8016OPCODE_EXPORT_VARIABLERegisters a variable export during initialization.
0x8017OPCODE_EXPORT_PROCEDURERegisters a procedure export during initialization.
0x8018OPCODE_SWAPSwaps stack values.
0x8019OPCODE_SWAPASwaps address-stack values.
0x801AOPCODE_POPPops and discards a value.
0x801BOPCODE_DUPDuplicates the top stack value.
0x801COPCODE_POP_RETURNPops a return address and returns.
0x801DOPCODE_POP_EXITPops state and exits the procedure.
0x801EOPCODE_POP_ADDRESSPops an address value.
0x801FOPCODE_POP_FLAGSPops procedure flags/state.
0x8020OPCODE_POP_FLAGS_RETURNPops flags and returns.
0x8021OPCODE_POP_FLAGS_EXITPops flags and exits.
0x8022OPCODE_POP_FLAGS_RETURN_EXTERNPops flags and returns from an external call.
0x8023OPCODE_POP_FLAGS_EXIT_EXTERNPops flags and exits from an external call.
0x8024OPCODE_POP_FLAGS_RETURN_VAL_EXTERNPops flags and returns a value from an external call.
0x8025OPCODE_POP_FLAGS_RETURN_VAL_EXITPops flags, returns a value, and exits.
0x8026OPCODE_POP_FLAGS_RETURN_VAL_EXIT_EXTERNPops flags, returns a value, and exits from an external call.
0x8027OPCODE_CHECK_PROCEDURE_ARGUMENT_COUNTChecks the number of arguments supplied to a procedure.
0x8028OPCODE_LOOKUP_PROCEDURE_BY_NAMELooks up a procedure by identifier string.
0x8029OPCODE_POP_BASEPops the current stack base/frame pointer.
0x802AOPCODE_POP_TO_BASEPops values back to the current base/frame pointer.
0x802BOPCODE_PUSH_BASEPushes the current stack base/frame pointer.
0x802COPCODE_SET_GLOBALSets up global variable storage.
0x802DOPCODE_FETCH_PROCEDURE_ADDRESSFetches a procedure's bytecode address.
0x802EOPCODE_DUMPDebug/dump helper.
0x802FOPCODE_IFConditional branch helper.
0x8030OPCODE_WHILELoop branch helper.
0x8031OPCODE_STOREStores a value in a local/global slot.
0x8032OPCODE_FETCHFetches a value from a local/global slot.
0x8033OPCODE_EQUALCompares for equality.
0x8034OPCODE_NOT_EQUALCompares for inequality.
0x8035OPCODE_LESS_THAN_EQUALCompares less-than-or-equal.
0x8036OPCODE_GREATER_THAN_EQUALCompares greater-than-or-equal.
0x8037OPCODE_LESS_THANCompares less-than.
0x8038OPCODE_GREATER_THANCompares greater-than.
0x8039OPCODE_ADDAdds two values or concatenates strings where supported.
0x803AOPCODE_SUBSubtracts values.
0x803BOPCODE_MULMultiplies values.
0x803COPCODE_DIVDivides values.
0x803DOPCODE_MODComputes remainder.
0x803EOPCODE_ANDLogical AND.
0x803FOPCODE_ORLogical OR.
0x8040OPCODE_BITWISE_ANDBitwise AND.
0x8041OPCODE_BITWISE_ORBitwise OR.
0x8042OPCODE_BITWISE_XORBitwise XOR.
0x8043OPCODE_BITWISE_NOTBitwise NOT.
0x8044OPCODE_FLOORFloors a numeric value.
0x8045OPCODE_NOTLogical NOT.
0x8046OPCODE_NEGATEArithmetic negation.
0x8047OPCODE_WAITSuspends execution for a delay.
0x8048OPCODE_CANCELCancels a scheduled event/call.
0x8049OPCODE_CANCEL_ALLCancels scheduled events/calls.
0x804AOPCODE_START_CRITICALStarts a critical section for script scheduling.
0x804BOPCODE_END_CRITICALEnds a critical section for script scheduling.

Vanilla Interpreter-Library Opcodes

These opcodes come from the generic interpreter library rather than the Fallout-specific game API. They cover dialogue window helpers, window drawing, movies, regions, buttons, mouse/input hooks, named events, sound handles, and simple utility routines. The gaps at 0x807D and 0x807E are not registered in Fallout 2 CE's library table.

OpcodeHandlerCategory
0x804CopSayQuitDialogue UI
0x804DopSayEndDialogue UI
0x804EopSayStartDialogue UI
0x804FopSayStartPosDialogue UI
0x8050opSayReplyTitleDialogue UI
0x8051opSayGoToReplyDialogue UI
0x8052opSayOptionDialogue UI
0x8053opSayReplyDialogue UI
0x8054opSayMessageDialogue UI
0x8055opSayReplyWindowDialogue UI
0x8056opSayOptionWindowDialogue UI
0x8057opSayBorderDialogue UI
0x8058opSayScrollUpDialogue UI
0x8059opSayScrollDownDialogue UI
0x805AopSaySetSpacingDialogue UI
0x805BopSayOptionColorDialogue UI
0x805CopSayReplyColorDialogue UI
0x805DopSayRestartDialogue UI
0x805EopSayGetLastPosDialogue UI
0x805FopSayReplyFlagsDialogue UI
0x8060opSayOptionFlagsDialogue UI
0x8061opSayMessageTimeoutDialogue UI
0x8062opCreateWinWindow/display
0x8063opDeleteWinWindow/display
0x8064opSelectWindow/display
0x8065opResizeWinWindow/display
0x8066opScaleWinWindow/display
0x8067opShowWinWindow/display
0x8068opFillWinWindow/display
0x8069opFillRectWindow/display
0x806AopFillWin3x3Window/display
0x806BopDisplayWindow/display
0x806CopDisplayGfxWindow/display
0x806DopDisplayRawWindow/display
0x806EopLoadPaletteTablePalette/display
0x806FopFadeInPalette/display
0x8070opFadeOutPalette/display
0x8071opGotoXYText drawing
0x8072opPrintText drawing
0x8073opFormatText drawing
0x8074opPrintRectText drawing
0x8075opSetFontText drawing
0x8076opSetTextFlagsText drawing
0x8077opSetTextColorText drawing
0x8078opSetHighlightColorText drawing
0x8079opStopMovieMovie
0x807AopPlayMovieMovie
0x807BopSetMovieFlagsMovie
0x807CopPlayMovieRectMovie
0x807FopAddRegionRegions
0x8080opAddRegionFlagRegions
0x8081opAddRegionProcRegions
0x8082opAddRegionRightProcRegions
0x8083opDeleteRegionRegions
0x8084opActivateRegionRegions
0x8085opCheckRegionRegions
0x8086opAddButtonButtons
0x8087opAddButtonTextButtons
0x8088opAddButtonFlagButtons
0x8089opAddButtonGfxButtons
0x808AopAddButtonProcButtons
0x808BopAddButtonRightProcButtons
0x808CopDeleteButtonButtons
0x808DopHideMouseMouse/input
0x808EopShowMouseMouse/input
0x808FopMouseShapeMouse/input
0x8090opRefreshMouseMouse/input
0x8091opSetGlobalMouseFuncMouse/input
0x8092opAddNamedEventNamed events
0x8093opAddNamedHandlerNamed events
0x8094opClearNamedNamed events
0x8095opSignalNamedNamed events
0x8096opAddKeyKeyboard/input
0x8097opDeleteKeyKeyboard/input
0x8098opSoundPlaySound
0x8099opSoundPauseSound
0x809AopSoundResumeSound
0x809BopSoundStopSound
0x809CopSoundRewindSound
0x809DopSoundDeleteSound
0x809EopSetOneOptPauseDialogue/UI option behavior
0x809FopSelectFileListFile list UI
0x80A0opTokenizeString utility

Vanilla Fallout Game Opcodes

These are the game-facing SSL operations. The "SSL name" column uses the names found in older opcode references and script compilers where available; the "CE handler" column gives the corresponding Fallout 2 CE implementation symbol. Argument counts and exact stack effects are a runtime/API concern, so this table is best treated as an opcode identity and compatibility map.

OpcodeSSL nameCE handler
0x80A1give_exp_pointsopGiveExpPoints
0x80A2scr_returnopScrReturn
0x80A3play_sfxopPlaySfx
0x80A4obj_nameopGetObjectName
0x80A5sfx_build_open_nameopSfxBuildOpenName
0x80A6get_pc_statopGetPcStat
0x80A7tile_contains_pid_objopTileGetObjectWithPid
0x80A8set_map_startopSetMapStart
0x80A9override_map_startopOverrideMapStart
0x80AAhas_skillopHasSkill
0x80ABusing_skillopUsingSkill
0x80ACroll_vs_skillopRollVsSkill
0x80ADskill_contestopSkillContest
0x80AEdo_checkopDoCheck
0x80AFsuccessopSuccess
0x80B0criticalopCritical
0x80B1how_muchopHowMuch
0x80B2mark_area_knownopMarkAreaKnown
0x80B3reaction_influenceopReactionInfluence
0x80B4randomopRandom
0x80B5roll_diceopRollDice
0x80B6move_toopMoveTo
0x80B7create_objectopCreateObject
0x80B8display_msgopDisplayMsg
0x80B9script_overridesopScriptOverrides
0x80BAobj_is_carrying_objopObjectIsCarryingObjectWithPid
0x80BBtile_contains_obj_pidopTileContainsObjectWithPid
0x80BCself_objopGetSelf
0x80BDsource_objopGetSource
0x80BEtarget_objopGetTarget
0x80BFdude_objopGetDude
0x80C0obj_being_used_withopGetObjectBeingUsed
0x80C1get_local_varopGetLocalVar
0x80C2set_local_varopSetLocalVar
0x80C3get_map_varopGetMapVar
0x80C4set_map_varopSetMapVar
0x80C5get_global_varopGetGlobalVar
0x80C6set_global_varopSetGlobalVar
0x80C7script_actionopGetScriptAction
0x80C8obj_typeopGetObjectType
0x80C9item_subtypeopGetItemType
0x80CAget_critter_statopGetCritterStat
0x80CBset_critter_statopSetCritterStat
0x80CCanimate_stand_objopAnimateStand
0x80CDanimate_stand_reverse_objopAnimateStandReverse
0x80CEanimate_move_obj_to_tileopAnimateMoveObjectToTile
0x80CFtile_in_tile_rectopTileInTileRect
0x80D0attack_complexopAttackComplex
0x80D1make_daytimeopMakeDayTime
0x80D2tile_distanceopTileDistanceBetween
0x80D3tile_distance_objsopTileDistanceBetweenObjects
0x80D4tile_numopGetObjectTile
0x80D5tile_num_in_directionopGetTileInDirection
0x80D6pickup_objopPickup
0x80D7drop_objopDrop
0x80D8add_obj_to_invenopAddObjectToInventory
0x80D9rm_obj_from_invenopRemoveObjectFromInventory
0x80DAwield_obj_critteropWieldItem
0x80DBuse_objopUseObject
0x80DCobj_can_see_objopObjectCanSeeObject
0x80DDattackopAttackComplex
0x80DEstart_gdialogopStartGameDialog
0x80DFend_gdialogopEndGameDialog
0x80E0dialogue_reactionopGameDialogReaction
0x80E1metarule3opMetarule3
0x80E2set_map_musicopSetMapMusic
0x80E3set_obj_visibilityopSetObjectVisibility
0x80E4load_mapopLoadMap
0x80E5wm_area_set_posopWorldmapCitySetPos
0x80E6set_exit_gridsopSetExitGrids
0x80E7anim_busyopAnimBusy
0x80E8critter_healopCritterHeal
0x80E9set_light_levelopSetLightLevel
0x80EAgame_timeopGetGameTime
0x80EBgame_time_in_secondsopGetGameTimeInSeconds
0x80ECelevationopGetObjectElevation
0x80EDkill_critteropKillCritter
0x80EEkill_critter_typeopKillCritterType
0x80EFcritter_damageopCritterDamage
0x80F0add_timer_eventopAddTimerEvent
0x80F1rm_timer_eventopRemoveTimerEvent
0x80F2game_ticksopGameTicks
0x80F3has_traitopHasTrait
0x80F4destroy_objectopDestroyObject
0x80F5obj_can_hear_objopObjectCanHearObject
0x80F6game_time_houropGameTimeHour
0x80F7fixed_paramopGetFixedParam
0x80F8tile_is_visibleopTileIsVisible
0x80F9dialogue_system_enteropGameDialogSystemEnter
0x80FAaction_being_usedopGetActionBeingUsed
0x80FBcritter_stateopGetCritterState
0x80FCgame_time_advanceopGameTimeAdvance
0x80FDradiation_incopRadiationIncrease
0x80FEradiation_decopRadiationDecrease
0x80FFcritter_attempt_placementopCritterAttemptPlacement
0x8100obj_pidopGetObjectPid
0x8101cur_map_indexopGetCurrentMap
0x8102critter_add_traitopCritterAddTrait
0x8103critter_rm_traitopCritterRemoveTrait
0x8104proto_dataopGetProtoData
0x8105message_stropGetMessageString
0x8106critter_inven_objopCritterGetInventoryObject
0x8107obj_set_light_levelopSetObjectLightLevel
0x8108scripts_request_world_mapopWorldmap
0x8109inven_cmds_op_inven_cmds
0x810Afloat_msgopFloatMessage
0x810BmetaruleopMetarule
0x810CanimopAnim
0x810Dobj_carrying_pid_objopObjectCarryingObjectByPid
0x810Ereg_anim_funcopRegAnimFunc
0x810Freg_anim_animateopRegAnimAnimate
0x8110reg_anim_animate_reverseopRegAnimAnimateReverse
0x8111reg_anim_obj_move_to_objopRegAnimObjectMoveToObject
0x8112reg_anim_obj_run_to_objopRegAnimObjectRunToObject
0x8113reg_anim_obj_move_to_tileopRegAnimObjectMoveToTile
0x8114reg_anim_obj_run_to_tileopRegAnimObjectRunToTile
0x8115play_gmovieopPlayGameMovie
0x8116add_mult_objs_to_invenopAddMultipleObjectsToInventory
0x8117rm_mult_objs_from_invenopRemoveMultipleObjectsFromInventory
0x8118monthopGetMonth
0x8119dayopGetDay
0x811AexplosionopExplosion
0x811Bdays_since_visitedopGetDaysSinceLastVisit
0x811Cgsay_start_op_gsay_start
0x811Dgsay_end_op_gsay_end
0x811Egsay_reply_op_gsay_reply
0x811Fgsay_option_op_gsay_option
0x8120gsay_message_op_gsay_message
0x8121giq_option_op_giq_option
0x8122poisonopPoison
0x8123get_poisonopGetPoison
0x8124party_addopPartyAdd
0x8125party_removeopPartyRemove
0x8126reg_anim_animate_foreveropRegAnimAnimateForever
0x8127critter_injureopCritterInjure
0x8128is_in_combatopCombatIsInitialized
0x8129gdialog_barter_op_gdialog_barter
0x812Agame_difficultyopGetGameDifficulty
0x812Brunning_burning_guyopGetRunningBurningGuy
0x812Cinven_unwield_op_inven_unwield
0x812Dobj_is_lockedopObjectIsLocked
0x812Eobj_lockopObjectLock
0x812Fobj_unlockopObjectUnlock
0x8130obj_is_openopObjectIsOpen
0x8131obj_openopObjectOpen
0x8132obj_closeopObjectClose
0x8133game_ui_disableopGameUiDisable
0x8134game_ui_enableopGameUiEnable
0x8135game_ui_is_disabledopGameUiIsDisabled
0x8136gfade_outopGameFadeOut
0x8137gfade_inopGameFadeIn
0x8138item_caps_totalopItemCapsTotal
0x8139item_caps_adjustopItemCapsAdjust
0x813Aanim_action_frame_op_anim_action_frame
0x813Breg_anim_play_sfxopRegAnimPlaySfx
0x813Ccritter_mod_skillopCritterModifySkill
0x813Dsfx_build_char_nameopSfxBuildCharName
0x813Esfx_build_ambient_nameopSfxBuildAmbientName
0x813Fsfx_build_interface_nameopSfxBuildInterfaceName
0x8140sfx_build_item_nameopSfxBuildItemName
0x8141sfx_build_weapon_nameopSfxBuildWeaponName
0x8142sfx_build_scenery_nameopSfxBuildSceneryName
0x8143attack_setupopAttackSetup
0x8144destroy_mult_objsopDestroyMultipleObjects
0x8145use_obj_on_objopUseObjectOnObject
0x8146endgame_slideshowopEndgameSlideshow
0x8147move_obj_inven_to_objopMoveObjectInventoryToObject
0x8148endgame_movieopEndgameMovie
0x8149obj_art_fidopGetObjectFid
0x814Aart_animopGetFidAnim
0x814Bparty_member_objopGetPartyMember
0x814Crotation_to_tileopGetRotationToTile
0x814Djam_lockopJamLock
0x814Egdialog_set_barter_modopGameDialogSetBarterMod
0x814Fcombat_difficultyopGetCombatDifficulty
0x8150obj_on_screenopObjectOnScreen
0x8151critter_is_fleeingopCritterIsFleeing
0x8152critter_set_flee_stateopCritterSetFleeState
0x8153terminate_combatopTerminateCombat
0x8154debug_msgopDebugMessage
0x8155critter_stop_attackingopCritterStopAttacking

sfall Extended Opcodes

sfall extends the Fallout 2 scripting VM with additional opcodes and compiler-visible functions. These are real INT bytecode operations in sfall-enabled runtimes, but they are not portable to the original executable unless a compatibility layer implements them. Some higher-level sfall functions are also exposed through sfall_func0 through sfall_func8, where the function name is a string argument rather than a dedicated opcode.

Rows marked with * require AllowUnsafeScripting in ddraw.ini. They expose raw memory writes or direct calls into executable addresses, so they are powerful but intentionally gated.

The table below expands the current sfall opcode artifact into one row per published opcode. It intentionally keeps the published signature spelling and type style. One entry in that artifact currently lists set_perk_int as 0x8196, which collides with set_target_knockback; tools should treat that as a version/source-list caveat and check the target sfall headers or compiler definitions.

OpcodeSignature or operator
0x8156int read_byte(int address)
0x8157int read_short(int address)
0x8158int read_int(int address)
0x8159string read_string(int address)
*0x81CFvoid write_byte(int address, int value)
*0x81D0void write_short(int address, int value)
*0x81D1void write_int(int address, int value)
*0x821Bvoid write_string(int address, string value)
*0x81D2void call_offset_v0(int address)
*0x81D3void call_offset_v1(int address, int arg1)
*0x81D4void call_offset_v2(int address, int arg1, int arg2)
*0x81D5void call_offset_v3(int address, int arg1, int arg2, int arg3)
*0x81D6void call_offset_v4(int address, int arg1, int arg2, int arg3, int arg4)
*0x81D7int call_offset_r0(int address)
*0x81D8int call_offset_r1(int address, int arg1)
*0x81D9int call_offset_r2(int address, int arg1, int arg2)
*0x81DAint call_offset_r3(int address, int arg1, int arg2, int arg3)
*0x81DBint call_offset_r4(int address, int arg1, int arg2, int arg3, int arg4)
0x815Avoid set_pc_base_stat(int StatID, int value)
0x815Bvoid set_pc_extra_stat(int StatID, int value)
0x815Cint get_pc_base_stat(int StatID)
0x815Dint get_pc_extra_stat(int StatID)
0x815Evoid set_critter_base_stat(object, int StatID, int value)
0x815Fvoid set_critter_extra_stat(object, int StatID, int value)
0x8160int get_critter_base_stat(object, int StatID)
0x8161int get_critter_extra_stat(object, int StatID)
0x8242void set_critter_skill_points(int critter, int skill, int value)
0x8243int get_critter_skill_points(int critter, int skill)
0x8244void set_available_skill_points(int value)
0x8245int get_available_skill_points
0x8246void mod_skill_points_per_level(int value)
0x81B4void set_stat_max(int stat, int value)
0x81B5void set_stat_min(int stat, int value)
0x81B7void set_pc_stat_max(int stat, int value)
0x81B8void set_pc_stat_min(int stat, int value)
0x81B9void set_npc_stat_max(int stat, int value)
0x81BAvoid set_npc_stat_min(int stat, int value)
0x816Bint input_funcs_available
0x816Cint key_pressed(int dxScancode)
0x8162void tap_key(int dxScancode)
0x821Cint get_mouse_x
0x821Dint get_mouse_y
0x821Eint get_mouse_buttons
0x821Fint get_window_under_mouse
0x8163int get_year
0x8164bool game_loaded
0x8165bool graphics_funcs_available
0x8166int load_shader(string path)
0x8167void free_shader(int ID)
0x8168void activate_shader(int ID)
0x8169void deactivate_shader(int ID)
0x816Dvoid set_shader_int(int ID, string param, int value)
0x816Evoid set_shader_float(int ID, string param, float value)
0x816Fvoid set_shader_vector(int ID, string param, float f1, float f2, float f3, float f4)
0x81ADint get_shader_version
0x81AEvoid set_shader_mode(int mode)
0x81B0void force_graphics_refresh(bool enabled)
0x81B1int get_shader_texture(int ID, int texture)
0x81B2void set_shader_texture(int ID, string param, int texID)
0x816Avoid set_global_script_repeat(int frames)
0x819Bvoid set_global_script_type(int type)
0x819Cint available_global_script_types
0x8170bool in_world_map
0x8171void force_encounter(int map)
0x8229void force_encounter_with_flags(int map, int flags)
0x822Avoid set_map_time_multi(float multi)
0x8172void set_world_map_pos(int x, int y)
0x8173int get_world_map_x_pos
0x8174int get_world_map_y_pos
0x8175void set_dm_model(string name)
0x8176void set_df_model(string name)
0x8177void set_movie_path(string filename, int movieid)
0x8178void set_perk_image(int perkID, int value)
0x8179void set_perk_ranks(int perkID, int value)
0x817Avoid set_perk_level(int perkID, int value)
0x817Bvoid set_perk_stat(int perkID, int value)
0x817Cvoid set_perk_stat_mag(int perkID, int value)
0x817Dvoid set_perk_skill1(int perkID, int value)
0x817Evoid set_perk_skill1_mag(int perkID, int value)
0x817Fvoid set_perk_type(int perkID, int value)
0x8180void set_perk_skill2(int perkID, int value)
0x8181void set_perk_skill2_mag(int perkID, int value)
0x8182void set_perk_str(int perkID, int value)
0x8183void set_perk_per(int perkID, int value)
0x8184void set_perk_end(int perkID, int value)
0x8185void set_perk_chr(int perkID, int value)
0x8196void set_perk_int(int perkID, int value)
0x8187void set_perk_agl(int perkID, int value)
0x8188void set_perk_lck(int perkID, int value)
0x8189void set_perk_name(int perkID, string value)
0x818Avoid set_perk_desc(int perkID, string value)
0x8247void set_perk_freq(int value)
0x818Bvoid set_pipboy_available(int available)
0x818Cint get_kill_counter(int critterType)
0x818Dvoid mod_kill_counter(int critterType, int amount)
0x818Eint get_perk_owed
0x818Fvoid set_perk_owed(int value)
0x8190int get_perk_available(int perk)
0x8191int get_critter_current_ap(object critter)
0x8192void set_critter_current_ap(object critter, int ap)
0x8193int active_hand
0x8194void toggle_active_hand
0x8195void set_weapon_knockback(object weapon, int type, int/float value)
0x8196void set_target_knockback(object critter, int type, int/float value)
0x8197void set_attacker_knockback(object critter, int type, int/float value)
0x8198void remove_weapon_knockback(object weapon)
0x8199void remove_target_knockback(object critter)
0x819Avoid remove_attacker_knockback(object critter)
0x819Dvoid set_sfall_global(string/int varname, int/float value)
0x819Eint get_sfall_global_int(string/int varname)
0x819Ffloat get_sfall_global_float(string/int varname)
0x822Dint create_array(int element_count, int flags)
0x822Evoid set_array(int array, any element, any value)
0x822Fany get_array(int array, any element)
0x8230void free_array(int array)
0x8231int len_array(int array)
0x8232void resize_array(int array, int new_element_count)
0x8233int temp_array(int element_count, int flags)
0x8234void fix_array(int array)
0x8239int scan_array(int array, int/float var)
0x8254void save_array(any key, int array)
0x8255int load_array(any key)
0x8256int array_key(int array, int index)
0x8257int arrayexpr(any key, any value)
0x81A0void set_pickpocket_max(int percentage)
0x81A1void set_hit_chance_max(int percentage)
0x81A2void set_skill_max(int value)
0x81AAvoid set_xp_mod(int percentage)
0x81ABvoid set_perk_level_mod(int levels)
0x81C5void set_critter_hit_chance_mod(object, int max, int mod)
0x81C6void set_base_hit_chance_mod(int max, int mod)
0x81C7void set_critter_skill_mod(object, int max)
0x81C8void set_base_skill_mod(int max)
0x81C9void set_critter_pickpocket_mod(object, int max, int mod)
0x81CAvoid set_base_pickpocket_mod(int max, int mod)
0x81A3int eax_available
0x81A4void set_eax_environment(int environment)
0x81A5void inc_npc_level(int pid/string name)
0x8241int get_npc_level(int pid/string name)
0x81A6int get_viewport_x
0x81A7int get_viewport_y
0x81A8void set_viewport_x(int view_x)
0x81A9void set_viewport_y(int view_y)
0x81ACint get_ini_setting(string setting)
0x81EBstring get_ini_string(string setting)
0x81AFint get_game_mode
0x81B3int get_uptime
0x81B6void set_car_current_town(int town)
0x81BBvoid set_fake_perk(string name, int level, int image, string desc)
0x81BCvoid set_fake_trait(string name, int active, int image, string desc)
0x81BDvoid set_selectable_perk(string name, int active, int image, string desc)
0x81BEvoid set_perkbox_title(string title)
0x81BFvoid hide_real_perks
0x81C0void show_real_perks
0x81C1int has_fake_perk(string name/int extraPerkID)
0x81C2int has_fake_trait(string name)
0x81C3void perk_add_mode(int type)
0x81C4void clear_selectable_perks
0x8225void remove_trait(int traitID)
0x81CBvoid set_pyromaniac_mod(int bonus)
0x81CCvoid apply_heaveho_fix
0x81CDvoid set_swiftlearner_mod(int bonus)
0x81CEvoid set_hp_per_level_mod(int mod)
0x81DCvoid show_iface_tag(int tag)
0x81DDvoid hide_iface_tag(int tag)
0x81DEint is_iface_tag_active(int tag)
0x81DFint get_bodypart_hit_modifier(int bodypart)
0x81E0void set_bodypart_hit_modifier(int bodypart, int value)
0x81E1void set_critical_table(int crittertype, int bodypart, int level, int valuetype, int value)
0x81E2int get_critical_table(int crittertype, int bodypart, int level, int valuetype)
0x81E3void reset_critical_table(int crittertype, int bodypart, int level, int valuetype)
0x81E4int get_sfall_arg
0x823Carray get_sfall_args
0x823Dvoid set_sfall_arg(int argnum, int value)
0x81E5void set_sfall_return(any value)
0x81EAint init_hook
0x81E6void set_unspent_ap_bonus(int multiplier)
0x81E7int get_unspent_ap_bonus
0x81E8void set_unspent_ap_perk_bonus(int multiplier)
0x81E9int get_unspent_ap_perk_bonus
0x81ECfloat sqrt(float)
0x81EDint/float abs(int/float)
0x81EEfloat sin(float)
0x81EFfloat cos(float)
0x81F0float tan(float)
0x81F1float arctan(float x, float y)
0x8263^ operator (exponentiation)
0x8264float log(float)
0x8265float exponent(float)
0x8266int ceil(float)
0x8267int round(float)
0x81F2void set_palette(string path)
0x81F3void remove_script(object)
0x81F4void set_script(object, int scriptid)
0x81F5int get_script(object)
0x81F6int nb_create_char
0x81F7int fs_create(string path, int size)
0x81F8int fs_copy(string path, string source)
0x81F9int fs_find(string path)
0x81FAvoid fs_write_byte(int id, int data)
0x81FBvoid fs_write_short(int id, int data)
0x81FCvoid fs_write_int(int id, int data)
0x81FDvoid fs_write_float(int id, int data)
0x81FEvoid fs_write_string(int id, string data)
0x8208void fs_write_bstring(int id, string data)
0x8209int fs_read_byte(int id)
0x820Aint fs_read_short(int id)
0x820Bint fs_read_int(int id)
0x820Cfloat fs_read_float(int id)
0x81FFvoid fs_delete(int id)
0x8200int fs_size(int id)
0x8201int fs_pos(int id)
0x8202void fs_seek(int id, int pos)
0x8203void fs_resize(int id, int size)
0x8204int get_proto_data(int pid, int offset)
0x8205void set_proto_data(int pid, int offset, int value)
0x8206void set_self(object)
0x8207void register_hook(int hook)
0x820Dint list_begin(int type)
0x820Eint list_next(int listid)
0x820Fvoid list_end(int listid)
0x8236array list_as_array(int type)
0x8210int sfall_ver_major
0x8211int sfall_ver_minor
0x8212int sfall_ver_build
0x8213void hero_select_win(int)
0x8214void set_hero_race(int style)
0x8215void set_hero_style(int style)
0x8216void set_critter_burst_disable(object critter, int disable)
0x8217int get_weapon_ammo_pid(object weapon)
0x8218void set_weapon_ammo_pid(object weapon, int pid)
0x8219int get_weapon_ammo_count(object weapon)
0x821Avoid set_weapon_ammo_count(object weapon, int count)
0x8220int get_screen_width
0x8221int get_screen_height
0x8222void stop_game
0x8223void resume_game
0x8224void create_message_window(string message)
0x8226int get_light_level
0x8227void refresh_pc_art
0x8228int get_attack_type
0x822Bint play_sfall_sound(string file, int mode)
0x822Cvoid stop_sfall_sound(int soundID)
0x8235array string_split(string string, string split)
0x8237int atoi(string string)
0x8238float atof(string string)
0x824Estring substr(string string, int start, int length)
0x824Fint strlen(string string)
0x8250string sprintf(string format, any value)
0x8251int charcode(string string)
0x8253int typeof(any value)
0x823Aint get_tile_fid(int tileData)
0x823Bint modified_ini
0x823Evoid force_aimed_shots(int pid)
0x823Fvoid disable_aimed_shots(int pid)
0x8240void mark_movie_played(int id)
0x8248object get_last_target(object critter)
0x8249object get_last_attacker(object critter)
0x824Avoid block_combat(int enable)
0x824Bint tile_under_cursor
0x824Cint gdialog_get_barter_mod
0x824Dvoid set_inven_ap_cost(int cost)
0x825Cvoid reg_anim_combat_check(int enable)
0x825Avoid reg_anim_destroy(object object)
0x825Bvoid reg_anim_animate_and_hide(object object, int animID, int delay)
0x825Dvoid reg_anim_light(object object, int radius, int delay)
0x825Evoid reg_anim_change_fid(object object, int FID, int delay)
0x825Fvoid reg_anim_take_out(object object, int holdFrameID, int delay)
0x8260void reg_anim_turn_towards(object object, int tile/targetObj, int delay)
0x8261int metarule2_explosions(object object)
0x8262void register_hook_proc(int hook, procedure proc)
0x826Bstring message_str_game(int fileId, int messageId)
0x826Cint sneak_success
0x826Dint tile_light(int elevation, int tileNum)
0x826Eobject obj_blocking_line(object objFrom, int tileTo, int blockingType)
0x826Fobject obj_blocking_tile(int tileNum, int elevation, int blockingType)
0x8270array tile_get_objs(int tileNum, int elevation)
0x8271array party_member_list(int includeHidden)
0x8272array path_find_to(object objFrom, int tileTo, int blockingType)
0x8273object create_spatial(int scriptID, int tile, int elevation, int radius)
0x8274int art_exists(int artFID)
0x8275int obj_is_carrying_obj(object invenObj, object itemObj)
0x8276any sfall_func0(string funcName)
0x8277any sfall_func1(string funcName, arg1)
0x8278any sfall_func2(string funcName, arg1, arg2)
0x8279any sfall_func3(string funcName, arg1, arg2, arg3)
0x827Aany sfall_func4(string funcName, arg1, arg2, arg3, arg4)
0x827Bany sfall_func5(string funcName, arg1, arg2, arg3, arg4, arg5)
0x827Cany sfall_func6(string funcName, arg1, arg2, arg3, arg4, arg5, arg6)
0x827Dvoid register_hook_proc_spec(int hook, procedure proc)
0x827Evoid reg_anim_callback(procedure proc)
0x827Fdiv operator (unsigned integer division)
0x8280any sfall_func7(string funcName, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
0x8281any sfall_func8(string funcName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

Because sfall evolves, treat the table above as a compatibility snapshot and check the target sfall version when authoring scripts. Scripts can use sfall_ver_major, sfall_ver_minor, and sfall_ver_build to guard version-sensitive behavior.

Stack Effects and Arguments

INT bytecode is stack based. Built-in opcode handlers pop their arguments from the interpreter stack, usually in reverse of the SSL source order, then optionally push a result. In the tables below, (a b -- c) means the source-level arguments a then b are consumed and c is pushed. The right side of the left-hand list is the top of stack at call time.

PatternStack effectNotes
Typed literal push(-- value)0xC001, 0xA001, and 0x9001 push a following 32-bit integer, float bits, or static-string-table offset.
Unary arithmetic/logical opcode(a -- result)Examples: floor, not, negate, bitwise_not.
Binary arithmetic/comparison opcode(a b -- result)Examples: add, sub, mul, equal, less_than. String concatenation can also be reached through add in compatible runtimes.
Fetch variable(slot -- value)Local, map, global, and interpreter-global fetches pop an index or slot and push the stored value.
Store variable(slot value -- )Store opcodes pop the value first internally, but SSL source naturally reads as slot then value.
Procedure/built-in call(arg0 ... argN -- result?)Game and sfall built-ins normally carry arguments on the stack, not inline in the instruction stream.
Conditional branch helpers(condition -- )Branch target handling is encoded by surrounding bytecode and compiler patterns; disassemblers should recover control flow from offsets, not only from opcode names.
Procedure return/exit cleanupvariesThe POP_FLAGS* family restores frame/flag state and may return a value or exit an external call. Treat these as procedure-frame instructions, not user-visible SSL calls.

Common Fallout game built-ins have the following practical stack contracts in Fallout 2 CE. The list is not a replacement for the handler source, but it covers the calls most often seen when reading map, object, dialogue, and utility scripts.

Opcode / SSL nameStack effectPurpose
display_msg(string -- )Adds a line to the message display.
float_msg(object message type -- )Shows or clears floating text over an object.
message_str(fileId messageId -- string)Looks up a message string.
create_object(pid tile elevation sid -- object)Creates an object. sid can attach a script; many SSL macros hide or default this argument.
destroy_object(object -- )Destroys an object.
move_to(object tile elevation -- )Moves an object to a tile/elevation.
self_obj, source_obj, target_obj, dude_obj(-- object)Push script context objects.
obj_pid(object -- pid)Returns an object's prototype id.
obj_name(object -- string)Returns display name text for an object.
obj_type, item_subtype(object -- int)Returns object/prototype classification.
tile_num, elevation(object -- int)Returns object location components.
tile_distance(tile1 tile2 -- int)Distance between two tile numbers.
tile_distance_objs(object1 object2 -- int)Distance between two objects, with elevation checks.
tile_num_in_direction(origin rotation distance -- tile)Computes a tile in a hex direction.
tile_contains_pid_obj(tile elevation pid -- object)Finds an object with a PID at a location.
get_local_var, get_map_var, get_global_var(index -- value)Reads script-local, map, or game-global variable storage.
set_local_var, set_map_var, set_global_var(index value -- )Writes script-local, map, or game-global variable storage.
has_skill, using_skill(object skill -- int)Skill value or skill state checks.
roll_vs_skill(object skill modifier -- int)Performs a skill roll.
random(min max -- int)Random integer in a range.
roll_dice(count sides -- int)Dice roll helper.
get_critter_stat(object stat -- int)Reads a critter stat.
set_critter_stat(object stat value -- )Writes a critter stat.
add_obj_to_inven, rm_obj_from_inven(container item -- )Inventory transfer helpers.
wield_obj_critter(critter item -- )Equips an item on a critter.
use_obj(object -- )Uses an object.
use_obj_on_obj(item target -- )Uses one object on another.
add_timer_event(object delay param -- )Adds a script timer event.
rm_timer_event(object -- )Removes queued events for an object.
game_time, game_ticks, cur_map_index(-- int)Push runtime state values.

For sfall opcodes, the signature table above doubles as an argument-count table. A signature like int get_weapon_ammo_pid(object weapon) has stack effect (weapon -- int); void set_weapon_ammo_count(object weapon, int count) has (weapon count -- ); and any sfall_func4(string funcName, arg1, arg2, arg3, arg4) has (funcName arg1 arg2 arg3 arg4 -- any).

Annotated Bytecode Example

The fragment below is not a complete INT file and not promised to be byte-for-byte compiler output. It is a compact illustration of instruction encoding inside a procedure body: a typed string push, a game built-in call, an integer push, and a script return value. Multi-byte values are shown in file byte order.

BytesDecoded operationStack effect
90 01 00 00 00 02push string @ static-string offset 2(-- "Hello")
80 B8display_msg("Hello" -- )
C0 01 00 00 00 01push int 1(-- 1)
80 A2scr_return(1 -- )
80 0Eexit(-- )

The static string offset in the first row is relative to the static string table, not to the file start. A real procedure can also contain compiler-emitted frame setup, branch targets, flag cleanup opcodes, and procedure-table offsets that surround the recognizable source-level operations.

Compatibility and Aliases

The opcode number is the only reliable identity in raw bytecode. Names vary across Fallout 2 CE symbols, older opcode lists, SSL compiler headers, sfall documentation, and decompiler output.

Script Lifecycle

Scripts are loaded lazily. A MAP or PRO record can reference a script index long before the corresponding INT is opened. When the engine first needs to execute a procedure for an active script instance, it resolves the index through scripts.lst, opens scripts\name.int, creates an interpreter program, finds the built-in procedures by name, runs the program initialization path, and then calls the requested procedure.

  1. MAP/PRO data creates or references a script instance with an SID and a scripts.lst index.
  2. The first procedure execution loads the INT from disk or DAT.
  3. The interpreter uses the procedure table and identifier table to cache known procedure indexes such as start and talk_p_proc.
  4. Initialization bytecode runs once for that loaded program, exporting names and preparing script state.
  5. The requested procedure is executed. Later calls reuse the loaded program while it remains active.

This explains why an INT can parse correctly but still fail in game: missing scripts.lst entries, wrong script indexes, unsupported opcodes, failed imports, or missing dialogue MSG files are all runtime integration problems rather than file-layout problems.

Built-In Script Procedures

The engine does not call arbitrary SSL procedure names for map/object events. It looks up a known list of procedure names in the INT procedure table and caches their procedure indexes after the script is loaded.

IndexProcedure nameTypical trigger
0no_p_procPlaceholder/no-procedure slot.
1startScript startup.
2spatial_p_procEntering a spatial trigger.
3description_p_procDescription/inspect behavior.
4pickup_p_procPicking up an item.
5drop_p_procDropping an item.
6use_p_procUsing an object.
7use_obj_on_p_procUsing one object on another.
8use_skill_on_p_procUsing a skill on an object.
11talk_p_procStarting character dialogue.
12critter_p_procPeriodic critter processing.
13combat_p_procCombat processing.
14damage_p_procTaking damage.
15map_enter_p_procEntering a map.
16map_exit_p_procLeaving a map.
17create_p_procScript/object creation.
18destroy_p_procScript/object destruction.
21look_at_p_procLook-at behavior.
22timed_event_p_procScript timer event.
23map_update_p_procPeriodic map update.
24push_p_procPushing an object.
25is_dropping_p_procDrop decision logic.
26combat_is_starting_p_procCombat start notification.
27combat_is_over_p_procCombat end notification.

Indexes 9, 10, 19, and 20 are present in the enum in Fallout 2 CE but mapped to placeholder names in the known-procedure name array. Older script headers may still document historical names such as use_ad_on_proc, use_disad_on_proc, or barter-related procedures.

scripts.lst Integration

scripts\scripts.lst maps script indexes to INT filenames. The script index is what appears in SIDs, PRO script fields, and MAP script records. Fallout 2 CE reads this list as text and stores a 13-character maximum base name before .int.

ACMAP.int # local_vars=12
DCJOEY.int # local_vars=8
ZSDOOR.int
FeatureBehavior
IndexingThe physical line number is the script index. Reordering lines changes script references.
FilenameThe engine stores the base name before .int and later appends .int when loading.
Name lengthFallout 2 CE rejects names longer than 13 bytes before .int, matching the fixed script-name storage used by the original engine.
Local varsIf a line contains # and local_vars=N, that number defines the local variable storage requested by script instances using that script index.
Dialogue MSGScript dialogue lookup uses the script base name to load dialog\name.msg.

Do not add blank lines casually to scripts.lst. Like other LST-style files, line position is data. A blank or malformed line can shift every later script index.

Script Naming Conventions

Fallout 2 scripts commonly use compact names that encode broad ownership in the filename. The convention is not enforced by the INT bytecode format, but it is useful when matching scripts, dialogue files, and design intent.

PartMeaningExamples
First characterArea or content group.A for Arroyo, K for Klamath, D for The Den, G for Gecko, N for New Reno, Z for generic/shared scripts.
Second characterScript role.C critter, I item, S scenery, T spatial, P party, H head/talking-head related, W wall.
Remaining charactersShort object, NPC, place, or behavior mnemonic.DCJOEY, ZSDOOR, ACMAP.

The same base name often connects several files: scripts\DCJOEY.int, source DCJOEY.ssl, and dialogue text\english\dialog\DCJOEY.msg. Tools should not require the naming convention, but preserving it makes cross-file debugging much easier.

Script IDs

A script ID, often called an SID, packs the script type into the high byte and a per-type script id/index into the low 24 bits. Fallout 2 CE creates new SIDs with:

sid = script_id | (script_type << 24)
Type valueScript typeTypical source
0System/map scriptMap-level script.
1Spatial scriptMAP spatial trigger.
2Timed scriptTimed script state.
3Item scriptItem PRO or object instance.
4Critter scriptCritter PRO or object instance.

Older PRO documentation sometimes describes packed script ids with a type nibble and a scripts.lst line number. When comparing sources, keep the distinction clear: scripts.lst maps indexes to INT filenames, while runtime SIDs identify active script instances of a given type.

Variables and Saved State

INT files contain compiled code and some script-level identifiers, but they are not where normal game variable values live after a game starts. Runtime values are split across several systems:

KindDefinition/referenceRuntime storage
Global variablesReferenced by index from script opcodes and named in GAM files.Global variable array saved with game state.
Map variablesReferenced by map_var and set_map_var.MAP/map-state variable array.
Script local variablesCount comes from local_vars=N in scripts.lst.MAP/SAV script local-variable array, pointed to by each script instance.
Procedure localsCompiler stack slots inside procedure bytecode.Interpreter stack frame while the procedure runs.
Static stringsStored in the INT static string table.Read-only program data while the INT is loaded.
Dynamic stringsCreated at runtime by the interpreter.Program heap with reference counts; not a normal file section.

This is why decompiling an INT cannot recover the current value of map variables or script locals from a save. For that, inspect the active MAP/SAV data instead.

Dialogue and MSG Files

Dialogue scripts usually call message opcodes rather than embedding every displayed line as a static string. The runtime script message loader derives the dialogue MSG path from the script base name:

scripts.lst line:  DCJOEY.int
dialogue file:    text\english\dialog\DCJOEY.msg

The MSG file then supplies message ids, optional speech tokens, and displayed text. The INT code decides which message id to request and when to start dialogue; the MSG file supplies the localizable content.

Minimal Parser and Disassembler Recipe

A basic INT inspection tool does not need to emulate the whole VM, but it should validate the tables before walking opcode bytes.

  1. Read the file into memory and use big-endian helpers for all integer fields.
  2. Require at least 42 bytes, then read procedure_count at 0x2A.
  3. Compute the identifier-table start as 0x2A + 4 + procedure_count * 24.
  4. Validate the identifier table size and decode length-prefixed names.
  5. Compute and validate the static-string table start.
  6. Decode procedure records and resolve procedure names from identifier offsets.
  7. Collect all procedure body offsets, condition offsets, and the bootstrap initialization jump target.
  8. Disassemble code from known entry offsets, following jump/call targets and stopping at return/exit patterns.
  9. When decoding literals, treat 0xC001, 0xA001, and 0x9001 as push-with-32-bit-operand forms.
  10. Report unsupported opcodes by numeric value and runtime family, rather than failing the whole file immediately.

Full decompilation requires more: stack-effect modeling, control-flow reconstruction, procedure-call analysis, string resolution, and engine-specific opcode metadata. That is where tools such as int2ssl earn their keep.

Decompilation Notes

Tools such as int2ssl recover readable SSL-like source from bytecode, but INT is not a lossless source archive.

Source featureCan it be recovered?
Procedure namesUsually yes, because they are stored in the identifier table.
Script-level exported namesOften yes, when present in the identifier table and export setup code.
Static stringsYes, from the static string table.
Local variable namesNo. Decompilers must invent names such as local_var0 or infer them from patterns.
Comments and formattingNo. They are not compiled into INT.
Preprocessor macros/includesNo direct recovery. Decompiled output shows the expanded result, not the original macro source.
Control-flow structurePartly. If/else/loops are reconstructed from jumps and stack effects, so difficult bytecode may decompile differently from the original SSL.
Compiler bugsThey remain in bytecode. A decompiler may show odd stack behavior or refuse to reconstruct invalid patterns.

Fallout 2's original script build pipeline used preprocessing before compilation. Some script libraries therefore depend on header files and macros that are not visible in the final INT. Keep the original SSL tree when possible; use decompilation as a recovery and inspection tool rather than as a perfect source-control format.

Validation Checklist

Authoring Notes

Source References