Thread: TRNG - Updates
View Single Post
Old 15-01-17, 22:26   #34
Join Date: Dec 2011
Location: Hungary
Posts: 4,624

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