www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
 
Thread Tools
Old 09-02-15, 10:20   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,493
Default TRNG Some special states of Lara

Instructions:

1. Copy the setup in your Script.
2. Build the Script.

Special instructions, if the Script doesn’t work/cannot be built:

1. Check TriggerGroup, MultEnvCondition and GlobalTrigger ID’s and change them if you are already using the ID in another TriggerGroup/MultEnvCondition/GlobalTrigger.
2. If you already have a Parameters= PARAM_BIG_NUMBERS command at your level, then remove the same command of the setup you’ve just copied, and type the amount value of the removed command into the old command.
3. Open the Find Trigger Number window in Set Trigger Type panel, and copy-paste the underlined triggers there (one by one), to check them:

- If you changed TriggerGroup/MultEnvCondition/GlobalTrigger ID’s, then you also need to change the TriggerGroup/MultEnvCondition/GlobalTrigger ID in the trigger (if it is a trigger about a TriggerGroup/MultEnvCondition/GlobalTrigger).
- If you removed the new Parameters= PARAM_BIG_NUMBERS command, you need to check if the big number index is still okay in the trigger (if it is a trigger about big numbers). If it is not, then choose the good one.
- Maybe you need to choose another variable, because you can’t use the variables (Global Byte Alfa1, Global Short Alfa1) I used in the setups. So choose another one now (if it is a trigger about variables), if it is needed.
You are never allowed to change Current Value variable!

Export the trigger you have changed, replacing the previous trigger in the Script.
3. Build the Script.

Don't forget: PARAM_BIG_NUMBERS position ID in the triggers, after the $ sign, must be typed in hexadecimal format!

Command:
Adjust Lara’s actual air under water to X percent

F110 is not the same. F110 adds some air amount to the actual amount.
And F104 is “only” about infinite air.

TriggerGroup= 1, $8000, 2, $105, > ; if Lara is not floating on water
$8000, 1, $10, > ; if MultEnvCondition1 is true
$2000, 262, $Z00A ; put the number at Z0 position of PARAM_BIG_NUMBERS (Z0 is 0 in this example) into Lara’s actual air percent
MultEnvCondition= 1, ENV_ROOM_IS, ROOM_WATER, IGNORE
Parameters= PARAM_BIG_NUMBERS, Y

18 in Y means 1 percent. (So Y=18X.) That is why full lungs (100%) mean 1800.

Activate an F118 in “single” mode for TriggerGroup#1 to adjust the air.

Note:
See this tutorial if you want to control Lara’s maximal air in water (i.e. the capacity of her lungs).
http://www.tombraiderforums.com/showthread.php?t=205089

Condition:
If Lara’s actual air is X more/less/exactly than Y percent under water

TriggerGroup= 1, $8000, 2, $105, > ; if Lara is not floating on water
$8000, 1, $10, > ; if MultEnvCondition1 is true
$2000, 244, $A10, >; put the actual air value into Global Short Alfa1 (GSA1) variable
$8000, 16, $W0X, > ;if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
$8000, 16, $W127; if GSA1 is the number at W1 position of PARAM_BIG_NUMBERS, W1 is 1 in this example
MultEnvCondition= 1, ENV_ROOM_IS, ROOM_WATER, IGNORE
Parameters= PARAM_BIG_NUMBERS, V0, 1800

18 in V0 means 1 percent. (So V0=18Y.)

We need that $8000, 16, $W127 condition, or else the condition in some cases will be true even if Lara is in waist-deep water, not swimming (but standing or jumping etc.), with full lungs. (Using animations or StateID’s for the proper condition seems too complicated.)

X values are:
26 – for a “bigger” condition (this time V0 must be the original V0 plus 1, so eg. if you want a “bigger than 20 percent” condition – when V0 is 2018=360, then V0 is 361)
27 – for a “smaller” condition
28 – for an “equal” condition

The easiest solutions to use the conditions:
- The TriggerGroup (1) ID is referred by a C15 trigger. There is a TRIGGER placed in the map, overlapped with the CONDITION trigger. The TRIGGER will be executed if Lara is in the trigger zone when the CONDITION is true.
- The TriggerGroup (1) ID is referred by the IdConditionTriggerGroup field of a GlobalTrigger.

So this condition is useless if you want to study the air percent when that is increasing while Lara is floating on the water surface.

Command:
X enable/disable infinite dash power for Lara

So Lara will never be tired with dashing, even a bit. – That is why you’ll never see the dash bar with infinite dash power.

TriggerGroup= 1, $2000, 279, $7809 ; set maximal (Value 120) dash bar value

Activate an F118 in “continuous” mode for TriggerGroup#1 to enable the infinite power. – Activate an F192 for the same TriggerGroup to disable the infinite power.
Or activate TriggerGroup#1 with a GlobalTrigger, with a continuous condition (eg. GT_ALWAYS) to enable the infinite power. – If the condition goes false or you disable the GlobalTrigger with an F109 that will disable the infinite power.

Note:
After using nitro, the motorbike can also have infinite dash power with this setup.

Condition:
If Lara’s actual dash power is X more/less/exactly than Y when dashing

TriggerGroup= 1, $8000, 73, $1F, > ; if Lara’s stateID is 73
$8000+TGROUP_OR, 74, $1F, > ; if Lara’s stateID is 74
$2000, 277, $9, >; put the actual dash value into Current Value variable
$8000, 255, $W0X ;if Current Value is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, Y

Y must be between 0 and 120.

X values are:
26 – for a “bigger” condition (this time Y must be the original Y plus 1, so eg. if you want a “bigger than 20” condition, then Y is 21)
27 – for a “smaller” condition
28 – for an “equal” condition

So this condition is useless if you want to study the dash power when that is increasing after Lara has just stopped dashing.

Condition:
If Lara is on a square of a mechanical scarab

So this condition will be true if Lara is touching any floor square that is marked by a grey frame (where you can start the mechanical scarab).

TriggerGroup= 1, $8000, 4, $119, > ; if Lara touches the floor
$2000, 244, $1200, >;put the status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $Y028,> ;if GBA1 is the number at Y0 position of PARAM_BIG_NUMBERS (Y0=0: first position, 1: second position etc.), Y0 is 0 in this example
$8000+TGROUP_OR, 0, $Y128,> ;if GBA1 is the number at Y1 position of PARAM_BIG_NUMBERS, Y1 is 1 in this example
$8000+TGROUP_OR, 0, $Y228,> ;if GBA1 is the number at Y2 position of PARAM_BIG_NUMBERS, Y2 is 2 in this example
$8000+TGROUP_OR, 0, $Y328,> ;if GBA1 is the number at Y3 position of PARAM_BIG_NUMBERS, Y3 is 3 in this example
$8000+TGROUP_OR, 0, $Y428,> ;if GBA1 is the number at Y4 position of PARAM_BIG_NUMBERS, Y4 is 4 in this example
$8000+TGROUP_OR, 0, $Y528,> ;if GBA1 is the number at Y5 position of PARAM_BIG_NUMBERS, Y5 is 5 in this example
$8000+TGROUP_OR, 0, $Y628,> ;if GBA1 is the number at Y6 position of PARAM_BIG_NUMBERS, Y6 is 6 in this example
$8000+TGROUP_OR, 0, $Y728, > ;if GBA1 is the number at Y7 position of PARAM_BIG_NUMBERS, Y7 is 7 in this example
$8000+TGROUP_OR, 0, $Y828, > ;if GBA1 is the number at Y8 position of PARAM_BIG_NUMBERS, Y8 is 8 in this example
$8000+TGROUP_OR, 0, $Y928, > ;if GBA1 is the number at Y9 position of PARAM_BIG_NUMBERS, Y9 is 9 in this example
$8000+TGROUP_OR, 0, $Y1028, > ;if GBA1 is the number at Y10 position of PARAM_BIG_NUMBERS, Y10 is 10 (hexadecimal: A, because $ means it is a hexadecimal number) in this example
$8000+TGROUP_OR, 0, $Y1128, > ;if GBA1 is the number at Y11 position of PARAM_BIG_NUMBERS, Y11 is 11 (hexadecimal B ) in this example
$8000+TGROUP_OR, 0, $Y1228, > ;if GBA1 is the number at Y12 position of PARAM_BIG_NUMBERS, Y12 is 12 (hexadecimal C) in this example
$8000+TGROUP_OR, 0, $Y1328 ;if GBA1 is the number at Y13 position of PARAM_BIG_NUMBERS, Y13 is 13 (hexadecimal D) in this example
Parameters= PARAM_BIG_NUMBERS, X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13

X codes are:
X0 is 1 – on the scarab square, no special action.
X1 is 5 – on the scarab square, crouching.
X2 is 9 – on the scarab square, shooting.
X3 is 17 - on the scarab square, looking through the lasersight.
X4 is 33 – on the scarab square, with burning torch in the hand.
X5 is 65 - on the scarab square, plus, Lara used a ladder, and didn’t hang on a ledge after that.
X6 is 13 – on the scarab square, crouching and shooting.
X7 is 37 – on the scarab square, crouching and with burning torch in the hand.
X8 is 69 – on the scarab square, crouching, plus, Lara used a ladder, and didn’t hang on a ledge after that.
X9 is 25 – on the scarab square, shooting, looking through the lasersight.
X10 is 73 - on the scarab square, shooting, plus, Lara used a ladder, and didn’t hang on a ledge after that.
X11 is 81 - on the scarab square, looking through the lasersight, plus, Lara used a ladder, and didn’t hang on a ledge after that.
X12 is 97 – on the scarab square, with burning torch in the hand, plus, Lara used a ladder, and didn’t hang on a ledge after that.
X13 is 89 – on the scarab square, shooting, looking through the lasersight, plus, Lara used a ladder, and didn’t hang on a ledge after that.

-----------------------------------------------------

If you can’t activate things after Lara’s dead (before the game loads back to the title automatically)

Usually you can’t activate anything after Lara’s dying animation has started, because her life power is 0.
But if you use this condition, then you have 301 tick frames (10 seconds plus one more frame), from the start of the dying animation, till the game load you back to the title automatically. (Of course, with some buttons, the player can force this load to happen sooner, before that 301 frames’ long interval expires. Eg. hitting ESC.)

For example:
Let’s suppose, the longest dying animation is 7 seconds=210 frames long. You want to print a text on the screen at the 220th frame (so when you are sure that any dying animation has ended) that reads “Lara has died!” That is why you use this setup to activate a “text” flipeffect when Y=220.

TriggerGroup= 1, $2000, 244, $B10, >; put the frame counter into Global Short Alfa1 variable
$8000, 16, $W0Z, > ;if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
$8000, 16, $129 ; if GSA1>=1 (or else the “smaller” condition will be true even if Lara is alive)
Parameters= PARAM_BIG_NUMBERS, Y

Y must be between 0 and 301.

Z values are:
26 – for a “bigger” condition (this time Y must be the original Y plus 1, so eg. if you want a “bigger than 20 frames” condition, then Y is 21 frame)
27 – for a “smaller” condition
28 – for an “equal” condition


Made using TRNG 1.2.2.7.

Last edited by AkyV; 08-07-16 at 10:33.
AkyV is online now  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 17:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.