Thread: TRNG - Updates
View Single Post
Old 25-07-13, 21:04   #28
Titak's Avatar
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,664

TRNG Updater
(Released 6 January 2014)

TRNG Updater

Part 1

- Added new window in NGLE program
Now it's possible to have an extra window with buttons to invoke all NGLE commands.
With button windows you can create your custom buttons linked to menu and keyboard commands other that other default buttons, renaming them as you wish.
See the document "help_ButtonsWindow.txt" in NG_Center folder and the samples in trle folder named "NetBook_ButtonsWindow.txt" and "WideScreen_ButtonsWindow.txt" for more infos.

- Added new keyboard command in NGLE
Now with CTRL 9 you can open the current tga file with the default program for tga type, set in Windows

- Added new keyboard command in NGLE
Now with ALT T you can reload current tga (texture) file avoiding to be prompted for the tga name to be loaded.

- Added in NG_Scripter the #include directive
The usage of include directive is useful to put in order the script dividing it in logical blocks.
For example when you create some script commands to realize a custom animation or other special effect, you can copy all commands for that target in a separated text file with a meaningfull name.
In this way your script could become like this:

#INCLUDE "LaraHome.txt"

#INCLUDE "AnimClimbFromWater.txt"

#INCLUDE "DistanceSensory.txt"

There are undoubt advantages in this job planning.
When you are not interested to some (already completed) features, you have not all those script commands in the main script to create confusion.
While, when you wish work own on that feature you can load (F5 key) the include file in Ng_center and you'll have only the meaningful commands in the editor to study and edit.

- Added in NG_Center program the #FIRST_ID directive
This directive it has been studied to be used in the include files of the script to set the start of IDs range for each script command in that include file.
The target is to reduce the risk of ID conflicts between command in the include file and those of the main script file.
The #first_Id directive works in according with the F1 command to get the first free id for the current command. With a first_id directive the F1 command will return always the first free id with value greather or even that typed in #first_id directive.
See in the [New Script Commands] section of the Reference panel the item "#FIRST_ID" for more infos.

- Enhanced the F1 keyboard command in NG_Center
Now the feature to locate the first free id for current command, other to support the #first_id directive (see above) is able to say to you in advance if there are two commands like the current with same Id value.

- Added in NG_Center the new #DEFINE directive
With #define you can create a temporary mnemonic variable with the wished value that you'll be able to use in all numeric arguments of the commands in that include file, also mixed with aritmetic formulas with [+] or [-] to link mnemonic constants or numeric values.

The main usage of this feature is to create a method to change all IDs of different commands in the include file, changing only a single value, that of #define directive.
See the description of #define directive in the [New script commands] section of the [Reference] panel to see some examples.

- Fixed a problem of backward compatibility with GlobalTrigger command

In the version it was been added to the GlobalTrigger command a new argument, the IdPerformTriggerGroupOnFalse field. This change generated the error message "ERROR: missing arguments for GlobalTrigger" in all previous scripts.
Now ng_center is able to recognize this particular situation and it omits the error message, adding byself a new null (ignore) field to cover the new IdPerformTriggerGroupOnFalse field.

- Improved the exporting of anim (trng) commands in NGLE program

When you export the current trigger from the Trigger Type window, using the Export Anim Command button, now you can choose as Frame Number the value -1. When you choose -1 the exported trigger will be performed in all frames of animation where it has been placed.
This chance is usefull for conditional triggergroups where you wish test for each frame if a condition is true. It could be useful also for some add effects.

- Added new condition trigger for collision

[Find Trigger Number] C82
The new conditional trigger "Collision. <#>Moveable is touching Lara with its (E)mesh" allows to verify if there is collision with a specif mesh of a given moveable and Lara.
This collision method is useful for fighting or traps.
For example you can detect if the right hand of an enemy is touching lara. If you place this condition in a trigger group called by an animcommand in the animation of enemy where he is trying to hit lara, you can add a damage to lara only when the collision right-hand of enemy and lara is true.
Note: this feature use the sphere mesh to detect the collision so it works better with meshes having about a sphere shape.

- Added new condition trigger for collision
[Find Trigger Number] C83
The new condition "Collision. Lara is touching <#>Moveable with her (E)mesh" it is alike the previous C82 condition, but in this case the detection happens for what lara's mesh is touching the moveable.
You can use this to detect if it is lara to hit the enemy with a fist.

Note: other that the same note typed for above C82 condition, I remember that some unofficial tool, to manage objects, could not take care to modify the sphere mesh of a an item, when it changes that mesh shape.
This is only a doubt, anyway if this situation was true, it could create bad detection for modified moveable having yet the old (original) sphere meshes (in spite their shape has been changed).

- Signalation about unused flag for TextFormat script command
The FT_SIZE_NO_BORDER flag has no more effect. It is a refuse of old print text management for special characters but the new trng code bypassed fully the manage of that flag.

- Added new script command: AnimationSlot
The AnimationSlot command is very much alike than Animation command but in this case the animation regards not lara but a generic moveable of the wished Slot.
With AnimationSlot command you can replace, remove or add new animations for existing enemies.

- Added new ENV_ conditions.
There are new ENV_ condition created for the AnimationSlot command.


The "BOX" are the gray box sectors placed in ngle to inhibit some zone to the enemies.

- Added new condition about detection of lara from some enemy

[Find Trigger Number] C84
The new condition "Creature. <#>Moveable with (E)degrees of view is able to see Lara" allows to discover if a moveable is able to see lara.
This condition works better than common detection in tomb4, where an enemy discovers the presence of lara also when she is back of him.
In this condition you can set the angle view of the enemy, and if lara is in hidden zone of his view he will be not able to see her.
The condition is able to manage further moveables or statics that stop the sight of the enemy and where lara could hidden her.
This condition is available also like ENV condition.
It works on all moveables not only enemies. Take care about the facing for eyes position.
In the "lightning" demo you can find a room where to check how it works.

unfortunately, until new AI skills will be not developed, this condition trigger is not able to change the common behavior of enemies
Anyway you can set an enemy with AI_GUARD or AI_PATROL1/2 and trigger when he will be able to see lara, to activate other enemies to attack her (the guard gives the alarm...)
Or you can use as "guard" a cctv like in the lightning demo (but I used a sentry gun instead of a cctv)

- Added new ENV condition for AnimationSlot command.
The new env condition ENV_ENEMY_SEE_LARA, works like the above trigger condition (C84).
You can use the ENV_ENEMY_SEE_LARA in the AnimationSlot command to start the attack of the enemy vs Lara.
See the ENV_ENEMY_SEE_LARA constant in the MNEMONIC CONSTANTS list of reference panel for more infos.

- Fixed problem with condition to check seconds of screen timer
[Find Trigger Number] C20
In previous versions the condition texts "Lower" and "Higher" had the opposite effect.

- Fixed bug in Equipment command.
In the version the Equipment command failed with many pickups when they had an id number different than 1: Key, Puzzle, pickup.
Note: in the reality this fixing has been already done in the previous ( version but the signalation was missing in the history.

- Fixed bug about extension of dynamic lights number

In the previous version the icreasing of dynamic light from 32 to 128 had a bug and the limit worked yet to 32.
Now this bug has been fixed, anyway for technical requirements the max number of contemporary light is now of 127 (and not 128)

- Fixed bug about activation of some triggers in contiguous sectors
This bug regarded all flipeffects or action triggers.
It happened when two or more actions (or flipeffects but not mixed between them) are in contiguous sectors and lara move her in these sectors keeping her body always in some trigger sector.
The problem was that a trigger already enabled it was no more activable after lara went out from that sector and then she came back on it.

- Added new flag for TriggerGroup command
It has been added the TGROUP_SINGLE_SHOT_RESUMED flag.
This flag works like the TGROUP_SINGLE_SHOT flag (see its description) but in this case it's not necessary use the flipeffect 345 to enable it newly.
In fact, a triggergroup with the TGROUP_SINGLE_SHOT_RESUMED in (first) flags word, will be enabled newly not just the current triggergroup stops to be performed. This means that the "single shot" atttribute will work only in contiguos triggered sectors, but just lara goes out from this trigger zone, the trigger will be newly ready for further activations.

since there was no more available bits (value to use) for TGROUP_ flags, I had to use the (futile) TGROUP_AND value as this new TGROUP_SINGLE_SHOT_RESUMED flag.
The TGROUP_AND flag was futile because in the missing of other operators (OR and NOT) the AND was the default.
I let the mnemonic constant TGROUP_AND only to avoid error messages from ng_center with old scripts, but now its value is 0, so it has no effect placing it or less in the TGROUP_ flags field.
The only situation where this remapping could create trouble is if you use the new dll with an old script.dat file compiled with previous ng_center version, but this is always a bad practice: when you use a new dll you should always recompile all buildable files with the new updated tools.
The buildable files are: script.dat, .tom and .tr4 file other that savegame files

- Removed error message "Error Decompressing Data" you got in tomb4 log file everytime the engine decompressed a tr4 file.

- Fixed bug in NG_Center program.
In previous version it was visible a little gray box over main window. It was a little (useless) button.
Now it has been removed

- Added new DGX parameter for DiagnosticType command.
It has been added the DGX_FPS flag. With this flag the current FPS (Frame Per Second) will be displayed in the diagnostic on screen.
The DGX_FPS disgnostic is useful when you are checking for slowdown in your level and you are trying to fix this problem with different settings of Turbo script command.
Note: There are two FPS values: the sync and the async frame rate. Read the description of DGX_FPS constant for more infos.

- Added new constant for DiagnosticType command.
It has been added the DGX_ERRORS constant.
When you enable diagnostic in game, and you add the DGX_ERRORS to the DiagnosticType command, you'll see all error messages that trng discovers parsing your script.dat or performing your triggers in game.
This is a very important help in development phase because in this way you can discover immediatly when you mistake something in script or trigger settings.

with DGX_ERRORS enabled, when you quit tomb4.exe you'll find in trle folder an "error_parsing_log.txt" file with the complete list of all parsed errors in last game session.
When you wish signal a problem with trng on some forum, you should show always also the "error_parsing_log.txt" contents.

- Changed management of TRB_ASYNC_FRAMES mode of Turbo script command
The previous management of TRB_ASYNC_FRAMES mode did not work fine.
Now the TRB_ASYNC_FRAMES mode tries to reach the full frame rate (30 fps) performing in same frame time two or more frame movements.
See TRB_ASYNC_FRAMES description in Reference panel of NG_Center for more infos.

- NG_Tom2pc program: Extended the memory to manage sprite textures.
With previous wideness of sprite memory, someone (used intensivly sprites) got a crash converting its wads files to build the tr4 level file.

- Added new flipeffect trigger to perform a lightning
[Find Trigger Number] F359
The new flipeffect trigger: "Weather. Perform a lightning with data in <&>Parameters for (E)Durate in Tick frames (1/30 second)" allows to simulate lightning from the sky (using a very short time), and the lightning conductor between two objects, (using infinite durate).
You have to customize the lightning with the linked PARAM_LIGHTNING Parameters script command.

There are many parameters to set and if you choose uncompatible values you could get bad results.
You could do experiments, anyway I suggest to you some settings:

To simulate a lightning conductor like in the "planet effect" of the library level, you can use these settings:

In the trigger set "0 tick frame" (it means: "infinite durate")

While in the script type:
ColorRGB=        1, 0, 208, 208
Parameters=    PARAM_LIGHTNING, 1, >
                        [SourcePosition], [targetPosition], 1, 32, 197, 32, 24, 4, 1, 5
Where, in place of [SourcePosition], you type the index of item to set source position for the lightning and, in place of [targetPosition] you type the index of item to set as the target position (read the description of PARAM_LIGHTNING constant for more infos)

To simulate a lightning from the sky, you can use these settings:

Set in the trigger a very low number of tick frames, 3 for example.
Then in the script type commands like these:
ColorRGB=        1, 255, 255, 200
                           LGTN_FLASH_SCREEN + LGTN_HEARTHQUAKE, IGNORE, [targetposition], 1, 32, 183, 32, 24, IGNORE, 1, 5
Where, in place of [targetPosition] you type the index of item to set as the target position (read the description of PARAM_LIGHTNING constant for more infos)

with the lightning you can kill (or burn) lara and kill enemies or explode shatters (and baddies).

- Added new flipeffect to stop an endless lightning.
[Find Trigger Number] F362
The new "Weather. Stop the endless lightning effect with <&>Parameters" flipeffect, stops a previous lightning performed with f359 trigger that used a "0 tick frame" for endless durate.

since that the lightnings are a limited resources it's always better stop them when lara goes away from their visible zone.

- Fixed bug in NG_Center.
In the scripter program, it sometimes happened that a row with a command was ignored because in previous row there was a "linker" character (the ">" character) in the comment.
TriggerGroup=    1, $2000, 359, $101  ;Weather. Perform a lightning with data in <&>Parameters for (E)Durate in Tick frames (1/30 second)
Organizer=      1, FO_LOOP, IGNORE, 2, 1, 4, 1, 1, 1 , 6, 1
In above exmple, the "Organizer" row was skipped, because trng used the ">" character of the text " <&>Paramteres.." like it was a linker character to continue to read second half of the row (triggergroup) in the next row.

Now the linker characters ">", placed in the comments, will be ignored.

- Added new research type in NGLE.
Now in the Advanced Search, you can look for an index of (generic) item of the level map.
This feature is useful when you know an index (for example you read it in a script command) and you wish know where (and what) is it.

- Added new flag for Image command.
The new IF_LOOP_AUDIO_TRACK flag, allows to play in loop (infinite) mode the audio track you choose as background music for your image.

- Added new customize constant: CUST_BACKGROUND
With this customize you can use an image as background for some game phases like loading level, pause, inventory ect.

You have to type the id of an Image command to choose the image to use as background.
In above example it will be used the image1.bmp in the trle\pix folder as background and playing the 119.wav audio track as background music.
See the description of CUST_BACKGROUND variable in the reference panel of NG_Center.

- Added new condition trigger
[Find Trigger Number] C85
The new condition trigger: "Sound. The <#>Sfx Sound effect is playing" detects when a sound effect is playing" detects when a sfx sound is currently playing

- Increased max number of TriggerGroup commands from 256 to 1000.
Now you can have upto 1000 triggergroup commands in a level section of your script.
About the IDs used with triggergroup the max value to use is 10000 (the number of triggergroups * 10)
Note: this rule act for all command scripts, where the max number of ID is the max number of occurence of that command multiplied by 10

- Increased max number of GlobalTrigger commands from 100 to 500.
Now you can type until to 500 GlobalTrigger command in same level section. About the max value for IDs it's 5000 (number of global trigger * 10)

- Increased max number of Organizer commands from 100 to 500
Now you can add upto 500 Organizer commands in same level section. About the max value for IDs it's 5000

- Increased max number of MultEnvCondition commands from 20 to 256
Now you can type upto 100 MultEnvCondition commands in same level section. About the max value for IDs it's 1000

- Increased max number of Animation command from 128 to 256

- Improved WindowsFont command
Now you can set in the WindowsFont command the charset of character font.
You type the code of charset linked with font name using the colon ":" character.
WindowsFont= 1, 128:MS Gothic, ...
When you modify the font name with the charset prefix you have to type the same syntax also in extra ng string for that font name.
In above example you should type in NG string:

128:MS Gothic

- Added new WFF_ flags for WindowsFont command
Now there are three new flag WFF_... for WindowsFont command:

WFF_ROTATE_90 : rotate the text of 90 degrees
WFF_ROTATE_INV_90 : rotate the text of -90 degrees
WFF_FROM_RIGHT_TO_LEFT : print text from right to left. This works only with hebrew and arabic charsets on nationalized computers.

- Added new script command: DefaultWindowsFont
If you type this command in the Title section of your script, you force the trng engine to use Windows font characters to show any text in the game.
All menu titles (New game/Load game/Options ect.) will be drawn whereby windows functions and using the windowds font you set in the given WindowsFont= command.

The most advantage to use windows font is to be able to support different charsets (different than default western charset).
Pratically using windows fonts you should be able to show texts in eastern languages.
To set the wished charset you have to type the charset code linked with the face name font you typed in the WindowsFont command used by the DefaultWindowsFont.
For example:
ColorRGB=        1, 255,0,0
ColorRGB=        2, 0,0,0
WindowsFont= 1, 204:Arial, WFF_BOLD+WFF_SHADOW, 40, 1, 2
DefaultWindowsFont= 1, IGNORE, 75, IGNORE, 20, 20, 20, 20, 10, 20, IGNORE, IGNORE, 10, IGNORE
Above commands are those used in the "lightning" sample.
The "204" is russian charset.

See the description of WindowsFont command for the list of charset codes.

I remember that is not necessary typing a charset number for western characters. Just you omit the charset number and it will be used the ANSI charset that is good for the most of western europe languages (english, french, spanish, german, italian)

Anyway, there are also some problems in windows font management.
Since the displaying of windows font is based on API windows functions (and not whereby the directX functions), the drawing will be more slower than default directx management used in tomb raider.
This means there will be a lost of performances when you use windows management for the texts.

Another risk is that the font you chose for windows font, could be missing in some computer and in that case trng engine will try to locate an alike font but since it is different the format in game cuould be less good.

For above reasons I suggest to use the DefaultWindwsFont= chance only when you use an eastern language (not supported in tomb raider default), while for western level builders (and their players) I suggest to continue using the default font management, because it grants better performances and compatibile issues with all computers.

- Added new flipeffect trigger to show windows font strings
[Find Trigger Number] F363
This flipeffect allows you to show an extrang string on the screen using new windows font management.
I remember that this flipeffect is not linked with the usage (or less) of DefaultWindowsFont command.

This flipeffect works together with the new PARAM_WTEXT parameter command to set all required settings for the printing.

- Added new flipeffect to remove a string printed in windows font mode.
[Find Trigger Number] F364
You use this flipeffect when you have (previously) printed a string in windows font mode and endless durate.

- Added new button to NG_Center program
In the Strings panel, there is the new button [Import Binary String]
It's not sure you'll have to use this feature, anyway it has been studied to allow to type in ng_center text in eastern characters, supposing that ng_center was not able to keep correctly these texts.
In the case you wish use windows print features with eastern characters, and you are not able to type these text in common way into ng_center, you can use [Import Binary String] to round this problem.
When you use this button you'll be prompoted to choose a .rtf (rich text file, typed with WRITE.exe program) or .doc (created with Words program) where you typed your eastern text.
Once you selected the right file, ng_center will convert the easter characters in a hexadecimal string, like: "&CB30E530FC30B230FC30E030".
Then you'll be able to use this hex string with flipeffect print string and, in game, trng will convert newly that string in your original text to print it.

* If you use this method to store your texts in ng_center, remember to include the text in two mark block so: "$$$$"
Pratically if your text is "Hello world", you'll type in .rtf or .doc document:

$$$$Hello World$$$$

* There is the chance that you'll be able to store your eastern texts in ng_center, in direct way. It depends by your language and by charset you set in ng_center.
I remember that you can change the charset of ng_center program using a translation file in its main folder.
If you have not a translation file for ng_Center, you can create a fake translation file in this way:
  1. Open block notes, and type this text, replacing "Japanese" with the name of your language, and "128" with the number of the wished charset code.
  2. Now save this text in NG_Center folder, giving the name "my_scripter_constants.txt"
  3. Now, close NG_Center, and launch it newly.
  4. Now in Settings panel you should see your language (you typed in Version= command).
    If it's not selected, select it now
  5. Now ng_center will support the charset you typed (CharSetNumber) and the wished font.
    You have to try if you are able to type text in [Strings] section, in your language, and if this texts, after saving, quit program and launch newly program, they stand yet there.

- Fixed bug about elevator

In previous versions (from the first, with new tnrg elevator) there was a problem with the inner (fake) keypad, when the game was saved/reloaded.
The keypad, after reload, appeared flickering or moved in bad position, a bit outside of elevator, where lara was not able to align with it to select the floor.

-Fixed bug in the management of CUST_KEEP_DEAD_ENEMIES manamgement.
In seldom circusances, when an enemy has been killed whereby explosion and it was enabled the CUST_KEEP_DEAD_ENEMIES customize, the collision of that invisible enemy remained in game.

-Fixed bug about aiming killed (with explosion) enemy
In the past versions, when an enemy has been killed whereby explosion with helicopter explosion effect (Action 82), lara was yet able to aim the enemy in spite he was killed and he was no more visible in game.

-Fixed bug about explosion of dog and mummy

This is a native bug of The Last Revelation
When Lara shots with explosive ammos to the frozen dog (ocb=1) or the sleeping mummy (ocb=2) the game had a crash

- Added new flag for Image command
It has been added the new IF_CRYPTIC flag.
When you set your image with this flag, the image will be crypted and it will be possible watch it only in game, where it will be decrypted at-fly by trng engine.
You can recognize a crypted image by the "@" character in front of its name.


is the crypted version of the image3.bmp
Note: since the crypting is irreversible, you should perform a backup of your images in a folder different than trle\pix folder, before enable the crypting, otherwise you'll be no more able to modify them.
It's advisable crypting only images that contain "secret" you don't want the player can see in advance, while for other generic image the crypting is a futile losing of time.

See the description of IF_CRYPTIC flag in the Reference panel for more infos.

- Fixed bug about leak memory with image management.
In previous versions, when you used images in your level and you set IF_PRELOAD flag for them, the memory required to load them was not freed correctly, wasting the global memory for the program and Windows.

- Fixed bugs in binoculars about game commands
In tomb4 there was a bug about keyboard commands when it was enabled the binoculars.
If player hit the Escape command for inventory, the game entered in the inventory but letting enabled the binoculars.
Same kind of bug when player hit P for pause screen. The pause screen came shown together with the binocular screen.
Now trng quits the binoculars before entering in inventory or pause screen.

- Fixed bug in binocular about view of Lara
In previous versions, when lara was looking downstairs (with binoculars) she was visible on the screen.

- Fixed bug in Diary
In previous version the font used for right page of the diary was always a bit different than that in the left page.

- Fixed bug in showing images, custom savegame panel and diary

In previous version, on some computer, when the game was set in full screen, the images and the custom savegame panel and Lara's diary, didn't work.

- Fixed bug in lasersight mode
In the past, also with standard tomb4, when lara is aiming using the lasersight, if the player used a shortcut to change weapon (1,2,3,4,5,6) key, the lasersight can be used also with this new weapon.

- Added new flag for image command.
Added the new IF_EFFECT_CROSS_FADE flag to enable a cross fade to show current image.
The IF_EFFECT_CROSS_FADE flag works fine only alone. It's not allowed zoom effect or moving from side effects and neither transparent images.
You can use it only with overlapped full screen images.

- Fixed bug about SET_SOFT_FULL_SCREEN setting
In the previous versions, when you used the SET_SOFT_FULL_SCREEN setting, the game was forced to 16 bit textures getting leak quality about textures.
Now it will be forced to work with 32 bit textures.

- Added new global trigger type.
It has been added the GT_SELECTED_INVENTORY_ITEM global trigger.

This global trigger is similar to GT_USED_INVENTORY_ITEM but there are important differences.
While GT_USED_INVENTORY_ITEM works only with inventory items where there is no hardcoded feature and only when lara is still in stand up position, with the GT_SELECTED_INVENTORY_ITEM global trigger, you detect the usage of the item, whose slot had been typed in Parameter field, first that tomb4 engine processes it.
If you use this globaltrigger with some hardcoded item you can replace the default management with yours, adding the new FGT_REPLACE_MANAGEMENT flag.

- Added new address for Code Memory variables
It has been added the reference to read/change the "Index of current vehicle or -1 if lara's not using a vehicle"
You can change it using variables flipeffects

- Changed operative mode of soft full screen
The old SET_SOFT_FULL_SCREEN for Setting= script command has been removed and it has been added the new SET_FORCE_SOFT_FULL_SCREEN setting.
The new SET_FORCE_SOFT_FULL_SCREEN setting works like the old SET_SOFT_FULL_SCREEN setting but it has been necessary change its name because now the player will be able to set or less soft full screen byself, directly in tomb4 setup window.
For this reason it should be a "forcing" setting the soft full screen in the script, since in this way the player will have never the chance to change that option.
It's better do not use the SET_FORCE_SOFT_FULL_SCREEN setting in the script, and let the player the choice to enable or less it in tomb raider setup.

- Added new constant for Settings script command.
It has been added the SET_FORCE_NO_WAITING_REFRESH setting.
The "no waiting refresh" mode allows to remove the (further) flickering of images, and improve the FPS (frame per second) of the game.
It works only when the game has been set in exclusive full screen (the common full screen, i.e. no "windowed" setting).
Please, remember that player will be able to set or less this option using tomb raider setup, for this reason it's advisable you didn't use this setting in the script, letting the player the chance to enable it or less, in according with performances of his computer.

- Changed tomb raider setup window.
Now, from version, the setup window will have new settings, stored in a frame named "Emergency settings"
Above settings, in fact, should be used by the player when he has some problem playing the level.
The player will be able to choose between "soft full screen" and "No waiting for refresh" modes.
Both modes solves problems about flickering images, while only "soft full screen" could fix problems about FMV videos.
By other hand, the "no waiting for refresh" allows to use a real exclusive full screen, that should have better performances about FPS.

- Fixed bug about tomb raider setup window
In tomb raider the setup window didn't keep the previous setting but it showed only default settings.
Now the setup window will show the current settings you set in previous times.

- Added new method to show Setup Window
Now, at first launch, tomb raider will show a litte popup window with the message "Press CTRL key for SETUP"
If the player hit (immediatly) the CTRL key, the setup window will be showed, otherwise will begin the game.
The old method, using a link with "-setup" option in the command line, it yet works, anyway that method was a bit problematic in some cirucstances since a link file keeps an absolute path and placing it in a zip file didn't work on target computers.
With this new method also beginners will be able to enter in setup mode in easy way.

the new setup window is stored in tomb4 executable, this means that, this new setup window, will be visible only using the new trng tomb4.exe file you find in trng update.
To recognize easily this new tomb4 program, it has been changed the icon and now it shows lara with sunglasses and microphone (64x64 icon version) or lara with a red background (32x32 icon version)

- Fixed bug about description of flipeffect trigger F276
[Find Trigger Number] F276
In previous versions the description of flipeffect trigger 276 was:

Variables. Memory. Subtract from <&>Savegame Memory the CurrentValue

While the correct description now is:

Variables. Memory. Subtract from <&>Item Memory the CurrentValue

- Added new customize command for Binoculars
It has been added the CUST_BINOCULARS constant for Customize command.
With CUST_BINOCULARS you can show in binocular view: compass data, sextant data, zoom factor data and sensory of lightness data.
You can also set the super-zoom mode where the zoom factor passes from (old) 4.3x to 40x

- Added new flipeffect trigger to enable in game the super zoom factor.
[Find Trigger Number] F365
The "Camera. Increase the zoom factor (enable Super Zoom mode) for Binocular" flipeffect, allows to enable the zoom factor from a trigger in game rather using a constant flag in the script.dat.

- Added new constant for DiagnosticType command.
It has been added the DGX_ERRORS constant.
When you enable diagnostic in game, and you add the DGX_ERRORS to the DiagnosticType command, you'll see all error messages that trng discovers parsing your script.dat or performing your triggers in game.
This is a very important help in development phase because in this way you can discover immediatly when you mistake something in script or trigger settings.

Note: with DGX_ERRORS enabled, when you quit tomb4.exe you'll find in trle folder an "error_parsing_log.txt" file with the complete list of all parsed errors in last game session.
When you wish signal a problem with trng on some forum, you should show always also the "error_parsing_log.txt" contents.

- Added new setting to NGLE program
Now in the Settings window of NGLE program there is the option "On [Exit and Play] save project with new filename"
If you check this option, when you'll use the [Exit & Play] button to convert the level and launch tomb4 to play it, the current project will be saved using a new (not yet used) name, with same method for progressive backups.

- Changed mouse pointer in NGLE program
Now when it will be used the [Place Object] button or the [Move Object] menu command, the mouse pointer will change its shape to become a double cross until the command will be not completed.
This change has been necessary to have same behavior when ngle is waiting for the choice of user about a final position to set with mouse.
This behavior is the same already present to place "light", "shadow", "sun" ect in the map, where the layout of mouse pointer will change until user doesn't select the final position in the map.

- Added new FAN flag for Animation command.
It has been added to animation command the FAN_DISABLE_PUSH_AWAY flag.
This flag will disable the hardcoded set of Lara's animations (125, 126, 127 and 128 ).
Above animation could be performed when some enemy is touching lara: she will contract her body, then she will remain frozen for some instant, while her body will be moved away.
These hardcoded animations could disturb the fighting skills with fists and kicks, other to disturb many other custom animations.

- Added new customize constant
It has been added to Customize command the CUST_DISABLE_PUSH_AWAY_ANIMATION constant.
The meaning is the same you saw in above point, about FAN_DISABLE_PUSH_AWAY flag, but in this case the disabling will be forever and not only in the progress of your custom animation.

- Added new flag for ImportFile command.
It has been added to ImportFile command the FTYPE_SETTINGS type.
This type is for binary file with multipurpouse target.
Currently it's not yet used by any command, but it will be in the future.

- Fixed bug about escape command with overlapped image
In the previous version the player was able to quit image with Escape command also when the IF_QUIT_ESCAPE flag had not been used.

- Fixed bug about NEF flag for Enemy command
In the previous version the NEF_ONLY_EXPLODE didn't work and that enemy was not killed neither with explosive ammos.

- Added new NEF flag for Enemy command
It has been added to Enemy command the new NEF_SET_AS_SEMIGOD flag.
When you set this flag for some baddie that will become immortal.

- Fixed bug about rubber-boat.
When lara had just entered in the rubber boat, and the cust_rolling for rubber boat was enabled and the boat was closed to some wall, the boat moved byself backward or forward for about half sector, ignoring collision rules.

- Fixed bugs about management of multi-trle-path in settings panel
In past version there were many error messages when the new trle path had no all required features. Now ng_center will adapt it to do it work fine with ng_center.

- Added new option in Trng Installer program.
It has been added the option to set or less xp compatibility for trng tools. It works only under windows vista or higher OS versions

- Fixed bug about [Play] button.
In the previous versione the mode [2d map] was enabled but it remained also after tomb4 quit and the status of [2d map] button was inverted. Now ngle will enter in 2d map mode while tomb4 is playing and after tomb4 quit, ngle will come back to common 3d view preserving textures.

- Enhancement about [Hide Objects] button in NGLE program
Now the [hide objects] will be disabled byself before performing output wad, [play] [exit and play] and backup of project.> I also wonder if it is possible to make "Hide Button" turn off automatically when using outputing wad/saving project/adding new objects or trigger. Though it's not that necessary really.

- Fixed bug about wrong position of dust effects with darts in according with their facing

- Fixed bug: also omitting the PB_SHOW_CHARGE_COUNTER flag, the text count was showed on screen, anyway.

- Fixed bug about customized bar of FBAR_SOUND_BAR_ANIM type.
It was not possible set a color Id in extra parameter

- Fixed bug about direct input in light panel of NGLE.
About [int] field of light panel in ngle, the range has been increased upto -1.00 / +1.00

- Added new customize constant.
It has been added the CUST_SLOT_FLAGS constant, used to add some feature to a given slot item.
You can to each slot one or more FFS_ flag.

- Enhancement about pushable objects over pickups items
About pickups that are able to forbid the access to pushable objects, now the pushable objects will be able to pass over some pickups (or other moveables)
You have to set what items will oversteppable using the FFS_PUSHABLE_CAN_OVERSTEP_IT flag in the
Customize=CUST_SLOT_FLAGS for the given slot.

For example:


With above command list the pushable object will be able to pass over the lasersight item on the floor.

- Changed the description of F361 flipeffect: "Weather. Set in advance the rain/snow setting using the intensity of <&>Room".
To do understand that it works also for snow intensity.

- Fixed bug: the text linked with damage bar did not disappear when the bar had been removed, in the case the string was an extra ng string

- Fixed bug in customized shatter objects.
The range about shatter objects set with Customize=CUST_SHATTER_RANGE command, was wrong. The field LastStaticAsShatter worked with static having a static slot lower by 2 respect the given value

- Fixed bug. In [OCB Calculator] (in tools2 panel of ng_center) in the Fish Ocb setting, the option for "Slow Fish" had no effect on final OCB value

- Improved safeness for [Hide Object] feature.
Now ngle will restore objects byself, everytime user moves from room with hidden obj to another room, or he was placing new objects or triggers

- Now the current room in ngle view after [Play] button, will be showed correctly after user restored ngle window from minimized state.

- Fixed bug about enemy command for Skeleton.
When you used Enemy script command to set as mortal (NEF_SET_AS_MORTAL) the skeleton, the (HP) vitality you set in the enemy command was changed by hardcoded tomb4 engine when you used OCB 3 in the skeleton.

- Added new OCB values for Boats
For rubber boat and motor-boat have been added following new OCB values:

16 = Boat out of order because there is no fuel.
32 = Automoatic fuel management. When the fuel (stored in local long Delta variable) is 0, the boat cann't work for "no fuel".
128 = Show fuel bar on screen. To use only togheter with 32 OCB value.
64 = Boat is out of order because it's anchored.

- Added new flag for custom bars
It has been added the FBAR_USED_FOR_BOAT_FUEL flag, for Customize=CUST_BAR script command.
With this flag you inform trng that custom bar (always the BAR_CUSTOM4) will be used for boat fuel management.



and remember to type the name of the bar in extra ng string with index=304:

304: Fuel

Above bar will work only if some boat of the level has been set with value 160 (128+32) in OCB field.

- Added new flipeffect for recharging of boat fuel
[Find Trigger Number] F366
It has been added the flipeffect "Variables. Boat. Move <&>fuel to boat tank in (E)way" to set or add the fuel level for boat.

- Fixed bug about going off from boats
In previous versions the compute to detect if lara had "free water" to jump out from the boat was wrong in some situation, and she was not able to jump out in spite there was space in that side.

- Fixed bug about collision panels into water.
In previous versions, when lara was floating on the water surface the contact with collisional panel pushed (suddenly) lara up, outside of the water, in weird way.

- Fixed bug about boat.
In previous versions when player hit LEFT or RIGHT command with no ACTION (CTRL) key, the boat turned, the fan turned but there was no engine sound.

- Added more infos to crash report (and last_crash) file generated when there is a crash.

- Fixed bug about elevator.
When in the Elevator script command you omitted the frame items, in some circustance, the game will crash at first movement of the elevator.

- Fixed bug about ItemGroup script command
In previous versions trng took more item indices (+1) of those really typed, when those were less than 2.

- Fixed bugs in NG Font editor tool.
In previous version the import image for font page (3x3 characters) didn't work.
When there was an attempt to import an image and it had not been done any previous importing of some windows font, the program crashed.
Also when the program didn't crash, the image was not really imported in the current .swd file.
The page image, that it had having a 126x126 pixel size, had really 124x124 pixel size, affecting other troubles.

- Fixed bug about TIMER_FIELD trigger type.
In previous version, when you place a trigger of TIMER_FIELD type with a negative value it happened a crash in the output wad phase.

- Fixed bug about change of color of custom bars after reloading of savegame.

- Added new flipeffect for cutscenes.
[Find Trigger Number] F367
It has been added the flipeffect "Camera. Show blank screen for <&>seconds with final curtain effect"
This flip will show a blank screen that, after some second, will be opened in the middle showing gradually the game scene.

- Added new flipeffect to stop infinite curtain effect
[Find Trigger Number] F368
This flip works to stop F367 when it has been chosen "Infinite time"

- Added new flipeffect for cinema effect
[Find Trigger Number] F369
It has been added the flipeffect "Camera. Set Cinema screen with black rows of <&>depth for (E)seconds"
To have a slim game scene with two black rows at top and bottom of the screen.
You can use this to evidence the custscenes respect to the normal game scene.

Note: when there is cinema effect the inventory, pause and load/save game screens will be not available. For this reason you should use this effect only for cutscenes or for short moments when the player will be not able to load/save game or leave the game.

- Added new flags for CUST_BACKGROUND customization
When you set as background for inventory the current game scene, you can modify the game scene used for background in different ways: adding colors, inverting colors or reducing lightning.
The new flags added to this command are:

- Fixed bug about Planet Effect
In previous versions, when a pushable object was put on right sector, this hardcoded effect changed the ocb value, enabling a lot of trng features for that pushable object, with chaotic results.

- Fixed (bad) bug about GlobalTrigger and reloading game.
In previous version, when you typed in the script a globaltrigger with FGT_DISABLED flag (beginning as disabled), then you enabled it with a trigger and you save the game, at reload of that savegame, in some cirucstances (no globaltrigger with disabled flag in the level) that globaltrigger was yet disabled.

WARNING: to fix this bug it has been necessary change some data in savegame file, for this reason now you cann't load savegame built with older versions from this last release.

- Improved the "Find Trigger Number" feature in NGLE program.
Now you can locate a trigger also using the triple serie of numbers of exported trigger in the script.
This feature is useful when you forgot the meaning of triggergroup of the script, or when the script is not yours.
Pratically, when you read in the script a row like this:

TriggerGroup= 4, $2000, 363, $40B

You can copy the three number of the trigger "$2000, 363, $40B" and past them in the Find Trigger Number window to see the original trigger that has originated the exported trigger data.

- Fixed bug in Set Trigger Type window of NGLE program.
When there was a trigger to enable a flyby sequence, the Set Trigger Type window showed a messed description about the flyby to enable.

- Fixed (bad) bug about triggers enabled by Flyby camera
In the previous versions flipeffects and action triggers were not triggered correctly by flyby camera.
Please note that in the title level the flyby camera enables common (not heavy) triggers, while in other level the flyby cam enables only heavy triggers.

- Fixed bug about launching of FMVs
When the triggered fmv was missing the game froze.
Now there will be an error message and the game will continue.

- Improved [Find Trigger Number] feature of NGLE program
Now you can decode also triple numbers of exported animcommand.
You have to type the animcommand in the format:
[-32640] [12] [256]

- Added new EDGX_ flag for DiagnosticType command.
It has been added to DiagnosticType command the EDGX_TRIGGER_TIMING flag.
With this flag you can see on screen the tick frame time about a triggering and the following triggering, about triggers in the level map.
This is useful to have precise values to type in organizer or other script commands to syncronize better cutscenes.
You can use it also to replace old method of rolling-ball (to activate a sequence of triggers) with an organizer, that it will do save many triggers in the maps.
Note: Theorically I should have had to give to this feature a DGX_ flag name but the available flags for that field was finished, so this is an EDGX_ flag to type in second field of DiagnosticType command.

- Changed internal structure in .mem file paired with last_crast#.txt file.
The size of .mem file pass from (old) 1.5 Mb to (new) 0.5 Mb

- Improved infos in last_crash report.
Now in the section named "QUICK DIAGNOSTIC LOG", there will be a description about items elaborated by tomb4 engine at moment of the crash.
It's not sure there was always an info of this kind, anyway when there is, it will inform you about moveable, room, flyby or slot (item type) was in elaboration while the crash occured.

- Added new flag for TestPosition script command.
It has been added the TPOS_ROUND_HORIENT flag for testposition command.
This flag accepts any facing of lara, just she was in direction of the moveable.
To understand this working mode you can think about polerope or when lara has to pick up an item from the floor.
Since the round facing is very particular there are some special rules and limitations:

* The couple (XDistanceMin / XDistanceMax) and (ZDistanceMin / ZDistanceMax) should have the same values, anyway trng engine will read only the pair (ZDistanceMin / ZDistanceMax).

* The range (HOrientDiffMin / HOrientDiffMax) is the only orienting pair to be verified.

* If you use this flag in a TestPosition command with an Animation command having the FAN_ALIGN_TO_ENV_POS flag, the position of Lara will be moved in ideal position but only in immediate way (no sliding or smoothed movement).
For this reason it's better using limited ranges about max / mix distance and DiffMin / DiffMax horizontal orient, to avoid a too jerk movement in game.

- Added new ENV condition for Animation command.
It has been added the ENV_FRAME_RANGE condition to Animation command.
This condition works like ENV_FRAME_NUMBER but in this case the condition will be true if the current frame of current Lara's animation is in the given range.
You have to type the frame range in DistanceForEnv field, using following formula:

MaxRange * 256 + MinRange

Note: MaxRange cann't pass over 254 value

- Added in exporting info of a trigger like animcommand the "to perform in all frame" description for animcommand set with frame = -1 (or 255)

- Some flipeffects, used to enable script commands by their IDs, gave a reduced limit of IDs to choose, in spite now in version the IDs available are bigger than older trng versions.

Note: Some triggers have been changed and new triggers have been added to handle new higher IDs, anyway in some circustance the ID from trigger in the map will be lower than max id value for script commands.
In this case there is the limitation you have to choose lower IDs for those script commands that you wish "call" from a trigger in the level map, while there is no limitation inside of the script since all script commands can refer to other IDs with very big values (until 32565)

- Three new flipeffects have been added as an improvement of F118 trigger, to perform a triggergroup in different ways, supporting higher script IDs
[Find Trigger Number] F371 F372 F373
It has been added an extension of Flipeffect 118 for each performing way of triggergroup:

"TriggerGroup. Perform <&>TriggerGroup from script.dat (single execution)"
"TriggerGroup. Perform <&>TriggerGroup from script.dat (always performed until lara stands on current sector)"
"TriggerGroup. Perform <&>TriggerGroup from script.dat (continue performing to stop with f192 trigger)"

All above flipeffect support ids from 1 to 9999

- Added two new flipeffects to support new (higher) globaltrigger IDs.
[Find Trigger Number] F374 F375
It has been added a double extension of F109 trigger:

"GlobalTriggers. Enable GlobalTrigger with ID<&>"
"GlobalTriggers. Disable GlobalTrigger with ID<&>"

All above triggers support ids between 1 / 4999

- Added three new flipeffects about resume organizers to support higher IDs
[Find Trigger Number] F376 F377 F378

"Organizer. Resume <&>Organizer from first command (reset)"
"Organizer. Resume <&>Organizer from next command (immediatly)"
"Organizer. Resume <&>Organizer from next command in the given time set in next command"

All above flipeffects handle IDs in the range 1/4999

- Increased max ID for some condition triggers in ngle program:
[Find Trigger Number] C15 C16

The condition C15 "Multiple condition of <#>TriggerGroup script command" pass from triggergroup IDs (1-255) to (1-1023)

The condition C16 "Multiple condition of <#>MultEnvCondition script command in (E)way" pass from MultEnvCondition IDs (1-255) to (1-1023)

- Fixed bug about SC_DOUBLE_SIZE flag for TextFormat command
In previous versions the SC_DOUBLE_SIZE flag had no effect or a bad effect.

- Added to the description of all multiple script commands the max number of instances allowed for level section.

- Improved bookmarks management in ng_center program
* Now the bookmarks will be preserved also after quiting ng_center program and restart.
* The looking for next bookmark should be a bit faster
* In previous versions the temporary saving of bookmark when you used [Build] button, was very slow. With very big script it required many seconds with no message about the work in progress. Now the saving is istantaneous

- Fixed bug about GT_DISTANCE_FROM_STATIC global trigger
In previous versions the GT_DISTANCE_FROM_STATIC didn't work since it computed the distance in sectors instead by game units.

- Added to ng_center a control about amount of multiple commands for each level section.
Now if there are more script commands (of same kind) than max allowed number there will be an error message.

- Added to the log of script building a section with statistics about amount of each multiple command with indication about max number of instances allowed for that kind of script command.


------- Statistic about amount of multiple commands in current level section -------
[35/999] TriggerGroup=
[32/Unlimited] Parameters=
[31/Unlimited] Customize=
[30/99] AddEffect=
[21/499] GlobalTrigger=
[15/199] ColorRGB=
[15/256] Animation=
[9/199] Image=
[6/255] MultEnvCondition=
---------------- End Statistics --------------------

- Fixed bug in Reference panel of NG_Center program.
In the "SCRIPT NEW commands" and "SCRIPT OLD commands" sections, the list was not always effectively sorted by command name.

- Improved detection of joystick inputs with savegame panel.
In previous version, with some joystick models, the movements were too fast or irregular.

- Fixed bug about generator of random numbers.
In previous version the random sequence of the program was always the same.
In spite it's not probable to have really same results in game, it was possibile that random triggers generated always same results when that point in game was reached after start of the program without other randomize call in the middle.

Last edited by AkyV; 05-08-16 at 12:58.
Titak is offline