Hidden Triggers in TRNG
by
AkyV
Page 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
Triggers for the executable combinations:
The basic formulas if you use variables in the combination:
a, the version if you don't use big numbers:
Trigger1. An F232 to put a value (Y) between 0 and 127 into Current Value. Or an F252 to put a value (Y) between -1 and -128 into Current Value.
Trigger2. An F278 to force Current Value value into the chosen field.
b, the version if you use big numbers:
Trigger1. An F263 to put a value (Y) between -65536 and 65535 into Current Value.
Trigger2. An F278 to force Current Value value into the chosen field.
The basic formulas if you don't use variables in the combination - only if you don't use big numbers:
Trigger1. An F279 to put a value (Y) between 0 and 127 into the chosen field. Or an F342 to put a value (Y) between -1 and -128 into the chosen field.
Changing the basic formula:
a, Only with variables - if the number you want to force is above 65535: see Chapter I-21.
b, If you want to accomplish something special with the formula: see Chapter 8.
Triggers for the condition combinations:
The basic formulas:
a, the version if you don't use big numbers:
Trigger1. An F277 to put the value of the chosen memory zone field into Current Value.
Trigger2. A C43 trigger to study Current Value value if that is equal with a chosen number (A) between 0 and 31.
b, the version if you use big numbers:
Trigger1. An F277 to put the value of the chosen memory zone field into Current Value.
Trigger2. A C40 trigger to study Current Value value if that is equal with a chosen number (A) between 0 and 65535.
Changing the basic formula:
a, For smaller/bigger condition relations (if I say that or - if you're studying a sequence - any time):
- if you don't use big numbers:
= replace C43 trigger by C42 trigger to study Current Value value if that is smaller than a chosen number between 0 and 31, or
= replace C43 trigger by C41 trigger to study Current Value value if that is bigger than/equal with a chosen number between 0 and 31..
- if you use big numbers:
= replace C40 trigger by C39 trigger to study Current Value value if that is smaller than a chosen number between 0 and 65535, or
= replace C40 trigger by C38 trigger to study Current Value value if that is bigger than/equal with a chosen number between 0 and 65535.
b, If you're studying a sequence, and the condition need a tolerance: see Chapter I-18.
c, If the subject may have negative value in the examined property: see Chapter I-19. (I will always tell when it is needed.)
d, If the number you want to study is above 65535: see Chapter I-22.
e, If you want to accomplish something special with the formula: see Chapter 8.
3.1. The name of the field:
Audio Track Number on Channel 1 (only for read) (Short)
Condition combination:
If the last audio on Channel1 is (A)
A:
'equal' from 0 to 255: audio file ID (from audio folder)
- this audio is just playing, or
- this audio was the latest audio on the channel, but it has already stopped by itself because it's ended
'smaller' 0:
- no audio played on the channel yet in the actual level, or
- the latest audio on the channel has been stopped by a flipeffect trigger
Type: simple.
Notes:
Don't use this condition with the old sound system.
3.2. The name of the field:
Audio Track Number on Channel 2 (only for read) (Short)
Condition combination:
If the last audio on Channel2 is (A)
This combination works in similar way as I said in Chapter 3.1.
3.3. The name of the field:
Camera Mode Next (0='follow me', 1='fixed', 2='look'; 3 ='combat') (Long)
Executable combination:
Force (Y) camera type
Y:
2:
- the look camera will work when you should see the chase camera, and
- if you use the look keys+arrows to look around, then the camera will keep the last position when releasing the keys, and
- if a standalone TARGET draws Lara's look then this camera position will be kept after leaving the trigger for the TARGET, and
- you can't activate triggers for Cameras (but you can for Fixed Cameras*)
3:
- the combat camera will work when you should see the chase camera, and
- you can't activate triggers for Cameras (but you can for Fixed Cameras*)
*: don't activate a Fixed Camera in a new, TRNG way (i.e. by an Action trigger exported into a TriggerGroup) if you force this value.
Type: continuous. When stopping it: the forced effect will be lost.
Notes:
- Don't use this field if a flyby camera sequence is just working.
- Don't activate a standby TRNG camera effect if you use this combination.
3.4. The name of the field:
Camera Mode Now (0='follow me', 1='fixed', 2='look'; 3 ='combat') (Long)
Condition combination:
If the actual camera type is (A)
A:
'equal'
0: chase camera
1: Camera or Fixed Camera
2: look camera or standalone TARGET
3: combat camera
Type: simple.
Note:
TRNG camera effects will use the same values:
- standby effect uses the chase camera so standby effect uses the value of the chase camera, i.e. 0.
- other TRNG camera effects will use Cameras or Fixed Cameras, so their value is 1.
3.5. The name of the field:
Current Level number (more updated than savegame memory) (Byte)
Executable combination:
Make small scorpions (Y) poisonous/non-poisonous
Y:
1 - non-poisonous
4 - poisonous
Force: single.
Attention! In this field we fiddled with level ID's, after all.
So, if you used this formula then you everyway need to use another formula like that - before you leave this level. The Y value in this new formula is the ID of the level. (The ID of the level is the number the FINISH trigger uses on another level when loads Lara to the present level.)
3.6. The name of the field:
Dash Bar Value (0 - 120) (Short)
Executable combination (1):
Adjust Lara's dash power to (Y)
Y: from 0 to 120 (120 is 100%)
Force: single.
Note:
- If you use the combination when Lara is not dashing, then the dash bar will appear on the screen with the required value, starts increasing, and disappear off the screen when reaching 100 %. (So probably you should place some condition triggers before F232 in the combination. For example 'if Lara's State ID is 73 or if Lara's State ID is 74' - because those State ID's are for the dash.)
- This field also works with motorbike, after using nitro. But it doesn't work with boats, because the boats have dash function - but without the dash bar.
Executable combination (2):
Adjust infinite dash power to Lara
Y: 120
Force: continuous. When stopping it: the power/bar will start working as usual.
Note:
This time there is no dash bar when Lara is dashing. (Anyway, the dash bar is unnecessary if the power is constant, right?) - That's why feel free to use combination now if Lara is not dashing, because the unnecessary dash bar won't be placed on the screen now.
I.e. the only thing that happens if you activate this condition any time is Lara will be able to dash any time when she wants, without a dash bar.
Condition combination:
If Lara's dash power is (A)
A: from 0 to 120 (120 is 100%)
Type: sequence.
3.7. The name of the field:
Earthquake vertical movement (negative values) (Long)
See more about earthquakes in Chapter 1.53.
Executable combination (1):
Perform an earthquake with (Y) intensity (without any usual quake tool)
Y: positive numbers
Force: single.
Notes:
- If you activate the combination then an earthquake starts at once with Y intensity. The intensity starts decreasing at once, till reaching 0 - when the quake stops. (I recommend forcing a value which can be divided by 5.)
- You need an F284 between the two original triggers of the formula to turn the sign in Current Value variable. (Because the original intensity value is negative in this field, but we can't handle to force it with big numbers now, so we'll use the positive version of the value, and then we'll invert the sign.)
- 'Without any usual quake tool' means you don't need to activate any well-known quake (quake object, OldFlip flipeffect etc.) for this quake.
Executable combination (2):
Perform a continuous earthquake with (Y) intensity (without any usual quake tool)
Y: positive numbers
Force: continuous. When stopping it: the quake will start acting exactly in the same way as if you have just activated an Executable formula (1).
See notes just above.
Condition combination:
If (non-object) earthquake has (A) intensity
A: positive values (can be divided by 5) (or 0 for 'no quakes' condition) (So you need to study the positive versions if the value is negative!)
Type: sequence.
These are the original intensity values of the non-object earthquakes:
- A quick, single quake with F1 trigger: it jumps to -60 when Lara steps on the trigger square. It starts decreasing immediately by five: -55, -50, -5, 0.
- A continuous quake with F7 trigger while Lara is on the trigger square: it jumps to a constant -145 while Lara is on the trigger square. If Lara leaves the square then it starts decreasing by five: -140, -135, -5, 0.
- F7 activated not (directly) by Lara (i.e. by switch, Heavy etc.): it uses the same -145, -140, -135, -5, 0 sequence as above. But this time the quake will be quick, without a pause at -145 intensity.
- 'Soft earthquake' animcommand: it works the similar way as F1 quake does. But the sequence could be a bit improper, for example: -56, -51, -4, 1, 0 or -53, -48, -3, 2, 0. (Be careful - if you use F1 just after a soft quake animcommand, that probably makes the F1 sequence also improper temporarily.)
- 'Heavy earthquake' animcommand: it works the same way as the 'F7 activated not (directly) by Lara' case.
- Rumbling RAISING_BLOCK (with OCB=1): this sequence: 27, 11, 27, 22, 17, 12, 7, 2, -3, 0.
- SQUISHY_BLOCK2: this sequence when rumbling: 41, 40, 39, 13, 12, 7, 2, -3, 0 and this one when hitting the floor: 91, 86, 81,11, 6, 1, -4, 0.
Be very careful - sometimes the signs will be inverted by themselves! So eg. maybe a heavy earthquake will run in a 145, 140, 135, 5, 0 sequence, not in a -145, -140, -135, -5, 0 one. (So test carefully your earthquakes under the actual settings of the level!)
Notes:
- F284 (between the two original triggers of the formula) will invert the sign in Current Value if the value is negative.
(I.e. In this field we won't use Negative/Positive/Null formula, because now we just turn the sign.)
- If a sequence can have two signs - just as now - then we won't study the unimportant part in this tutorial. Eg. at 'soft earthquakes' the 'unimportant part' is the positive one: 2. So we'll study only the negative part, changing the sign.
- Use this combination only if a non-object earthquake is working. (Or the earthquakes of the executable combinations above.)
- Never place an Earthquake object in the level if you want to use F7 trigger or 'heavy earthquake' animcommand!
3.8. The name of the field:
Frame 3d Counter. (It works in game and inventory but not in pause) (Long)
Executable combination:
Change 'time taken' in Statistics to (Y) frames
Y: from 0 to any frames
Force: single.
Notes:
- This field counts the active game time, i.e. when the gameplay isn't interrupted by open menus - except: the open inventory time is also included in the timer now. (But the open F5, F6, Pause menus are not.)
- Sometimes it is worth forcing a value here. For example, if you start a new level then you force 0 here so the number of the passed time will be counted from 0 (as if the counter worked on only the actual level and not the whole game).
Condition combination:
If 'time taken' in Statistics is (A) frames
A: from 0 to any frames
Type: sequence.
3.9. The name of the field:
Frame System Counter. (Works always, in game, inventory and pause screens) (Long)
This field work the same way as Chapter 3.8.
Except:
This field counts all the game time, i.e. included when any menu (inventory, F5, F6, Pause) is open.
Executable combination:
Adjust all the game time to (Y) frames
Condition combination:
If all the game time is (A) frames
3.10. The name of the field:
Inventory Item just chosen from inventory (example a key to open a door) (Long)
Executable combination:
Remove the unnecessary 'no' sound of Lara
Y: -1
Force: single.
The purpose of this field is troubleshooting. To understand that, I quoted some short (and edited) part of TRNG 1.2.1.9. readme file:
"Inventory. The item selected from inventory is <#>Item" condition is interesting when you wish to create a custom interactive item, where it's necessary to use some inventory item to engage it. It works like the keys for the doors, the combo items with some hole combos, or the crowbar for some wooden doors.
Remark: when you manage the correct selected item remember to perform also this field: 'Inventory Item just chosen from inventory (example a key to open a door) (Long)', with -1 value.
The reason is that otherwise you'll hear the "NO" sound sample after using this inventory item.
3.11. The name of the field:
KeyBoard Game Command hit (Use bit operations with KEY1_ constants) (Long)
Condition combination:
If the player (A) does/does not hit any key command
A:
'equal'
0: the player just doesn't hit a key command
0, with TGROUP_NOT flag in the condition trigger: the player just hits a key command
Type: simple.
Notes:
-'Key commands' are the original keys of TR4 - see them in Options menu as 'control configuration'.
This field also works if you customized them for another key in Options menu.
But this field doesn't work if you attach a new, TRNG feature to a key.
- See F53 trigger if you want to simulate a key command. Or see C13 (or maybe C12) trigger for a condition of a single key.
3.12. The name of the field:
Music volume (max = 100) (Long)
Executable combination:
Adjust music volume in Options menu to (Y) percents
Y: from 0 to 100%
Force: single.
Note:
You can force a preset audio volume for your game, with SoundSettings Script command.
Condition combination:
If music volume in Options menu is (A) percents
A: from 0 to 100%
Type: sequence.
3.13. The name of the field:
Script Dat. Level Flags (Use bit operation to read or change) (Short)
Executable combination:
Change level property to (Y)
Y:
+1: YoungLara
+2: Weather
+4: Horizon
+8: Layer1
+16: Layer2
+32: StarField
+64: Lightning
+128: Train
+256: Pulse
+512: ColAddHorizon
+1024: ResetHUB
+2048: LensFlare
+4096: Timer
+8192: Mirror
+16384: RemoveAmulet
+32768: NoLevel
Force: single.
If you want to know what Y values are, then see NG Center\Reference\Script old commands.
So these values are flags for old Script commands:
- If a command like that is present in a level with numeric values (see eg. Layer1= 160, 160, 192, 7) or ENABLED values (see eg. Horizon= ENABLED) then that command will have a value in this field.
- But if a command like that is not present in a level or is present but with DISABLED value (or is disabled with a semicolon) (see eg. Horizon= DISABLED) that command won't have a value in this field.
'+' sign means these values will be added to each other. So, for example, if only that 'Horizon=ENABLED' and 'Layer1= 160, 160, 192, 7' and 'LensFlare= 250000, -32000, 110000, 128, 96, 0' have values in this field, then the value of the field is 4+8+2048=2060.
What if eg. you want to switch off sun disk in all the rooms of this level? Then there is a usual but tiresome solution: you create a flipmap with all the rooms where you can see the sun disk. In the flipped rooms of all those rooms you switch on the NL button of Room Editor - then you activate that flipmap.
Or another solution, if you activate this formula, with Value 12. Value 12 means 4+8, i.e. only Horizon+Layer1, so the LensFlare flag has been removed.
Or another nice possibility: you don't have a Train=ENABLED entry in your Script, so this is not a train level - though, there is a train formed here. Lara will get into the train, you force the value of Train flag (+128) in the field - and 'the train will start'.
Notes:
- Unfortunately, you cannot force something to switch on in an easy way if that thing uses numeric values in the Script.
For example: you don't have a LensFlare entry in your Script, so if you make LensFlare enabled in this field, then that will be useless (because the game won't know which numeric values to use). - The problem could be solved, if you place a LensFlare entry in the Script, but remove its value (2048) from the field when the level will start, with a combination, and later, in the required moment (with another combination like that), you will add its value (2048) to the field.
- But please, be careful, because you can't force every flag value, only some of them. (I didn't test all the possibilities - mostly because some old commands seem useless.) And, on the other hand, there are some simpler possibilities sometimes. (See eg. F151 which is able to enable/disable the Lightning flag.)
Condition combination:
If level property is (A)
A: 'equal' see the possible values above.
Type: simple.
Note:
Naturally you should use this condition only if you changed a flag by the executable combination, and if you want to know the change has happened yet or not. (So eg. if you want to know 'if the sun disk has been switched off or not'.)
3.14. The name of the field:
Sound SFX volume (max = 100) (Long)
Executable combination:
Adjust SFX volume in Options menu to (Y) percents
Y: from 0 to 100%
Force: single.
Note:
You can force a preset sound volume for your game, with SoundSettings Script command.
Condition combination:
If SFX volume in Options menu is (A) percents
A: from 0 to 100%
Type: sequence.
3.15. The name of the field:
Speed Layer1 (4th field of Layer1= script command) (Byte)
Condition combination (1):
If the speed of the clouds on layer1 is (A)
A:
0: the clouds are still (or the layer is off)
from 1 (minimum speed) to 127 (maximum speed): when the clouds are drifting northwards (Room Editor facing)
from 128 (maximum speed) to 255 (minimum speed): when the clouds are drifting southwards (Room Editor facing)
Type: sequence.
Note:
An executable combination with this field is possible to change the direction/speed of layer1. But unnecessary. Use F153 trigger instead.
Condition combination (2):
If the direction of the clouds on layer1 is (A)
A:
'equal' 0: the clouds are still (or the layer is off)
'bigger/equal' 1 and 'smaller' 128: the clouds are drifting northwards (Room Editor facing)
'bigger/equal' 128 and 'smaller' 256: the clouds are drifting southwards (Room Editor facing)
Type: simple.
3.16. The name of the field:
Speed Layer2 (4th field of Layer2= script command) (Byte)
Condition combination (1):
If the speed of the clouds on layer2 is (A)
Condition combination (2):
If the direction of the clouds on layer2 is (A)
This combination works in similar way as I said in Chapter 3.15.
Except:
Unless you are using both Layer1 and Layer2 at the same time, the intervals are swapped for each other: 1-127 is the south interval, and 128-255 is the north one.
3.17. The name of the field:
Test. Disable Fog Bulbs (1 = disable) (Byte)
Condition combination:
If volumetric FX is (A) switched on/off
A:
'equal'
0: switched on (i.e. fog bulbs are enabled, the distance fog is disabled)
1: switched off (i.e. fog bulbs are disabled, the distance fog is enabled)
Type: simple.
Note:
An executable combination with this field is possible to switch on/off volumetric FX. But unnecessary. Use F61/F62 trigger instead.
3.18. The name of the field:
Test. There is a Flyby in progress (1 = true / 0 = false) (Long)
Condition combination:
If a flyby sequence (A) is/is not being performed
A:
'equal'
0: not being performed
1: being performed
Type: simple.