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

Closed Thread
Thread Tools
Old 02-12-16, 10:49   #31
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

MK5 Full Installer (also updating to TRNG
Plugin SDK pack
(Released 2 December 2016)

See the download links in

Description is available here:

Visual Studio Express:

Download Visual Express 2010

Run autorun.exe of VCExpress folder to install.

You need a registration to make it free. See what Paolone says here about it - except: I think online registration does not work any more, I was able to type the key directly you can see in one of the images here (I think the Visual Express download links on this page of Paolone's site are useless now):

If you don't have auto-enumeration when using this C++ Express version, then install
Performance Tools for Visual Studio 2010 with Service Pack 1.
You may need a Microsoft account to get in.

Further, old steps to auto-enumeration, I don't think you need them any more - besides, the hotfix link seems dead:

2. Then install this hotfix.
3. Perhaps you also need to reset the settings (see Tools menu/Settings/Import and Export Settings).

Last edited by AkyV; 06-06-22 at 09:37.
AkyV is offline  
Old 14-12-16, 15:59   #32
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 14 December 2016)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-2):

- Changed internal format of TriggerGroup= script command
This mod is not visible, normally, anyway the difference is that now you can have same amount of exported triggers, in a given TriggerGroup, as you had in old versions but only if your triggergroup doesn't include ANY exported trigger from plugins.

It's necessary giving an explanation of above matter.

With release, the script can containing also exported triggers from plugins...
When you export a trigger (from ngle) and this trigger is owned by some plugin, in the exported three values there will be also the Id of plugin, to recognize it from other trng triggers.
To store this extra value I had to increase the size (wide) of numbers in triggergroup command, passing from (old) word (16 bits) to (new) dword (32 bits).
The collateral effect of this change was that, since the max space for triggergroup command is 255 words, the number of values (and therefore, of exported triggers) decreased by half, from 63 exported triggers to 32.
Since that, level builders used triggergroup with more than 33 triggers, with new release, the scripter gave the error: "Too much (many) arguments for TriggerGroup= command", I tried to avoid this problem with this solution: when the scripter discovers that in the triggergroup there is NO trigger from plugin, it will build the triggergroup using newly (as in the past) words. In this way the amount remain the same.
Anyway, when in the triggergroup there is at least one plugin exported trigger, the limitation will come back and the max number of triggers will be about of 33 triggers.

- Changed (a bit) the procedure to unistall a plugin from plugin panel
In release, once you chose to uninstall a plugin, the ng_center restarted, quiting and then launching itself newly.
Now it will be possible choosing if restarting or less NG_Center after the unistalling.
Note: once you uninstalled a plugin, and before launching ng_center newly, the trng system is not safe, for this reason the only one reason to postpone the restarting is if you mean uninstalling another plugin or installing a new plugin. All other operations (omitting the restarting) could have bad results.

- Changed the procedure to install a plugin from NG_Center's plugin panel.
This change is alike the above, about uninstalling.
Now the restarting of NG_Center, after installing of new plugin, can be postponed.
About this choice there is same above speech: the only one reason to postpone the restarting is if you mean uninstalling another plugin or installing a new plugin. All other operations (omitting the restarting) could have bad results.

- Fixed bug about overlapped images
In version, it occurred a crash showing in game a not IF_POP_IMAGE image.

- Fixed bug about FMV videos in SOFT_FULL_SCREEN mode
In past versions, when a fmv, with the game working in full screen mode and Soft full screen setting enabled in tomb4 preferences, was shown, the ration proportion was often wrong, with the video stretched to fit all screen size, ignoring the original video ratio.
Now the original size ratio will be preserved, indifferently by current size of tomb raider (and PC) screen.

- Fixed bug about FMV played in exclusive video mode
In version, when a fmv was played in full screen (omitting the SOFT_FULL_SCREEN setting) then the program, radomly,froze or crashed

- Renamed log of Ng_Tom2pc program
In past versions, after a building, the ng_tom2pc.exe wrote a disk file named "statistics.txt" to trle folder, to show last log.
Anyway, since in the past there were also statistics about memory usage, while then, from some versions, there is only the last building log, the name of this log file it has been changed, to get it more coherent with its content.
Now this file will be named: "NG_Tom2Pc_Last_Log.txt"

- Fixed bug in NG_Center
In 1.5.0 NG_Center version, the Import= script command affected an "Overflow" error message.

- Updated infos about Plugin_Cranes plugin
In the case you had currently installed the Cranes plugin, it will be added a description for input command to drive it.
You'll see the new button in NG_Center's plugin panel when you select Cranes plugin.

- Updated some plugin libraries.
If you installed in NG_Center the plugins: Cleaner, Cranes, Star Wars Robot or MechWarrior, it will be updated their plugin_.dll library to fix a bug in savegame management.

TRNG Patcher updater (PU-2):

- Improved update checking in Trng Patcher program
Now Trng Patcher will be able to detect new info update file on website.

- Some corrections about documentation in "\PLUGIN_SDK_STORE\Help_SDK_Tutorial" folder"

- Fixed bug in "trng.cpp" source.
In AddNGToken() function (to save record data in savegame), when there was an odd amount of bytes, the AddNGToken() function omitted to fix the problem adding another extra byte, giving an "ERROR" message.
Now it will give a "WARNING" message and it will add one extra byte to force even amount of bytes for current savegame record.
Note: it has been updated also the file version for all plugin sources, from 1,0,0,0 to 1,0,0,1

- Updated Plugin Setup Files of Crane.
It has been added a button to show input commands to drive the crane in plugin panel (if crane was installed) and in folder:
"\PLUGIN_SDK_STORE\Plugin\plugin_Cranes_VC2010_sou rces\Plugin Setup Files"

Last edited by AkyV; 27-01-17 at 23:04.
AkyV is offline  
Old 06-01-17, 15:56   #33
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 6 January 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-3):

- Fixed bug in NG Center
In previous version, NG Center didn't pass the correct (own) ng_center folder to trng_installer.exe program, to manage the updating.

- Improved update checking in NG_Center program
It has been added a further control about corrupted downloaded file, giving some tips to procede with manual installation.

Note: about this issue, it happened only when your antivirus/firewall stops any download performed by ng_center. So, if you get this problem (an empty update folder after the download operation) I suggest to change the setting of your firewall/antivirus to allow at ng_center to perform these downloads.

About this matter, I remind you that now ng_center (and trngPatcher) don't ever dowload an .exe selfextractor but only common zip files and then it will be you (if you wish), to launch the updater program (trng_installer.exe)
So a compromise it could be to allow to download at least "harmless" .zip / .rar file, keeping the limitation for executable files.

- Added managment of notification messages in update checking.
From this ng_center release (1.5.2 ), when you check for updates you could receive a notice that doesn't matter with new (or less) update but it is a comunication about some important issue, new or old, that trng's author (me) want give to all level builders, to fix, or avoid, some problem.
Ng_Center, other to show the new notices, will preserve also old notices and you can read them when you wish, using the new button named [Show Old Notices], that you find in NG_Center's plugin panel.

- Added new flag for TriggerGroup script command.
It has been added the TGROUP_COMMAND flag to use in first word of three values for trigger.
The TGROUP_COMMAND has to be used alone in first value, you cann't add to it other TGROUP_ flags, with only exception for TGROUP_ELSE.

When you use TGROUP_COMMAND flag as first value, you are creating a fake trigger used to manage other (real exported) triggers of current TriggerGroup command.
The general syntax of TGROUP_COMMAND flag is:

TGROUP_COMMAND, TCMD_.. (command to perform), Value (parameter for current TCMD_ command)

Currently there are following TCMD_ commands:

TCMD_EXIT (used to quit in that point the triggergroup, returning a value TRUE or FALSE)

TCMD_GOTO (used to change sequential execution and jumping to the given index of trigger, in current triggergroup)

TCMD_PAUSE (used only for debugging. You can freeze the game for some microseconds or until you type a given key)

TCMD_LOG (used only for script debugging. You can enable/disable the script log to have only a selective log for some triggergroup and not others)

The TCMD_SET_... are different commands to change some fields of following (real) trigger.
They work like the TGROUP_USE_FOUND_ITEM_INDEX, TGROUP_USE_ITEM_USED_BY_LARA_INDEX, TGROUP_USE_EXECUTOR_ITEM_INDEX ... ect but there are some important differences.

The TCMD_SET.. commands use, as source value, the content of given trng variable that you set in next value of current command trigger.

The TCMD_SET.. commands have not the limit to work only with Object (index) field, they can change any field of next trigger. In this way you can change also parameters of flipeffects, actions and condition triggers to set some value that, in next trigger parameter, could be: a static index, a number of click, a speed or a number of seconds, ect.

See descriptions of specific TCMD_ commands in NG_Center's reference panel, for more infos.
In particular way, in TCMD_SET_EXTRA_TIMER description, there is a pair of examples of its usage.

- Improved script log.
The script log is that log that you see using "tomb4_log.exe" program and you enable with script commands:

Diagnostic= ENABLED

Now in the log, all trigger's description inside triggergroup, will be preceded by index number of current trigger, in the form: "Index)".
Above indices are useful, since now you can use TCMD_GOTO command, to jump to different triggers.

Example of new log:
29438: Perform TriggerGroup=4
29438: 0) Perform Trigger: [$8002, 64, $32B]
29438: CONDITION trigger: "Variables. The <#>Numeric Variable is = than (E)Value" <<#> = 64 (E) = 3>
29438: {Local Byte Alfa1} = 0
29438: TrigggerResult=false
29438: 3) Perform Trigger: [$8042, 65, $12B]
29438: CONDITION trigger: "Variables. The <#>Numeric Variable is = than (E)Value" <<#> = 65 (E) = 1>
29438: {Local Byte Alfa2} = 0
29438: TrigggerResult=false
29438: 6) Perform Trigger: [$2040, 239, $370B]
29438: FLIPEFFECT trigger: "Variables. Text. Copy the <&>NG String to (E)Text Variable." <<&> = 11 (E) = 55>
29438: TriggerResult=true
29438: 7) Perform Trigger: [$2000, 409, $2]
29438: FLIPEFFECT trigger: "Images. Perform <&>InputBox parameters and wait for player input" <<&> = 2 (E) = 0>

- Fixed bug about ng featured pushable objects
In previous version, when a pusable object with standable ng feature was invisible (not yet triggered) its floor collision was already present.
Now not visible pushable (at start of the game) will have no collision.

- Fixed bug in [NG Doctor] tool
In previous release it happened (sometimes) that ng doctor was not able to locate the .tga file of current project file, generating an (handled) crash that stopped further analyses.

- Expanded by three times the space to host level's geometry.
The development of this new feature it has been nicely troubled.
It has been added in release, then it has been removed in and now it comes back newly to be present.
The reason of these changes it's that I had the doubt this expansion had gotten some collateral effects but, finally, I discovered it was not true.
So now it will be let.
This larger size for level's geometry it could be useful for users of MetaTR program, since the amount of vertices for level, now grows about of three times.

- Improved [Find Trigger Number] button in NGLE program
Now this command will accept also an exported trigger function, in a format like:
PerformConditionTrigger("Plugin_trng", 1, 223 | NGLE_INDEX, 0);
PerformActionTrigger(NULL, 89, 188 | NGLE_INDEX, 5);
It could be used when, once you (plugin builder) set many exported functions to call directly trng/plugin triggers, you forgot the target of above functions.
In this situation just you copy & paste the whole C++ row and paste it in input box of [Find Trigger Number] button, to see the original trigger called by this function.
Note: to host better the description of new features, the input box window it has been enlarged a bit.

TRNG Patcher updater (PU-3):

- From current trng_installer version (for plugin only), all source files that will be replaced or modified, will be, previously, also saved (a backup copy) to a subfolder named: "backup_PU-N" (where 'N' is number of update and PU means Plugin Update), located in same folder of updated (modified) file.

- Improved update management in TrngPacher
From 1.0.2 version (that of this update), Trng Patcher will be able to handle multiple updates.
Pratically it means that, if you missed to download the update PU4 (for instance) and currently last update is PU5, you'll be anyway able to download previous (and, for you, missing) PU 4 update.
More it has been added the chance to receive on-line notices, in spite it could be missing a new update but there is some comunication about some trng/plugin issue.

- Added some topic to html plugin tutorials
It has been added the "Functions" topic in "Basics of C++ Language" tutorial
It has been completed the description of preset list directives, in "How to add new Triggers" tutorial.
It has been added some new function's descriptions to "Function Collection" tutorial

- Fixed an error about type of IndexOfAimedEnemy variable (and structure's field)
In previous sources the info about current enemy that lara is aiming, was stored in the field of StrLaraInfo{} structure with the declaration:

int IndexOfAimedEnemy;

Really it was an error. That value was a pointer to StrItemTr4 structure of given enemy.
For this reason above field has been declared newly in this way:

StrItemTr4 *pStrAimedEnemy;

Since it is a pointer of structure, you can use it in this way:

StrItemTr4 *pEnemy;
int Y;

pEnemy = GET.LaraInfo.pStrAimedEnemy;
// and now you can access to all fields of this structure using the "->"
// for instance:
Y = pEnemy->CordY

Note: a change like above it has been necessary also in trng core, and so in structures.h source.
In "StrGlobAddress" structure the field:

int *pCurrentEnemyTarget;

it has been changed in this way:

StrItemTr4 **p2CurrentEnemyTarget;

This complication is necessary because above field points to a tomb4 address where it is placed another pointer to StrItemTr4 structure of aimed enemy.
If no enemy is currently aimed, there will be NULL (0) in tomb4 pointer.

Note: You no need to access directly to above field, anyway if you wish, you should use a code like this:

StrItemTr4 *pEnemy;

pEnemy = *Trng.pGlobTomb4->pAdr->p2CurrentEnemyTarget;

if (pEnemy == NULL) {
// there is no aimed enemy
}else {
// there is an aimed enemy and now you can access to the fields of his structure with "->" operator
// for instance
if (pEnemy->StateIdCurrent == 3) {
// current state id of aimed enemy is 3

- Added new function in trng.cpp source.
It has been added the function:

int ConvertFromStrItemToItemIndex(StrItemTr4 * pItem);

Above function could be used to discover the item index that correspond to a given pointer of StrItemTr4 structure.
For instance, if you have only the pointer to item structure and you wish know its index, you can using above function in this way:

int ItemIndex;
StrItemTr4 *pItem;

ItemIndex = ConvertFromStrItemToItemIndex(pItem);

- Improved in TrngPatcher the tools to fix problems with VC 2010 and VC6 projects
The old tools: [Tools->Fix Visual C++ 2010..] and [Tools->Fix Vc6 ....] have
been improved to fix also problems about missing of auto-enumeration feature in VC 2010's editor and it has been improved the method also for VC6 projects.

This problem happens when you don't see the list of members (fields of structure) after you typed the "." or "->" operators after the structure (or pointer of structure) name.

- Increased the returned data for GET_INVENTORY query of Get() locator function
While, in previous version, the Get(GET_INVENTORY,...) set a value only in GET.pInventory, now it will be set also data in GET.InventoryData structure, where you can find, other that previous pInventory (but now called "pPresence", to do better understanding its meaning), also two new inventory variables.
One, to discover what slot item has been selected in inventory (* GET.InventoryData.pChosenItemSlot)
The other to discover (or set) what slot has been required in game. It happens when lara tries to engage a door (requiring a key), the jeep (another requird key) a door requiring a crowbar. ect.

Note: the old returned value, the GET.pInventory, it has been let unchanged for backward compatibility, anyway it's suggested that now you used the new GET.InventoryData to access to inventory data.

- Fixed bug about PARAM_ script commands
In previous releases, the cbParametersMine() function missed to store also the PARAM_ constant value (main value to identify the PARAM_ script command) in plugin data structure.
This error got impossible locate the plugin's PARAM_ script commands, using the "Get(enumGET.MY_PARAMETER_COMMAND, PARAM_...,... )" function.

- Changed "structures.h" source file
It has been changed a bit the "StrBassHandles" structure to host the new "pProcExtra" pointer to another new structure to extend the bass available procedures.
1) This change doesn't yet allow to use new bass procedure. It will be necessary waiting next update
2) This change doesn't compromise any following field or structure of StrGlobTomb4 structure.

- Changed "Tomb_NextGeneration.h"
It has been increased the space for level's geometry by three times.

Last edited by AkyV; 27-01-17 at 23:05.
AkyV is offline  
Old 15-01-17, 22:26   #34
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 15 January 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-4):

- Fixed bug about the saving of coordinates and facing of Moveables in savegame.

Main trigger to enable this feature was the A60 trigger.
That trigger should be used to set a moveable that we wish that, its position and facing, was saved in savegame, in spite it should be not a creature or other moveable (like vehicles) where this saving operation is already enabled by default.

About this skill, there was a big error: the amount of moveables to save was never cleared at start of new level and, as result, if player played for long time, passing from a level and other, the amount of moveables grew upto generate overflow and other unpredicatable bugs.
Now this bug it has been fixed, anyway savegames saved with bugged engine could have yet problems. Anyway when new engine (of current update) will load a bugged savegame it will reset all "save items" data. Removing the overflow bug but also loosing all moveable indices signed as "to save".

- Improved NG Doctor tool in NG_Center program
* Now NG Doctor is able to recognize a tomb4 patched with FLEP and it will report this info in final diagnostic log.
* The final diagnostico log will show also a list of the Mounted Plugins, with many infos to recognize specific dll (version, size and if it is with debug infos) and other infos to detect probelms.
* Diagnostic log will show also unupdated plugin .dll in trle folder (when the library in plugin folder of ng_center is earlier)

- Fixed bug in NG_Center
In previous (1.5.2) release, there was a crash when user clicked on [Show Old Notices] button of Update panel.

- Fixed bug about CUST_KEEP_DEAD_ENEMIES failure on reassigned creature slots
In previous versions, when a non-creature slot was used like a creature (baddies, animals, ect.) whereby an AssignSlot command and the CUST_KEEP_DEAD_ENEMIES feature was enabled, the reassigned creature, once killed, disappeared once saved and reloaded the savegame.

- Improved update checking
Now NG_Center, from Plugin panel, will be able to handle multiple updates. This means that you'll be able to see all available updates to download and choose also older updates that you chould having missed in the past.

TRNG Patcher updater (PU-4):

- Added new enumGET for Get() locator function
It has been added the enumGET.VARIABLES
With this new constant you can get access to trng variables and selected index for memory zones.
When you call the function with this new constant:
Get(enumGET.VARIABLES, 0,0);
You'll get result in "GET.Vars" structure.
Using this structure you'll be able to read/test/change all trng variabiles, divided by global and local, with different types (long, word, byte) signed or less.
More you'll be able to read or set the current selected "item" for different memory variabiles.
Note: the "Get(enumGET.VARIABLES, 0,0);" function could be called only once in cbInitLevel() function and it will set valid values in GET.Vars structure for all current level.

- Added new functions for access to trng and memory variables
It has been added a set of new functions to access to trng variables and memory variables whereby trigger/script parameters

int ReadNumVariable(int Code);
void WriteNumVariable(int Code, int Value):
char * ReadTextVariable(int Code);
void WriteTextVariable(int Code, char *pText);
int ReadMemVariable(int Code);
void WriteMemVariable(int Code, int Value);

Main target of these functions is that you'll be able to access to trng and memory variables, using a parameter in same trigger/script format.
In this way you can let to users (level builders) the chance to choose the variable to use, and your code will be able to access to the given variable, passing to these new functions the parameter read from trigger parameter or script command.

Read "Function Collections" tutorial, about ReadNumVariables() (and others), for an in-depth description of usage and syntax of these new functions.

- Added multiple function to convert different kinds of tomb raider "stuff"
It has been added the function:

int Convert(int CONV_Type, int Index, int SecondaryIndex, void * pPointer);

The Convert() function requires, as first input parameter, an "enumCONV." value (or a CONV_.. value).
In according with this first value this function will be able to convert different tomb raider types:

From Ngle Index to Tomb Index (about moveable item indices) and viceversa
From Ngle Static Index to Tomb Static Indices and viceversa
From StrItemTr4 structure of moveable to its index
From Relative animation index to absolute anim index and viceversa
From Relative frame index to absolute index and viceversa
From Ngle Room Index to Tomb Room index and viceversa
From rect box of microunits to real pixel values, in according with current screen resolution

Read "Functions Collection" tutorial, about "Convert() function", for more infos.

- Fixed bug in TrngPatcher program
In previous release when there was the check for some update, it was detected always how to update, in spite that update had been already performed.

- Added new infos about sources version
From this update (PU-4), the plugin sources will be marked with a version info, set like a comment row.
All sources, whose there have been an updating, could have this version info.
It appears in a comment row like this :


It will be placed at top of any source.

* Since this info will be used for future checks about updating, it's important that you didn't remove or change manually this version info tag.

* It is normal that main source (usually plugin_trng.cpp but it could have another name) had more than one version update row. It happens because the main source it will be never replaced from an update but only fixed with selective Find & Replace method. Therefore, to keep track of all single find & replace updates, performed or less, it will be necessary having multiple version info rows, one for each performed update.

- Fixed unjustified error message about customize parsing
In previous versions, when the code checked for the presence of some own CUST_ customize command, with a code like this:

// found a Customize=CUST_MY_BUSINESS script command for current level section

If that kind of customize was missing in that level section, there was the error message: "ERROR: not found my CUSTOMIZE with CUST_ value=...."
This message was not reasonable, like error, since it is normal that a given customize can existing or less in the script.
For this reason it has been removed above error message.

- Fixed bug in Trng Patcher
In previous versione, after having downloaded the update the program warned that the update folder will be openend but really it didn't.

Last edited by AkyV; 27-01-17 at 23:05.
AkyV is offline  
Old 27-01-17, 23:09   #35
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 27 January 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-5):

- Fixed unjustified warning message from some plugins
It has been removed the warning about "not even size in AddNGToken() function".
Above message will be showed in log, or on screen when DGX_ERRORS was enabled, everytime it was saved a savegame and some plugin was mounted.
That warning was not really worrying, so it has been removed.
Note: you can recognize updated plugins because their version will be ""

- Fixed old bug in NGLE program
This was a bug of old winroomedit program.
Using some commands to look for texture, untextured faces, illegal slope, objects or triggers, when this item was in a new room, the name and flip map value, of this new room, it was not updated.

- Fixed old bug in NGLE program
This was a bug of old winroomedit program.
After having set menu command: [Texture->Load palette], used to replace the standard palette with the palette of given .pcx image, the colors in the editor were messed up.

- Fixed bug in NG_Center
In previous version, NG_Doctor failed to parse plugin installation if there was a plugin that was: present in ng_center but missing (with its plugin_.dll) in trle folder. There was an execption and the looking for errors was stopped.

- Fixed bug in Flipeffect 309
In previous version, the trigger F309, used to show in log the value and name of a given numeric variable, wrote wrong names when the variable was: "Last Input Number", Last Input Text", "Current Value" or "Big Text"

- Attemp to fix a bug about underwater playing of sfx anim command sounds
I say "attempt" because I have had problems to reproduce this bug on my pc. In my tests there was no bug.
Anyway I rewrote from scratch the code to hanlde this situation (playing underwater sfx via animcommand) and I hope the bug was solved.
I remind you some notes about sfx sound management:
1) When you use an exported trigger as animcommand to ply sfx sound, it will have the "always" flag. This means that it will be played indifferently wehter the room of that moveable was in water or less
2) If you use the BUGF_LAND_WATER_SFX_ENEMIES in the script, you shoul take care that the [Water/Land] flags (in wad merger's AnimCommands window) have been set correctly.
3) It's better avoiding to play same sfx sound twice or more times in short time (few tick frame of difference) because the replay of a sound, that already was playing, could forbid that sound to be played in correct way. Only "looped" sounds do exception to above rule.

- Attempt to fix bug about delay in drawing load level image
Using the script command:
To set an image in loading level phase, there was a delay in drawing image.
Like for above bug, I've not been able to detect any delay, anyway I performed an attempt (at blind way) to fix this problem.

- Fixed bug about updating process
In previous version of NG_Center, the folder with update files was not opened as said.

TRNG Patcher updater (PU-5):

- Added input parameters for cbInitLevel() callback
While in previous versions the prototype of cbInitLevel was void (no input arguments):

void cbInitLevel(void)

Now some input arguments have been added:

void cbInitLevel(int LevelNow, int LevelOld, DWORD FIL_Flags)

New arguments give informations that could be useful to perform selective initialise of your variables.

LevelNow = Current number of level is going to begin
LevelOld = Previous level (0=title, -1 = from savegame, OtherValues= number of level from where there has been the level jump to current level)
FIL flags = you can testing this value with "&" operator (like for all flags) and enumFIL. enumerator. It gives you specific informations about how this level it has been started.

For instance to understand when you should set the default value for your variables, you should perform this condition:
if (FIL_Flags & enumFIL.FROM_NEW_LEVEL) {
// current level begins for first time: reset from scratch all my variables and features


Note: in spite this change seems violate the rule to keep backward compatibility, also already compiled plugins will be able to work with new tomb_nextgeneration.dll without problems, because the adding of input arguments don't affect any problem for old plugins that don't use these extra input parameters.

- Removed warning about "not even size in AddNGToken() function"
Above message was generated, in save game process, when the MyData.Local or .Global structure was yet empty. Anyway it was a false positive.
Now it will be omitted but it could coming back only then plugin author add variables in some local or global structure of MyData and these variable had a not even amount of bytes.

- Renamed a folder's description in Trng Patcher's Settings window
In TrngPatcher's Settings window, it has been renamed the description of plugin sources folder, to get more understandable its usage.
Now the description is "Folder of YOUR Plugin Sources: (*.cpp and .h files)"
It's important to set this path because it will be in this folder that trng patcher will update source files downloaded in last update.

- Added new callback
It has been added the CB_DIAGNOSTIC callback
You can use it to add your text to show on screen when level builder enabled diagnostic in the script.
You require it (inside of RequireMyCallBacks() function) in this way:

GET_CALLBACK(enumCB.DIAGNOSTIC, 0,0, cbDiagnosticMine);

Then you create the corresponding function to manage it, in this way:

char *cbDiagnosticMine(WORD DGX_Type, WORD EDGX_Flags, char *pCurrentLogText)
static char MyBuffer[4096];

sprintf(MyBuffer, "MyProgActions=%d\nAmount Bubbles=%d", MyData.TotProgrActions, MyData.Save.Local.Bubbles );

return MyBuffer;

* You should type above function over RequireMyCallBacks() function, as usual.
* Remember to define as "static" the local buffer (MyBuffer[] in above example) where you'll type your log to return.
* Use "\n" characters to signal a new line.
* In spite you could easily making yourself a simil-diagnostic on-screen, it should be better that your diagnostic was linked with that of trng, to permit at level builders to enable/disable all diagnostics via script and to avoid that other texts overalpping yours or viceversa

See declaration of CALL_DIAGNOSTIC prototype in DefTomb4Funct.h source for more infos.

- Improved FromNgleIndexToTomb4Index() and Convert() functions
It has been added the chance to convert ngle indices about cameras in tomb4 format.
Previously this ngle / tomb conversion worked only for moveable item indices.

- Fixed bugs in Get() function
In Get() function, for some enumGET values requiring an index, it was ignored the check for further NGLE_INDEX flag, used to require a conversion from ngle index to tomb index.
This problem was present in following GET_ parameters:

- Fixed bug in [Export Function] button of ngle program
In previous versions, when you tried to export a trigger (like A41) that had in object parameter a camera or fixed camera index, in resulting exported funcion the "| NGLE_INDEX" constant, to force conversion from ngle index to tomb index, was missing.

- Fixed bug in NGLE program
In previous versions, when you click on [Export Function] in "Set Trigger Type" window and some field of trigger was missing, it may be that program crashed

- Fixed bug in Get() function
In previous version, the call to get data for (trng and memory) variables:
produced a crash.

- Improved Get() function
About the enumGET.COLOR_RGB request, now there will be a new parameter to set in SecondaryIndex of Get() function.
The syntax now is:

Get(enumGET.COLOR_RGB request, IdOfRgbColor, enumCOLF_ (COLor Format));

The new constants COLF have only two values:

COLF_WINDOWS_COLOR (to get the color in the format required by Windows Api functions
COLF_TOMB_COLOR (to get the color in the format required by Tomb4 functions.

- Corrected wrong description about #REPEAT# tag syntax.
In previous documentation the description of #repeat# tag was wrong about last (optional) parameter.
It was described like an "increment" but in the reality it was the FirstIndex parameter, to set a value for index of each row, different than the number of counter showed in the description of that parameter.
The FirstIndex argument will be used in very specific situations.
See the (updated) description of #REPEAT# tag in "How to add new Triggers" tutorial, for more infos.

- Fixed some internal links in Function Collections tutorial
In previous release the links for GetMemory() and LoadFile() functions were wrong.
AkyV is offline  
Old 16-02-17, 23:11   #36
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 16 February 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-6):

- Removed previous fixing about color palette in NGLE program
In previous version there has been an attempt to fix colors after loading color palette in ngle.
Now that fixing has been removed. I believe it was not a bug but rather it was necessary loading only color palette that had colors compatibles with those of ngle program.
I don't know better, but it's not realistic that eidos programmers had not seen that problem, perhaps for them was not a problem since they used right imported color palette.

- Added ocb code for static objects
It has been added the ocb value 8192 (shatter specific)
This code works only with shatterable statics.
When a shatter has 8192 code, it will be destroyed only by moveables set in Customize=CUST_SHATTER_SPECIFIC script command.
See following chapter

- Added new customize constant
It has been added the CUST_SHATTER_SPECIFIC constant.
With this customize you can decide what kind of moveables or ammo, will be able to destroy the shatter with 8192 ocb code.
This add on has been thought to solve the problem about missing "special" SHATTER9 of classic trle. In the past, the SHATTER9 can be destroyed only by KNIGHTS_TEMPLAR and SKELETON (with sword). Anyway in trng releases, from that to change the shatter range in static items, that specific feature of SHATTER9 was vanished.
Now you can restore that special feature with a customize like this in your script:
and adding 8192 ocb to some shatter (the shatter9 for instance).

See CUST_SHATTER_SPECIFIC description in NG_Center's mnemonic constants panel, for more infos

- Fixed bug in Sphinx
In previous versions, the sphinx destroied all statics from SHATTER0, ignoring the setting in CUST_SHATTER_RANGE customize and also the default SHATTER9 limit with the risk to destroy also new static slots (EXTRA) like they were shatters

- Fixed bug in customizing CrossBow ammo
It's not easy forecasting the effect of this bug, anyway there was an error that mixed the trng code to handle crossbow customizing (like for harpoon) and old original code of crossbow ammo management.

- Fixed bug about jittering of Frog Man
When Lara and frogaman were about at same height, underwater, the frogman had a weird jittering.

- Added new ocb values for FrogMan
It has been added a serie of flags for frogman.
Most are about shooting, to disable it or to set max distance to enable shooting.
See in [OCB list] of NG_Center's reference panel the "_NEW FrogMan" item, for more infos.

- About false detection of hitting for FrogMan
In many circustancesm it happened that harpoon (shot by Lara) hits FrogMan, in spite it seems to hit the empty (a bit lower of FrogMan)
This bug is not fixable whereby code but changing the collision box of frogman in many underwater animations.
It is a problem born when I used automatic collision for animation with WadMerger.
The program, taking as bound the extreme positions of any mesh (enclosed the light cone) created many collision boxes where the box (used to detect a collision with harpoon) is very bigger than real frogman body.
In spite this fixing (with wadmerger) is not so complicated, I already performed it for you.
You can download the frogman with fixed collisions here: http://www.TrLevelManager.eu/download/frogman_new.zip

- Fixed bug in C84 condition trigger
In previous release, when the enemy (whose check lara's detection) had a west facing (in ngle view), the condition gave many false positive also when lara was back of him.

Note: this bug could have produced bugs also in other situations: the chance to get in kayak and the conditions working with testposition command.

- Improved menu command "Plugins->Info about mounted plugis" of NGLE program
In previous version the command showed only the plugin with .trg file.
In spite that behavior was correct, since only plugins with triggers will be mounted in ngle program, now those infos have been integrated with plugin currently installed in trle folder, specifing two lists: the list of mounted plugins (with triggers) and other list with not mounted plugins but installed in trle folder.

- Restyled input box window in NGLE program
In previous version the window used in ngle to get an input by user (texts or values) was too high.
Now it has been reduced the space for descripton to get the window inside of ngle window when there are input about light values.

- Suggestion about fixing for an old bug in key/puzzle activation.
There was a bug in old trle (and also in trng) occurred in this situation: when lara was using a key/puzzle to activate a trigger, if player saved the game before the trigger activation was completed, at reloading of that savegame, the animation were completed but no trigger activation happened.

Studying the problem I believe that the bug was not in the tomb4 code (and for this reason I didn't any bug fixing in this case) but rather in animations used to use/complete key/puzzle.
Pratically eidos programmers created the flipeffect 6 (named "Activation trigger" in wad merger) own to avoid that problem about saving/reloading in the middle of critical animtions, but then (weirdly) they forgot to set that anim command flipeffect in right frame of critical animations. Indeed the linked procedure seems was not ever called.
For this reason the way to fix this bug it's simply to add, to all animations that using key or completing puzzle, the anim command flipeffect 6 (activation trigger) in next frame that of "Set free hand", or, in the case it was missing (wery weird) in last frame of that animation.

Note: above work around should work, anyway there is the risk of a double activation that, in spite it should not affecting big issues for common object activations, it could have some effect for some trng triggers called twice. You should taking care about this eventuality in projecting phase.

- Fixed bug about bikebeam
In old tomb4 when the bike exploded, the bike beam continued to do light, in spite the bike was vanished.

- Fixed bug in Set Trigger Type window of NGLE program
In past releases there was a bug that could confuse the level builder.

It happened in this situation: the trigger showed a previous condition trigger having an extra parameter...
Since in condition triggers the extra parameters are stored using the five activation buttons ([1][2][3][4][5]), when this condition trigger had some extra parameter the values (checked/unchecked) of activation buttons changed in according with extra parameter and the user should not change manually them.

Above it's usual and normal behavior.
Anyway, the problem occurred when user changed current condition trigger with another condition (or with condition of another engine/plugin) that had NO extra parameter. In this new situation, the activation buttons will be not changed by trigger setting but (and this is the bug), ngle didn't reset the activation buttons of previous condition. As result, if level builder didn't see this situation, he will have a (new) condition trigger with messed activation buttons and in this way the trigger activation (when the condition will be true) will be not immediate, since the activation buttons are used own to have some trigger activation only when all five activation buttons are pushed.

Now I tried to fix above bug in this way: everytime the user changes current condition or current plugin/engine, the activation buttons will be restored to all/pushed status, i.e. "immediate activation"
Anyway there is yet the chance to have this bug in some combination, from/to type/activation mode trigger to another, so take care to verify if activation buttons have the wished status when you change the trigger to one that had: NO argument list for extra argument and it was a condition.

- Fixed bug about execution of old flipeffects
For "old" flipeffect I mean those "historical" flipeffects with number less or even than 46
I discovered a shocking bug!
Probably because of strong restyling of internal management of triggers, born to support plugin features, the management of old timer value (used by old flipeffects) it had been skipped.

Pratically, in all trng releases from upto current (excluded), old flipeffects were executed ignoring the value typed in Timer parameter.
For this reason, in spite this fixing was aimed to solve a bug in Flipeffect 28 (about fog bulb color) probably, it occurred in many other old flipeffect triggers.
I apologize for this embarassing failure.

- Attempt to fix problem in update phase
In previous versions, some users had problems in on-line update operation.
The file downloaded by NG_Center, to perform last update, appeared "empty", or, at least, empty was the folder with extracted files.
Now it has been changed the unzip operation, hoping this mod solved the problem.

TRNG Patcher updater (PU-6):

- Changed target of Home key in Trng Patcher editor
In previous release the Home key moved the caret at top of whole text, while not it will be placed at begin of current line

- Added new commands to "Tools" menu of TrngPatcher program
Now in Tools menu command there are two commands used only for .script file.
When you loaded in text editor a ".script" plugin file, you can use these two new commands to expand all mnemonic constant descriptions or to compatc them, newly.

You can use the menu command: "Tools->Reformat whole .script file->Expand linees (remove > chars)" to have newline characters in the description of any constant description.
In this format it's easier reading the description and editing it.
Then you can (and you have to) compact newly the text, using the menu command: "Tools->Reformat whole .script file->Compact Linees (add > chars)" to have newly the .script file in a compatible format with ng_center program requirements.


* When you expand the .script text, the divisor linees, between a description and the next, will be replaced with "||" pair of characters. You should not remove these linees because they will be used to remember where a description ends and where another starts.

* If you wish adding new constants while you are in expanded format, you should remember to divide one description from previous, using a line with only "||" characters.

* Before saving the .script file remember to compact it newly. Anyway if you forgot this operation, TrngPatcher will remind you about this issue.

* Since the pair of characters "||" (divisor line) and the character ">" (break-line inside constant description) are special formatters, you cann't using them for other targets in your .script file.

- Fixed some description about Preset list
In the "Preset List for Arguments" table of "How to add new Triggers" tutorial, some descriptions in "Range" field have been corrected.
In previous version it was described the Object field like an argument that was able to host values upto 4095.
Really the matter is complex: when you are working on level map (and .prj file) that argument is able to host also values bigger than 4095 but this chance exists only for ngle "object" indices and it will be changed in Output wad operation, where all ngle indices will be converted in tomb4 format, reducing the max value for Object field to 0/1023.
This means that you can host any index about ngle objects in Object field but you cann't host your constant values with numbers bigger than 1023.

- Attempt to fix problem in update phase
In previous versions, some users had problems in on-line update operation.
The file downloaded by trngpatcher, to perform last update, appeared "empty", or, at least, empty was the folder with extracted files.
Now it has been changed the unzip operation, hoping this mod solved the problem.
AkyV is offline  
Old 28-03-17, 23:16   #37
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 28 March 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-7):

- Fixed bug about disabling new sound engine (BASS)
In previous versions (from to when in [Options] section of script there was the command:
to disable bass engine and restore old tomb4 sound management, the game crashed when current audio track restarted for second loop.

- Fixed description of some trng triggers
It has been changed the description of F115, F116 and C81 triggers, replacing the text:
"Cold water room"
with new text:
"Cold room"
This fixing was necessary because, in spite of previous descritpion, that flag worked either with water rooms and dry rooms

- Improved "Set Trigger Type" window in NGLE
Trying to bridge an historical gap about trigger description, it has been added a new informative row to host a remark line about current trigger usage.
More, it may be that for some triggers there was a [Trigger's Help] button, to show an extensive description about current trigger usage.
Note: currently there are only few trng triggers with these extra infos (like A41 and A42) but in the future I'll try to add more infos for complex triggers.

- Added support for MetaTr Cabinets
For MetaTr's users, there is now the chance to export the restyled geometry and textures of your level in a file, the meta cabinet (with extension ".mtcab"), to have a faster and easy importing of meta features, using the common tom->tr4 building with ng_tom2pc.
The advantage is own to can adding/modifing triggers and items in your level, preserving in automatic way the previous meta geometry.
You find the [Create Meta-Tr Cabinet] tool, to build a meta cabinet file, in [Tools3] panel of NG Center program.
Once you launched the tool, you can reading also more detailed instructions about its usage.
Note: in spite this is not main usage, I remind that the cabinet method could word fine also for level builders that don't use metatr program. In this case the advantage will be only to reduce drammatically the building time, since most of geometry and reprocessing texture operations will be skipped.

- About bug on Action Trigger 41 (to activate camera)
The Action41 works but it's necessary understanding its usage.
Read the help file linked with this trigger in Set Trigger Type window when A41 has been selected.

- About bug on TIMER_FIELD trigger
In my tests TIMER_FIELD worked, anyway its usage requires some learning.
It required that the TIMER_FIELD trigger was the first in trigger sequence on that sector.
You discover the position in trigger sequence performing a click (with left mouse button) on 2d floor map in NGLE on the wished square. Going on to click, you'll have all trigger info on that square but there will be a moment that you don't receive any info. This "empty" info is when you completed the sequence and, at next click, you'll see the info about FIRST trigger on that sector. The TIMER_FIELD has to be the first.
Another matter is about the [ONE-SHOT] button...
If the main trigger on that sector (that will be never the TIMER_FIELD trigger but other trigger whose you want change the timer value) has not the [ONE-SHOT] button, no action will be peformed in game until lara stands on that square. Only when she will leave the sector the countdown (or opening) will begin.
If you don't want this behavior and you wish that immediately the trigger was performed, you have to set as [ONE-SHOT] the main trigger (to open a door, for instance)
Note: unfortuntately this kind of trigger is not one of them where I can add a description directly in Set Trigger Type window. So try to keep in mind above speech.

- Improved WindowTitle script command
In previous versions, the WindowTitle command worked only for game's main window but it had no effect on setup window, that went on to show in caption bar "Tomb Raider - The Last Revelation" title.
Now you can change also the name of setup window using the WindowTitle command but you have to follow these two rules:
1) The WindowTitle (to work with setup window) has to be placed in [Title] section
2) The string you use for the new title (for technical reasons) it has to be an extra ng string type. Indeed, if you use a standard string there will be no change in setup window

- Fixed dead links on tr level manager website
From migration to .eu domain, some zip file in demo pages were missing.
Now I have restored the downloads for:
lightning.zip - "Lightnings and Binoculars (Sources) (16 MB)"
speech_demo_trle.zip - "Cutscenes and Demos - Binary, playable demo (53 MB)"

TRNG Patcher updater (PU-7):

- Improved Trng Patcher program
Now it's possible resize the window of TrngPatcher using common Windows features

- Changed editor Trng Patcher key command
Now the [END] key will move the caret at end of current line, while in previous release the caret was moved at bottom of whole document.

- Fixed bug in Trng Patcher program
In previous version, the "Tools->Reformat whole .script file" commands, generated an error at bottom of file, closed to final "<END>" line.
Since the compact/expand operations, required to have (at least) an empty row first of final <END> line, multiple conversions got to attach final <END> line inside of last constant description.
Now, to fix this problem, an empty line will be added by trngpatcher when it was missing in the original (compact) .script file, first of final <END> row.

- Added D3D constants and their enumD3D auto enumerators
In previous version had been forgotten the list of D3D_ values, used to find a given light type with Find() function for enumFIND.Light type.

- Added to Get() locator the GET_FLIPMAPS type
Now it's possible getting all infos about flipmaps with the code:
Getting results in:


For more infos, read the comments of the StrFlipMap structure prototype that you find in structures.h source

- Added reference for static index conversion to trng.h source
In previous releases was missing the declaration of FromNgleStaticIndexToTomb4Indices() function in trng.h.
For this reason, in spite the corresponding function was present in trng.cpp source, it was not possible calling that function

- Extended syntax for trigger definition
Now it's possible adding a remark or an help file for some trigger (flipeffects, conditions or actions)
The new extended syntax works in .trg plugin file and it has been described in "Remarks and Documentation for triggers" chapter of "How to add new Triggers" tutorial.

- Updated the "How to add new Triggers" tutorial
It has been added the description about new #REMARK#, #STAR_DOC# and #END_DOC# tags in trigger declaration on .trg plugin file.
AkyV is offline  
Old 07-04-17, 10:56   #38
Join Date: Dec 2011
Location: Hungary
Posts: 4,737

TRNG Updater
(Released: 07 April 2017)

See the update functions in NG Center and TRNG Patcher.

NG Center updater (CU-8):

- Fixed some dead links in trng websites
There were some dead links in secondary trng website: http://www.webalice/paolone2011/ng.htm
The links about "Lightnings and Binoculars (Sources) " and "Cutscenes and Demos - Binary, playable demo" were dead.
In demo collection has been added the link to download the new Frog Man moveable with fixed collision boxes.

- Fixed bug in NGLE program about [P] button of Set Trigger Type window
In previous release, clicking on [P] button of "Trigger's Remark" row, there was a crash if currently the selected trigger was not a trng trigger (flipeffect/action/condition)

- Fixed output for Trigger's Help button
In previous version, in the trigger's help, showed clicking on [Trigger's Help] button, there was some internal markers like: "#START_DOC# and "#END_DOC#"

- Fixed the description of TCMD_SET_EXTRA_TIMER constant in NG_Center's reference panel
In previous versions, the first example about usage of TCMD_SET_EXTRA_TIMER script command was wrong. It was not working since the trigger used in the example was not correct to realize the wished target.

- Added new triggergroup TCMD_ command
It has been added the TCMD_TIMER_FIELD command.
This command is different than other commands like "TCMD_SET_FULL_TIMER" or "TCMD_SET_EXTRA_TIMER".
Indeed, while these two commands change the value of an ARGUMENT of next trigger in triggergroup sequence, the TCMD_TIMER_FIELD presets the number of seconds for all (following) triggers in triggergroup sequence.
Anyway, most important difference, is that, with TCMD_TIMER_FIELD command, you can set a number of seconds in the range -1029 / + 1029 seconds (more than 18 minutes), while with TCMD_SET_EXTRA_TIMER command, the range is only of -64 / + 63 seconds.
Read the TCMD_SET_EXTRA_TIMER description in NG_Center's reference panel for more infos.

- Fixed bug about Trigger's Help
In previous version, when the text in "#START_DOC#", "#END_DOC#" pair, had a length greater than 512 characters, there was a crash in tomb4 when it was enabled DGX_LOG_SCRIPT_COMMANDS diagnostic type, because tomb4 was not able to manage the size of DOC documentation linked with trigger's description.

TRNG Patcher updater (PU-8):

- Fixed bug in trng_installer program
In previous update (the PU-7 update), the trng_installer program required the Comctl32.ocx activeX object.
On some operative system (like WindowsXp) the program was not able to run until a manual installation of Comctl32.ocx activeX occurred.

- Fixed bug about remind for updating
In previous versions, when Trng Patcher detected a long time (about 30 days) without checking for on-line updates, it reminds to check using a message box.
The bug was that, in spite user checked for updates, the remind was yet present, only because no update was yet available.

- Added FITEM_ flag for moveable flags in StrItemTr4 structure.
In previous versions, the flag with value 0x10 (16 decimal) had a not sure meaning.
Now (thanks to AkvY) it has been discovered its real meaning: it will be set when enemy has just been hit with weapons (but not grenade)
To preserve backward compatibility, the old FITEM_FLAG_10 flag it has been let, but it has been added the new flag (with same 0x10 value): FITEM_ITEM_HAS_BEEN_HIT (or enumFITEM.ITEM_HAS_BEEN_HIT auto enumerator).
AkyV is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 09:34.

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