www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 17-09-06, 18:16   #1
Uvavoo
Archaeologist
 
Join Date: Jul 2002
Location: Huddersfield
Posts: 2,215
Default TREP Flipeffect Editor and Timer Editor User Codes

Two of the most powerful features of the TREP patcher are the Flipmap Editor and the Timer editor. These two editors give ENORMOUS power to include completely new gameplay to your tomb raider levels without resorting to tricks like the infamous 'rolling ball trick'.
I thought I would start a sticky thread so users can post their custom flipeffects.
I will start the ball rolling with a very simple but effective bit of code. This enables things like a gas filled room etc.

DEC_HP 3
STOP


All you need to do is assign this code to a flipeffect number using TREP's flipeffect editor. In game just place a series of triggers where you want the effect to take place (in a gas filled room for example), when Lara is on a trigger her health bar will decrease. Put a fog bulb in the room to simulate the noxious gas. Change the number to increase or decrease the rate of health loss.

There are of course more examples in Pyaumuch's excellent user manual.
__________________
Me Like Blue Me no like Purple

Last edited by Uvavoo; 17-09-06 at 18:17.
Uvavoo is offline   Reply With Quote
Old 17-09-06, 18:25   #2
rika2
Professor
 
rika2's Avatar
 
Join Date: Feb 2005
Posts: 3,365
Default

ONLY_IN_WATER
DEC_HP 8

I use this for freezing water... this language is very simple and easy to use.
__________________
"We hail thee whom the gods have callen!"
rika2 is offline   Reply With Quote
Old 17-09-06, 18:59   #3
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,593
Default Deadly water & Triggering an animation

Great thread, Uvavoo!!!

Freezing water
ONLY_IN_WATER
DEC_HP 1
STOP

This is what I use for freezing water.
It drains Lara's health quite slowly so she can still stay in the water for a pretty long time. It is not as cold as the water in TR3 Antarctica.


Toxic fluid
ONLY_IN_WATER
DEC_HP 10
STOP

Drains Lara's health very fast but it does not have the flame effect which would occur when using the green death square.
The ONLY_IN_WATER command makes sure that Lara will only loose health when IN the water, not when jumping over it.

Animation trigger
PLAY_ANIM 443

Animation 443 is a custom made dying animation. It does not really kill Lara (healthbar does not drain to zero) but the action is shown with a flyby camera. The camera triggers the jump back to the main menu.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 17-09-06 at 19:05.
Titak is offline   Reply With Quote
Old 17-09-06, 19:02   #4
Mr XY
Junior Member
 
Join Date: Jun 2006
Location: Germany, Heidelberg
Posts: 380
Default

One Question:

I'm using this freezing water, too. But why do you use the command "STOP", Titak??
Mr XY is offline   Reply With Quote
Old 17-09-06, 19:04   #5
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,593
Default

It is needed to make the effect stop when Lara leaves the trigger.

It might not be needed anymore in the latest TREP version though. But when I created the effect with an older version I had to add that, according to the userguide.
(Or so I understood...)
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 17-09-06, 19:16   #6
Uvavoo
Archaeologist
 
Join Date: Jul 2002
Location: Huddersfield
Posts: 2,215
Default

Yes, stop is still required as the effect would continue to execute even when lara leaves the trigger.

I wonder if it would be possible to have a command such as TRIGGER 44, where 44 is the trigger number (trigger could be defined in an empty room for example). Used in conjunction with the Timer and the IF statements some amazing things could be achieved,...... Pyaumuch??? or is this not possible and I am asking too much (greedy!)
__________________
Me Like Blue Me no like Purple

Last edited by Uvavoo; 17-09-06 at 20:02.
Uvavoo is offline   Reply With Quote
Old 17-09-06, 19:20   #7
teme9
Professor
 
teme9's Avatar
 
Join Date: Nov 2005
Location: Finland
Posts: 3,255
Default

If you want this "another" kind poisonous effect use:

FLASH_GREEN
DEC_HP 10
SPEEDDN
STOP


The speed down effect makes more "poisonous" looking.
teme9 is offline   Reply With Quote
Old 17-09-06, 23:31   #8
Pyuaumch
Historian
 
Join Date: Dec 2005
Location: Russia
Posts: 491
Default

@Uvavoo: Now TREP is updated again (version 0.743) with new option in racetimer editor, which will allow you to use IF statements there too (i call them conditional directives - it's ONLY_ON_LAND, ONLY_IN_WATER and Harly's ENVIRONMENT commands). To use conditional directives in Racetimer Editor, use method: call option in Racetimer Editor (or else game will crash with this timer event).

Also, i don't know which are other values you want to use with IF statements in flipeffect editor (like ammo quantities, items in inventory, statistics etc.), so most likely it will be easier to create some conditional directives, like this:

ONLYIF_BYTE_LESSTHAN [ADDRESS] [0-255]
ONLYIF_WORD_LESSTHAN [ADDRESS] [0-65535]
ONLYIF_DWORD_LESSTHAN [ADDRESS] [0-...]
ONLYIF_BYTE_MORETHAN [ADDRESS] [0-255]

...and so on. Then you will simply need a list of byte, word and dword TR4 engine values and their addresses and work with them. Please tell me which values you want to use with IF statements, and i'll try to compile a short list of commonly used TR4 values and their addresses, and then you will be able to use them with these conditional directives.

As for TRIGGER [item ID] command, i don't fully understand how TR4 engine activates items... It looks like it's activating items only if Lara is on trigger square, and there is no chance to activate them by simply changing some values in memory... Anyway, maybe this problem will be resolved later .
Pyuaumch is offline   Reply With Quote
Old 18-09-06, 16:09   #9
Uvavoo
Archaeologist
 
Join Date: Jul 2002
Location: Huddersfield
Posts: 2,215
Default

That's very interesting.
Essentially you have an IF statement with respect of the TIMER, ie IF the timer is at say 30 seconds then do this. I was thinking in terms of creating sophisticated seqences by triggering events using the timer, such as a flyby camera.
Although using If statements with other variables sounds interesting.

I suspect that when a trigger is activated the engine looks at the tr4data file for the parameters and passes these back to the engine. So it would be tricky if not impossible to achieve activating a trigger via a flipeffect. But who knows?
__________________
Me Like Blue Me no like Purple
Uvavoo is offline   Reply With Quote
Old 08-11-06, 12:00   #10
Uvavoo
Archaeologist
 
Join Date: Jul 2002
Location: Huddersfield
Posts: 2,215
Default

Setting up a countdown timer
Although this has been explained in the documentation, I thought I would repeat the main theory here.

CREATE FLIPEFFECTS FIRST
1. Create a Flipeffect using the Flipeffect editor.
2. In the description field at the top type in start countdown counter.
3. The code is as follows:

START_TIMER_FROM 010:00:00
STOP


4. This will count down from 10 minutes. Don't forget to check the Enable flipeffect editor and note down your flipeffect number (in this case 50).
5. Click the Proceed button.

CREATE TIMER
1. Click on the Timer button.
2. Insert the following settings:


Just to explain the settings.
Invert race timer: this makes the clock count DOWN.
Timer becomes visible at: this makes the onscreen clock visible at the time specified. (note: You must put the line Timer= ENABLED in your script.
If race timer equals: means at this time the event(s) specified will be triggered. In this case KILL_LARA. So, when the counter counts down to zero, Lara will die.
Event number: You can have many events all triggered at specific times.

Another Event
Here is an example of another event.



This is a simple event. All it does is flash the screen green when there is one minute to go. Note the new event number is 2.

To trigger the whole thing, create a trigger for FLIPEFFECT 50. When Lara steps on it, the timer will start.

This is a simple example, but in the timer editor you can have complex series of events occurring at set times. For example triggering audio, explosions etc, in fact any command used in the flippeffect editor can be used in the Timer editor.
__________________
Me Like Blue Me no like Purple
Uvavoo is offline   Reply With Quote
Reply

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 04:34.


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