Posted: Sun Aug 25, 2019 12:28 am Post subject:
The complete and definitive mapping index
Subject description: trigger events, trigger actions, script actions, teams, AI triggers, and more.
this mapping index is meant to both help novice mappers step up their game, and to serve as a single reference point for
advanced mappers with all of the relevant appended internal lists and known bugs. i did not create most of the lists here myself, and
dont mean to take credit for them by referencing them here. have fun mapping.
firstly the tab that says map: adjusting the parameters "left, top, width, height" will shift a set of blue lines which represent the players
visible area on the map, not overly complex, but if you intend to make a map with multiple map expand triggers, you are going to need
to write this down.
on the subject of that, trigger action 40: Resize Player View... lists this as "bottom, left, right, top" for whatever reason, and you need to input
the numbers in a different order than the "map" entry shows
BASIC
for most intents and purposes, the "next scenario, Alt. scenario, New INI format, CarryOverCap ?, End of game, Skip score stats, One time only,
Skip map selection, Official, Percent(money?), Only Multiplayer, Initial time, and Addon needed entries arent worth mentioning.
Crates for destroyed trucks does work in ra2, in this case it registers units with the ini tag "CarriesCrate=yes" as eligible, which
by default is only [TRUCKB]
Growing Ore ( i am unsure if this does anything at all, or if it is used in conjunction with the entries under "special flags" )
Free radar also works, but is typically used only for debugging or mission maps.
Ignore global AI Triggers does work, in the case it is "yes" the map will ignore normal AI triggers, even if they are individually set to "enabled"
Spoiler (click here to read it):
turning this on will make the AI build nothing but its miners in terms of units until you write its AI. if this is a campaign map that you want
to have an AI, this should always be on, as the default AI is not made for campaign maps and will break your map's AI. if this is a skirmish map and
you only want to add a few teams to the existing skirmish AI, then this can be left off.
Special Flags
Ore grows, and Ore spreads work in ra2, typically NOT used because they are OP. obvious remnants of TS logic.
Initial veteran works in ra2, but it typically NOT used because it is OP
i am unsure about Destroyable bridges, MCV deploy, Fixed alliance, Shroud, Inert, and Weather Storms. in some cases these would be obsolete
leftovers of tiberian sun, in other cases they would seem to conflict with ingame GUI options and are probably redundant
Lighting Settings
not a lot to say about lighting except it is the big invisible lightpost in the sky. both general and individual lighting can be viewed and
tested via the map renderer, so i encourage people to try playing with this setting in conjunction with that utility. it even registers ini edited lights.
Singleplayer settings
if you are looking at this screen it means you are the developer of a full blown mod, so i will skip this part.
Houses
houses should only be modified in single player
IQ: this gives control over a set of hardcoded AI behaviors, giving a high iq to the player controlled house has adverse effects. the behaviors associated
with IQ are found in Rules.ini, and are as follows.
Spoiler (click here to read it):
Code:
[IQ]
MaxIQLevels=5 ; the maximum number of discrete IQ levels
SuperWeapons=4 ; super weapons are automatically fired by computer
Production=5 ; building/unit production is automatically controlled by computer
GuardArea=2 ; newly produced units start in guard area mode
RepairSell=1 ; allowed to choose repair or sell of damaged buildings
AutoCrush=2 ; automatically try to crush antogonists if possible
Scatter=2 ; will scatter from incoming threats [grenades and such]
ContentScan=3 ; will consider contents of transport when picking good target
Aircraft=3 ; automatically replace aircraft
Harvester=2 ; automatically replace lost harvesters
SellBack=2 ; allowed to sell buildings
Map edge: this is supposedly affiliated with the map edge from which reinforcements arrive
Side: this is the replacement to TS's "Acts like" entry, and associates a "parent house" to the baby house. if not, its redudnant.
Color: this is the color of the house
Allies: these are houses allied to the house, houses arent mutually allied by default, so dont forget
Money: its the amount of money the house has on map start, in multiples of 100 credits
Node count: this is automatically generated on the creation of base nodes. dont mess with this
Technology level: this sets the max tech level of the house (not sure if this is obsolete)
Build activity (%): i dont know what this does honestly. if it does anything at all, its fairly redundant.
Player control: can the player control the houses units?
a final note on houses: a map specific house can be appended to a map specific ini file; that is to say you could make any new house the singular Owner= (etc)
of units/buildings in the .ini, and it would be respected ingame.
Local Variables
local variables are a beautiful thing which can associate scripts and triggers. a local variable can be set to "clear" or "set" via either a trigger
action, or a script action. local variables being clear or set can be assigned to the event of a trigger, and can facilitate for example, the execution of a script action
by a unit causing the firing of a trigger, or setting up a trigger so multiple specific conditions have to be set before trigger firing.
local variables are also useful for making triggers that repeat and fire once for every time an event is triggered by making a trigger with 'local set' be the event and
'local clear' be one of the actions. the local prevents the repeating trigger from infinity trigger fire catastrophes
Triggers
Trigger options
Name: the name of the trigger (ordered alphabetically in the trigger list)
House: the house of the trigger, referenced in certain trigger actions
Type: 0 means the triggers only fires once, on the meeting of a triggers events.
Type: 2 means the trigger fires repeatedly on the meeting of a triggers events. in cases where the event is constantly met, a trigger constantly fires every frame (which is ugly)
Attached trigger: this is used to facilitate the firing of multiple trigger actions through one trigger tag (which is attached to units/objects) further explained in "tags"
Disabled: if yes, this trigger is not active until enabled again by another trigger using action 53: enable trigger.
Easy, Medium, Hard: associated with campaign difficulty levels.
Events
trigger events consist of one or more events which have parameters which vary from event to event
1) entered by... fires when the cell, or object which the triggers tag is attached to is entered by a unit of the listed house. (-1 means ANY HOUSE and works in skirmish)
2) Spied upon... when tested the flag does nothing.
3) Thieved by... this is a relic of unused tiberian sun logic. does nothing
4)Discovered by player fires when the object is not shrouded from the player
5)House Discovered fires when anything of the given house is not shrouded from the player
6)Attacked by any house fires when the object attached takes damage from something attacking it
7)Destroyed by any house fires when the object is destroyed from something attacking it
8 ) Any event A dummy event that fires the trigger immediately on trigger enable
9) Destroyed units All... fires when all units of a set house are rekt
10) Destroyed buildings All... fires when all buildings of a set house are rekt
11) Destroyed All... fires when everything of a set house is rekt
12)Credits exceed... fires when the house of the trigger exceeds the set amount of credits owned
13) Elapsed time... fires after a set amount of time, measured in units of ingame time
14) Mission Timer Expired fires when the mission timer which was set reaches 0
15) Destroyed Buildings # fires when a set amount of buildings owned by the house of the trigger are rekt
16) Destroyed Units # fires when a set amount of units owned by the house of the trigger are rekt
17) No Factories left fires when the house of the trigger has no factories
18 ) Civilians Evacuated does nothing (TS relic)
19) Build Building type Fires when the house of the trigger builds the building listed
20) Build unit type fires when the house of the trigger builds the type of vehicle listed
21) Build infantry type fires when the house of the trigger builds the type of infantry
22) Build Aircraft type fires when the house of the trigger builds the type of aircraft
23) Leaves map (team) apparently fires when the team leaves the map and is deleted. unsure if this is redundant
24) Zone Entry by.... triggers when the house listed enters the general proximity of the celltag the trigger is in
25) Crosses horizontal line... triggers when the house specified crosses a line going (bottom)left to (top)right isometrically, of the attached cell
26)Crosses Vertical line... triggers when the house specified crosses a line going (top)left to (bottom) right isometrically, of the attached cell
27) Global is set... used for mission maps regarding a set of variables which are carried over between maps
28 ) Global is clear... used for mission maps regarding a set of variables which are carried over between maps
29)Destroyed by anything[not infiltrate] fires when the object is rekt, but not if that object infiltrates a building and is therefore deleted
30)Low Power... triggers when the house of the trigger becomes low on power
31)Bridge destroyed apparently attached to a bridge registering when bridge is destroyed (maby redundant)
32)Building exists... fires when the building type is owned by the house of the trigger
33) Selected by player fires when the attached object is literally selected by a player
34)Comes near waypoint triggers when the attached object approaches the vicinity of listed waypoint
35) Enemy in Spotlight... redundant event (TS relic)
36) Local is set... when the local is "set" this event is registered as met
37) Local is clear... when the local is "clear" this event is registered as met
38 ) First damaged (combat only) fires when the attached object is attacked or damaged in combat
39) Half health (combat only) triggers when the attached object is damaged to 1/2 health from combat
40) Quarter health (combat only) triggers when the attached object is damaged to 1/4 health from combat
41) First damaged (any sources) triggers when the attached object takes any damage
42) Half health (any source) triggers when the attached object is at half health
43) Quarter health (any source) triggers when the attached object is at 1/4 health
44) Attacked by (house) triggers when the attached object is attacked by the listed house
45) Ambient light <= triggers when ambient light falls to a certain level
46) Ambient light >= triggers when ambient light rises to a certain level
47) Elapsed Scenario Time... Triggers when the time has elapsed, starting at the "start of a scenario" (possibly redundant)
48 ) Destroyed by anything triggers when the attached object has been rekted
49) Pickup Crate fires when the attached object picks up a crate
50) Pickup Crate (any) fires when a crate has been picked up
51) Random delay... fires between 50 and 150% of set time
52) Credits below... fires when the house of the trigger has less than a set amount of credits
53) Spy entering as house... triggers when a spy disguised as the set house enters a cell (not an attached building)
54) Spy entering as Infantry... triggers when a spy disguised as the set infantrytype enters a cell (not an attached building)
55) Destroyed Units Naval... triggers when all Naval=yes units of the set house are destroyed
56) Destroyed Units Land... triggers when all land units (presumably Naval=no) of a set house are destroyed
57) Building does not exist triggers when no buildings of the set type are owned by the house of the trigger
58 ) Power Full... triggers when the house listed has full power
59) Entered of Overflown by... triggers when the set house moves over a cell, including aircraft units
60) TechType exists... triggers if there are a certain amount of the infantry, unit, or buildingtype listed, on the whole map
Spoiler (click here to read it):
the number entry on this does work, but if it is a unit, the techtype counts as 'existing' not the moment that it
enters the map, but rather the moment that the unit's cameo is clicked
61)Techtype Does not exist... triggers when there are not a certain amount of infantry, units, or buildingtypes listed on the whole map
Actions
trigger actions take place when the condition(s) of the trigger are met. multiple actions fire in order on consecutive frames.
1) Winner is... causes the house specified to be considered the winner, followed by game end
2)Loser is... causes the house specified to be considered the loser, followed by game end
3)Production begins... production is considered on for the specified house, the AI has a green light to consider making units
4) Create team... creates (tries to recruit) specified teamtype, by the house of the TEAM, NOT THE TRIGGER. (works in skirmish)
5) Destroy team... kicks units out of the specified teamtype, making those units recruitable
6) All to hunt... forces all units of the house specified, including garrisoned units, to execute the hunt script
7) Reinforcement (team) creates a reinforcement team (typically cargoplane=yes teams with designated team waypoints)
8 ) Drop Zone Flare (waypoint)... as far as i know this is redundant since before TS
9) Fire sale... causes the house specified to sell all buildings
10) Play movie... presumably obsolete from TS, plays a full screen movie. the movie is listed manually as a number from an internal table (index needed)
11) Text Trigger.... displays a pre-set text from ra2's CSF file
12) Destroy trigger... wipes the trigger from any units or buildings from which it is attached
13) Autocreate begins... as far as i know, autocreate is redundant since TS
14) Change house... causes the attached object to change house to that specified
15) Allow win likely redundant. if not redundant, obsolete to local variables
16) Reveal all map reveals the whole map to the player. in multiplayer games this is known to cause disconnect errors
17) Reveal around waypoint... causes a section of map around waypoint to be unshrouded. as per rules.ini
Spoiler (click here to read it):
Code:
[General]
RevealTriggerRadius=9 ; the sight range of a "reveal around waypoint" trigger, 10 is maximum
18 ) Reveal zone of waypoint.... a redundant trigger
19) Play sound effect... plays the sound effect specified from the internal [SoundList] of sound(md).ini
20) Play music theme... plays the song specified from the theme(md).ini list
21) Play speech... plays a speech from the eva(md).ini [DialogList] index
22) Force trigger... forces the specified trigger to fire, ignoring its events
23) Timer start starts the countdown on the map's timer
24) Timer stop stops the countdown on the maps timer
25) Timer extend extends the countdown on the maps timer by an amount specified
26) Timer shorten shortens the countdown on the maps timer by an amount specified
27) Timer set... sets the maps countdown timers initial time
28 ) Global set... sets a defined global variable, a local variable that carries over between maps
29) Global clear... clears a defined global variable, a local variable that carries over betwen maps
30) Auto base building... redundant since before TS
31) Grow shroud one step supposedly causes the shroud to creep in one cell, unsure if this is redundant
32) Destroy attached building this simply blows up anything the trigger is attached to, including bridges
33) Add 1-time special weapon... adds a single use of the superweapon from rules.ini's [SuperWeaponTypes] table
34) Add repeating special weapon.. adds a superweapon from rules.ini's [SuperWeaponTypes] table
35) Preferred target... supposedly sets the 'preferred superweapon target' unsure if this is redundant in ra2, or obsolete to action 135. (or what list it reads from)
36) All change house... all objects of the triggers' house will change to the house specified
37) Make ally... the house of the trigger will consider the house specified as an ally
38 ) Make enemy... the house of the trigger will consider the house specified as an enemy, overriding AIHateDelays= under [General] in rules.ini
39) Change zoom level... zooms in the camera. this works in ra2 and ts, but causes problems with the GUI
40) Resize player view... changes the players visible area to the 4 values specified, see "Map" above
41) Plays the specified animation from the [Animations] index in rules.ini
Spoiler (click here to read it):
the appended anims list for yr accorting to modenc
42) Do explosion at... creates an explosion from the warhead of the specified weapon, which is input as a number, ignoring all projectile stuff. weapontype index below
43) creates a voxel anim at a specified waypoint. the trigger action works but needs to be set with .ini editing as the action is hidden in vanilla fa2
44) was used in ts to play ion storms for set durations and is redundant, if not, would need to be configured via INI editing
45) was the stop action for ion storms in tiberian sun
46) Lock input locks the player input completely
47) Unlock input undoes action 46 and unlocks the input
48 ) moves the camera to the specified waypoint at the specified speed (lower is faster (?) )
49) Zoom in zooms the tactical minimap in, likely used in conjunction with action 40
50) Zoom out undoes action 49 and zooms the player minimap back out
51) Reshroud map reshrouds the entire map, this is reported to cause disconnects in multiplayer
52) redundant trigger action (was related to spotlights in tiberian sun)
53) Enable trigger... enables triggers which have been disabled via either action 54, or marked as disabled in "trigger options"
54) Disable trigger... disables a trigger so that it may not fire even if its conditions are met, except if enabled again
55) Create radar event this creates a radar event at specified waypoint. the event index is found in rulesmd and is input as a number
Spoiler (click here to read it):
Code:
; Controls for radar events
; The events, in order, are:
; (1) Generic Combat Event,
; (2) Generic Noncombat Event,
; (3) Dropzone Event,
; (4) Base Under Attack Event,
; (5) Harvester Under Attack Event,
; (6) Enemy Object Sensed Event
56) Local set.... marks the defined local variable as "Set", to be read as a trigger action
57) Local clear... marks the defined local variable as "Clear" to be read as a trigger action
58 ) Meteor Shower at... supposedly fires a meteor of a certain type at a defined waypoint, is obsolete since ts to action 41
59) Reduce tiberium (ore) does nothing more than reduce the "tiberium" at a set waypoint by one step. if not redundant, needs to be input via INI editing
60) Sell building sells any buildings attached to this trigger
61) Turn off building a function from ts that works in RA2, this powers down any attached buildings taking them from the power grid
62) Turn on building a function from ts that works in RA2, this powers up any powered down buildings adding them to the power grid
63) Apply 100 damage at... this trigger simply causes 100 [HE] warhead damage at the waypoint specified
64) Light flash (small) at... redundant trigger
65) Light flash (medium) at... redundant trigger
66) Light flash (large) at... redundant trigger
67) Announce win tells the player he is victorious
68 ) Announce lose tells the player he sucks
69) Force end forces the end of scenario, typically after Announce win or lose
70) Destroy tag... deletes the specified tag and by extension triggers, presumably this reads the number entries under [Tags] in the map INI
71) Set ambient step... sets the amount of steps that the fading will take place in
72) Set ambient rate... sets the rate at which ambient light will fade
73) Set ambient light... sets the target ambient light value to a certain level
74) AI triggers begin... AI triggers for the house specified are now eligible to be fired (this is automatic in skirmish)
75) AI Triggers stop... AI triggers for the house specified are now all unable to be fired
76) Ratio of AI trigger teams... supposedly sets the ratio of teams which are made for AI triggers, since all teams are trigger teams, im convinced this is obsolete / redundant
77) Ratio of team aircraft... supposedly sets ratio of teams made for AI triggers, regarding aircraft only
78 ) Ratio of team infantry.. supposedly sets the ratio of teams made for AI triggers, regarding infantry only
79) Ratio of team units... supposedly sets the ratio of teams made for AI triggers, regarding vehicles only
80) Reinforcement (team) [at waypoint] the team specified will be magically spawned at the waypoint specified, ignoring the teams waypoint
81) Wakeup self any units attached to this trigger will leave sleep or harmless mode and enter guard mode
82) Wakeup all sleepers all units on the map set to sleep mode will enter guard mode
83) Wakeup all harmless all units on the map set to harmless mode will enter guard mode
84) Wakeup group all units with the specified group number will leave sleep or harmless mode and enter guard mode
85) Vein growth... redundant even in tiberian sun
86) Tiberium growth... controls whether tiberium growth is on or off
87) Ice growth... redundant trigger action
88 ) Particle anim at... plays the specified particle anim at the specified waypoint. not that this action mistakenly reads the [Particles] list and not [ParticleSystems] list
this action CAN be made to work, but is bugged by default. in FA2 the trigger action reads "waypoint" as "particlesystem#" an easy
trick to make this work is to put the particle system and waypoint you want removed into action 88, then switch to action 89 in the editor
90) Lightning strike at... does a single lightning strike at specified waypoint.
Spoiler (click here to read it):
in tiberian sun, lightning strike at waypoint 0 was the "turn off eva" map hack
in red alert 2, waypoints above 100 need to be manually entered as the two-letter representation of waypoints on the final
entry of the 'actions' section in the ini editor, otherwise waypoints above 100 will fire at waypoint 0
91) Go berzerk Redundant trigger action
92) Activate firestorm... used in TS to activate the specified houses firestorm, redundant in RA2
93) Deactivate firestorm... used in TS to deactivate the specified houses firestorm
94) Ion cannon strike... used in TS to fire an ion cannon at the specified waypoint, DOES works in RA2, but the ion cannon beam palette is wrong
95) Nuke strike... fires a nuclear missile at the waypoint specified
96) Chem missile strike... Redundant. using this action causes an internal error
97) Toggle train cargo suposedly changes the "Crate for destroyed trucks" on and off
98 ) Play sound effect (Random) plays a selected sound effect at a random waypoint on the map
99) Play sound effect at... plays a selected sound effect at a selected waypoint
100) Play ingame movie... plays an ingame movie over the radar (index needed)
101) Reshroud map at... shrouds an area around the set waypoint
102) Lightning storm strike... causes a lightning storm credited to the owner of the trigger to be played at a set waypoint
103) Timer text... plays a text string from the string table along with the map timer
104) Flash team... makes the team specified flash for a set number of frames. this action needs to be input into INI manually to work
Spoiler (click here to read it):
Code:
[Actions]
01000000=1,104,5,(the teams internal ID),0,0,0,0,(the number of frames)
105) Talk bubble... a redundant feature from TS
106) Set tech level (Techno) [Level]... sets a specified technology to a specified TechLevel= value
107) Reinforcement by chrono... causes the set teamtype to chrono spawn to a set waypoint
108 ) Create crate... creates the specified crate type at the specified waypoint
Spoiler (click here to read it):
The crate type index is as follows:
Code:
0: money (SoloCrateMoney=5000 by default)
1: vehicle crate
2: health crate
3: cloak
4: explodes
5: napalm
6: money
7: map shroud
8: map reveal
9: armour
10: speed
11: firepower
12: nuke
14: veterancy
16: gas (but the gas is not configured right and appears as off-palate weather storm clouds)
17: tiberium
19: random
109) Iron curtain at... fires an iron curtain at the set waypoint
110) Pause game for (seconds)... pauses the game for a specified time
111) Evict occupiers kicks infantry out of the attached garrisonable structures
112) Center (Jump) camera to waypoint.... moves the camera to the set waypoint instantly
113) Make side cheer makes the specified house's infantry cheer
114) Set tab to (0-3) forces the sidebar tab to display a certain set
115) Flash Cameo flashes a set techtypes cameo for a set amount of frames (techtype entry takes techtypes techtypes INI key)
116) Stop sounds at... stops sounds playing at a set waypoint (via action 99)
117) Play ingame movie (pause game) pauses game, locks input, and plays a specified ingame movie (index needed)
118 ) Clear all smudges deletes all smudges from the map
119) Destroy all of... destroys all objects owned by the house specified
120) Destroy all buildings of... destroys all structures owned by the house specified
121) Destroy all land units of... destroys all land units owned by the house specified
122) Destroy all naval units of... destroys all naval units owned by the house specified
123) Mind control base of... all buildings owned by the house specified will change house to the owner of the trigger
124) Restore mind controlled base to... undoes trigger action 123 and restores "mind controlled" buildings
125) Create building at... the owner of the trigger gains the building specified at the waypoint specified (the building is specified by the ini tag)
126) Restore starting technos of... spawns a copy of all units and buildings the house specified had at map start, reguardless of if they still exist or not
127) Crono screen effect for... does the chrono screen effect for the specified amount of time
128 ) Teleport all to... teleports all of the owning triggers house's units to the waypoint specified
129) Set superweapon charge sets the house of the triggers specified super weapons charge to the percent specified
130) Restore starting buildings of... restores all the buildings specified house had at map start, or repairs them
131) Flash buildings of type... all buildings of the specified type belonging to the triggers house will flash for a specified time
132) Superweapon set recharge time sets the charge time of a superweapon
133) Superweapon reset charge time undoes the superweapon set recharge time action
134) Superweapon reset resets the specified superweapons charge percent
135) Preffered target cell set sets a specific waypoint for the AI to consider for super weapon targeting
136) Preffered target cell clear undoes action 135 and sets super weapon targeting to default
137) Center base cell set the trigger owner will consider its base to be the specified waypoint
138 ) Center base cell clear undoes action 137 and the ai calculates its own base center (typically happens when an mcv deploys)
139) Blackout radar the trigger owners radar will be disable for the specified amount of time
140) Defensive target cell set the owner of this triggers AI will consider the specified waypoint for force shield targeting
141) Defensive target cell clear the owner of this triggers AI will go back to targeting force shields normally
142) Retint red like a lightpost, applies a positive or negative integer "tint" of red to the whole maps lighting
143) Retint green like a lightpost, applies a positive or negative integer "tint" of green to the whole maps lighting
144) Reting blue like a lightpost, applies a positive or negative integer "tint" of blue ot the whole maps lighting
Spoiler (click here to read it):
A note on trigger action 142, 143, and 144: if the "tint" is applied, and the map is then restarted, the
map will start with the tint pre-applied, and the effect will stack next time the tint is applied
145) Jump camera home will jump the camera to what it considers "home" (typically conyard or mcv, base)
Tags
for every trigger a tag is created, the tag is what is attached to buildings or cells.
Name: tags automatically take the name of their corresponding triggers
Repeat: tags automatically take the repeat status of their corresponding triggers
Trigger: lists the corresponding trigger
in the event that you want two triggers to fire on one object through one tag, the second trigger is input into the "Trigger options" Attached trigger entry, and
the tag corresponding to the second trigger should be deleted. be sure the trigger/tag "type" is set accordingly, if you want both triggers to fire through one tag
Scripts
scripts are a set of directions which are followed by teams
0) Attack... the team will pick a target
Spoiler (click here to read it):
0 null
1 not specified (anything)
2 buildings
3 harvesters
4 infantry
5 vehicles
6 factories
7 base defenses
8 base threats (possibly obsolete)
9 power plants
10 occupiable structures
11 buildings with NeedsEngineer=yes
1) Attack waypoint... will blindly attack waypoint. infiltrators, c4, spy, and engineer will attempt to engage buildings at set waypoint
2) Go berzerk... a redundant script action from TS
3) Move to waypoint... will move straight to the specified waypoint, without scanning for enemies
4) Move to cell... apparently this was supposed to make units move to celltags associated with certain triggers. i couldnt replicate it
5) Guard area (timer ticks)... will do a simple 'guard' action, for specified amount of time
6) Jump to line #... will jump to the script line number (minus 1)
7) Player wins... triggers victory for the player
8 ) Unload... the team unloads, and splits teams
Spoiler (click here to read it):
0 keep transports and units
1 keep transports, yeet units
2 yeet transports, keep units
3 yeet both transports and units
9) Deploy... causes the team to attempt to deploy
10) Follow friendlies... causes the team to follow the nearest friendly unit
11) Do this... makes the team do an indefinate specified action
Spoiler (click here to read it):
0 enter sleep mode
1 attack nearest enemy
4 run off the map
5 enter guard mode
6 enter sticky mode
11 area guard
13 stop
15 hunt (blindly attack whatever)
23 enter harmless
12) Set global... sets the global variable specified
13) Idle anim... causes infantry to play their idle anim
14) Load onto transport... all units will attempt to load onto "the" transport in the team
15) Spy on structure at waypoint... spies will attempt to enter the building at the specified waypoint. fairly redundant
16) Patrol to waypoint... the team will move to the specified waypoint, actively angaging any threats on the way
17) Change script... team changes to the specified script (uses the number index in the [ScriptTypes] map ini section)
18 Change team... team changes teams. (uses the number index in the [TeamTypes] mapside ini section)
19) Panic... causes civilian units to panic for a time, non panickers will go to prone
20) Change house... the team will change to the house specified
21) Scatter... the team will do a scatter
22) Move to shroud... as far as i know, this script action is redundant.
23) Force player loss... triggers a loss condition for the owner of the team
24) Play speech... plays a specified speech entry from EVA.ini's [DialogList] table
25) Play sound... plays a specified sound from sounds.ini's [SoundList] table
26) Play movie... plays a specified movie from art.ini's [Movies] list
27) Play theme... plays a specified theme from Theme.ini's [Themes] list
28 )Reduce ore... reduces ore that is on the same cell as the team (related to ore miners)
29) Begin production... triggers the teams owning house to "begin production" like trigger action 3
30) Force sale... causes the teams house to to the "Fire sale" trigger action
31) Suicide... causes the teamtype to self destruct
32) Start storm in... this action will make a brief weather storm manifest at a random spot on the map. it is a remnant of TS ion storm logic
33) End storm... theoretically ends initiated ion storms, but is rather redundant
34) Center map on team... centers the player view on the specified team. 0 in the speed parameter is instant centering
35) Shroud map for time interval... simply reshrouds the map, the time interval part is ignored
36) Reveal map for time interval... reveals the whole map, the time interval part is ignored
37) Delete team members... all members of the team are deleted then this action executes
38 )Clear global variable... clears the specified global variable
39) Set local variable... sets the specified local variable, (to be read as a trigger event)
40) Clear local variable... clears the specified local variable (to be read as a trigger event)
41) Unpanic... causes the team memeber to stop panicking
42) Force facing... causes the team units to face a specified direction.
Spoiler (click here to read it):
the facing options are as follows
0 northeast
1 east
2 southeast
3 south
4 southwest
5 west
6 northwest
7 north
43) Wait until fully loaded... i am convinced this action is redundant
44) Unload truck... makes any [TRUCKB] in the team change image to [TRUCKA]'s Image= entry
45) Load truck... makes and [TRUCKA] in the team change image to [TRUCKB]'s Image= entry
46) Attack enemy building... makes the team attempt to attack the specified building from rules.ini's [BuildingTypes] list
Spoiler (click here to read it):
the appended yr buildingtypes list according to modenc
47) Moveto enemy building... makes the team attempt to move to the specified building from rules.ini's [BuildingTypes] list
48 )Scout... this action makes the team attempt to visit any base structure owned by each house on the map.
49) Success... makes the team persist with the previous action until completion. also affects AI trigger weighting
50) Flash... causes the team to flash for the specified amount of time
51) Play anim... causes the team to play the specified anim from rules.ini's [Animations] list
52) Display talk bubble... plays the talk bubble anim over one unit in the team. this still works in RA2
Spoiler (click here to read it):
0 (nothing)
1 (*)
2 (?)
3 (!)
53) Gather at enemy... causes the team to move to a safe distance outside of an enemy base
Spoiler (click here to read it):
the amount of distance the ai considers safe can be adjusted in the .ini
Code:
[General]
AISafeDistance=20 ;gs cell distance the AI will consider in Gathering outside enemy base (from center of enemy base)
54) Gather at base... causes the team to gather at its own base
55) Iron curtain me... causes the AI to consider iron curtaining this taskforce
56) Chrono prep for ABwP... causes the AI to teleport the team to buildingtype listed from the [BuildingTypes] number index in rules.ini
57) Crono prep for AQ... causes the AI to teleport the team to target based off of the number index from "Attack..."
58 ) Move to own building... causes the teamtype to move to the building type listed from the [BuildingTypes] number index in rules.ini
Spoiler (click here to read it):
there are 6 more YR-only scripts that can be used, but to use them you have to go into the fa2 .ini editor and put the data in manually.
switching to the script viewer and looking at manually written scripts will reset them to something else and they wont work; on the line that represents
the script action in the ini editor use the following code for effect:
Code:
59,(waypoint number) ~ attack structure at waypoint irrelevant of owner
60,0 ~ enter the nearest allied building with 'Grinding=yes'
61,0 ~ enter the nearest allied building with 'Bunker=yes' (tank bunker)
62,0 ~ enter the nearest allied building with 'InfantryAbsorb=yes' (bio reactor)
63,0 ~ enter the nearest owned building with 'CanOccupyFire=yes'
64,0 ~ enter the nearest neutral building with 'CanOccupyFire=yes'
Taskforces
taskforces are simply a specified number of a specified type(s) of units, for use in teamtypes.
Name: the name of the taskforce, indicated in teamtypes
Group: as far as i know, this is redundant
Number of units: the specified number of the specified unit type
Unit type: the kind of unit, by ini key. needs to be typed in backwards for some reason.
Teams
teams are the combination of scripts and taskforces with additional parameters, for use in various trigger actions, and also in AI Triggers. depending on what the team
was made for, some entries will be ignored.
Name: the name of the team, listed in triggers and ai triggers
Veteran level: the veteran level the team will spawn with. (ignored in AI trigger teams)
House: the specified house the team shall spawn with (ignored in AI trigger teams)
Techlevel: what techlevel the team will be considered as
Mind control decision: what the team will do if mind controlled
Waypoint: this is used ONLY in conjunction with "cargo plane" teams (cargoplane teams only)
Script: the script the team will carry out, upon being made or recruited
Taskforce: the units which compose the team.
Tag: this attaches a trigger tag to the unit, just like preplaced units.
Transport waypoint: used ONLY to set the spawn point of a cargo plane, if any (cargoplane teams only)
Group: the group number, which can be used for specific recruiting
Max: the max amount of this team that the AI will build at once (used only in AI trigger teams)
Spoiler (click here to read it):
very important part of AI scripting.
in campaign map AI's, all houses on the map will have a COMBINED max= for the team, but for skirmish
maps, max= applies to each computer seperately
Priority: used in recruiting, teams with higher priorities can recruit teams of lower priorities and not vice verca
Spoiler (click here to read it):
also very important for AI scripting, this lets you create dynamic recruitment heirarchies for your AI. for example, a basedefence=yes pool team with reinforce=yes will constantly
replenish its units, giving it low priority= and areteammembersrecruitable=yes and having other teams take units from it makes a clever AI.
i also want to mention the INI tags:
Code:
[General]
SuspendDelay=2 ; minutes that suspended teams will remain suspended
SuspendPriority=1 ; teams with less than this priority will suspend during base defense ops
changing suspend priority to 2 and giving your pool teams priority=1 will add an extra layer of sophistication to your AI's defensive teams
Loadable: causes players to be able to load units in this (for example, a civ transport)
Full: the unit will spawn as full, if it is a harvester or has ammo (often used with 'ontransonly)
Annoyance: supposedly, this makes the AI reinforce the unit until it runs out of money and cant anymore
Guard slower: literally makes the team respond just a little bit slower to being attacked
Recruiter: this team attempts to steal units from other teams that are both lower Priority=, and have AreTeamMembersRecruitable=yes, to compose its own taskforce
Cargo plane: this is used only in conjunction to "Waypoint" and trigger action 7 "reinforce (team)." the result is a cargo plane dropping the taskforce at the set waypoint.
Whiner: i am convinced this does nothing
Loose recruit: i am convinced this does nothing
Agressive: causes the team to be more aggressive, pausing the script to attack enemies in range.
Suicide: causes the team to execute orders blindly or die trying, without retaliating
Autocreate: this function is obsolete since TS, some very specific effects on recruiting which i wont cover are a side-effect of it.
Prebuild: this is completely unused in ai.ini and is likely redundant
Reinforce: causes the AI to constantly try and refill this teams units
Spoiler (click here to read it):
reinforce has an ambiguous name. this action is best used only on basedefense teams when you want to use them as pool teams. adding this
to, for example a spawned team of 10 conscipts, will make the AI try and re-fill that team with new conscripts if some die. even if the AI is not soviet.
OnTransOnly: if the team is spawned, all units will be spawned inside the teams transport
AvoidThreats: causes the team to try and go around threats, just like the harvesters
AreTeamMembersRecruitable: marks the team as being recruitable; other teams with higher Priority= and Recruiter=yes will rob units from this team to fill its own team
TransportsReturnOnUnload: if the script action "unload" is used to yeet transports and keep units, the transport will move to the previous waypoint automatically upon unload
IsBaseDefense: used in conjunction with AItriggers to register the team as a basedefense
Spoiler (click here to read it):
the game DEMANDS that basedefense teams exist. the AI will always build these teams before any other team, and if there are none, then the
AI will do nothing at all. it is ABSOLUTELY CRITICAL to write several basedefense teams to have a working AI. all teams marked as basedefense should
also have their AI triggers marked as basedefense.
the code dictating this is in rules.ini. look at it now so you know how many you need to make.
Code:
[General]
MinimumAIDefensiveTeams=1,1,1 ; (by difficulty level, from hardest to easiest)
MaximumAIDefensiveTeams=2,2,2 ; " "
UseMinDefenseRule=yes
OnlyTargetHouseEnemy: this is used in specific cases if units attacking neutral house becomes a problem.
AI triggers
AI triggers are the way the AI builds teams, an AI trigger is similar to trigger action 4 and can both create and recruit teams. AI triggers are my favorite
Enabled: this enables/disables the trigger, and the results of ticking this box can be seen in "AI Trigger Enabling"
Type: sets the trigger's condition's type. it is used with the parameters at the bottom of the trigger. "-1 none" will make the AI simply build these whenever able
Name: it just names the AI trigger
House: this sets the houses that can use the trigger. should be left at <all> unless its a special case
Teamtype#1 sets the main teamtype that the trigger will cause to be built
Teamtype#2 sets an optional auxilary team. idk if this works only if max= for the main team is met, or what.
Multi-Side: this sets the side that can build the team, else the AI will build the wrong faction's units. '0 None' means all sides can build this
Base defense: considers this a basedefense team for building purposes. all basedefence teams should have basedefence AI triggers
Available in Skirmish: does what it says and is pretty useless
Easy/Medium/Hard: this is how you make easy, normal, and brutal AI's build appropriate teams
The AI has a cool weighting system that works like a lottery to determine the probability of a team getting built.
Weight: sets the weight of the team at the start of the map. should always be between max and min weight
MinWeight: the lowest amount of weight a team can have
MaxWeight:the most weight a team can have Last edited by McPwny on Tue Oct 17, 2023 5:03 pm; edited 15 times in total QUICK_EDIT
- OreGrows (default no) dictates whether pre-placed ore gains density over time, without an ore mine present.
- OreSpreads (default yes) dictates whether ore spreads to adjacent cells after maximum density reached.
- DestroyableBridges I believe only affects whether Tanya can C4 the whole thing, it has no effect on whether bridges can be damaged by conventional weapons
It's also worth noting FA2YR incorrectly sets the Weather Storm (Ion*) lighting in the map, or at least it is not the normal Westwood map value. Both this and the general map lighting default values can be fixed by editing StdMapRA2.ini
Also as I brought up in the Map Renderer thread, there is something to be explained about changing the map view when making new maps with FA2YR:
Other than that, this seems like a pretty thorough tutorial. I will be sure to read through it when I have the time. The formatting is a little intimidating, but alas you can't do much with the forum software being what it is. _________________
18 ) Reveal zone of waypoint.... a redundant trigger
No it isn't, "zone" applies a reveal to an entire island surrounded by water, up to the water for example. Unlike a reveal for a waypoint which just exposes a 10-wide circle. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum