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 13-08-15, 10:15   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,493
Default TRNG - Talking to Zip

Download a project file illustrating this tutorial


Do you remember the cutscenes in which Lara’s talking to Zip in TR5 VCI levels, using her headset?



Well, you can create similar situations in TRNG, if you want.
In fact, the tutorial will show this operation:

The player makes Lara move but then she stops suddenly, automatically. It’s because she can hear something in her headset, obviously: she raises her right hand to the set so that she will hear better. The conversation happens. Then Lara lowers her hand and the player can control her again.

(“The player makes Lara move” – I said, so it’s a cutscene on a “real” level, and not an independent cutscene-level.)

Ingredients:

- A proper LARA_SKIN, i.e. in which the headset is on Lara’s head. (I recommend one of Po Yu’s outfits, from TRSearch.) Put it (and its accessories: LARA_SKIN_JOINTS etc.) into your WAD.



- The three special TR5 animations used for headset-talking: 467, 468 and 469. (You can find them in LARA object of the VCI levels, of course.) Put them into your WAD, attaching them into LARA object. Use these values for the animations:

- Speed, Accel, Next Frame: 0
- FrameRate: use the original values
- StateID: 89
- 467 Next Animation: 468
- 468 Next Animation: 468
- 469 Next Animation: 11
- State Change Editor: empty
- there are no AnimCommands

- An audio file in which the conversation is recorded with an actress (Lara) and an actor (Zip). (It’s not necessary if you achieve the conversation by texts. – See more below.) Put it into your audio folder. Use a usual audio ID as a name.

In the project, you need a flyby camera sequence that will be flying around Lara during the conversation, and a placed trigger that activates the whole operation (in fact, that enables Organizer#1):

; Set Trigger Type - FLIPEFFECT 127
; Exporting: TRIGGER(1:1) for FLIPEFFECT(127)
; <#> : Organizer. Enable <&>Organizer
; <&> : Organizer= 1
; (E) :
; Values to add in script command: $2000, 127, $1

Obviously, each conversation will happen only once. That’s why the trigger must be “One Shot” so that Lara can’t start that conversation again.

You have to press 9 and 10 buttons in the OCB panel of the first camera of the sequence so that the player won’t be able to abort the sequence using the Look key, and Lara won’t be able to move during the sequence.

In the Script, you need these entries:

Organizer= 1, IGNORE, IGNORE, 0, 1, 0, 2, 3, 3, 22, 4
TriggerGroup= 1, $2000, 83, $0
TriggerGroup= 2, $5000, 98, $2D
TriggerGroup= 3, $2000, 129, $46, $2000, 80, $D3
TriggerGroup= 4, $2000, 80, $D5

When Lara activates Organizer#1 by that trigger, then Organizer activates TriggerGroup#1 (see “0, 1”) and TriggerGroup#2 (see “0, 2”) at once.
TriggerGroup#1 makes Lara holster her weapons or drop the flare/torch in her hand (because the animations are obviously ugly without empty hands):

; Set Trigger Type - FLIPEFFECT 83
; Exporting: TRIGGER(0:0) for FLIPEFFECT(83)
; <#> : Lara. (Weapons) Remove weapons or flare from lara's hands
; <&> :
; (E) :
; Values to add in script command: $2000, 83, $0

TriggerGroup#2 starts that flyby sequence (in our example, its first camera has ID98):

; Set Trigger Type - ACTION 45
; Exporting: TRIGGER(45:0) for ACTION(98)
; <#> : CAMERA_FLYBY ID 98
; <&> : Trigger. (FlyBy) (E)Activate or Untrigger the <#>FlyBy camera sequence
; (E) : Activate Flyby camera sequence
; Values to add in script command: $5000, 98, $2D

(Those two triggers happen in the same time, but because of technical reasons, we can’t place them in the same TriggerGroup, and the trigger of the weapons must be triggered before the trigger of the sequence. – I.e. if we don’t do that then Lara won’t holster her weapons.)

After three seconds (see: “3, 3”) the Organizer starts TriggerGroup#3:
I.e. it starts the audio file in which the conversation is recorded (in our example, it’s 070.wav):

; Set Trigger Type - FLIPEFFECT 129
; Exporting: TRIGGER(70:0) for FLIPEFFECT(129)
; <#> : Sound. (CD) Play <&>CD track in (E) way on channel2
; <&> : AUDIO\070
; (E) : Single playback
; Values to add in script command: $2000, 129, $46

and starts the starting animation of the headset-using (Animation467):

; Set Trigger Type - FLIPEFFECT 80
; Exporting: TRIGGER(211:0) for FLIPEFFECT(80)
; <#> : Lara. (Animation) Force <&>Animation (256-512) of (E)slot for Lara
; <&> : 467 Animation
; (E) : SLOT_000 LARA
; Values to add in script command: $2000, 80, $D3

(Lara’s most important animation is Animation103, when she’s standing and still. It means many other animations start or should start from Animation103, including Animation467. I.e. at its very first frame, Lara’s standing and still in Animation467.
So, if Lara just performs a non-standing and/or non-still animation just when the game forces her to perform Animation467, then it will be more or less ugly. - That’s why the Organizer gives Lara some time to finish her actual movement, i.e. to reach the standing-still position at the end of the actual movement, before starting Animation467.
For example, Lara’s just jumping when activates Organizer#1. This is not a good position to start Animation467. But the flyby sequence, that just starts, disables Lara’s non-automatic movements, thanks to Button 10. So when she lands and stands up – automatically -, the player can’t do anything after that, so Lara remains in standing and still position, which is good for starting Animation467. – To reach the standing-still state from many other states – for example: from this mid-jump state -, 3 seconds is just enough, I think, that’s why the Organizer uses 3 seconds time slip just after it’s activated the flyby sequence.)

Animation467 shows Lara’s raising her hand to the headset.
The next animation is Animation468 automatically (see Next Animation of Animation467 in WADMerger Animation Editor). It’s a loop animation where we can see Lara holding her hand to the headset.



This time the length of the conversation (i.e. the audio file) is 22 seconds, for example. So, 22 seconds after Lara raises her hand, she lowers that, because the conversation has just ended. It means Organizer starts TriggerGroup#4 (see: “22, 4”) that forces Lara to abort Animation468 and starts Animation469:

; Set Trigger Type - FLIPEFFECT 80
; Exporting: TRIGGER(213:0) for FLIPEFFECT(80)
; <#> : Lara. (Animation) Force <&>Animation (256-512) of (E)slot for Lara
; <&> : 469 Animation
; (E) : SLOT_000 LARA
; Values to add in script command: $2000, 80, $D5

Animation469 is a short animation: Lara lowers her hand, and then she’s just standing and still. The cutscene’s ended – and you can also stop the flyby sequence now.

Notes:

1. The setup is flexible at some points, so you can change it, if you want.
For example, you can use other number buttons for the sequence, not only 9 and 10. For example, use 0 so the sequence won’t start from Lara’s chase-camera, but will start directly from its first camera.
Etc.

2. Be careful with the situations in which Lara can’t get into a good position for starting Animation467.
For example: she jumps when activates Organizer then lands. But on a slope, that’s why she starts sliding. So 3 seconds after she’s started the flyby sequence she’s not standing and still but standing and sliding.

3. The setup I’ve introduced you works on only one conversation.
So, if you want another conversation, then you also need:

- Another placed One Shot trigger to start another Organizer.
- A link to TriggerGroup#1 in the new Organizer, to remove the weapons.
- Another flyby sequence and another TriggerGroup in the new Organizer to start this new sequence.
- Another audio file and another TriggerGroup in the new Organizer to start this new audio.
- Another $2000, 80, $D3 trigger to force Animation467, in the TriggerGroup of the new audio file.
- A link to TriggerGroup#4 in the new Organizer, to start Animation469.

Alternative solution with texts

Maybe you don’t have an actress and an actor to create the audio file. Never mind. You will solve the problem by texts. I.e. you won’t start any audio but will print the contents of the conversation on the screen. – So you have to reform the setup:

Customize= CUST_TEXT_ON_FLY_SCREEN, ENABLED
Organizer= 1, IGNORE, IGNORE, 0, 1, 0, 2, 3, 3, 5, 5, 5, 4
TriggerGroup= 1, $2000, 83, $0
TriggerGroup= 2, $5000, 98, $2D
TriggerGroup= 3, $2000, 80, $D3, $2000, 203, $104
TriggerGroup= 4, $2000, 80, $D5
TriggerGroup= 5, $2000, 203, $105
Parameters= PARAM_PRINT_TEXT, 1, CL_WHITE, IGNORE, IGNORE, 3, 300, 300

So, when Animation467 starts then there won’t be any audio started but this trigger will be activated:

; Set Trigger Type - FLIPEFFECT 203
; Exporting: TRIGGER(260:0) for FLIPEFFECT(203)
; <#> : Text. Print formatted text <&>ExtaNg string with (E)formatting data
; <&> : 4: ZIP\nHey, Lara!
; (E) : Parameters=PARAM_PRINT_TEXT, 1
; Values to add in script command: $2000, 203, $104

It uses PARAM_PRINT_TEXT#1 to print the contents of ExtraNG#4 entry (“ZIP\nHey, Lara!”) on the screen. (Where “\n” means “I hit ENTER”.) – So Zip starts the conversation now, with a salute.
PARAM_PRINT_TEXT#1 means the text will be written in “300, 300” position, with white fonts (see: CL_WHITE), for 3 seconds.



5 seconds after the ExtraNG#4 has been printed on the screen (see: “5, 5”) - so 2 seconds after ExtraNG#4 has been deleted off the screen - TriggerGroup#5 will be activated:

; Set Trigger Type - FLIPEFFECT 203
; Exporting: TRIGGER(261:0) for FLIPEFFECT(203)
; <#> : Text. Print formatted text <&>ExtaNg string with (E)formatting data
; <&> : 5: LARA\nHey, Zip! What's the matter?
; (E) : Parameters=PARAM_PRINT_TEXT, 1
; Values to add in script command: $2000, 203, $105

It also uses PARAM_PRINT_TEXT#1 to print the contents of ExtraNG#5 entry (“LARA\nHey, Zip! What’s the matter?”) on the screen. – So Lara salutes back and asks why Zip called her.



5 seconds after the ExtraNG#5 has been printed on the screen (see: “5, 4”) - so 2 seconds after ExtraNG#5 has been deleted off the screen - TriggerGroup#4 will be activated, to force Animation469 on Lara. (I.e. it’s a very short conversation now. For example, because of “the radio sign has been broken”.)

Notes:

1. The entry of CUST_TEXT_ON_FLY_SCREEN is needed or else the list won’t be printed on the screen of a flyby sequence!

2. Of course, this is just an example, so you can form the fonts and print the texts in other ways, if you want.

3. This “text-setup” will also work only on one conversation. Do another setup for another “text-conversation” – similar way as I said at the “audio-setup” above.

4. If you want, then combine the two methods: when the audio plays, you print the texts on the screen. (Be careful, i.e. the speech and the text must be synchronized with each other.)

View from non-flyby cameras

When the headset-animations follow each other then the player can’t interrupt (by hitting keys), because

- these animations don’t need and don’t accept that interruption (because of their StateIDs), and
- the changes between Animation467 and 468 is automatic (i.e. controlled by only the Next Animation field) and between Animation468 and 469 is only controlled by a trigger.

But only if we are talking about the animations of LARA object. I mean, for example, “drawing a weapon” is not an animation of LARA object, i.e. it has nothing to do with the interruption/Next Animation management of LARA object. So, player is able to make Lara draw weapons if the headset-animations are just being performed.
But, as I said above, these animations are ugly without empty hands, of course. So we need that disabling Button 10 not only to start Animation467 from a standing-still position but to disable non-LARA movements (drawing weapons, igniting flares etc.) when the flyby camera sequence is just working (during the headset-animations).

But what if you want the sequence to be ended before the headset-animations end? (So now the ending part of the cutscene uses another type camera, e.g. Lara’s chase-camera.) In this case, Lara will be able to draw weapons etc. during those animations, after the end of sequence, because Button 10 is not valid now.
Well, in that case you need further entries in your Script:

GlobalTrigger= 1, IGNORE, GT_CONDITION_GROUP, IGNORE, 6, 7, 8
TriggerGroup= 6, $8000, 468, $1E, $8000+TGROUP_OR, 469, $1E
TriggerGroup= 7, $2000, 51, $0
TriggerGroup= 8, $2000, 52, $0

So GlobalTrigger#1 disables all the key commands when Lara’s performing Animation468 or 469 and enables them again, as the animations has just ended – and now it doesn’t matter if the flyby sequence is just working or not.

; Set Trigger Type - CONDITION 30
; Exporting: CONDITION(30:0) for PARAMETER(480)
; <#> : Animation= 468
; <&> : Lara. (Animation) Lara is performing <#>animation
; (E) :
; Values to add in script command: $8000, 468, $1E

; Set Trigger Type - FLIPEFFECT 51
; Exporting: TRIGGER(0:0) for FLIPEFFECT(51)
; <#> : Keyboard. Disable <&>keyboard command for (E) time
; <&> : All keyboard commands
; (E) : Forever (use other action/effect to disable it)
; Values to add in script command: $2000, 51, $0

; Set Trigger Type - FLIPEFFECT 52
; Exporting: TRIGGER(0:0) for FLIPEFFECT(52)
; <#> : Keyboard. Enable newly <&>keyboard command
; <&> : All keyboard commands
; (E) :
; Values to add in script command: $2000, 52, $0

Notes:

1. GlobalTrigger#1 (with TriggerGroup#6, 7 and 8 together) always works with any setup: one/more audio/text/combined setup(s).

2. I didn’t want to make the things more complicated, that’s why I disabled all the keys. But you need to disable only the keys that are usable to perform non-LARA object animations when Lara’s performing Animation468 or 469.

3. I don’t think the flyby ends before starting Animation468. That’s why Animation467 is not calculated now.
(I mean, I think, it’s always sure that any interrupting resolution during that short animation is prevented by the disabling effect - i.e. Button 10 - of the flyby sequence.)

4. Try to make the setup more perfect, if you want.
I mean I realized if I extract the weapons exactly at the moment (!) when the Organizer starts the whole procedure, then there will be weapons in Lara’s hand during using the headset.
It is ugly, of course, but, I think, the chance is little to extract the weapons exactly at that moment. (No, it doesn’t seem a working solution if you just want to place a key-disabling trigger in TriggerGroup#1, 2 or 3.)

Forcing other animations

As I said above, the setup is flexible – so, for example, we can use other forced animations, not only 467, 468 and 469.
For example, the cutscene won’t end when Lara lowers her hand, because you also force the running animation on her so that she’ll start running when she lowers her hand, followed by the flyby cameras. And, the audio file is longer, it ends at the end of the running animation, and in the last part of the audio you’ll hear the continuance of the conversation. (I.e. Lara started running but she’s still talking to Zip.)

Notes:

1. If you force an animation, always be careful with the starting animation. (Just I said before with Animation103 and 467.)

2. Some forced animations won’t work properly, so you need some tricks to make them work properly.
See for example that running animation. It needs the player to press the up arrow continuously. But we can’t use an animation forced if that needs the intervention (i.e. key-pushing) of the player - that’s why this running animation fails if we want to force it.
But there’s a solution if we do more than using an animation-forcing FLIPEFFECT trigger. So, we also force Lara to have a neutral State ID (let’s say, State69), when we force her to run. (Or, copy-paste the running animation into a new animation slot, with StateID69, and that animation is what you will force.) – That StateID doesn’t need and doesn’t accept any intervention.
That’s what will happen with StateID69: Lara performs the 21 frames long forced running animation one time.
But we want to force a continuous running, of course, performing those 21 frames more times after each other. That’s why we also use some loop method now (for example, a loop Organizer) so that she will just run and run. – Until some other triggers command her to do something else. (This is what that means now: stop the Organizer to get the control back on Lara, or, if you want, at the same time, when the Organizer stops, activate another trigger that forces another animation on Lara.)

3. As I said above: in a cutscene, animations have automatic connections between each other, without the intervention of the player – at most, some triggers also control the operation.
If an animation doesn’t connect properly to the next one now, then you have to check those requirements:
- check the Next Animation field,
- rule out any need of intervention of the player (see above, how),
- define the proper trigger to abort the forced animation or to force another animation (see above, how).

4. Don’t forget to disable keys for any forced animations you force after the flyby sequence stopped.

Made using TRNG 1.2.2.6
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:43.


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