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 30-12-14, 11:29   #1
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,798
Default TRNG - Flare customisation

Here are two tutorials which have to do with customising the flares.


Flare Customisation - Lights and other visual effects

Change the colour of the light your flares emit, add sparks, a glow effect or even flames to your flare!


Flare Customisation - Sounds
The flare had this hissing sound in both TR2 and TR3, but for some reason this sound was not included in TR4.
TREP has a nice little patch which also adds this sound, but it is not built-in into TRNG, and FLEP does not have this patch either.
However, with some scripting it is now also possible with TRNG.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 10-08-15 at 13:39.
Titak is offline  
Old 10-08-15, 13:28   #2
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,798
Default

Flare Customisation - Lights and other visual effects
by Titak

The TRNG now has multiple Customize= CUST_**** possibilities for all kinds of things.
One of these is for customizing the flares.

You can now add different effects to the flares, like TR2/TR3 style sparks. Besides these these effects you can also customize the colour of the light the flare emits (the colour settings also affects the glow colour but does not affect the flame colour), for how long flares burn and the range of the light cast.


THE SCRIPT
The general syntax for customizing flares is:
Customize=CUST_FLARE, Flags for Flare (FFL_....), SecondsOfLifeTime, Red, Green, Blue, Intensity


Flags for Flare (FFL_....) field
---------------------------------
You can add one or more FFL_ flags to add special effects to the flare.
You can type IGNORE in this field you are not interested to set flags.
FFL_ADD_FIRE
Adds a flame to the flare

FFL_ADD_GLOW_LIGHT
Will add a glow to the flare (the glow is made of sprite 11)

FFL_ADD_SMOKE_TO_SPARKS
Adds smoke to the flare, but this can only be used together with the FFL_ADD_SPARKS command.

FFL_ADD_SPARKS
Sdds sparks to the flare, like in TR2 and TR3

FFL_FLAT_LIGHT
By default the light of a flare is flickering slightly.
By adding this to the script your flarelight will not flicker, it will be flat, like the light of a lightbulb.


SecondsOfLifeTime field
-----------------------
In this field you set the amount of seconds the flare will burn. So if you type 50 in this field, the flare will burn for 50 seconds.
The default value was 30 seconds.
You can type IGNORE in this field to preserve the default value.


Red, Green, Blue fields
-----------------------
In these three fields you can set the middle color of flare light.

Remark: this color will be not applied in the first and the last phase of the life-time of the flare: the switching on and the switching off phases.
The original green colour will then be seen.
You can type IGNORE in these three fields to preserve the default values (red = 128 , Green = 192, Blue=0)


Intensity field
---------------
You can change the middle light intensity of flare.
The default value was 16.
You can type ignore in this field to preserve default value.

Remark: The intensity field does not really make the light the flare omits brighter. It makes it carry further.
So if you type for example 200 in this field, the flare's light will light up a very large area.


EXAMPLES

Pretty much regular flare with sparks and smoke, with yellow/orange light, with default intensity:
Customize= CUST_FLARE, FFL_ADD_SMOKE_TO_SPARKS + FFL_ADD_SPARKS, IGNORE, 250, 205, 15, IGNORE




Flame, with low intensity/range and yellow light:
Customize= CUST_FLARE, FFL_ADD_FIRE, IGNORE, 255, 200, 55, 10




Glow with pink light and high intensity/range:
Customize= CUST_FLARE, FFL_ADD_GLOW_LIGHT, IGNORE, 255, 0, 255, 100




Glow with yellow light and fairly high intensity/range:
Customize= CUST_FLARE, FFL_ADD_GLOW_LIGHT, IGNORE, 255, 200, 55, 40




Glow + fire + sparks + smoke with aqua light and regular intensity:
Customize= CUST_FLARE, FFL_ADD_GLOW_LIGHT + FFL_ADD_FIRE + FFL_ADD_SMOKE_TO_SPARKS + FFL_ADD_SPARKS, IGNORE, 0, 200, 255, IGNORE




Flame with green light and default intensity:
Customize= CUST_FLARE, FFL_ADD_FIRE, IGNORE, 0, 205, 15, IGNORE




Glow with white light with intensity/range 20:
Customize= CUST_FLARE, FFL_ADD_GLOW_LIGHT, IGNORE, 255, 255, 255, 20




Glow with white light with intensity/range 0:
Customize= CUST_FLARE, FFL_ADD_GLOW_LIGHT, IGNORE, 255, 255, 255, 0

__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 10-08-15 at 13:41.
Titak is offline  
Old 10-08-15, 13:30   #3
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,798
Default

Flare Customisation - Sound
by AkyV and Titak

This tutorial is about adding a hissing sound to a burning flare.
TREP already has a nice little patch for this and now it is also possible in TRNG.


PROPER SOUNDs
Put these sounds in the Sound/Samples folder:
crysmash.wav
l_toy1.wav

Crysmash.wav should already be assigned to your wad(s) since it is the default sound that the flare makes when it ignites.
This version of crysmash.wav however is another sound which, imo, is more suitable for the flare.
You can ofcourse keep using the original crysmash.wav.
For l_toy1.wav to work you need to assign sound 101 (BEETLE_CLK_WHIRR) to your wad.
You can assign it with WADMerger Sound Manager or by editing the sounds.txt, either manually, with Screamer, TRLE Sound Editor or SFX Manager.
Make sure you set Ch(ance) to 0.


SCRIPTING
The short version for those who simply want to copy and paste it in the script of their level:
Code:
Customize= CUST_FLARE, FFL_ADD_SMOKE_TO_SPARKS + FFL_ADD_SPARKS, IGNORE, 255, 200, 55, 10
GlobalTrigger= 13, FGT_SINGLE_SHOT_RESUMED, GT_CONDITION_GROUP, -1, 34, 35, -1
TriggerGroup= 34, $8000, 7, $23, $2000, 244, $450, $8000, 80, $2B
TriggerGroup= 35, $2000, 264, $0, $2000, 70, $65

GlobalTrigger= 14, -1, GT_CONDITION_GROUP, -1, 36, 37, -1
TriggerGroup= 36, $8000, 115, $26
TriggerGroup= 37, $2000, 265, $0, $2000, 266, $0, $2000, 72, $65

Parameters= PARAM_BIG_NUMBERS, 900
GlobalTrigger= 15, -1, GT_CONDITION_GROUP, -1, 38, 39, -1
TriggerGroup= 38, $8000, 7, $23, $2000, 244, $450, $8000, 80, $22B
TriggerGroup= 39, $2000, 265, $0, $2000, 266, $0
The long version, for those who want to study how it works:
Code:
Customize= CUST_FLARE, FFL_ADD_SMOKE_TO_SPARKS + FFL_ADD_SPARKS, IGNORE, 255, 200, 55, 10

GlobalTrigger= 13, FGT_SINGLE_SHOT_RESUMED, GT_CONDITION_GROUP, -1, 34, 35, -1
TriggerGroup= 34, $8000, 7, $23, $2000, 244, $450, $8000, 80, $2B
          ; Set Trigger Type - CONDITION 35
          ; Exporting: CONDITION(35:0) for PARAMETER(7)
          ; <#> : Holding_Flare
          ; <&> : Lara. (Holds) Lara is holding/driving the <#>item
          ; (E) :
          ; Values to add in script command: $8000, 7, $23

          ; Set Trigger Type - FLIPEFFECT 244
          ; Exporting: TRIGGER(1104:0) for FLIPEFFECT(244)
          ; <#> : Variables. Memory. Copy to <&>Numeric Variable the (E)Savegame Memory value
          ; <&> : Local Short Alfa1
          ; (E) : Lara. Hands. Attached Lara Status (Short)
          ; Values to add in script command: $2000, 244, $450

          ; Set Trigger Type - CONDITION 43
          ; Exporting: CONDITION(43:62) for PARAMETER(80)
          ; <#> : Local Short Alfa1
          ; <&> : Variables. The <#>Numeric Variable is = than (E)Value
          ; (E) : Value= 0
          ; Values to add in script command: $8000, 80, $2B

TriggerGroup= 35, $2000, 264, $0, $2000, 70, $65
          ; Set Trigger Type - FLIPEFFECT 264
          ; Exporting: TRIGGER(0:0) for FLIPEFFECT(264)
          ; <#> : Variables. Timer. Start the <&>TRNG Timer in (E)Mode
          ; <&> : Local Timer
          ; (E) : Increasing Timer
          ; Values to add in script command: $2000, 264, $0

          ; Set Trigger Type - FLIPEFFECT 70
          ; Exporting: TRIGGER(101:0) for FLIPEFFECT(70)
          ; <#> : Sound. Play <&>Sound sample of first group (0-255) for (E) time
          ; <&> : BEETLE_CLK_WHIRR 101 Ok l_toy1
          ; (E) : Forever (use other action/effect to disable it)
          ; Values to add in script command: $2000, 70, $65


GlobalTrigger= 14, -1, GT_CONDITION_GROUP, -1, 36, 37, -1
TriggerGroup= 36, $8000, 115, $26
          ; Set Trigger Type - CONDITION 38
          ; Exporting: CONDITION(38:62) for PARAMETER(115)
          ; <#> : Local Long Timer
          ; <&> : Variables. The <#>Numeric Variable is >= than (E)Big Number value
          ; (E) : Value of Parameters=PARAM_BIG_NUMBERS at index= 0
          ; Values to add in script command: $8000, 115, $26

TriggerGroup= 37, $2000, 265, $0, $2000, 266, $0, $2000, 72, $65
          ; Set Trigger Type - FLIPEFFECT 265
          ; Exporting: TRIGGER(0:0) for FLIPEFFECT(265)
          ; <#> : Variables. Timer. Stop the <&>TRNG Timer
          ; <&> : Local Timer
          ; (E) :
          ; Values to add in script command: $2000, 265, $0

          ; Set Trigger Type - FLIPEFFECT 266
          ; Exporting: TRIGGER(0:0) for FLIPEFFECT(266)
          ; <#> : Variables. Timer. Initialize <&>TRNG Timer to (E)Seconds
          ; <&> : Local Timer
          ; (E) : Seconds= 0
          ; Values to add in script command: $2000, 266, $0

          ; Set Trigger Type - FLIPEFFECT 72
          ; Exporting: TRIGGER(101:0) for FLIPEFFECT(72)
          ; <#> : Sound. Stop <&>Sound sample of first group (0-255)
          ; <&> : BEETLE_CLK_WHIRR 101 Ok l_toy1
          ; (E) :
          ; Values to add in script command: $2000, 72, $65


Parameters= PARAM_BIG_NUMBERS, 900
GlobalTrigger= 15, -1, GT_CONDITION_GROUP, -1, 38, 39, -1
TriggerGroup= 38, $8000, 7, $23, $2000, 244, $450, $8000, 80, $22B
          ; Set Trigger Type - CONDITION 43
          ; Exporting: CONDITION(43:58) for PARAMETER(80)
          ; <#> : Local Short Alfa1
          ; <&> : Variables. The <#>Numeric Variable is = than (E)Value
          ; (E) : Value= 2
          ; Values to add in script command: $8000, 80, $22B
TriggerGroup= 39, $2000, 265, $0, $2000, 266, $0

Note 1:
Customize= CUST_FLARE, FFL_ADD_SMOKE_TO_SPARKS + FFL_ADD_SPARKS, IGNORE, 255, 200, 55, 10
is not really needed. I just put it in as an example and also because I think it makes sense to use the sound with a flare that has sparkles and smoke coming out of it.

Note:
If you are already using those TG and GT numbers in your script, you should change the numbers in this script.
Do not forget to adjust the TG numbers in the GT's accordingly.
Remember you can easily find a free number for a TG and/or GT by selecting the number from the above script and then pressing the F1 button. NG-Center will then replace the selected number with the first free number available.


Some notes from AkyV:
  1. The sound is not smooth now, a bit abrupt. But I didn't want to solve this problem because I think it is just cool for a sparking.
  2. The volume is not adjusted with this kind of flipeffects. If Lara drops the flare and runs far from that, then the volume remains the same.
  3. There is a tiny bug, but I think it is not important: if Lara ignites the second flare just in the moment when the first one extinguishes on the floor, then the sound will be heard, though the second one is still not burning but the first one has just been extinguished.
Re Note 1: I also experienced this irregular sound when I quickly added the sound with WADMerger Animation Editor.
But it became smooth when I added the sound to my wad using Screamer.
CH(ance) of the sound should be set to 0.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 10-08-15 at 13:41.
Titak 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 00:14.


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