Mission Table Subscripts

The Mission Table subscripts exist in every mission in the game in various forms, though always at least having a Sequence subscript. Each subscript contains code relating to an element of the mission, such as enemies and NPCs, cutscenes, support radio, result score, opening credits and music.

The TppSimpleMissionData class of entity in a DataSet .fox2 file loaded with the mission defines paths to the Mission Table subscripts.

```
<entity class="TppSimpleMissionData" classVersion="1" addr="0x053506A0" unknown1="136" unknown2="1989016">
 <staticProperties>
 <property name="name" type="String" container="StaticArray" arraySize="1">
 <value>mission_data</value>
 </property>
 <property name="dataSet" type="EntityHandle" container="StaticArray" arraySize="1">
 <value>0x04D8FF20</value>
 </property>
 <property name="script" type="FilePtr" container="StaticArray" arraySize="1">
 <value>/Assets/tpp/script/mission/mission_main.lua</value>
 </property>
 <property name="subScripts" type="FilePtr" container="StringMap" arraySize="7">
 <value key="sequence">/Assets/tpp/level/mission2/ih/example/example_sequence.lua</value>
 <value key="enemy">/Assets/tpp/level/mission2/ih/example/example_enemy.lua</value>
 <value key="radio">/Assets/tpp/level/mission2/ih/example/example_radio.lua</value>
 <value key="demo">/Assets/tpp/level/mission2/ih/example/example_demo.lua</value>
 <value key="telop">/Assets/tpp/level/mission2/ih/example/example_telop.lua</value>
 <value key="sound">/Assets/tpp/level/mission2/ih/example/example_sound.lua</value>
 <value key="score">/Assets/tpp/level/mission2/ih/example/example_score.lua</value>
 </property>
 </staticProperties>
 <dynamicProperties />
</entity>

```
TppSimpleMissionData entity example with all subscripts used in the game.

The `sequence` subscript is the only truly integral subscript, and while there is exclusive functionality behind other subscripts, they are optional to the mission running at all. The example above lists all possible subscripts used in vanilla missions.

Along with any defined subscripts, the `mission_main` script must be packed and loaded with the DataSet as well. Here is a compressed version of that script:

```
local this = {}
this.OnAllocate = function(subScripts) return TppMain.OnAllocate(subScripts) end
this.OnInitialize = function(subScripts) return TppMain.OnInitialize(subScripts) end
this.OnReload = function(subScripts) return TppMain.OnReload(subScripts) end
this.OnUpdate = function(subScripts) return TppMain.OnUpdate(subScripts) end
this.OnChangeSVars = function(subScripts, varName, key) return TppMain.OnChangeSVars(subScripts, varName, key) end
this.OnMessage = function(subScripts, sender, messageId, arg0, arg1, arg2, arg3) return TppMain.OnMessage(subScripts, sender, messageId, arg0, arg1, arg2, arg3) end
this.OnTerminate = function(subScripts) return TppMain.OnTerminate(subScripts) end
return this

```
mission\_main.lua, compressed

## All Subscripts

These can be used in any subscript, though usually only one utilizes them.

### Callback functions

#### OnLoad

The `OnLoad` function, which is looked for and is called in all subscripts, but most importantly in the Sequence subscript, has to contain two function calls that define the sequence tables: the index-name table, `TppSequence.RegisterSequences()`, and the name-callbacks table, `TppSequence.RegisterSequenceTable()`.

```
--Sequence names in order. The first listed sequence will be the one we will first boot to.
local sequenceNames = {
	"Seq\_Game\_MainGame",
	"Seq\_Game\_Escape"
}
--Define the sequences callback table.
local sequences = {}
--Register a callback table for each sequence in sequenceNames.
sequences.Seq\_Game\_MainGame={}
sequences.Seq\_Game\_Escape={
	OnEnter=function(self,sequenceName)
		TppMission.CanMissionClear()
	end,
}
--Tell TppSequence to register these tables.
function this.OnLoad()
	TppSequence.RegisterSequences(sequenceNames)
	TppSequence.RegisterSequenceTable(sequences)
end

```
Example of an `OnLoad` callback that defines the sequence tables.

The example above registers two sequences, although only one, of any name, is required for the mission to boot. One of them, MainGame, has no callbacks, but is a valid sequence nonetheless. The other sequence, Escape, has an OnEnter callback that calls TppMission.CanMissionClear(). The OnEnter callback is called when the game switches to or starts with that sequence. Calling TppMission.CanMissionClear() will make the game start asking if you're not within the hot zone, so if you don't have a hot zone area defined in a .trap file or as a GeoTriggerTrap, the start of that sequence will clear the mission immediately.

### Tables

#### saveVarsList

The `saveVarsList` table initializies variables that are written to the save file for the mission. Essentially, it's a simplified version of the returned table of the DeclareSVars function, simplified specifically through the `TppSequence.MakeSVarsTable` function.

```
this.saveVarsList = {
	isFlag00	= false,
	isFlag01	= false,
	isFlag02	= false,
	isFlag03	= false,
	numFlag00 = 0,
	numFlag01 = 0,
	numFlag02 = 0,
	numFlag03 = 0,
}

```
The only data types of variables that you can define here as is are booleans or integers, other types, and with different parameters, you will have to write out its own table.

```
this.saveVarsList = {
	posAbortWarmhole\_x = { name = "posAbortWarmhole\_x", type = TppScriptVars.TYPE\_FLOAT, value = 0, save = true, sync = true, wait = true, category = TppScriptVars.CATEGORY\_MISSION },
	posAbortWarmhole\_y = { name = "posAbortWarmhole\_y", type = TppScriptVars.TYPE\_FLOAT, value = 0, save = true, sync = true, wait = true, category = TppScriptVars.CATEGORY\_MISSION },
	posAbortWarmhole\_z = { name = "posAbortWarmhole\_z", type = TppScriptVars.TYPE\_FLOAT, value = 0, save = true, sync = true, wait = true, category = TppScriptVars.CATEGORY\_MISSION },
}

```

#### DeclareSVars

Is called from all subscripts, but seemingly only the equivalent from other libraries is actually used. In those uses, it seems to be a function that returns a table of the more detailed table save lists, just not additionally indexed by the save variable name. This and the save variables list from before get merged into one list.

```
function this.DeclareSVars()
  return{
    {name="chk\_checkPointName",arraySize=TppDefine.CHECK\_POINT\_MAX,type=TppScriptVars.TYPE\_UINT32,value=0,save=true,sync=false,wait=false,category=TppScriptVars.CATEGORY\_MISSION},
    {name="chk\_checkPointEnable",arraySize=TppDefine.CHECK\_POINT\_MAX,type=TppScriptVars.TYPE\_BOOL,value=0,save=true,sync=false,wait=false,category=TppScriptVars.CATEGORY\_MISSION},
  }
end

```

## Sequence

### Callback functions

#### OnBuddyBlockLoad

Called in `TppMain`'s read of the sequence subscript right before `TppBuddy2BlockController.Load()` is called. Usually has functions that set up pre-placed positions or flags for buddies.

### Flags

#### MISSION\_START\_INITIAL\_WEATHER

Defines the mission start weather type.

```
this.MISSION\_START\_INITIAL\_WEATHER = TppDefine.WEATHER.SUNNY

```

#### ALWAYS\_APPLY\_TEMPORATY\_PLAYER\_PARTS\_SETTING

Only seems to be used for the ACC missions.

#### ENABLE\_DEFAULT\_HELI\_MISSION\_CLEAR

The ENABLE\_DEFAULT\_HELI\_MISSION\_CLEAR flag is a boolean that defines whether the game will clear or abort the mission when the player closes the door on the support helicopter.

```
this.ENABLE\_DEFAULT\_HELI\_MISSION\_CLEAR=true

```
Example use of the flag. When enabled, the mission will end when the helicopter door is closed.

### Tables

#### missionStartPosition

The `missionStartPosition` table defines order box names and helicopter drop route names to help the game keep track of the player's mission start type.

```
this.missionStartPosition = {
	orderBoxList = {
		--Order box names, i.e. "box\_s12000\_00",
		"box\_flowTape\_00",
	},
	helicopterRouteList = {
		--Drop point route names, need to be here when order boxes are
		"lz\_drp\_flowStation\_E0000|lz\_drp\_flowStation\_E\_0000",
		"lz\_drp\_flowStation\_I0000|rt\_drp\_flowStation\_I\_0000",
		"lz\_drp\_swamp\_W0000|lz\_drp\_swamp\_W\_0000",
	},
}

```

#### DISABLE\_BUDDY\_TYPE

This variable will block a buddy from participating in the mission from within. It can either be one buddy type, or a table of multiple buddy types.

```
this.DISABLE\_BUDDY\_TYPE = BuddyType.QUIET

```

```
this.DISABLE\_BUDDY\_TYPE = {
    BuddyType.HORSE,
    BuddyType.WALKER\_GEAR,
    BuddyType.BATTLE\_GEAR
}

```

#### playerInitialWeaponTable

The initial weapon table will override the player's specified secondary, primary hip, back and support weapons. Unspecified slots are not overwritten, however.

```
this.playerInitialWeaponTable = {
    { secondary     = "EQP\_WP\_10101",	magazine = TppDefine.INIT\_MAG.HANDGUN\_DEFAULT },
    { primaryHip    = "EQP\_WP\_30101",	magazine = TppDefine.INIT\_MAG.ASSAULT\_DEFAULT },
    { primaryBack   = "EQP\_None" },
    { support   	= "EQP\_SWP\_Grenade" },
    { support   	= "EQP\_SWP\_Magazine" },
}

```

```
this.playerInitialWeaponTable = {
	{ secondary     = "EQP\_WP\_10004",	magazine = TppDefine.INIT\_MAG.HANDGUN\_DEFAULT },
	{ primaryHip    = "EQP\_WP\_30103",	magazine = TppDefine.INIT\_MAG.ASSAULT\_DEFAULT },
	{ primaryBack   = "EQP\_None" },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
	{ support		= "EQP\_None", },
}

```
You can also use `TppDefine.CYPR_PLAYER_INITIAL_WEAPON_TABLE` to overwrite all of the player's weapons with `"EQP_None"`.

```
this.playerInitialWeaponTable = TppDefine.CYPR\_PLAYER\_INITIAL\_WEAPON\_TABLE

```

#### playerInitialItemTable

The initial item table will overwrite the player's items on mission start. Unspecified slots will not be overwritten.

```
this.playerInitialItemTable = {
    "EQP\_IT\_TimeCigarette", "EQP\_IT\_Nvg", "EQP\_None",
}

```

```
this.playerInitialItemTable = { "EQP\_None", "EQP\_None","EQP\_None","EQP\_None","EQP\_None","EQP\_None","EQP\_None","EQP\_None",}

```
You can also use `TppDefine.CYPR_PLAYER_INITIAL_ITEM_TABLE` to completely overwrite the item table with `"EQP_None"`.

```
this.playerInitialItemTable = TppDefine.CYPR\_PLAYER\_INITIAL\_ITEM\_TABLE

```

#### checkPointList

The `checkPointList` table lists the names of checkpoint locators.

```
this.checkPointList = {
	"CHK\_NotKillQuiet",
	"CHK\_MovedToMB",
	"CHK\_E3\_killQuiet",
	"CHK\_StartPos",
}

```

#### baseList

The `baseList` table defines what bases - large outposts or observation guard posts - are in the mission and which should save a checkpoint when entering or leaving them.

```
this.baseList={
	"flowStation",
	"swampWest",
}

```

#### missionObjectiveDefine, missionObjectiveTree and missionObjectiveEnum

See this page: Mission Objectives#Mission Table Sequence subscript tables

TBA

## Enemy

The `enemy` subscript defines callbacks related to NPCs, like enemy soldiers and hostages.

### Callback functions

#### InitEnemy

The `InitEnemy` callback is called early into `TppMain`'s reading of the enemy sub-table, just after the `soldierDefine` table is read. It seems to be mainly used for Mother Base missions with enemies. It's also used to use routes for soldiers with `TppEnemy.SetSneakRoute()` and `TppEnemy.SetCautionRoute()` or set them to use specific route groups without shift changes before `routeSets` has the chance to give them more random ones.

#### SetUpEnemy

The `SetUpEnemy` callback is called after all other callbacks in `TppMain`'s read of the enemy subscript. It's usually used for more generic custom later NPC set-ups that are not yet accounted for by other callbacks and tables.

#### SpawnVehicleOnInitialize

This function doesn't seem to do anything on its own, but it's during this function that `TppEnemy.SpawnVehicles(...)` is called from.

```
this.SpawnVehicleOnInitialize = function()
	TppEnemy.SpawnVehicles( this.VEHICLE\_SPAWN\_LIST )
end

```
The name `this.VEHICLE_SPAWN_LIST` seems to be completely arbitrary despite being common. It can be anything. The list itself is actually a list of `SendCommand` tables sent to `TppVehicle2`, all of them spawn a specific locator of `TppVehicle2`. See more arguments for this `SendCommand` on the Commands page.

```
this.VEHICLE\_SPAWN\_LIST = {
	{
		id = "Spawn",
		locator = "sol\_vehicle\_0000",
		type = Vehicle.type.EASTERN\_TRUCK,
		subType = Vehicle.subType.EASTERN\_TRUCK\_CARGO\_MATERIAL,
	},
}

```
The same can also be done with `TppEnemy.DespawnVehicles(...)` and a similar arbitrary table with `"Despawn"` as the command id and just the locator name specified. TBA

### Flags

#### MAX\_SOLDIER\_STATE\_COUNT

The `MAX_SOLDIER_STATE_COUNT` integer is an optional setting for your mission that overrides the maximum amount of soldier states saved to `svars`. The default setting is 160, and vanilla missions find that enough, except for free roam missions in Afghanistan, Africa and Mother Base, which raise it to 360 or 256. This only has to be done if your totalCount of TppSoldier2 type in its GameObject definition exceeds 160.

```
this.MAX\_SOLDIER\_STATE\_COUNT = 360

```

#### USE\_COMMON\_REINFORCE\_PLAN

The `MAX_SOLDIER_STATE_COUNT` bool is an optional flag that allows common reinforce plans to be used if you have vanilla outposts and LRRP patrols defined between them in `soldierDefine` and `routeSets`.

```
this.USE\_COMMON\_REINFORCE\_PLAN = true

```

### Tables

#### soldierDefine

The `soldierDefine` table defines which soldiers should belong to which outposts, as well as their default starting LRRP patrols and vehicles. This table is integral to the soldiers appearing in your mission. However, it alone will not simply spawn soldiers - you need GameObjectLocators of TppSoldier2 type in .fox2 DataSets with the soldier names, along with the GameObject entity that defines the TppSoldier2 GameObject type for your mission.

Here's a simple example with two CPs with very few soldiers:

```
this.soldierDefine = {
	cp\_swamp\_vip = {
		"sol\_mis\_0000",
	},
	cp\_savannah = {
		"sol\_mis\_0004",
		"sol\_mis\_0005",
		"sol\_mis\_0006",
	},
}

```
Here's an example of a LRRP unit with a given travel plan:

```
this.soldierDefine = {
    mafr\_02\_21\_lrrp={
		"sol\_02\_21\_0000",
		"sol\_02\_21\_0001",
		lrrpTravelPlan	= "travel\_swampWest",
	},
}

```
And with a vehicle:

```
this.soldierDefine = {
    afgh\_01\_13\_lrrp = {
		"sol\_01\_13\_0000",
		"sol\_01\_13\_0001",
		lrrpTravelPlan	= "travelArea2\_01",
		lrrpVehicle		= "veh\_trc\_0000",
	},
}

```

#### routeSets

The `routeSet` table defines route sets for soldiers in the command posts defined in the `soldierDefine` table.

See this page: Route Set.

#### travelPlans

The `travelPlans` table defines LRRP travel and other kinds of travel between sets of routes and outposts, with some parameters like wait hold time, one-way patrols, etc..

This example using the `base` parameter might seem like a simple travel plan, but it actually has some prerequisites. You have to have the numbered LRRP CPs defined, along with their standard uniformed route sets.

```
this.travelPlans = {
	travel\_swampWest={
		{ base = "mafr\_swampWest\_ob", },
		{ base = "mafr\_flowStation\_cp", },
	}
}

```
Here's an example of a more detailed travel route that does more or less the same:

```
this.travelPlans = {
	travelCommFacility01 = {
		{ cp="afgh\_02\_34\_lrrp", 		routeGroup={ "travel", "lrrp\_02to34" } },
		{ cp="afgh\_commFacility\_cp", 	routeGroup={ "travel", "lrrpHold" },wait=15 },
		{ cp="afgh\_02\_34\_lrrp",			routeGroup={ "travel", "lrrp\_34to02" } },
		{ cp="afgh\_commWest\_ob", 		routeGroup={ "travel", "lrrpHold" },wait=15 },
	},
}

```
The `cp` parameter defines which command post the soldiers will belong to and which outpost the `routeGroup` will be taken from. The `routeGroup` defines the set of routes that will be taken from the specified command post's route set. The `wait` time on the hold parameter is the time in seconds that the soldiers will wait at the hold routes. It might actually be overwritten by a common time of 15 seconds somewhere in the code.
This is an example of a one-way travel plan:

```
this.travelPlans = {
	travelCommFacility01 = {
        ONE\_WAY = true,
		{ cp="afgh\_02\_34\_lrrp", 		routeGroup={ "travel", "lrrp\_02to34" } },
		{ cp="afgh\_commFacility\_cp",    finishTravel=true },
	},
}

```
Once the soldiers on the travel plan finish the travel plan, they will not loop back to the first route set and will instead join the last command post as regular soldiers.
In this example, they will loop on the last route group instead of joining regular route groups:

```
this.travelPlans = {
	travelVip = {
		ONE\_WAY = true,
		{ cp="afgh\_10036\_lrrp", 		routeGroup={ "travel", "lrrp\_16to29" } },
		{ cp="afgh\_field\_cp", 			routeGroup={ "travel", "lrrp\_Vip\_Hold" } },
	},
}

```
TBA

#### soldierPowerSettings

The `soldierPowerSettings` table forces certain power settings onto soldier locators from the `soldierDefine` table. The power settings table given to a soldier can be empy to remove their power settings entirely. See `TppEnemy`'s `POWER_SETTING` table for all power settings.

This simple example of the table will simply remove all power settings from the given soldier.

```
this.soldierPowerSettings = {
    sol\_vip\_0000 = { },
}

```
This example gives some specific soldiers sniper rifles, body armor, helmets and missiles.

```
this.soldierPowerSettings = {
	sol\_pfCamp\_0001 = { "SNIPER" },
	sol\_pfCamp\_0002 = { "SNIPER" },
	sol\_pfCamp\_0003 = { "SNIPER" },
	sol\_ZRS\_0010	= { "SOFT\_ARMOR", "HELMET", },
	sol\_ZRS\_0011	= { "SOFT\_ARMOR", "HELMET", },
	sol\_ZRS\_0012	= { "SOFT\_ARMOR", "HELMET", "MISSILE" },
	sol\_ZRS\_0013	= { "SOFT\_ARMOR", "HELMET", "MISSILE" },
}

```

#### soldierPersonalAbilitySettings

The soldier personal ability settings table forces specified soldiers to use specific personal abilities. It's seemingly never used in the vanilla game.

The setting types are: "`shot`", which most likely refers to firearm aim precision, "`grenade`" grenade throw precision, "`reload`" how often they need to reload, "`hp`" their life, "`notice`" how they prioritize suspicious sights and noises, "`cure`" how fast they regenerate, "`reflex`" how long the reflex mode encounter with them lasts, "`speed`" how fast they move, "`fulton`" how often they will shoot down Fulton balloons, and "`holdup`" how often they resist in response to being held up. Any of these settings can be specified here.

The setting levels range from `"low"`, `"mid"`, `"high"` to `"sp"`.

```
this.soldierPersonalAbilitySettings={
    sol\_vip\_0000={
        shot    = "sp",
        grenade = "high",
        reload  = "mid",
        hp      = "low",
        notice  = "sp",
        cure    = "high",
        reflex  = "mid",
        speed   = "low",
        fulton   = "sp",
        holdup  = "high",
    },
    sol\_vip\_0001={
        hp      = "sp",
        cure    = "sp",
        speed   = "sp",
        fulton   = "sp",
        holdup  = "sp",
    },
    sol\_vip\_0002={
        holdup  = "low",
    },
}

```

#### cpGroups

The CP groups table defines command post groups, and joins specified outposts to existing vanilla command post groups, if you make custom ones. See the `afgh_cpGroups` and `mafr_cpGroups` scripts for the vanilla CP groups, or alert a CP in free roam in the game and see how many will be raised to alert when their HQ is alerted to your presence as well.

This example adds the custom observation post to the vanilla `group_Area2`.

```
this.cpGroups = {
	group\_Area2 = {
		"ms\_13\_34\_ob",
	}
}

```

#### vehicleDefine

The `vehicleDefine` table only defines the number of vehicle instances that should have `svars` reserved for them. You can define a specific number of vehicles you use here, but you always should add 1 more for the player's own vehicle. Since spawned vehicles are often defined in a table, the fastest way to define them here would be to get the length of the table with `#`.

```
this.vehicleDefine = {
	instanceCount = #this.VEHICLE\_SPAWN\_LIST + 1,
}

```

#### syncRouteTable

The sync route table defines parameters for the Sync Route route node event. In the vanilla game, it's only used in s10086/Lingua Franca, s10110/Voices and s10150/Skull Face. It defines a group of routes that will get synced with the Sync Route event. The `script` flag seems to allow the function `SyncRouteManager.SetScriptStep(...)` to manipulate it somehow.

```
this.syncRouteTable = {
	interrogation1 = {
		"rts\_guard1\_interrogation1\_0000",
		"rts\_interpreter\_interrogation1\_0000",
		"rts\_interrogator\_interrogation1\_0000",
	},
	interrogation1\_caution = {
		"rts\_guard1\_interrogation1\_c\_0000",
		"rts\_interpreter\_interrogation1\_c\_0000",
		"rts\_interrogator\_interrogation1\_c\_0000",
	},
	interrogation2 = {
		"rts\_interpreter\_interrogation2\_0000",
		"rts\_interrogator\_interrogation2\_0000",
	},
}

```

```
this.syncRouteTable = {
    SyncRoute = {
        "rts\_Fire\_fW",
        "rts\_Fire\_fW2",
    },
}

```

```
this.syncRouteTable = {
	sync\_bringer = {
		"rts\_bringer\_A",
		"rts\_bringer\_B",
		script = true,
	},
}

```

#### GetRouteSetPriority

This only seems to be used in Mother Base missions, and its result is generated with `mtbs_enemy`'s `GetRouteSetPriority`. It's initialized as `nil` and only set with the `mtbs_enemy` function on the script's `OnAllocate` callback.

TBA

## Radio

The `radio` subscript defines callbacks related to support radio lines, like real-time radio, intel radio, optional radio, debriefings and more.

### gameOverRadioTable

This table overrides game over lines. See `TppRadio.COMMON_GAME_OVER_RADIO_LIST` for all the default labels used with the `TppDefine.GAME_OVER_RADIO` enum.

```
this.gameOverRadioTable = {
    [TppDefine.GAME\_OVER\_RADIO.PLAYER\_DEAD] = "f8000\_gmov0100",
    [TppDefine.GAME\_OVER\_RADIO.S10020\_OUT\_OF\_MISSION\_AREA] = "f8000\_gmov0090"
    [TppDefine.GAME\_OVER\_RADIO.S10020\_TARGET\_TIMEOVERDEAD] = "s0020\_gmov4010",
    [TppDefine.GAME\_OVER\_RADIO.S10020\_TARGET\_DEAD] = "s0020\_gmov4020",
    [TppDefine.GAME\_OVER\_RADIO.S10020\_TARGET\_KILL] = "s0020\_gmov4030",
    [TppDefine.GAME\_OVER\_RADIO.S10020\_RIDING\_HELI\_DESTROYED] = "s0020\_gmov4040",
    [TppDefine.GAME\_OVER\_RADIO.S10020\_PLAYER\_DESTROY\_HELI] = "s0020\_gmov4050",
}

```

### debugRadioLineTable

Even though there is no functionality to actually display these debug radio messages in the vanilla game, you can use this table to help yourself debug your custom missions.

```
this.debugRadioLineTable = {
	RescueHuey\_announce = {
		"[dbg]ボス、東側で兵器開発をしている科学者がHECを通じて接触してきた",
		"[dbg]名前はエメリッヒ",
		"[dbg]彼は西側への亡命を希望している",
		"[dbg]まずは依頼者であり、ターゲットでもあるエメリッヒと接触したい",
		"[dbg]この科学者は常時、北のソビエト軍ベースキャンプで軟禁状態にある",
		"[dbg]だが今は変電施設に来ている",
		"[dbg]新兵器のデモンストレーションをするためにな",
		"[dbg]今がターゲット接触のチャンスといえるだろう",
		"[dbg]変電施設へ向かえ。エメリッヒに接触するんだ",
	},
	RescueHuey\_updateArea = {
		"[dbg]変電施設に到達したな",
		"[dbg]エメリッヒ博士は施設北端の実験場にいるはずだ",
		"[dbg]実験場の入り口を目指してくれ",
	},
}

```

### radioList

The `radioList` table defines radio labels that can be used in the mission. Any label can be played without having to be registered here, but the optional `playOnce` boolean parameter is useful, as if it's set, it will block repeated playbacks of that label as its own radio group. `debugRadioLineTable` entries can also be defined here the same way as they were there.

```
this.radioList = {
	{ "s0033\_rtrg0010", playOnce = true },
	"f1000\_rtrg2250",
	test\_MissionComplete\_LeaveBase 	= {"(dbg)拠点から離れて安全を確保するんだ" ,},
}

```

### optionalRadioList

This table seemingly has no functionality behind it aside from registering it to also unused mvars tables. One of them shows that this had the same playOnce functionality as radioList, but since this whole thing is unused, it doesn't much matter.

### intelRadioList

The intel radio list registers radio labels for intel radio (espionage radio) for specific locators or overall intel radio types of entities. The specific locators include NPC locator names and special `EspionageRadioLocator`s made for this specifically. The intel radio types list is large and is listed as StrCode64 hashes in the game's .exe... a few hundred times. You can find most examples of intel radio types in `TppTutorial.IntelRadioSetting`.

```
this.intelRadioList = {
    --Intel radio type
	type\_walkergear = "s0080\_esrg4050",
    --Espionage Radio locator
	erl\_dirtyriver = "s0080\_esrg1010",
    --Enemy soldier locator
	sol\_outland\_0000 = "s0080\_esrg1030",
}

```

### USE\_COMMON\_RESULT\_RADIO

The `USE_COMMON_RESULT_RADIO` boolean flag seemingly does nothing and is only used in s10041.

### blackTelephoneDisplaySetting

This table defines the shape, texture path, image description `langId` and timing of appearance and disappearance of the images seen in the debriefing, or as the game internally calls it, the "black telephone" sequence.

The table entry's key is the debriefing radio's label, as you would need different timings for different debriefing radio labels, which change in some missions based on what you do in them. The value is a table with a `Japanese` and `English` tables within, and the Japanese one is only used if the game version being used is the Japanese voice one.

The first string of an entry within either the `Japanese` or `English` table determines the shape of the photo image - `"sub"` for vertical and `"main"` for horizontal, and the index, starting from `"1"`. The second string is the path to the `.ftex` file that will be used for the photo. The texture will be stretched to the proportions dictated by the first string. Then comes the timing float, in seconds - the image will appear this many seconds into this radio label's version of the debriefing. The optional fourth value is the `langId`, which only shows up for vertical `sub` images.

If the first string is instead `"hide"`, the second string becomes which previously defined image to hide, and the the third parameter float becomes the time in seconds at which the image is hidden.

What controls where on the screen in the image is placed is unknown.

```
this.blackTelephoneDisplaySetting = {
	f6000\_rtrg0150	= {
		Japanese = {
			{ "sub\_1", "/Assets/tpp/ui/texture/Photo/tpp/10115/mb\_photo\_10115\_010\_1.ftex", 0.6,"cast\_mosquito" },
			{ "main\_1", "/Assets/tpp/ui/texture/Photo/tpp/demo/mission\_demo\_s10115\_02.ftex", 3.5 },
			{ "main\_2", "/Assets/tpp/ui/texture/Photo/tpp/demo/mission\_demo\_s10115\_03.ftex", 7.3 },
			{ "main\_3", "/Assets/tpp/ui/texture/Photo/tpp/demo/mission\_demo\_s10115\_04.ftex", 29.9 },
			{ "hide", "main\_1", 47.1 },
			{ "hide", "main\_2", 47.4 },
			{ "hide", "main\_3", 47.7 },
		},
		English = {
			{ "sub\_1", "/Assets/tpp/ui/texture/Photo/tpp/10115/mb\_photo\_10115\_010\_1.ftex", 0.6,"cast\_mosquito" },
			{ "main\_1", "/Assets/tpp/ui/texture/Photo/tpp/demo/mission\_demo\_s10115\_02.ftex", 4.0 },
			{ "main\_2", "/Assets/tpp/ui/texture/Photo/tpp/demo/mission\_demo\_s10115\_03.ftex", 7.1 },
			{ "main\_3", "/Assets/tpp/ui/texture/Photo/tpp/demo/mission\_demo\_s10115\_04.ftex", 28.3 },
			{ "hide", "main\_1", 43.3 },
			{ "hide", "main\_2", 43.7 },
			{ "hide", "main\_3", 44.0 },
		},
	},
}

```

### commonRadioTable

This table overrides common radio lines for various contexts, like recovering an enemy soldier or prisoner, approaching an enemy helicopter, being warned about leaving the mission area, etc. You can also use `TppRadio.IGNORE_COMMON_RADIO` to completely disable that radio call in your mission. See `TppRadio.COMMON_RADIO_LIST` for the radio labels used for the `TppDefine.COMMON_RADIO` enum.

```
this.commonRadioTable = {
    [ TppDefine.COMMON\_RADIO.HOSTAGE\_RECOVERED ] = TppRadio.IGNORE\_COMMON\_RADIO,
    [ TppDefine.COMMON\_RADIO.SEARCH\_TARGET\_ENABLED ] = TppRadio.IGNORE\_COMMON\_RADIO,
    [ TppDefine.COMMON\_RADIO.PLAYER\_NEAR\_ENEMY\_HELI ] = "f1000\_rtrg3781",
    [ TppDefine.COMMON\_RADIO.OUTSIDE\_MISSION\_AREA ] = "s0150\_rtrg0050",
    [ TppDefine.COMMON\_RADIO.ABORT\_BY\_HELI ] = "s0260\_rtrg0430"
}

```

## Demo

The `demo` subscript defines callbacks related to cutscenes.

### demoList

The `demoList` table defines internal `demoId`s to indexed with more descriptive names used by functions like `TppDemo.Play()`.

```
this.demoList = {
	Demo\_ArrivalInAfghanistan		= "p31\_010010",
	Demo\_RescueMillerExplanation	= "p31\_010020",
	Demo\_GetIntel					= "p31\_010025",
	Demo\_RescueMiller				= "p31\_010030",
	Demo\_TimeOverDeadMiller			= "p31\_010035",
	Demo\_ParasiteAppearance			= "p31\_010040",
	Demo\_ParasiteDiscover\_upper		= "p31\_010045",
	Demo\_EscapeWithMillerOnHeli		= "p31\_010050",
}

```

### demoBlockList

The `demoBlockList` table defines the blocks that will get loaded for specific cutscenes, using the more descriptive names from the `demoList` table. This table is based on the `ScriptBlock` system, so you can load multiple .fpk packs at once, but only one of these needs to have a `ScriptBlockData` entity with the relevant script in it.

```
this.demoBlockList = {
	Demo\_SahelanTest 		= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d01.fpk" },
	Demo\_GetIntel			= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d07.fpk" },
	Demo\_ContactHuey 		= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d02.fpk" },
	Demo\_RideMetal 			= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d06.fpk" },
	Demo\_SahelanHerald01 	= {
        TppDefine.MISSION\_COMMON\_PACK.EAST\_TRUCK,
        "/Assets/tpp/pack/mission2/story/s10070/s10070\_d08.fpk"
	},
	Demo\_SahelanHerald02 	= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d08.fpk" },
	Demo\_SahelanAttacks 	= {
        TppDefine.MISSION\_COMMON\_PACK.SKULLFACE,
        TppDefine.MISSION\_COMMON\_PACK.EAST\_TRUCK,
        "/Assets/tpp/pack/mission2/story/s10070/s10070\_d03.fpk",
    },
	Demo\_SahelanFalling 	= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d04.fpk" },
	Demo\_MotherBase 		= { "/Assets/tpp/pack/mission2/story/s10070/s10070\_d05.fpk" },
}

```

## Sound

The `sound` subscript defines callbacks related to the mission's music, like certain jingles, including the helicopter's descend track.

### USE\_COMMON\_ESCAPE\_BGM

If the `USE_COMMON_ESCAPE_BGM` bool is set to true and the `bgmList` exists as a table in the subscript, the game will use the location's common escape scene music.

```
this.USE\_COMMON\_ESCAPE\_BGM=true

```

### bgmList

The `bgmList` table defines scene BGM event sets. They're indexed by their name, which will get used with functions like `TppSound.SetSceneBGM(...)`.

```
this.bgmList = {
    bgm\_volgin = {
        start = "Play\_bgm\_s10110\_volgin\_01",
        finish = "Stop\_bgm\_s10110\_volgin\_01",
        restore = "Set\_Switch\_bgm\_boss\_phase\_none",
        switch = {
            "Set\_Switch\_bgm\_boss\_phase\_al",
            "Set\_Switch\_bgm\_boss\_phase\_ed",
            "Set\_Switch\_bgm\_boss\_phase\_none",
            "Set\_Switch\_bgm\_boss\_phase\_sn",
        },
    },
    bgm\_south\_africa = {
        start = "Play\_bgm\_s10080\_south\_africa",
        finish = "Stop\_bgm\_s10080\_south\_africa",
    },
}

```

### missionStartTelopJingleName

The mission start telop jingle name is seemingly unused in the game's vanilla missions. It seems to define the play event for the music that plays at the start of the mission, and in the vanilla game, the only unique ones that are heard are in free roam Afghanistan and Africa helicopter entries.

```
this.missionStartTelopJingleName="Play\_bgm\_afgh\_jingle\_op"

```

### noRestorePhaseBGMList

This is seemingly unused entirely, all that's there is that the mvars table it's turned into hashes the table's values, which are therefore most likely the BGM set names.

### showCreditJingleName

This overrides the event that plays the music in the mission's end credits.

```
this.showCreditJingleName = "Play\_bgm\_s10240\_jingle\_ed"

```

### heliDescentJingleName

This overrides the event that plays when the mission can be cleared and helicopter descends for the player to ride it.

```
this.heliDescentJingleName = "Play\_bgm\_mission\_heli\_descent\_low"

```

### startHeliClearJingleName

This overrides the event that plays when the mission can be cleared and you're riding the helicopter on your way to clear the mission.

```
this.startHeliClearJingleName = "Play\_bgm\_mission\_clear\_heli\_sad"

```

### finishHeliClearJingleName

This overrides the event that ends the previously mentioned event's music.

```
this.finishHeliClearJingleName = "Stop\_bgm\_mission\_clear\_heli\_sad"

```

## Telop

The `telop` subscript defines the `langIds` for names appearing mission's opening credits. It entirely consists of a few tables of langIds.

### mainCharacterLangList

The main character list defines the `langId`s credits for what main characters are either the player or give support radio in the mission. The vanilla game usually uses the given three standard main character `langId`s.

```
this.mainCharacterLangList = {
    "cast\_venom\_snake",
    "cast\_kazuhira\_miller",
    "cast\_sharashka\_ocelot"
}

```
Missions where supporting characters also provide support radio also include those characters, specifically `"cast_code_talker"` and `"cast_emmerich"`.

### enemyCombatantsLangList

The enemy combatants list defines the `langId`s for credits for which faction of enemy soldiers the player encounters in the mission. It can be one group or multiple. This telop list is optional.

Commonly, one enemy combatants group `langId` is used:

```
this.enemyCombatantsLangList = {
    "cast\_soviet\_soldiers"
}

```
Sometimes, multiple credits are shown, and always in a sub-table, as well:

```
this.enemyCombatantsLangList = {
    {
        "cast\_soviet\_soldiers",
        "cast\_Spetsnaz"
    }
}

```

### guestCharacterLangList

The guest character list defines the `langId`s for credits for mission targets or optional targets in the mission. This table is optional.

Just like the enemy combatants list, a single `langId` is within the table directly, but multiple have to be in a sub-table.

```
this.guestCharacterLangList = {
    "cast\_bionics\_engineer"
}

```

```
this.guestCharacterLangList = {
	{
        "cast\_skull\_face",
        "cast\_tretij\_rebenok",
        "cast\_soldier\_skulls",
        "cast\_hamid\_fighters\_mujahid"
    }
}

```

### specialMechanicLangList

The special mechanic list defines the `langId`s for credits for the featured mechas in the mission, like armored vehicles, enemy helicopters, Walker Gears or Sahelanthropus. This table is optional.

Like before, a single `langId` is within the table directly, but multiple have to be in a sub-table.

```
this.specialMechanicLangList = {
    "cast\_tt-77"
}

```

```
this.specialMechanicLangList = {
	{
        "cast\_sahelanthropus",
        "cast\_HP-48\_Krokodil"
    }
}

```

### missionWriter

The mission writer list defines the `langIds` for the mission's writers. There can only be one or two writers - third or more will not display on the screen. Unlike the previous three lists, this table does not use a sub-table for multiple entries.

```
this.missionWriter = {
    "staff\_hideo\_kojima",
    "staff\_hidenari\_inamura"
}

```

### missionDirector

The mission director table is orphaned and is not used in `TppTelop`.

### missionLevelDesigner

The mission level designer list defines the `langId`s first for the mission's director / tuner, and second the mission location's level designer. Unlike some of the previous lists, this does not need to use a sub-table for multiple entries.

```
this.missionLevelDesigner = {
    "staff\_yuji\_korekado",
    "staff\_shinpei\_yamamoto"
}

```

## Score

The `score` subscript defines time limits for certain mission ranks and the max amount of tactical takedowns that count as bonuses to the score. The only contents it ever has is the table `missionScoreTable`.

### missionScoreTable

This table defines the base time in seconds for each mission completion rank with `baseTime` and the count limit for tactical takedown bonuses in with `tacticalTakeDownPoint`.

```
this.missionScoreTable = {
    baseTime = {
        S = 720, A = 1380, B = 2370, C = 5928, D = 7836, E = 11754
    },
    tacticalTakeDownPoint = { countLimit = 40 },
}

```