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 01-07-15, 06:43   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default TRNG – Some customizations for monsters

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, and GlobalTrigger ID’s and change them if you are already using the ID in another TriggerGroup/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/GlobalTrigger ID’s, then you also need to change the TriggerGroup/GlobalTrigger ID in the trigger (if it is a trigger about a TriggerGroup/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 Byte Alfa2, 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.

Command:
Make X Mutant perform the harmless rage for Y tick frames

About the default setup of the harmless rage:

- The harmless rage will start if the mutant - has just come to life - totally opens his 'double collars'.
- The default value is 600 frames (20 seconds) for this rage.
- Some moments after stopping raging like this, the mutant will notice Lara. Until he notices her, he won't attack her. (That is why this rage is ‘harmless’).

TriggerGroup= 1, $5000, X, $36, > ; defining the mutant with its X ID code you see in Room Editor
$2000, 261, $W017 ; put the number at W0 position of PARAM_BIG_NUMBERS into the rage property (W0 is 0 in this example, W0 must be typed in hexadecimal format now in the trigger code)
Parameters= PARAM_BIG_NUMBERS, Z

Y values are from 1 to 599 tick frames.
Z must be 600 minus Y.

Activate an F118 in „single” mode for TriggerGroup#1 to start the harmless rage for the required time. (Or to change – increase or decrease - the time of the actual harmless rage if you activate F118 just when he is performing that rage.)

Notes:

- If you activate this command then the timer won't start till the collars are totally open.
- If the mutant is just in the middle of a 'harmless rage animation' when the timer of the command is just expires then he continues the animation till the end of the animation everyway, before attacking Lara.
- If you activate this command after he started attacking, then he stops attacking now (but first, continuing the attacking animation till the end) to rage again for the required time.

Command:
Make X Mutant perform the harmless rage permanently

Use the same formula just as above. - But this time don’t use single F118:

You need a continous activation. If you stop it, then the rage will stop in Y tick frames.
Activate an F118 in “continuous” mode for TriggerGroup#1 to start the continous activation. – Activate an F192 for the same TriggerGroup to stop the continous activation.
Or activate TriggerGroup#1 with a GlobalTrigger, with a continuous condition (eg. GT_ALWAYS) to start the continous activation. – If the condition goes false or you disable the GlobalTrigger with an F109 that will stop the continous activation.

Condition:
If X Mutant finishes the harmless rage in Y exactly/less/more than Z tick frames

TriggerGroup= 1, $5000, X, $36, > ; defining the mutant with its X ID code you see in Room Editor
$2000, 256, $1710, > ; put the actual rage time into Global Short Alfa1 (GSA1) variable
$8000, 16, $W0Y, > ;if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
U
Parameters= PARAM_BIG_NUMBERS, V, 999

Z values are from 1 to 599 tick frames.
V must be 600 minus Z.

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

U values are:
- if Y=26: $8000, 16, $W127 ; if if GSA1< than the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code)is 1 in this example. (Without this trigger, the condition will remain true even after the end of the rage.)
- if Y=27: $8000, 16, $129; if GSA1>=1. (Without this trigger, the condition will be true even before the start of the rage.)
- if Y=28: no need for U

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.

Condition:
If X Mutant is just Y harmful/harmless for Lara

TriggerGroup= 1, $5000, X, $36, > ; defining the mutant with its X ID code you see in Room Editor
$2000, 256, $1710, > ; put the actual status into Global Short Alfa1 (GSA1) variable
Y
Parameters= PARAM_BIG_NUMBERS, 999

Y values are:
- harmful:
$8000, 16, $W028 ;if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
- harmless (i.e. before the mutant stops raging):
$8000+TGROUP_NOT, 16, $W028, > ;if GSA1 is NOT the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
$9000, X, $30E ; if X mutant is active (or else the condition will be true even if the mutant has not been activated yet)

Command:
Make the energy attacks of X Setha/Harpy enervate with Y light effect

'Energy attacks' of Setha means the 'direct attack' (when Setha rushes at Lara) is not counted now. Setha has three types of energy attacks:

- 151 tick frames long: standing on the ground, a big energy ball
- 161 tick frames long: standing on the ground, 'little' energy bullets
- 199 tick frames long: jumping into the air, 'little' energy bullets

If you use this command with continuous activation (see above), that means all the possible energy attack procedures that the Setha will perform after that, will have the proper noises - but there won't be missiles to hurt Lara. (That's why the attack is 'enervate'.) – If you stop the continuous activation, then Setha will 'regain his health', i.e. 'conquer the enervation'.

In the given frame of the 'real' attack procedure, the Setha will perform a light effect on himself. The energy effect is naturally changes continuously, being an electric arc. So the effect shows different looks at different tick frames. For example, the effect look ‘this way’ at Frame 99 (let’s call it ‘Look Alpha’), but looks ‘that way’ at Frame 100 (let’s call it ‘Look Beta’).
So, if we force Y=100 now, then he will perform 'Beta' light effect continuously when performing an enervate attack. – Moreover, the energy effect of the three types are not clearly the same, so, if you force 100, then the enervate light effect will be different, if Setha performs the 151 frames long attack, as opposed to performing the 161 frames long attack. (But naturally we could compare 151 to 199 or 161 to 199, too.)

TriggerGroup= 1, $5000, X, $36, > ; defining Setha with its X ID code you see in Room Editor
$2000, 261, $W015 ; put the number at W0 position of PARAM_BIG_NUMBERS into the energy attack property (W0 is 0 in this example, W0 must be typed in hexadecimal format now in the trigger code)
Parameters= PARAM_BIG_NUMBERS, Y

Y values are from 1 to 150. (Y cannot reach the length of the shortest - 151 frames long - attack type or else the solution will be buggy perhaps.)

Notes:
- When you want to stop the continuous activation then it's recommended to do that when he just doesn't perform an energy attack.
- The forced value naturally doesn't have any effect if the Setha is just not energy-attacking.

We could tell the same thing about Harpy, except: the one and only energy attack type of the Harpy is 118 tick frames long.

Condition:
If X Setha/Harpy has started the actual energy attack Y exactly/less/more than Z tick frames ago

TriggerGroup= 1, $5000, X, $36, > ; defining Setha/Harpy with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the actual time of the energy attack into Global Byte Alfa1 (GBA1) variable
$8000, 0, $W0Y, > ;if GBA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
U
Parameters= PARAM_BIG_NUMBERS, Z, 118

Z values for setha are from 1 to 198, except 151 or 161.
Z values for harpy are from 1 to 117.

Y values are:
26 – for a “bigger” condition (this time Z must be the original Z plus 1, so eg. if you want a “bigger than 50” condition, then Z is 51) – I don’t recommend it for setha
27 – for a “smaller” condition – I don’t recommend it for setha
28 – for an “equal” condition

U values are:
- if Y=26: $8000, 0, $W127 ; if if GBA1< than the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code)is 1 in this example. (Without this trigger, the condition will remain true even after the end of the attack.)
- if Y=27: $8000, 0, $129; if GBA1>=1. (Without this trigger, the condition will be true even before the start of the attack.)
- if Y=28: no need for U

Command:
Transport X Ahmet to new Y “X” and Z “Z” horizontal start position the next time

In the classic Ahmet-Scales setup, the Ahmet will be transported back into his cage when the scales are reset. If you use this command, then you will define an alternative location, whereto the Ahmet will be transported if the scales are reset the next time.

TriggerGroup= 1, $5000, X, $36, > ; defining Ahmet with its X ID code you see in Room Editor
$2000, 255, $V15, >; force Value Y for “X” coordinate (V is the hexadecimal version of Value Y)
$2000, 255, $W17; force Value Z for “Z” coordinate (W is the hexadecimal version of Value Z)

Y values are:
from 1 to 100: the 1st-100th squares of the floor grid, counted from the northern (top) edge of Room Editor Window
Z values are:
from 1 to 100: the 1st-100th squares of the floor grid, counted from the western (left) edge of Room Editor Window

Because the biggest length of the floor grid of the level is 100 squares in both horizontal direction.

Activate an F118 in „single” mode for TriggerGroup#1 to adjust the new position for the next reset. (And for the further resets, as well, if you don’t use another command after that, to change the position again.)

Notes:

- The game draws a horizontal vector that starts from the previous X, Z point, and ends at the new X, Z point. The vector cannot cross room walls or else the command will fail. But that doesn't mean the new X, Z point cannot be in another room - in this case the vector must cross portals (doors), where there were room walls before.

- As for the vertical position: in the new X, Z position the ahmet will be put on the floor square of the room there.
But if the ahmet will be in a higher/lower floor square after this 'transportation', in another room, so not in the room where you want, then you probably must descend/ascend the vertical position of the previous X, Z point - i.e. the floor square there -, to solve the problem.

Condition:
If X Ahmet is in Y „X” and Z „Z” horizontal position when the scales will be being reset the next time

TriggerGroup= 1, $5000, X, $36, > ; defining Ahmet with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the next “X” coordinate into Global Byte Alfa1 (GBA1) variable
$2000, 256, $1701, > ; put the next “Y” coordinate into Global Byte Alfa2 (GBA2) variable
$8000, 0, $W028, > ;if GBA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
$8000, 1, $W128 ;if GBA2 is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code)is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y, Z

See Y and Z values above.

Command:
Force Y event on X Laser Head

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 255, $Y15; force Value Y for this parameter

Y values are:

0 (singly): freeze it in the actual position (it will be frozen till you force another status)
0 (continuously, after the eyes having been shot): freeze it in the actual position (it will be frozen till you stop forcing)
1 (singly): stop the actual attack
1 (continuously): disable all attacks (till you stop forcing)
1 (continuously, after the eyes having been shot): the blind head continues searching for Lara, harmlessly (till you stop forcing)
2 (singly): force an attack (wherever the head looks at)
2 (continuously): force a continuous attack (wherever the head looks at) (till you stop forcing)
2 (continuously, after the eyes having been shot): the blind head remains living, harmlessly, keeping the actual position (till you stop forcing)
3 (singly): kill the head (even if the eyes aren't shot)

If you need a single activation, then activate an F118 in „single” mode for TriggerGroup#1 to force the status.
If you need a continous activation – then see above („Make X Mutant perform the harmless rage permanently”) what your possibilities are.

Condition:
If X Laser Head has Y status

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the actual status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $Y2B, >; if GBA1 is Y
$9000, X, $30E ; if X laser head is active (you need this line only for Value Y=0, or else the condition will be true even if the head has not been activated yet)

Y values are:

0: the head has just been activated, so the head is still ascending to its position
1: the head is searching for Lara or (noticing her) is about to attack
2: the head is attacking: getting energy then shooting
3: the eyes are all shot or the head has exploded

Command:
Make X Laser Head get energy continuously with Y effect

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 255, $W18; force Value Y for this parameter (W is the hexadecimal version of Value Y)

Y values are from 1 to 90.
There are 3 seconds (from 1 to 90 tick frames) when the head is getting energy. Each frame has a different energy effect. (See the description above about setha to understand it.) Naturally Frame1 has a 'very low energy' effect but Frame90 has a 'very high energy' effect. So, for example, Y=40 effect means 'the energy effect that belongs to Frame40'.

You need a continous activation (see above, how). If you stop it, then the head will start shooting in 91 minus Y tick frames.

Note:
You can activate the command any time. But it will work really only at the next attack against Lara. (Or at the actual attack, if you are so clever and activates the command exactly in the short period when the head is attacking.)

Command:
Make X Laser Head attack at once, when noticing Lara (i.e. without getting energy)

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 255, $5B18; force Value 91 for this parameter

You need a continous activation (see above, how). If you stop it, then the head will get energy after that, at the attacks.

Notes:

-You can activate the command any time. But it will work really only at the next attack against Lara. And each attack after that - till you stop forcing.
- With this command, the status (see above) probably remains 1, not turning into 2.

Condition:
If there still are Y tick frames before X Laser Head turns his head again

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the actual status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $12B, >; if GBA1 is 1 („head is searching”)
$2000, 256, $1801, > ; put the actual head-turning time into Global Byte Alfa2 (GBA2) variable
$8000, 1, $W028 ;if GBA2 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
Parameters= PARAM_BIG_NUMBERS, Y

Y values are from 1 to (about) 100 tick frames.

Note:
There is a tiny bug in this condition: it has a bad result at that head-movement when the head is searching for Lara but notices her. (So probably you should use this condition if you sure the head won’t notice Lara.)

Condition:
If there still are Z exactly/less/more than Y tick frames before X Laser Head (just getting energy) will shoot

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the actual status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $22B, >; if GBA1 is 2 („head is attacking”)
$2000, 256, $1801, > ; put the actual shooting time into Global Byte Alfa2 (GBA2) variable
$8000, 1, $W0Z, > ;if GBA2 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example,
U
Parameters= PARAM_BIG_NUMBERS, V, 91

V is 91 minus Y.
Y values are from 1 to 90.

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

U values are:
- if Z=26: $8000, 1, $W127 ; if if GBA2< than the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code)is 1 in this example. (Without this trigger, the condition will remain true even when he’s shooting.)
- if Z=27 or 28: no need for U

Condition:
If X Laser Head is just shooting

TriggerGroup= 1, $5000, X, $36, > ; defining the laser head with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the actual status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $22B, >; if GBA1 is 2 („head is attacking”)
$2000, 256, $1801, > ; put the actual shooting status into Global Byte Alfa2 (GBA2) variable
$8000, 1, $W028 ;if GBA2 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code)is 0 in this example
Parameters= PARAM_BIG_NUMBERS, 91

Condition:
If X Hydra is dying

When the hydra starts dying then it means he starts shattering. First a part of him, then the second part of him etc. When the last (12th) part of him has been shattered then the hydra is dead.
So “dying” means “the body parts are shattering one by one” now.

TriggerGroup= 1, $5000, X, $36, > ; defining the hydra with its X ID code you see in Room Editor
$2000, 256, $1800, > ; put the actual number of parts into Global Byte Alfa1 (GBA1) variable
$8000, 0, $129, >; if GBA1>=1
$8000, 0, $C2A ; if GBA1<12

Condition:
If there still are Z exactly/less/more than Y body parts to shatter before X Hydra (just dying) dies

TriggerGroup= 1, $5000, X, $36, > ; defining the hydra with its X ID code you see in Room Editor
$2000, 256, $1800, > ; put the actual number of parts into Global Byte Alfa1 (GBA1) variable
$8000, 0, $WZ >; if GBA1 is W (W is the hexadecimal version of V)
U

Y values are: from Part 1 to Part 11 (i.e. from1 to 11)
V is 12 minus Y.

Z values are:
29 – for a “smaller” condition (this time Y must be the original Y minus 1, so eg. if you want a “smaller than 10” condition, then Y is 9)
2A – for a “bigger” condition
2B – for an “equal” condition

U values are:
- if Y=29: $8000, 0, $C2A ; if GBA1<12. (Without this trigger, the condition will remain true even after the death of hydra.)
- if Y=2A: $8000, 0, $129; if GBA1>=1. (Without this trigger, the condition will be true even before the start of dying.)
- if Y=2B: no need for U

Made using TRNG 1.2.2.7.
AkyV is offline  
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:50.


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