Thread: TRNG - Updates
View Single Post
Old 06-01-14, 17:20   #29
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,189
Default

TRNG 1.2.2.7 Updater
(Released 6 January 2014)


Part 2

- Added new Diagnostic flag to allow demo recording
It has been added to Diagnostic command the EDGX_RECORDING_DEMO flag.
When you enable this flag you'll be able to record a demo file.
A demo file is a binary file that will be saved in trle\data folder with progressive names like: demo1.pak, demo2.pak ect.
A demo file contains all data about lara status and position at begin of the recording and then all keyboard (or joystick) command you set in the recording phase.
Once you created demo#.pak file, you'll be able to type its id (really a common index present in its file. e.g. demo5.pak has 5 as index or id) in the new script command: Demo= (see next paragraph the description)
When a demo will be played, trng engine will place lara in the position she had when it had been recorded and restore her status: weapons in hands, animation, stateid, special actions that she was performing (climbing, monkeying, swimming underwater ect). Also her mesh look will be forced to be them of start recording.
Then the keyboard commands will be sent to trng engine bypassing the user input. In this way you can record a scene where lara run, climb, shots or use items from inventory, and then show this sequence like a little cutscene.
In the reality the demo, born to add demos in title level, could be used also to create inside cutscenes.

I've not had the time to create a tutorial, anyway you can find many infos looking for EDGX_RECORDING_DEMO flag in Reference panel of ng_center.
I did a new project sample with some demos and one cutscene with all sources.

Anyway, here I wish explaing the philosophy of creation of cutscenes using demo features.
You can launch a demo file also with a trigger from the game (F379).
About the creation of cutscenes you should understand the better way to work:
  1. You begin placing lara at start position of your cutscene, you can reach this point also in game, moving simply lara in that position.
  2. Then you start recording (F11 key) now move lara where you wish she will go in the cutscene.
  3. When you wish some custom animation for lara, you can place a trigger casted with condition about demo mode, to set the cutscene animation, or, you can let still lara for some seconds, the time you suppose to be necessary to perform that custom animation. Then at end of recording, you'll be able to add the trigger for that custom animation in the demo organizer command at right frame, and when you'll play the cutscene, lara will perform that animation
  4. Same speech when you wish that enemies interacted with lara. You can transform them in actors, moving them with triggers in demo organizer and setting custom animation also for them.
  5. You can also, in post-production, adding different camera views to look lara or other actors from wished angle (see below, the new cutscene camera).
The general philosophy is therefor to create your cutscene in different steps, using demo organizer or triggers on the map to do happen what you wish.
You can add these triggers to animate the cutscene, AFTER having record the lara movements, working only on the script into the organizer linked with the demo.

More, thanks to editing features of demo recorder, you can also trim your already recorded cutscene, removing last part or the first part and then append to it a new recording beginning from last frame of previous recording.

- Added new script command to support demo.pak files
It has been added the new Demo= script command.
Demo command is of service to play the demo data you recorded using the EDGX_RECORDING_DEMO skill in DiagnosticType command.

This command works to show a demo of the levels of your adventure while player is yet in title level.
In above situation you'll place the Demo= command in [Title] section of the script, of course.

Anyway, if you use Demo command in a [Level] section it will work in custscene-mode, with some operative differences.
See description of Demo= script command in reference panel of ng_center and also the description of EDGX_RECORDING_DEMO flag about recording of demo files.

- Added new mode for condition about Lara status.
[Find Trigger Number] C25
It has been added to the conditon "Lara. (Status) Current <#>Lara status is (E)enabled/disabled" the Lara status: "Demo/Custscene mode"
This new mode is service for adding triggers in demo/cutscene that will be performed ONLY in demo mode and not when lara, in common game mode, will pass over those trigger sectors.
In this way you can increase with special texts, sounds or view effect (changing camera views) the demo/cutscene, preserving in same time the game scene where lara, later, will go.

Note: The demo mode is enabled not only while the demo is playing but also when there is a demo recording in progress.

- Added new flipeffect to launch a demo/cutscene
[Find Trigger Number] F379
It has been added the flipeffect: "Cutscene. Perform the demo.pak with <&>index in (E)way"
With this trigger you can launch a binary demo.pak file (stored in Data folder).

- Added new flipeffect to stop a demo in progress
[Find Trigger Number] F380
It has been added the flipeffect: "Cutscene. Stop the current demo in progress".
Above flipeffect is able to stop a demo from title or a testing demo but it has been thought to stop a demo launched from current level with F379 trigger, when you need to detect some condition to choose when the demo/cutscene should be completed.

- Added new condition triggers to detect frame of current demo
[Find Trigger Number] C86 C87
These condition triggers will be true when there is a demo in playing (or recording) phase and its current frame is the same supplied in the trigger.
The only difference is the way to supply the frame index to check.
The C86 condition "Cutscene. Current demo is playing/recording the <#>frame" gets the frame directly from the trigger.
While the C87 condition "Cutscene. Current demo is playing/recording the <#>frame from Paramaters=PARAM_BIG_NUMBERS script command" read the frame from a PARAM_BIG_NUMBERS script command.
The first condition (C86) covers only 1023 frame for about 30 seconds (34.1), in the case the frame to check is over that value it will be necessary using the C87 condition.
These trigger are used to enable other triggers in a precise moment of a demo.

Note: about the apparently weirdness that above triggers work also in recording mode, the reason is simple: when you record a demo it's necessary (or at list better) that you see what it will happen when the demo will be played and for this reason same triggers enabled in playing mode will be enabled also in recording mode in this way, for instance, if there is a trigger to move an item, in the middle of the demo, while you are recording this demo, you'll find that item in the new position (moved from trigger) and in this way lara will be able to interact with it in current new position, in the following demo recording, like it will happen in playing mode.

- Added new flag for Organizer
It has been added the new FO_DEMO_ORGANIZER flag.
Adding this flag to organizer you have to set in Parameter field the index of demo.pak that it will be the owner of current organizer.
Then you can use this organizer to perform triggergroups when the given demo is playing (or recording) the given frame.
The syntax of time field of demo organizer is different in this case, you'll type the absolute value of current demo frame to perform a trigger in that moment.
Read the description of FO_DEMO_ORGANIZER flag for more infos.

- Added new action trigger to transform enemies in actors for cutscenes
[Find Trigger Number] A86
It has been added the Action trigger: "Cutscene. Change <#>Moveable to (E)Actor status"
Thanks to this action you can remove AI feature from an enemy and transform him in a brainless dummy, i.e. an actor.
This moveable will apply animations or changes of state-id as you wish, using action triggers to force them, but it will have no independent decision, and neither it will be able to detect collision or other physics management.
With same A86 action you can also give again to him the brain (AI Skills) when you wish.

Note: since all enemies with same slot have the same AI skills, when you remove the AI skills from an enemy, also other enemies of same kind will lose their AI skills. For this reason it's important remember to restore always the AI skills at end of the cutscene, otherwise in the next game playing all enemies of that kind will be brainless.

- Improved the PARAM_MOVE_ITEM script command.
It has been added to the Parameters=PARAM_MOVE_ITEM script command a new set of FMOV_ flags and DIR_ directions.
The main target of this enhancment is to give the chance to move item with non costant speed, having a gravity simulation and new relative directions.

There are new preset proportional speeds (with acceleration) and gravity simulations that you can enable adding FMOV_ flags.
See description of new FMOV_ flags for more infos.

About new directions, now you can set a direction in according with current facing of item to move, while in the past it was possible only set an absolute direction (north, east, west, south).

These new skils could be useful for cutscenes, anyway remember that when you do move an actor setting a specific animation for him, he will move really byself and it's not necessary using a trigger linked with PARAM_MOVE_ITEM script command.
For this reason you should use new skills of PARAM_MOVE_ITEM only to move static items or animatings where there is no moving animation for them.

- Added new action trigger to give a role to some enemy within a cutscene.
[Find Trigger Number] A87
This action A87 should be not confused with above A86 action trigger.
While the A86 trigger changes really the behavior of the enemy, the A87 trigger set only as assignment about what moveable is the leading actor or the extra actor but the enemy will have no modification in game.
Above assignment will be used for other triggers or script commands to recognize what enemy will be affected from some command thought for leading or extra actor.
It works like a internal variable for cutscenes.

Notes:
* It's not forecast that a cutscene can be saved in the middle, for this reason the state of actor role will be not saved in savegame. Therefor it's important preventing that player was able to save the game within a cutscene.

* The A87 trigger is a way to assign to some moveable the role of leading or extra actor. Anyway when you use the A86 trigger to transform a moveable in an actor, the leading or extra actor role will be assigned byself if in that moment no leading or extra actor role had yet been assigned.
For instance:
You have no set any role to moveables.
You use A86 trigger to transform a Crocodile in an actor. Trng will assign to crocodile the leading actor role, because it had not yet been assigned.
You use A86 trigger to transform also von croy in an actor. Trng will assign to von croy the extra actor role.
You restore crocodile like common moveables (or you remove it and remove actor status).
You use A86 trigger to trasnform baddy2 in an actor. Baddy2 now is the new leading actor. Ect

* The moveable with the role of leading actor will be able to engage heavy triggers in easy way, i.e. simply walking over them, in spite of missing of AI items on that sector. This skill is not present for extra actor.


- Added new action trigger to add basic collision to actors
[Find Trigger Number] A88
It has been added the new action trigger "Cutscene. Set for actor <#>Moveable the (E)Basic collision status"
The reason to add basic collision to actors is that when you transform a common enemy in an actor, he will lose any ability to detect byself the collisions.
Theorically you should use an actor only in the controlled environment of cutscene, therefor you'll do him move in right direction, for right distance, avoiding to smash over the walls or to fall in the empty.
Anyway some basic collsion is useful, like that to move up/down the actor when he move over a non-flat floor.
The basic collision will forbid to actor to sink in the floor when he move forward for a upward slope, or to remain to fly in the empty when in front of him there is an hole in the floor.
The basic collision keep the feet of enemy on the floor, with gravity falling when there is an hole, or moving immediatly upper when there is a slope moving up.
The basic collision will stop also current animation (setting first animation with hspeed=0) when the actor is moving in the wall.

Notes:

* You should remember to remove Basic collision when you go out of cutscene.
* The basic collisions will be removed byself when you remove the status of Actor from an enemy
* The only reason to do NOT adding basic collision, is when you are using a flying enemy, or when you wish move him inside floor, walls or ceiling and for above reasons you don't wish any other interference with your action triggers to move the actor.

- Added new triggers to manage camera for cutscenes
[Find Trigger Number] F381/382/383/384/385/386/387/388/389/390/391/392/395/396

The cutscene camera is a user-friendly camera that you can use to change the actor to look, choosing many angle view and dynamic effects.
It's user-friendly because instead to have to place many fixed camera items in the map, setting triggers for all cameras and all targets, choosing the durate time ecc, you can with a single trigger enable a camera looking some preset target: Lara, leading actor or extra actor.
It's not necessary place any fixed camera for this target and neither triggers to enable cameras or targets (excepting the new triggers we are describing now, of course), anyway it's necessary that (somewhere in your level) there was a fixed camera that trng will use and then it will put back to its original place.

We have five triggers to engage cutscene camera and choose who it will look:

F381: Cutscene. Camera. Look Leading Actor from <&>View angle and (E)Distance
F382: Cutscene. Camera. Look Extra Actor from <&>View angle and (E)Distance
F383: Cutscene. Camera. Look Lara from <&>View angle and (E)Distance
F395: Cutscene. Camera. Actor with <&>role will look Lara (enemy subjective view, enemy not visible)
F396: Cutscene. Camera. Lara will look Actor with <&>role (lara subjective view, lara not visible)

All above cameras have (theoretically) an infinite durate, anyway you can stop them with F384 trigger:

F384: Cutscene. Camera. Reset cutscene camera and come back to lara's chase camera

Another way to stop previous cutscene camera is to call another different camera view. If you perform another F381/382/383/395/396 trigger the previous view will be closed and it will begin the new.

You have some triggers to add dynamic effect to the cutscene camera:

F385: Cutscene. Camera. Move up cutscene camera of <&>Clicks in (E)demo frames
F386: Cutscene. Camera. Move down cutscene camera of <&>Clicks in (E)demo frames
F387: Cutscene. Camera. Zoom-in cutscene camera covering <&>Distance in (E)demo frames
F388: Cutscene. Camera. Zoom-out cutscene camera covering <&>Distance in (E)demo frames
F389: Cutscene. Camera. Rotate at right cutscene camera around target by <&>Degrees in (E)demo frames
F390: Cutscene. Camera. Rotate at left cutscene camera around target by <&>Degrees in (E)demo frames

Note: above dynamic effects are not available with cutscene camera started with F395 or F396 triggers, because the subjective views work with preset source and target points and it's not possible change them.

You can also freeze (stop) all dynamic effects of cutscene camera with flipeffect 391:

F391: Cutscene. Camera. Freeze cutscene camera for <&>demo frames

Above flipeffect is useful also when you don't wish that the camera follows the moving of current actor. In this situation you can engage the cutscene camera looking an actor and then freeze it to avoid that it follows the actor in his walking.

You can also change idea and continue the movement of cutscene (previously frozen) camera with flipeffect 392:

F392: Cutscene. Camera. Remove freeze from cutscene camera

Notes:

* Differently than other demo/cutscene stuff, the cutscene camera will not work when you are in recording demo mode. This is necessary to allow that it was possible to "drive" lara in correct way. Situation that it could be complicated if the cutscene camera is looking in a different direction while you are trying to control lara's movements.

* It's very important remembering always to reset cutscene camera (F384) when you completed the cutscene or demo, otherwise the game will be messed forever or at least until the player will not load another level.

* If you wish having a top-view of some actor, you have to use two triggers: the first, chosen between F381/382/383/395/396 to engage the cutscene camera, and the second (F385, engaged immediatly after the first) to move up the camera at the height you wish.
The trick is to choose Distance=0 for first trigger (F381/382/383/395/396) and to select Demo frames=0 for second trigger.
In this way the cutscene camera will begin with a top-view of your actor.

* The dynamic effects (F385/386/387/388/389/390/391) will work only if when you perform them the cutscene camera it had been already engaged from F381/382/383 trigger.

* In spite of the fact that the cutscene camera has been created for demo/cutscenes, you can use it in common game phase but in this case the frames for timing will be taken from general game frame counter, instead by demo frame counter.

* If with flipeffect 391 you choose demo frames=0, the camera will be frozen forever, o until you call a F392 trigger.

- Added new condition triggers to check distance from floor and ceiling
[Find Trigger Number] C88/89/90
These condition triggers allow to verify when a moveable has a distance from floor or ceiling within a given range.
These conditions are very alike of ENV_DISTANCE_CEILING and ENV_DISTANCE_FLOOR conditions, but their use is more easy and they have been created to work fine with cutscene, since the moveable to check is always that with the Leading Actor role.
Another difference is that the C90 and C91 condition to check distance from ceiling, work using the top side of moveable to compute the distance while the ENV_DISTANCE_FLOOR conditon used the original Y coordinate of the enemey that it's very often located on his feet.

C88: Cutscene. Leading Actor is far from floor of <#>Units or greater
C89: Cutscene. Leading Actor is far from floor of <#>Units or lower
C90: Cutscene. Leading Actor top side is far from ceiling of <#>Units or greater
C91: Cutscene. Leading Actor top side is far from ceiling of <#>Units or lower

Above conditions are useful in praticular way when you choose to do not use the Basic Collisions for your actor and you try to move it with action triggers in the scenes. In that case you'll need to check height of floor to move up or down the actor when it is on floor with new different height.

- Added new action trigger to force frame number of animation
[Find Trigger Number] A89
It has been added a new action trigger to force a specific frame number for current animation:

A89: Creature. Force for <#>Moveable the (E)Frame of current animation

This could be useful when you (first) set a new animation but then you wish that this animation began from a frame different than first frame.
About cutscenes, you can use A89 trigger to drive better the actors, skipping some frame of animations in acording with requirements of current scene.

- Added new action trigger to force state-id of moveables
[Find Trigger Number] A90
It has been added an action trigger to set the current state-id for a given moveable:

A90: Creature. Force for <#>Moveable the (E)State-id

In spite it is more clean the method to change the next state id, to give to tomb engine the chance to find better frame to swap to another animation, in some circustances you can need to force immediatly the current state id.
Anyway if you use this action trigger in worse moment, you'll get bad results.

- Added new flipeffect to swap animation slots
[Find Trigger Number] F393
It has been added a flipeffect to swap animation slot of some actor in current cutscene.

F393: Cutscene. Animations. Swap animations set in data of <&>Parameter command for (E)Actor

The swapping of animation slot is very interesting to replace only temporarily some animations of a moveable with others of same moveable.
The idea is to give only for some situations different animations to use in a cutscene and then restore default animations.

For instance if you created new animation for lara walking, and you placed this new animation in 600 animation slot of lara.
You can type in the script the command:

Parameters= PARAM_SWAP_ANIMATIONS, 1, 1, 600, 1

When you perform the F393 trigger with data in ID=1 of Parameters=PARAM_SWAP_ANIMATIONS and set as actor, Lara, it will happen that when you give the command to walk forward (SHIFT+UP), lara will use the custom animation you had stored in slot 600 but that, after the f393 trigger, will be in the animation slot 1, the default for forward walking.
In this way in the cutscene lara will walk in a different way.
You can use same method for other targets, like replace the default animation for pickup with a new animation fully different.
At end of cutscene you'll restore the swapped animations (just performing a second time the same previous trigger with same data) and in the game playing, after the cutscene, the default animations of lara will come back at usual behaviour.

You can use the swapping also for enemies, just you set for them a role like Leading actor or Extra actor and then give the data for the swapping.

Notes:

* You can swap in same moment a whole set of consecutive animations.

* The source and target set of animations have to be stored in same slot, the same of actor you chose in F393 trigger.

* If the animations to swap are a wide quantity the swapping could require a perceptible interval of time, for this reason it's better perform this trigger when there wasn't so much "action" in game scene, to hide the further slow down.

See description of PARAM_SWAP_ANIMATIONS constant for more infos.

- Added new flipeffect to free all cutscene resources
[Find Trigger Number] F394
It has been added the flipeffect trigger 394:

F394: Cutscene. Free cutscene <&>resources (to call at end of cutscene)

This trigger allows to free all resources used in a cutscene in easy way.
All actors will be restored as common enemies with AI skill (if they had it). The basic collisions will be removed, the cutscene camera will be freed and the default camera will be recovered.
About the further animation swapping, you can choose if restore them or less.
Only reason to do NOT restore them is if you had performed some animation swapping that you wish preserve in selective way. The F394 trigger, in fact, restore all animation swapping, not only those performed in last cutscene.

- Added new flipeffect to swap single mesh of Von Croy
[Find Trigger Number] F397
It has been added the flipeffect: “Cutscene. Swap Von Croy <&>mesh with same mesh of (E)slot”
Von croy requires always a double in MESHSWAP1 slot.
Using F397 trigger you’ll be able to swap single mesh from von croy and this slot.
Note: really you can choose also some other slots, other that MESHSWAP1, in this way you can prepare different items in Von Croy’s hands and show them in real von croy with this trigger.

- Added new flipeffect to control better Von Croy
[Find Trigger Number] F398

It has been added the flipeffect: "Cutscene. AI. Set Von Croy<&>Data with (E)Value”
This flipeffect allows to change some critical data of von croy’s AI.
Probably other data will be added to this flipeffect in next release with new AI management.

- Added new Action trigger to enable a speech sequence for given moveable
[Find Trigger Number] A91
It has been added the action trigger: “Cutscene. Speech. Apply (E)Speech Parameters for <#>Moveable”
This trigger works with new PARAM_ACTOR_SPEECH parameter script command.
You can set in Parameters=PARAM_ACTOR_SPEECH command a sequence of speech commands to control the head of wished actor.
See the level “Deliver a speech” for an example of its usage.
See also the description of PARAM_ACTOR_SPEECH mnemonic costants for more infos.

Note:
With A91 trigger and PARAM_ACTOR_SPEECH constant, it has been added also a new organization of speech slots.
While in the past, each slot had only a different head, now you can have in a single slot many heads, each with different expression.
You can have upto 64 heads for each slot, anyway currently in speech.wad there are 16 heads for each slot, only a little part of these are really used therefor you can use others to add new expressions to simulate happiness, amazement, rage, ect.

These are new organized slots:

17 LARA_SPEECH_HEAD1 Adult Lara
18 LARA_SPEECH_HEAD2 Young Lara
19 LARA_SPEECH_HEAD3 Von Croy
20 LARA_SPEECH_HEAD4 Yves Laurel
21 ACTOR1_SPEECH_HEAD1 Troop
22 ACTOR1_SPEECH_HEAD2 Egyptian

You can find these new objects in speech.wad of demo level linked with 1.2.2.7 version of trng.
In spite there is the SPCF_OLD_SPEECH_SLOTS flag to work with old organization of speech slots, I discourage to use it, because there are many limitations in that old method.

- Improved ImportFile script command
In previous versions the only way to play a sound imported in memory, using IMPORT_MEMORY flag, was to use F131 o F132 flipeffect.

Now, from 1.2.2.7 version, the sounds, imported having a ordinal number like an audio track, will be loaded directly from script.dat (already loaded in memory) everytime any play-cd trigger will require that same audio track number.

- Added new action trigger to flip meshes
[Find Trigger Number] A92
It has been added the new action trigger: "Enemy. Mesh. Flip (E)Mesh of <#>Moveable"
The flip mesh has same target of swap mesh but it works in different way.
In tomb4 engine all moveables have two meshes for each side of the body: the main mesh and the secondary mesh.
Only the main mesh is visible.
The secondary mesh it's used to swap between main/secondary slots the meshes and change some part of body.
For instance an hand that can hold or less a weapon it will have in main mesh the empty hand, while in secondary mesh the hand holding the weapon.
To load in secondary slot of mesh a different mesh the engine will use a clone of enemy in some SWAPMESH slot but it will be used only in initilize phase, to copy in secondary or main mesh the different meshes, and then the swap mesh slot will be ignored.
Most moveable have main and secondary mesh with same value and for this reason when you perform a flip of that mesh you'll not see any change.

- Improved saving of triggergroup status in savegame
In previous version any change of triggergroup commands in script affected an outing of date of savegame recorder previously.
In spite it's normal that a change in game files (tr4 and script) required new fresh savegames, the old method to restore status of triggergroups was boring because affected unpredictable bugs and bad behaviors in game.
Now new method should allow to change triggergroups in script.dat and using newly old savegames created with previous script.dat version.

- Improved calculation of text position in presence of cinema effect
In previous release, when there was a position of text about top or bottom screen, this setting ignored the further presence of black bars to reduce the height of screen with the result that the text was not visible.
Now the top and bottom position will be computed in according with current presence and height of black strips.

- Added new flipeffects to handle a two-way conversation with texts on screen
[Find Trigger Number] F399/400/401
These three new triggers allow to set position and color for some actor (leading or extra) or Lara, to have not, in following SPC_TEXT commands, the necessity to set everytime the position of text for that given actor.

- Added new diagnostic flag for AnimationSlot command
It has been added the EDGX_ANIMATION_SLOT flag.
This flag works like the DGX_ANIMATION flag but in this case you'll get infos about the AnimationSlot commands.
Just you type a negative index in AnimIndex field and the animation will be never performed but the result of condition set in AnimationSlot command will be drawn on screen.

- Fixed description of FSS_ANIMATE flag in Reference panel of NG_Center
There was an error in description of formula used to store frame rate and number of sprite in extra parameter.

It was:

FrameDurate * 245 + NumberOfSprites

while correct formula is:

FrameDurate * 256 + NumberOfSprites

- Fixed bug about FSS_ANIMATE flag in PARAM_SHOW_SPRITE script command
In previous versions an animated sprites created disturbances on other animated sprites (activated later) or printing of texts operations.

- Changed priority between pop images and windows font text
In previous versions, the windows font text were drawn belove further pop images, detector and keypad.
In this way it was not possible print texts over above features.
Now the windows font printing has an higher priority and text will be drawn over above items.

- Fixed bug about alignment of examine text with DefaultWindowsFont
In previouse releases the alignment of examine text, set whereby an offset in ExamineText field of DefaultWindowsFont script command, had no effect.

- Changed in NG_Center some editing keys
In previous versions the keys HOME and END moved the caret at start (HOME) or at end (END) of whole script.
This behavior was not very useful, for this reason now HOME and END keys will move the caret at begin or at end of current line.

- Added new customization for sounds of new objects
It has been added the TS_SHOT_HARPOON_UW constant to use with CUST_SFX customize command.
The TS_SHOT_HARPOON_UW sound will be played only when lara is underwater and she shot with harpoon.
In previous versions there was no sound for underwater shooting with harpoon.
If you don't change this sound the default value will be 68 PENDULUM_BLADES

- Added new flipeffects to handle animation in sprites
[Find Trigger Number] F402 F403
The F402 trigger allows to stop an animated sprite at the given frame
The F403 trigger resume the animations of suspended sprites.

- Added new BAR_ values for CUST_BAR customize
In Customize=CUST_BAR now you can use two new values:
CUST_DAMAGE to customize the bar of damage room
CUST_COLD to customize the bar of cold water room.

Notes: you can use FBAR_SOUND_BAR_ANIM flag for above two bars like for all BAR_CUSTOM1/2/3/4


- Added new FBAR_ flag for CUST_BAR customize
It has been added the FBAR_DRAW_ALWAYS flag to force the given bar to be always visible.
This flag works only for some bars, not alls.
See FBAR_DRAW_ALWAYS description in MNEMONIC_CONSTANT section of reference panel of NG_Center for more infos.

- Fixed bug in management of SecondsForDeath in damage or cold rooms
In previous version when the number of seconds for death was too high the bar will never decrease.
Now trng will limit the SecondsForDeath value to its real max limit of 333 seconds.
This means that, if you set an higher value, trng will force the seconds for death at 333 seconds to avoid the freeze of damage bar.


- Fixed bug about flipeffect 297
[Find Trigger Number] F297
In previous versions the flipeffect 297 to convert a ngle room index to tomb room index didn't work always fine.

- Added new condition trigger to detect PAD status
[Find Trigger Number] C92
It has been added the condition trigger 92: "Creature. PAD trigger. the <#>moveable is touching floor"
This condition trigger should work like PAD triggertype but with advantage that you can export it.
You can use it for Lara, exporting pad condition, or with enemies.
About rollingball it doens't work fine because rollingball detect heavy triggers in front of it, before moving on that sector, with result that when the condition will be checked the rollingball is yet over previous sector and if it was touching it the condition will be true in wrong way.
You should use this condition only for exporting in conditional triggergroup, while if you wish have a pad trigger in the level map it's better using common pad trigger type.

- Added new global trigger to detected the creation of new items in game
It has been added the GT_CREATED_NEW_ITEM global trigger.
This global trigger will be enabled everytime in game it has been created an item with same slot you typed in Parameter field.
When the global trigger will be engaged the index of new created item (always a moveable) will be stored as found item index, and you can elaborate it adding to exported triggers the TGROUP_USE_FOUND_ITEM_INDEX flag.

- Changed description of one savegame memory variable
It has been changed the description of savegame variable from:
"Lara. Hands. Weapon in the hand"
to:
"WeaponAnim. Index of fake item with animations for current weapon (only big weapons)"

Notes:
* The effective absolute address of this memory variable it has not been changed
* The index stored in this variable points to a moveable item structure where there is a fake moveable item used from tomb4 engine to store current animation, frame and state id of animated extra slot of lara with weapons
* In my opinion this fake item will be created only for bigger weapons: shotgun, grenade-gun and crossbow.
With little weapons, the animation, frame and state-id will be stored in single specific memory zones that you can change using some new savegame variables. (See following paragraph)

- Added new savegame memory variable for extra animated slot of Lara
There are these new savegame memory variables:

"WeaponAnim. Current frame of weapon animation"
"WeaponAnim. Current animation of weapon animation."
"WeaponAnim. Current frame of torch-flare animation"
"WeaponAnim. Current animation of torch-flare animation"
"WeaponAnim. Current state id of extra lara slots. (Weapons and torch)"

Note: really I'm not sure about all above descriptions. I've not had the time to study better above variables.
For instance, I've some doubt about "WeaponAnim. Current state id of extra lara slots. (Weapons and torch)" description, since it could work only with torch animation but not with weapon animations.
If you discover some error in above descriptions, signal it to me, please.

- Added new flipeffect trigger to engage a secret in game
[Find Trigger Number] F404
This trigger works like old secret trigger. It has been added only to get available the exporting for secret triggering.

Note: there is a little difference between F404 trigger and the old secret trigger.
The old trigger (for a bug I suppose) refused to perform twice the same secret number ONLY when it had a number in the range 0-7, while f404 trigger refuses to perform same secret (already engaged) in the range 0-15.

- Added new flipeffect trigger to launch a fmv file
[Find Trigger Number] F405
This trigger works like the old fmv trigger. It has been added only to get available this kind of trigger for exporting.

- Fixed bug about popup images
In previous version when there was a pop up image on screen while you quit the level, in next level it was no possible show popup images

- Fixed bug about adding effect on static items
In previous versions the adding effect to static object was buggy.
The room number about position of effect was not set and it had a random value with possible disappearing of the effect or crash of the program.

- Added new setting in NGLE Settings window of NGLE program
It has been added the new setting "Hide objects on Draw Doors view" to improve the speed of drawing rooms when [Draw Doors] button is checked.
The hidding of object should increase the speed in room drawing.

Note: differently by [Hide Objects] button, this feature doesn't remove really objects but only skip their drawing.


- Added new flag for CUST_BACKGROUND customize
It has been added the BKGDF_SKIP_LOADING_TIME flag.
This flag works only togheter with BKGDF_MINIMAL_LOADING_TIME flag.
If you use BKGDF_MINIMAL_LOADING_TIME flag, the background for loading level will be kept on screen until the time you set, in spite the effective loading of level could be already completed.
If you wish that the player was able to skip in advance the background and go to next level, you can add the BKGDF_SKIP_LOADING_TIME flag and player will be able to skip the background with escape, space or action (ctrl, really) key.

- Fixed bug about flipeffect to follow enemy target on some axis
[Find Trigger Number] F119
In previous release the updating of source position of camera was in relation with moving of Lara. No moving of lara no updating of source position.

- Added new tool in (new) Tools3 panel
It has been added [Audio Converter] tool.
You find this utility in Tools3 panel.

The audio converter allows to convert:

* Mp3 files to wav files
* Wav files to Mp3 files
* Wav files to another wav with different internal format

There are preset values to convert wav files to "44100 Hz 4 bit stereo" (format for native audio folder of trle) and to "22050 Hz 16 bit mono" (format for sound\samples folder).
About the format "44100 Hz 16 bit stereo", this is not supported in native way by tomb4, anyway this format is the most standard wav format and you can use it as intermediate step when a direct audio conversion is not possible.
For instance, you cann't convert directly a wav file of AUDIO folder to a wav file for Sound\samples folder.
In this case you'll have to convert the wav file of audio folder, to intermediate standard format "44100 Hz 16 bit stereo" and then using these new wav files to convert them to format for sound\samples folder "22050 Hz 16 bit mono"
Alike speech for mp3 conversion. To convert a wav file to mp3 format it's better using a source wav file in standard wav format "44100 Hz 16 bit stereo" otherwise the direct conversion could fail.

- Added new savegame memory variable
To Savegame Memory list it has been added the new variable:
"TRNG Index. Index of last item to have enabled a trigger"

This variable will host the (tomb) index of last moveable that has enabled a trigger.

Note: this value could change many times in same frame, since all moveables require to be moved or elaborated at least once for each frame and some of them could enable a trigger in same frame.
For this reason a diagnostic on screen of its value it could take leak results.
Anyway you can use this variable to perform a condition to discover the index of moveable that enabled an heavy trigger.
Just you link to heavy trigger the performing of a triggergroup where you add at begin the conditions to read above index and compare it, after a conversion in ngle index format, with some item index you wish.

To perform these conditions you'll have to use:

F244 trigger to copy in CurrentValue the index of last item to have performed a trigger
F300 trigger to convert the tomb index in CurrentValue in NGLE format
C40 or C48 triggers to compare value in CurrentValue with you wished ngle item index

while the following triggers, that you'll add to this triggergroup, will be performed only if above condition it's true, and therefor only if the moveable to have engaged that heavy trigger is that you set in condition.



- Added new action trigger to update room of animating
[Find Trigger Number] A93
It has been added the action trigger: "Move. Update room for <#>Animating with (E)units of Y displacement"

To understand when and how to use this trigger it's important understanding what is this "updating of room"
While static items have owned always from a single room and they cann't move to other rooms, all moveables can move for whole level.
In spite of this their freedom, also moveables have owned by their beginning room, but for moveables there is a "change-room" procedure to change the room owner of any moveable. This change of owner it's that I called "updating of room"

The room updating will be performed byself in most circustances:

* All enemies that are able to move byself, will update their room after every moving.
* The code that handles lara does the room updating, of course.
* Also all moveables you forced as actors (see triggers for cutscenes) will have their room updated but only(!) if you added to them the basic collision feature.
* All moveables you move using action triggers with progressive movements (27 28 29 30 31 32 33 34 35 36 40 56 57) and flipeffect 167 perform room updating on moved animating.

While the immediate moving with action triggers: 63 64 65 66 67 68 and (Physics) attractions: 69 70 71 72 73 74 75 76, have no room updating.

Another situation where you can use the new A93 trigger is when you to do move an animating replacing in its slot a real enemy (like a baddy) and to do move him applying a moving animation. In this case the room updating will be NOT performed since it's not forecast that animating items move byself since they have not AI skill.

For above situations you can use A93 trigger to update the room of animating/moveable.
This updating should be performed everytime you move it, or at least when it moved across boundary between its previous room and the new room.

Notes:

* In the case you update the room for an already updated moveable nothing of bad happens, but you are wasting cpu time for nothing.
Different situation when you apply a displacement different than 0 on some creature that has already its own room updating procedure. In this situation you could have bad behavior in game since the room of that moveable will be changed by your code but also by the original AI code with a different final value of room.

* When you move a moveable in a different room with NO updating of room, the moveable could blinking, disappearing or provoking a crash

* In spite I spoke about "animatings" the room updating is a procedure that works for all moveables items, but, by other hand, in most circustance it's not necessary for creatures (enemies) because their AI skill already performs room updating byself.

* The "units of Y displacement" value (see description of A93 trigger) it's a boring matter to explain.
You can let it to "no displacement" and it will work fine 99% of times.
About that 1% the problem happens on vertical portals.
Since most moveables have their Y coordinate at their base, where they touch the floor, when a moveable has only the feet in below room while the most of his body is in upper room, it sometimes happen that there were problems about visibility box or (more seldom) with collision box, since this moveable will be seen as he was in lower room (for his feet) but he is almost all in upper room. To correct this problem tomb4 code in some circustance apply a Y displacment of moveable before updating room to put him in a room where he is really with most of his body.
In above situation it will be used a -256 or -128 value to move to upper room the y coordinate.
In other cirucstances, like for rollingballs it could happen the opposite. Since rollingball has its Y pivot in the middle of the sphere when it touches the floor of lower room, it could be yet with its y coordinate in upper room but in this way it could fail to enable heavy pad triggers. So tomb4 code correct it with +512 (hardcoded) to force it in lower room.
Pratically this Y displacemnt is an attempt (by core design programmers) to fix a bug in computation of moveable position when moveables are in boundary of two vertical rooms.
This attempt doesn't work always fine...


- Changed description of many memory variables
This work has been done all by AkyV so all credits for him.

AkyV studied many memory variables (item, savegame, inventory, memory and code) and discovered the real meaning of many "unknown" or bad described fields.
In new descriptions by AkyV you can understand better the real usage of many of these memory zones.

- Added new flag for CUST_BACKGROUND customize
It has been added the BKGDF_SKIP_LOADING_TIME flag.
This flag works only together with BKGDF_MINIMAL_LOADING_TIME flag.
If you use BKGDF_MINIMAL_LOADING_TIME flag, the background for loading level will be kept on screen until the time you set, in spite the effective loading of level could be already completed.
If you wish that the player was able to skip in advance the background and go to next level, you can add the BKGDF_SKIP_LOADING_TIME flag and player will be able to skip the background with escape, space or action (ctrl, really) key.

- Fixed bug about flipeffect to follow enemy target on some axis
[Find Trigger Number] F119
In previous release the updating of source position of camera was in relation with moving of Lara. No moving of lara no updating of source position.

- Added new tool in (new) Tools3 panel
It has been added [Audio Converter] tool.
You find this utility in Tools3 panel.

The audio converter allows to convert:

* Mp3 files to wav files
* Wav files to Mp3 files
* Wav files to another wav with different internal format

There are preset values to convert wav files to "44100 Hz 4 bit stereo" (format for native audio folder of trle) and to "22050 Hz 16 bit mono" (format for sound\samples folder).
About the format "44100 Hz 16 bit stereo", this is not supported in native way by tomb4, anyway this format is the most standard wav format and you can use it as intermediate step when a direct audio conversion is not possible.
For instance, you cann't convert directly a wav file of AUDIO folder to a wav file for Sound\samples folder.
In this case you'll have to convert the wav file of audio folder, to intermediate standard format "44100 Hz 16 bit stereo" and then using these new wav files to convert them to format for sound\samples folder "22050 Hz 16 bit mono"
Alike speech for mp3 conversion. To convert a wav file to mp3 format it's better using a source wav file in standard wav format "44100 Hz 16 bit stereo" otherwise the direct conversion could fail.

- Added new savegame memory variable
To Savegame Memory list it has been added the new variable:
"TRNG Index. Index of last item to have enabled a trigger"

This variable will host the (tomb) index of last moveable that has enabled a trigger.

Note: this value could change many times in same frame, since all moveables require to be moved or elaborated at least once for each frame and some of them could enable a trigger in same frame.
For this reason a diagnostic on screen of its value it could take leak results.
Anyway you can use this variable to perform a condition to discover the index of moveable that enabled an heavy trigger.
Just you link to heavy trigger the performing of a triggergroup where you add at begin the conditions to read above index and compare it, after a conversion in ngle index format, with some item index you wish.

To perform these conditions you'll have to use:

F244 trigger to copy in CurrentValue the index of last item to have performed a trigger
F300 trigger to convert the tomb index in CurrentValue in NGLE format
C40 or C48 triggers to compare value in CurrentValue with you wished ngle item index

while the following triggers, that you'll add to this triggergroup, will be performed only if above condition it's true, and therefor only if the moveable to have engaged that heavy trigger is that you set in condition.



- Added new action trigger to update room of animating
[Find Trigger Number] A93
It has been added the action trigger: "Move. Update room for <#>Animating with (E)units of Y displacement"

To understand when and how to use this trigger it's important understanding what is this "updating of room"
While static items have owned always from a single room and they cann't move to other rooms, all moveables can move for whole level.
In spite of this their freedom, also moveables have owned by their beginning room, but for moveables there is a "change-room" procedure to change the room owner of any moveable. This change of owner it's that I called "updating of room"

The room updating will be performed byself in most circustances:

* All enemies that are able to move byself, will update their room after every moving.
* The code that handles lara does the room updating, of course.
* Also all moveables you forced as actors (see triggers for cutscenes) will have their room updated but only(!) if you added to them the basic collision feature.
* All moveables you move using action triggers with progressive movements (27 28 29 30 31 32 33 34 35 36 40 56 57) and flipeffect 167 perform room updating on moved animating.

While the immediate moving with action triggers: 63 64 65 66 67 68 and (Physics) attractions: 69 70 71 72 73 74 75 76, have no room updating.

Another situation where you can use the new A93 trigger is when you to do move an animating replacing in its slot a real enemy (like a baddy) and to do move him applying a moving animation. In this case the room updating will be NOT performed since it's not forecast that animating items move byself since they have not AI skill.

For above situations you can use A93 trigger to update the room of animating/moveable.
This updating should be performed everytime you move it, or at least when it moved across boundary between its previous room and the new room.

Notes:

* In the case you update the room for an already updated moveable nothing of bad happens, but you are wasting cpu time for nothing.
Different situation when you apply a displacement different than 0 on some creature that has already its own room updating procedure. In this situation you could have bad behavior in game since the room of that moveable will be changed by your code but also by the original AI code with a different final value of room.

* When you move a moveable in a different room with NO updating of room, the moveable could blinking, disappearing or provoking a crash

* In spite I spoke about "animatings" the room updating is a procedure that works for all moveables items, but, by other hand, in most circustance it's not necessary for creatures (enemies) because their AI skill already performs room updating byself.

* The "units of Y displacement" value (see description of A93 trigger) it's a boring matter to explain.
You can let it to "no displacement" and it will work fine 99% of times.
About that 1% the problem happens on vertical portals.
Since most moveables have their Y coordinate at their base, where they touch the floor, when a moveable has only the feet in below room while the most of his body is in upper room, it sometimes happen that there were problems about visibility box or (more seldom) with collision box, since this moveable will be seen as he was in lower room (for his feet) but he is almost all in upper room. To correct this problem tomb4 code in some circustance apply a Y displacment of moveable before updating room to put him in a room where he is really with most of his body.
In above situation it will be used a -256 or -128 value to move to upper room the y coordinate.
In other cirucstances, like for rollingballs it could happen the opposite. Since rollingball has its Y pivot in the middle of the sphere when it touches the floor of lower room, it could be yet with its y coordinate in upper room but in this way it could fail to enable heavy pad triggers. So tomb4 code correct it with +512 (hardcoded) to force it in lower room.
Pratically this Y displacemnt is an attempt (by core design programmers) to fix a bug in computation of moveable position when moveables are in boundary of two vertical rooms.
This attempt doesn't work always fine...

- Changed description of many memory variables
This work has been done by AkyV so all credits for him.
AkyV studied many memory variables (item, savegame, inventory, memory and code) and discovered the real meaning of many "unknown" or bad described fields.
In new descriptions by AkyV you can understand better the real usage of many of these memory zones.

CODE memory:

OLD: "Earthquake vertical movement (negative values)"
NEW: "Earthquake intensity"

SLOT memory:

OLD: "Unknown1 (Pheraps distance to enable the MIP version)"
NEW: "Distance to enable the MIP version"

OLD: "Unknown2 (Usually it has value 50)"
NEW: "Distance to detect Lara"

OLD: "Explosion Mask. (Each bit a type of weapon able to do explode it"
NEW: "Shatterable meshes"

ITEM Memory:
OLD: "Unknown (Pheraps accelleration on falling)"
NEW: "State ID (at AI objects)"

OLD: "Unknown Countdown (Some counter, not yet discovered)"
NEW: "Object timer"

OLD: "Object buttons. Five buttons + invisible button"
NEW: "Object buttons. Five buttons + Clear Body button (only for read)"

OLD: "Custom Flags (Different flags in according with object type)"
NEW: "Object status. Five buttons + One Shot button"

OLD: "Facing Rotation (Only for Lara)"
NEW: "Facing Rotation"

OLD: "Unknown (Light_A)"
NEW: "Light on object. Red ambience"

OLD: "Unknown (Light_B)"},
NEW: "Light on object. Green ambience"

OLD: "Unknown (Light_C)"},
NEW: "Light on object. Blue ambience"},

OLD: "Unknown (Light_D)"},
NEW: "Light on object. RedGreenBlue ambience"},

OLD: "Unknown (Light_E)"},
NEW: "Light on object. Red ambience difference"},

OLD: "Unknown (Light_F)"},
NEW: "Light on object. Green ambience difference"},

OLD: "Unknown (Light_G)"},
NEW: "Light on object. Blue ambience difference"},

OLD: "Unknown (Light_H)"},
NEW: "Light on object. Ambience changing degrees"},

SAVEGAME memory:
OLD: "System. Disable special keys (15 disable inventory pause f5)"
NEW: "Lara. Time in death"

OLD: "Lara. Test. Throw out item from the Hands (1 = lara is throwing out item)"
NEW: "Lara. Torch status in Lara's hand"

OLD: "Lara. Test. Lara is placing the weapon on the back (1 = yes)"
NEW: "Lara. Test. Lara is aiming at the enemy automatically (1 = yes)"

OLD: "Lara. Rope. Speed sliding on the rope"
NEW: "Lara. Horizontal position on the rope"

OLD: "System. Fog Bulb Color"
NEW: "System. Fog Color"

OLD: "System. Unknown (Item chosen from Inventory?"
NEW: "System. Inventory closed at item"

OLD: "WeaponAnim. Current frame of torch-flare animation"
NEW: "WeaponAnim. Current frame of torch-flare-weapon animation"

OLD: "WeaponAnim. Current animation of torch-flare animation"
NEW: "WeaponAnim. Current animation of torch-flare-weapon animation"

INVENTORY memory:
OLD: "View Flags. (2 = turn endless, $4000 = usable?)"
NEW: "View Flags.(2 = turn endless)"

- Fixed bug in code variable about script.dat flags
In previous versions the code variable named:

"Script Dat. Option Flags (Use bit operations to read or write)"

didn't work.

Flags for this variable:
1 FlyCheat
2 LoadSave
4 Title
8 PlayAnyLevel
128 DemoDisk

Note: probably only FlyCheat and Loadsave may be changed in run time with valid results. About others, I discourage to use them because those flags will be used only at start time before you are able to change them.

- Fixed bug about trigger to read inventory memory
[Find Trigger Number] F339
In previous versions the trigger to read from (currently selected) inventory memory a value from some field to copy it to some numeric variable didn't work and very often it occured a crash.

- Added new action trigger to set as active item a moveable
[Find Trigger Number] A94
It has been added the action trigger "Trigger. Set <#>Moveable as ACTIVE item (item that you'll move or animate)"
You should use this trigger only before moving or animating with action triggers that moveable to inform tomb4 engine that it is not a simple "static" animating but a moveable that will be used as a creature.

This trigger fixes a very particular situation.

When you move or animate a moveable different than creatures with AI skills and in the level there is currently no creature enabled, the object you moved with action triggers could be no updated correctly.
For instance it will be no able to enable heavy triggers in spite you set for it the NEF_EASY_HEAVY_ENABLING flag in Enemy script command.

The reason of this complicated speech is that tomb4 engine omits to perform any control procedure of moveable when there is no active item. Since animating items(but in many circustances, also doors, switch, and other traps) will be not seen as active items, the tomb4 engine skip all control procedure of all moveables.

When you set a moveable like "active item" you inform tomb4 engine that, the object could be moved, animated or it could enable heavy triggers.

Added new action trigger to remove status of Active item from a moveable
[Find Trigger Number] A95
This trigger has opposite target of A94 and it removes the object from active-item list.
You should use this action trigger only on objects you had triggered with A94 trigger.
You should use this trigger only when you mean do not move evermore this moveable.
note: if you try to use this trigger on creatures you should have same result to freeze them.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by AkyV; 05-08-16 at 13:00.
Titak is online now