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 11-06-15, 12:19   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,498
Default TRNG Some customizations for tiny creatures

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 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.

Condition:
If X Wraith3 has Y exactly/less/more than Z death status

As you know, a wraith3 dies if he touches an ANIMATING10, circling around it. But not right away, i.e. he must touch it more than once. Each tick frame when he touches the object is +512 in the counter. The 26th frame means the death of the wraith.

It happens in three (sometimes four) parts. Each part usually means a 8-10 frames long touch. So, for example, when he touches first then the counter starts: 547, 1059. 4131, 4643. Then he gets farther from ANIMATING10. Then he comes back for a newer part: 5155, 5667. 8739, 9251. Then he gets farther from ANIMATING10 again. Then he comes back for a third part again: 9763, 10275. 12835, 13346. And now he dies.

TriggerGroup= 1, $5000, X, $36, > ; defining the wraith with its X ID code you see in Room Editor
$2000, 256, $2710, > ; * put the actual status 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
Parameters= PARAM_BIG_NUMBERS, Z

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 9763” condition, then Z is 9764)
27 – for a “smaller” condition
28 – for an “equal” condition

I recommend using Z this way – some examples:
Equal 547: He has just found ANIMATING10, so ANIMATING10 has just caught him.
Equal 13346: He just dies.
More than 12000, plus less than 13346: he dies soon. - This time the formula looks this way:

TriggerGroup= 1, $5000, X, $36, > ; defining the wraith with its X ID code you see in Room Editor
$2000, 256, $2710, > ; * put the actual status into Global Short Alfa1 (GSA1) variable
$8000, 16, $W0Y0 ;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
$8000, 16, $W1Y1 ;if GSA1 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, Z1, Z2

Y0 is 26
Y1 is 27
Z1 is 12000
Z2 is 13346

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.

Note:
See the vitality tutorial about special death conditions being not savegame-stable.

Command:
Customize X Fire Wraith in Y way

TriggerGroup= 1, $5000, X, $36, > ; defining the wraith with its X ID code you see in Room Editor
$2000, 261, $W016 ; put the number at W0 position of PARAM_BIG_NUMBERS into the wraith 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:

10000 - each contact with Lara will ignite her + wraith is invulnerable in water
1 - each contact with Lara will not ignite her + wraith is invulnerable in water
-2 - each contact with Lara will not ignite her + wraith is vulnerable in water

You need continuous activation. If you stop continuous activation, then the wraith will start acting in the default way.
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 Fire Wraith has Y customized status

This condition is useful if you have changed the property with the previous command.

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

Y values are:
$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, Z is 10000 - each contact with Lara will ignite her + wraith is invulnerable in water
$8000, 16, $12B; if GSA1 is 1, Z is not needed - each contact with Lara will not ignite her + wraith is invulnerable in water
$8000, 16, $2A; if GSA1<0, Z is not needed - each contact with Lara will not ignite her + wraith is vulnerable in water

Command:
Make X Ice Wraith Y invulnerable in water

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

You need continuous activation (see more about it above). If you stop continuous activation, then the wraith will be vulnerable in the water again.

Note:
If the invulnerable ice wraith contacts with water then the flipmap (that should be activated when the wraith dies in water) won't be activated.

Condition:
If X Ice Wraith is Y (in)vulnerable in water

This condition is useful if you have changed the property with the previous command.

TriggerGroup= 1, $5000, X, $36, > ; defining the wraith with its X ID code you see in Room Editor
$2000, 256, $1600, > ; put the actual status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $Y2B; if GBA1 is Y

Y values are:
0 - vulnerable
1 - invulnerable

Condition:
If X Wraith is circling Y (anti)clockwise

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

Y values are:
$8000, 16, $129; if GSA1>=1 – clockwise
$8000, 16, $2A; if GSA1<0 – anti-clockwise

Note:
Naturally if the radius is big then the route of the wraith seems linear, though that isn't.

Command:
Make X Wraith have Y route

TriggerGroup= 1, $5000, X, $36, > ; defining the wraith with its X ID code you see in Room Editor
$2000, 261, $W018 ; put the number at W0 position of PARAM_BIG_NUMBERS into the wraith 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:
any positive number: moving forwards+constantly downwards,
any negative number: moving forwards+constantly upwards,
0 - moving forwards+keeping constantly his Room Editor vertical position

You need continuous activation (see more about it above). If you stop continuous activation, then the wraith will start acting in the default way.

Notes:
- The scale is not linear. I.e. if Y=-1 is a very low ascension, then Y=-1000 is not a thousandfold ascension, but much less.
- Don't forget to kill the wraith if he ascended too high/descended too low, disappearing above the ceiling/below the floor forever. (Use an A14 if there is no other way to kill him.) Or stop the continuous activation, so the wraith will start chasing Lara again.

Condition:
If X Wraith is Y coming to/going from Lara

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

Y values are:
$8000, 16, $129; if GSA1>=1 – going farther
$8000, 16, $2A; if GSA1<0 – coming closer

Note:
This condition seems a bit buggy (i.e. it will have the wrong result) if you use it too soon. That's why first you should use it at the first attack against Lara (and not before, but at any time after that). - I.e. use this condition if you are sure that the wraith has been living for a couple of seconds, at least.

Command:
Adjust the emission speed of X Little Beetles (coming from the wall) to Y

'From the wall' means it works only for +4000 OCB, when the scarabs are emitted from the wall.

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

Y values are:
0: they will be emitted fast, in only one bunch (because little beetles will be emitted in four bunches from the wall usually)
1: only one or few beetles will be emitted at the same time. There is one or few seconds pause between two emissions.

You need continuous activation (see more about it above). If you stop continuous activation, then the emission will continue 'normally' (if there still are beetles in the wall).

Condition:
If Z exactly/less/more than Y bunches of the four bunches of X Little Beetles has not been emitted yet from the wall

When the first bunch has been emitted, then Value Y turns from 4 to 3, when the second bunch has been emitted, then the field value turns from 3 to 2 etc.

TriggerGroup= 1, $5000, X, $36, > ; defining the beetle emitter with its X ID code you see in Room Editor
$2000, 256, $1700, > ; put the actual status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $YZ, >; if GBA1 is Y
$9000, X, $20E ; if X little beetles are living (or else a „more than” condition will be true even if the beetles have not been activated yet)

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

Command:
Make X Fish Emitter emit further Y fishes

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

Y=127 is the absolute maximum, i.e. the aggregate amount of the fishes+little beetles just alive is 127. (If you exceed this limit then further fishes won't be emitted.)

Activate an F118 in „single” mode for TriggerGroup#1 to adjust the fish amount.

Notes:

- As you see, this is a good way to change the fish amount defined by the OCB value of the fish emitter.
- If the emitter hasn't been activated when you activate the command, then the command 'really' starts when the emitter has been activated.
- The command is useless if you force the value after the fish emitting counter reaches 0.

Condition:
If there still are Y exactly/more/less than Z fishes of X Fish Emitter to emit

TriggerGroup= 1, $5000, X, $36, > ; defining the fish emitter with its X ID code you see in Room Editor
$2000, 256, $1500, > ; put the actual fish amount emitted 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
$9000, X, $30E ; if X fishes are active (or else a „more than” condition will be true even if the fishes have not been activated yet)
Parameters= PARAM_BIG_NUMBERS, Z

Z: from 0 to 127.

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)
27 – for a “smaller” condition
28 – for an “equal” condition

Note:
See above (wraith3 death) what if you want a “more than… but less than” condition.

Command:
Make X Fish Emitter emit the next fish in Y seconds

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

Z values are in tick frames. So if Z=30 that is Y=1 second.

Activate an F118 in „single” mode for TriggerGroup#1 to adjust the time gap.

Notes:
- The default values between emitting two fishes are from 1 to (about?) 16 tick frames, randomly, but you can choose even a much bigger number in this command.
- If the emitter hasn't been activated when you activate the command, then the command 'really' starts when the emitter has been activated.
- The command is useless if you force the value after the last fish has been emitted.
- If you want a permanent pause in the emission, then use A14 in “disable emitter” mode, for the emitter. Then, to start the emission again, activate the common trigger of the emitter again.

Condition:
If X Fish Emitter emits the next fish Y exactly/less/more than Z seconds

TriggerGroup= 1, $5000, X, $36, > ; defining the fish emitter with its X ID code you see in Room Editor
$2000, 256, $1610, > ; put the actual fish amount emitted 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
$9000, X, $30E ; if X fishes are active (or else a „more than” condition will be true even if the fishes have not been activated yet)
Parameters= PARAM_BIG_NUMBERS, V

V values are in tick frames. So if V=30 that is Z=1 second.

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

Note:
See “the fish emitter is dead” condition in my vitality tutorial. If you experience that the present condition is true after all the fishes having been emitted, then use that “dead” condition to disable the present condition – eg. this way:

GlobalTrigger1:
- condition: if the next fish is emitted in Z seconds
- executable: (whatever you want)
GlobalTrigger2:
- condition: the emitter is dead
- executable: disable GlobalTrigger1

Command:
Make X Fish Emitter emit Y fish type

In the fish emitter each fish type has an ID. For example, if you force 3 for an emitter, with this command, then Fish Type 3 will be emitted everyway – whatever is what OCB wants.

The maximum types are four, so the ID's are 0, 1, 2, 3. Always the lowest ID’s are used, and the fish type order for ID’s is always piranha, clown, butterfly, angel. So, for example, if you have all the four types for the emitter (according to OCB), then the ID’s are:

0 - piranha, 1 - clown, 2 - butterfly, 3 – angel

But eg. if you don't have piranha, then the ID's are:

0 - clown, 1 - butterfly, 2 - angel

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

You need continuous activation (see more about it above). If you stop continuous activation, then the emitter will start emitting fishes according to the OCB value.

Y values are from 0 to 3.

Note:
The command is useless after the last fish has been emitted.

Condition:
If X Fish Emitter emits Y fish type

TriggerGroup= 1, $5000, X, $36, > ; defining the fish emitter with its X ID code you see in Room Editor
$2000, 256, $1800, > ; put the actual fish type into Global Byte Alfa1 (GBA1) variable
$8000, 0, $Y2B, >; if GBA1 is Y
$9000, X, $30E ; if X fishes are active (or else the condition for Type 0 will be true even if the fishes have not been activated yet)

See Y values above.

Note:
See “the fish emitter is dead” condition in my vitality tutorial. If you experience that the present condition is true after all the fishes having been emitted, then use that “dead” condition to disable the present condition – eg. this way:

GlobalTrigger1:
- condition: if Y fish type is being emitted
- executable: (whatever you want)
GlobalTrigger2:
- condition: the emitter is dead
- executable: disable GlobalTrigger1

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

*: Be careful! If you use commands with some $...27 triggers (see eg. “poison X enemy”), that may affect the usability of the condition. If you want the condition then you may avoid that command.

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

Made using TRNG 1.2.2.7.

Last edited by Titak; 18-06-15 at 18:49.
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 19:37.


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