ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Actions (maps)/TSFS

From ModEnc
Jump to navigation Jump to search

In TS, Actions become a separate section, so Triggers can have multiple Actions with up to seven parameters. The game assumed the Trigger, Event and Action all share the same ID. So a Trigger which has ID 12451245 uses the Action list with ID 12451245.

The following Actions are available:

Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
0 No Action 0 0 0 0 0 0 A
No Action - nothing happens
1 Win 0 House# 0 0 0 0 A
House P2 wins the game
2 Lose 0 House# 0 0 0 0 A
House P2 loses the game
3 Production Begins 0 House# 0 0 0 0 A
Enables computer-controlled House P2 to produce units for teams and (re)construct buildings according to base nodes. This is necessary if the House's IQ is too low for automatic production.
4 Create Team. 14 TeamType ID 0 0 0 0 A
Creates an instance of TeamType P2 owned by HOUSE2. The TaskForce will be recruited from existing units or produced from factory, provided the House is AI-controlled and production is enabled.
5 Destroy Team 1 TeamType ID 0 0 0 0 A
Destroys all instances of TeamType P2. This dissolves the team(s), but leaves the team members alive. However, the teams are regarded as "killed" for purposes like certain trigger events (e.g. event #29 or #48).
6 All to Hunt 0 House# 0 0 0 0 A
House P2 sends all its objects to hunt
7 Reinforcement 1 TeamType ID 0 0 0 0 A
Spawns team type P2 and grants it to its owner house. In most cases, the task force will arrive from the map edge closest to the team's origin waypoint. Units with the tunnel (subterranean) locomotor spawn directly at the waypoint.

If no waypoint is defined or the waypoint is otherwise invalid, then the edge is determined by the Edge parameter of the team's house.

See also action #80.

Note: In case of non-burrowing ground units, the game attempts to determine a clear spot just outside the map's visible area to spawn the task force in. This can often lead to strange results, like the task force spawning far away from the desired waypoint, even on the opposite side of the map.

8 Drop Zone Flare 0 0 0 0 0 0 Waypoint
Displays a drop zone flare at waypoint P7 and reveals map around that location
9 Fire Sale 0 House# 0 0 0 0 A
House P2 sells all structures
10 Play Movie 0 Movie# 0 0 0 0 A
Pauses the game and plays the movie P2 in full screen
11 Text Trigger 0 String# 0 0 0 0 A
Displays the text with index P2 from tutorial.ini
12 Destroy Trigger 2 Trigger ID 0 0 0 0 A
Destroy all instances of Trigger P2
13 Autocreate Begins 0 House# 0 0 0 0 A
Logic related to Autocreate Begins, as a whole or in part, is obsolete in Tiberian Sun.

In previous games, this action enabled the specified computer-controlled house to periodically build autocreate teams. However, this system is deprecated, most likely in favor of the new and more flexible AI triggers.
14 Change House 0 House# 0 0 0 0 A
Attached objects are granted to House P2.

Note that the House will technically "capture" the objects. If there's another trigger with events like #29 or #48 attached to those objects, that trigger will fire due to the House change.

Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
15 Allow Win 0 0 0 0 0 0 A
Logic related to Allow Win, as a whole or in part, is obsolete in Tiberian Sun.

In previous games, the mission could only be won once all triggers that had this action had fired. In TS, this was made obsolete by the introduction of local variables.
16 Reveal all map 0 0 0 0 0 0 A
Reveals the entire map to the player
17 Reveal around waypoint 0 Waypoint# 0 0 0 0 A
Reveals a region of the map to the player around the waypoint specified
18 Reveal waypoint zone 0 Waypoint# 0 0 0 0 A
Reveals the zone of waypoint P2
19 Play sound effect 0 Sound# 0 0 0 0 A
Plays the sound effect P2
20 Play music theme 0 Theme# 0 0 0 0 A
Plays the music theme P2
21 Play speech 0 Speech# 0 0 0 0 A
Plays the speech P2
22 Force Trigger 2 Trigger ID 0 0 0 0 A
Forces trigger P2 to fire
23 Timer Start 0 0 0 0 0 0 A
Starts the global mission timer
24 Timer Stop 0 0 0 0 0 0 A
Stops the global mission timer
25 Timer Extend 0 Time5 0 0 0 0 A
Extends the global mission timer by this many seconds5.
26 Timer Shorten 0 Time5 0 0 0 0 A
Reduces the global mission timer by this many seconds5.
27 Timer Set 0 Time5 0 0 0 0 A
Sets the global mission timer to this many seconds5.
28 Global Set 0 Global# 0 0 0 0 A
Global variable P2 is set
29 Global Clear 0 Global# 0 0 0 0 A
Global variable P2 is cleared
Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
30 Auto Base Building 0 Boolean 0 0 0 0 A
If P2 ≠ 0, enables base construction for HOUSE. See also action no. 3
31 Grow shroud 0 0 0 0 0 0 A
The shroud expands by one cell
32 Destroy Attached Object 0 0 0 0 0 0 A
Attached objects are destroyed
33 Add 1-time super weapon 0 SuperWeapon# 0 0 0 0 A
HOUSE gets one-time superweapon P2
34 Add repeating super weapon 0 SuperWeapon# 0 0 0 0 A
HOUSE gains repeating superweapon P2
35 Preferred target 0 Quarry# 0 0 0 0 A
HOUSE sets the preferred target type for super weapons to P2
36 All change house 0 House# 0 0 0 0 A
All objects of HOUSE are assigned to House P2
37 Make ally 0 House# 0 0 0 0 A
Forces HOUSE to ally with house P2
38 Make enemy 0 House# 0 0 0 0 A
Forces HOUSE to un-ally with house P2
39 Change Zoom Level 0 Special 0 0 0 0 A
Changes the zoom out level of the player's radar map:
(1 - normal view, 2 - zoomed out)
40 Resize Player View 0 0 X offset Y offset Width Height A
Changes the visible portion of the map. See [Map]LocalSize= for more information on the parameters.
41 Play Anim At 0 Animation# 0 0 0 0 Waypoint
Plays animation P2 in the waypoint P7
42 Fire Weapon At 0 Weapon# 0 0 0 0 Waypoint
Detonates an explosion with weapon P2 in the waypoint P7
43 Meteor Impact At 0 VoxelAnim# 0 0 0 0 Waypoint#
Creates VoxelAnim P2 at waypoint P7 and plays the EVA speech "Meteor storm approaching"
44 Ion Storm start 0 Time5 0 0 0 0 A
Starts an ion storm sequence to run for P2 seconds5.
Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
45 Ion Storm stop 0 0 0 0 0 0 A
Stops any Ion storm in progress
46 Lock input 0 0 0 0 0 0 A
Disables user input
47 Unlock input 0 0 0 0 0 0 A
Enables user input
48 Center Camera at waypoint 0 Speed (0-4) 0 0 0 0 Waypoint
Moves the tactical view to waypoint P7 with given speed in P2
49 Zoom in 0 0 0 0 0 0 A
Zooms the tactical map in
50 Zoom out 0 0 0 0 0 0 A
Zooms the tactical map out
51 Reshroud Map 0 0 0 0 0 0 A
Reshrouds the entire map
52 Change Light Behavior 0 Special 0 0 0 0 A
Changes the way a building spotlight behaves:
  • 0 - No spotlight
  • 1 - Obey rules.ini setting
  • 2 - Circle
  • 3 - Follow
53 Enable Trigger 2 Trigger# 0 0 0 0 A
Enables trigger P2
54 Disable Trigger 2 Trigger# 0 0 0 0 A
Disables trigger P2
55 Create Radar Event 0 Radar Event# 0 0 0 0 Waypoint
Creates a radar event of type P2 at waypoint P7
56 Local Set 0 Local# 0 0 0 0 A
Local P2 is set
57 Local Clear 0 Local# 0 0 0 0 A
Local is cleared
58 Meteor Shower 0 Size (0-3) 0 0 0 0 Waypoint
Creates a meteor shower of size P2 around waypoint P7 and plays the EVA speech "Meteor storm approaching". Larger size values indicate more meteors.
59 Reduce Tiberium 0 0 0 0 0 0 Waypoint
Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
60 Sell Building 0 0 0 0 0 0 A
Attached building is sold
61 Turn Off Building 0 0 0 0 0 0 A
Attached building is turned off
62 Turn On Building 0 0 0 0 0 0 A
Attached building is turned on
63 Apply 100 Damage 0 Waypoint# 0 0 0 0 A
Detonates an explosion of [HE] warhead (with 100 points of Damage) at waypoint P2
64 Small Light Flash 0 Waypoint# 0 0 0 0 A
Shows a small light flash at waypoint P2
65 Medium Light Flash 0 Waypoint# 0 0 0 0 A
Shows a medium light flash at waypoint P2
66 Large Light Flash 0 Waypoint# 0 0 0 0 A
Shows a large light flash at waypoint P2
67 Announce Win 0 0 0 0 0 0 A
EVA announcement that the player has won
68 Announce Lose 0 0 0 0 0 0 A
EVA announcement that the player has lost
69 Force End 0 0 0 0 0 0 A
Forces end of scenario
70 Destroy Tag 3 Tag ID 0 0 0 0 A
Destroy tag P2 and all attached triggers
71 Set Ambient Step 0 Number3 0 0 0 0 A
Sets ambient light fade step value to P2
72 Set Ambient Rate 0 Number3 0 0 0 0 A
Sets ambient light fade rate to P2
73 Set Ambient Light 0 Number 0 0 0 0 A
Sets ambient light to level P2
74 AI Triggers Begin 0 House# 0 0 0 0 A
Start AI triggers for house P2
Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
75 AI Triggers Stop 0 House# 0 0 0 0 A
Stop AI triggers for house P2
76 Ratio of AI Trigger Teams 0 Number 0 0 0 0 A
Percentage chance for each of the HOUSE's AI triggers to be created, subject to normal AI trigger conditions. Defaults to 100. See also RatioAITriggerTeam.
77 Ratio of Team Aircraft 0 Number 0 0 0 0 A
HOUSE's percentage of aircraft created for teams (P2% are created for AI Triggers, (100-P2)% are for other teams). Defaults to 75. See also RatioTeamAircraft.
78 Ratio of Team Infantry 0 Number 0 0 0 0 A
HOUSE's percentage of infantry created for teams (P2% are created for AI Triggers, (100-P2)% are for other teams). Defaults to 75. See also RatioTeamInfantry.
79 Ratio of Team Units 0 Number 0 0 0 0 A
HOUSE's percentage of units created for teams (P2% are created for AI Triggers, (100-P2)% are for other teams). Defaults to 75. See also RatioTeamUnits.
80 Reinforcement Team At 1 TeamType ID 0 0 0 0 Waypoint
Creates reinforcement team P2 at waypoint P7. The units will appear magically at the waypoint.

If there is a building or a transport on the waypoint, the task force will spawn inside it, even if the task force members could not normally enter the object. In case of buildings, the task force will exit the building as if produced from it. Transports will not kick out the passengers unless specifically told to (by the player or a script).

Units with the tunnel (subterranean) locomotor spawn underground and emerge at or, if obstructed, as close as possible to the waypoint.

81 Wakeup Self 0 0 0 0 0 0 A
Breaks attached object out of sleep or harmless mode so as to enter guard mode
82 Wakeup All Sleepers 0 0 0 0 0 0 A
Breaks all HOUSE's units out of sleep mode
83 Wakeup All Harmless 0 0 0 0 0 0 A
Breaks all HOUSE's units out of harmless mode
84 Wakeup Group 0 Group 0 0 0 0 A
Action Wakeup Group is bugged. In certain circumstances, it will crash the game.

Wakeup all HOUSE's units which (as received from their TaskForce) belong to group P2
85 Vein Growth 0 0/1 = no/yes 0 0 0 0 A
Sets whether the Veins grow or not
86 Tiberium Growth 0 0/1 = no/yes 0 0 0 0 A
Sets whether Tiberium grows or not
87 Ice Growth 0 0/1 = no/yes 0 0 0 0 A
Sets whether ice grows or not
88 Particle System Anim At 0 ParticleSystem# 0 0 0 0 Waypoint
Spawn particle system P2 (0-based index) at waypoint P7
89 Remove Particle System Anim At 0 0 0 0 0 0 Waypoint
Remove all particle system from waypoint P7
Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)
90 Lightning Strike At 0 0 0 0 0 0 Waypoint
A single Ion Storm lightning bolt strikes at waypoint P7
91 Go Berzerk 0 0 0 0 0 0 A
Attached object goes berzerk (only works on Cyborg=yes infantry)
92 Activate Firestorm 0 0 0 0 0 0 A
Activates HOUSE's firestorm defense
93 Deactivate Firestorm 0 0 0 0 0 0 A
Deactivates HOUSE's firestorm defense
94 Ion Cannon Strike 0 0 0 0 0 0 Waypoint
Fires Ion-Cannon at waypoint P7
95 Nuke Strike 0 0 0 0 0 0 Waypoint
Fires a Nuclear Missile (Multi Missile) at waypoint P7
96 Chem Missile strike 0 0 0 0 0 0 Waypoint
Fires Chemical missile at waypoint P7
97 Toggle Train Cargo 0 0 0 0 0 0 A
Toggles state of [Basic]→TrainCrate
98 Play Sound Effect Random 0 Sound# 0 0 0 0 A
Plays sound P2 at random waypoint
99 Play Sound Effect At 0 Sound# 0 0 0 0 Waypoint
Plays sound effect P2 at waypoint P7
100 Play Ingame Movie 0 Movie# 0 0 0 0 A
Displays movie P2 in the minimap window. Player still has control of interface and units
101 Flash Team 4 TeamType ID 0 0 0 0 Duration
Flash team P2 for the duration (in frames) specified in P7
102 Disable Speech 0 0 0 0 0 0 A
Disables EVA announcements.
103 Enable Speech 0 0 0 0 0 0 A
Enables EVA announcements.
104 Set Team ID 0 Group 0 0 0 0 A
Assigns all attached objects to Group P2.
105 Talk Bubble 4 TeamType ID 0 0 0 0 Frame
Displays talk bubble frame P7 (1-based index) over each member of TeamType P2
Code 1 Action Parameter types
#1 (P1) #2 (P2) #3 (P3) #4 (P4) #5 (P5) #6 (P6) #7 (P7)

Notes

1 This column specifies the code to be written in the Action's "action" slot, e.g. A1 in the Actions page.

2 HOUSE in this document refers to the house owning the Trigger, labeled "HOUSE" in the Triggers page.

3 This value is a floating-point number converted to hexadecimal and expressed as an integer. For example, to set AmbientChangeRate to 0.5, first convert the float to hex (0x3f000000) and further into int (1056964608).

4 P1 specifies how certain other parameters are to be interpreted:

P1 value P2 type P7 value/type
0 No specific type Waypoint, if applicable
1 TeamType Waypoint, if applicable
2 Trigger A
3 Tag A
4 TeamType Depends on action, is not waypoint

5 Time is seconds on default game speed (15 FPS).

Referencing items
As you probably noticed, some of the Parameter descriptions in this table end with "#". The reason for that is:
Some parameters take their values to be indexes of objects, others assume they are the identifiers of those objects.
For convenience, if the parameter's description in the table ends with a "#" symbol, you should use the object's index in its appropriate list, otherwise you should use its ID.
Also note: All entries in column P7 are expected to be literal, so you have to convert all the numbers into letters like this:
0 is "A", 1 is "B", 25 is "Z", 26 is "AA", just like the columnm numbering in your favourite spreadsheet program.