Thread: TRNG - Updates
View Single Post
Old 06-01-17, 15:56   #33
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,907
Default

TRNG 1.3.0.2 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)

TCMD_SET_...
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
DiagnosticType= DGX_LOG_SCRIPT_COMMANDS, EDGX_CONCISE_SCRIPT_LOG

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 1.3.0.0 release, then it has been removed in 1.3.0.1 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);
or
PerformActionTrigger(NULL, 89, 188 | NGLE_INDEX, 5);
ect.
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;

Get(enumGET.INFO_LARA,0,0);
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.
Notes:
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