Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tomb Raider Next Generation

Reply
 
Thread Tools
Old 12-01-17, 21:58   #151
Paolone
Member
 
Joined: Apr 2007
Posts: 726
Default

Quote:
Originally Posted by HD86 View Post
Can I enter the indexes of two items in a single action trigger?
Unfortunately you can not. This is a limitation in trigger structure, indeed neither me I have created an action trigger with two moveables.
When you need of more parametere for your trigger, like in this case requiring two moveable indices, you should create a your Parameter=PARAM_ script and then, in the trigger you'll let choose the PARAM id with data about the two enemies (from and to) for the moving.
For instance if you create your PARAM like this:
PARAM_FROM_TO_MOVING
you can set that, in one argument the level builder will have to type the index of first moveable, and in next argument the other.
About how to create your PARAM constant and script command, you can read this topic: http://www.trlevelmanager.eu/plugin_...DK.htm#LINK210
Note: really above link is for CUST_ constant but the speech is almost the same.
Just you define a PARAM_ constant and then you'll get (from the code) the values of that parameter=Param using:
Code:
	// supposing that "PARAM_FROM_TO_MOVING" was the constant for parameter
	// and that in Timer variable there was the value typed in the trigger to choose the Id o Parameter=PARAM_FROM_TO_MOVING, ...
	// you can get the data of that script command in this way:
	Get(enumGET.MY_PARAMETER_COMMAND, PARAM_FROM_TO_MOVING, Timer);
	//and then read its indices with this code (supposing argument position was [1] and [2], of course
	FromItemIndex = GET.pParam->pVetArg[1];
	ToItemIndex = GET.pParam->pVetArg[2];
Note: you'll have to define the "PARAM_FROM_TO_MOVING" in your "Constants_mine.h" source with a row like:

#define PARAM_FROM_TO_MOVING 1

for instance, and the value should be the same of your plugin..script files and ng_center reference.
Paolone is offline   Reply With Quote
Old 13-01-17, 00:53   #152
HD86
Member
 
Joined: Apr 2014
Posts: 260
Default

Quote:
Originally Posted by Paolone View Post
does that sample described like played (and you don't hear the sound) or neither it appears the sfx number displayed on screen?
The number does not appear. It does not say that the sound is playing.

Thanks Paolone for explaining the parameters. I have a related question, how can I retrieve data from a TestPosition command in my script? For example, I have a TestPosition command in my script, and I want to get the numbers from that TestPosition command and use them in the function CheckPositionAlignment(). How can I do that?

I found that the following will not work:

<START_TRIGGERTYPE_12_T_H>
110: (some text)
<END>
<START_CONDITION_110_O_H>
(some list)
<END>
<START_CONDITION_110_B_H>
(some list)
<END>

It took me some time until I figured out what is wrong. I had to swap the lists:

<START_TRIGGERTYPE_12_T_H>
110: (some text)
<END>
<START_CONDITION_110_B_H>
(some list)
<END>
<START_CONDITION_110_O_H>
(some list)
<END>

If there is an "extra" parameter it must be written before the "object" parameter, or the NGLE will not recognize the "extra" parameter.

Also for some reason the last parameter of the #REPEAT# tag does not work. The list values will always increase by 1, regardless of the number entered here.

EDIT: I found an (indirect) answer to my question. It is possible to use the function TestEnvCondition().

if (TestEnvCondition(-1, enumENV.ITEM_TEST_POSITION, -1, ID, -1)==true)

Your "Function Collection" is amazing Paolone. It has answers to everything. I wish you released this treasure earlier.

2ND EDIT: The correct answer is StrTestPositionCmd.IdTestPosition.

Last edited by HD86; 13-01-17 at 19:50.
HD86 is offline   Reply With Quote
Old 15-01-17, 20:07   #153
Paolone
Member
 
Joined: Apr 2007
Posts: 726
Default

Quote:
Originally Posted by HD86 View Post
The number does not appear. It does not say that the sound is playing.
I tried to reproduce this problem but my experiments get the sfx played.
I added an exportet flipeffect trigger as animcommand and I insert this animcommand in an underwater swimming animation of lara.
I hear the sound in game.
Could you say me something of more specific about this problem?
For instance: what moveable was the owner, that kind of trigger and with what setting as animcommand?
Quote:

If there is an "extra" parameter it must be written before the "object" parameter, or the NGLE will not recognize the "extra" parameter.

Also for some reason the last parameter of the #REPEAT# tag does not work. The list values will always increase by 1, regardless of the number entered here.
Thanks for this warning, I'll check for these bugs.
Paolone is offline   Reply With Quote
Old 15-01-17, 21:50   #154
HD86
Member
 
Joined: Apr 2014
Posts: 260
Default

Like Titak said:

Quote:
Originally Posted by Titak View Post
That is indeed a common bug, so it does not happen only on your end.

For some odd reason, it does work most of the time for me when I export the flipeffect to play a sample on a certain frame as an animcommand and then insert that in the AnimCommand window of the animation.
We don't have a problem with a "set position" animcommand having an exported TRNG flipeffect but only with the "play sound" animcommand. I don't remember that the "play sound" animcommand ever worked for any slot other than Lara.

Try using a "play sound" animcommand for a creature other than Lara and see if that will work underwater (for example, try a CROCODILE or an ANIMATING object).

By the way, there are other common bugs in the TRNG triggers. For example, the timer of ACTION 41 does not work, and also the new TIMER_FIELD trigger does not work. I know that others have the ACTION 41 problem and not only me.

Could you please explain the sizes of the trigger parameters? I have found that the "Extra" parameter of an action trigger will always have the value 0 if I use a somewhat big number in the "Object" parameter (e.g. a moveable index); but the TRNG triggers do not have the same limit.

For example, the following works for TRNG:

$5000, 1425, $7F1 (object = 1425; extra = $7F)

However, the same trigger will not work for my plugin:

$015000, 1425, $7F1 (object = 1425; extra = 0)

Last edited by HD86; 17-01-17 at 02:46.
HD86 is offline   Reply With Quote
Old 18-01-17, 18:49   #155
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default

WADMerger fixer is not available from trlevelmanager.eu.
AkyV is offline   Reply With Quote
Old 18-01-17, 21:06   #156
Paolone
Member
 
Joined: Apr 2007
Posts: 726
Default

Quote:
Originally Posted by HD86 View Post
Could you please explain the sizes of the trigger parameters? I have found that the "Extra" parameter of an action trigger will always have the value 0 if I use a somewhat big number in the "Object" parameter (e.g. a moveable index); but the TRNG triggers do not have the same limit.

For example, the following works for TRNG:

$5000, 1425, $7F1 (object = 1425; extra = $7F)

However, the same trigger will not work for my plugin:

$015000, 1425, $7F1 (object = 1425; extra = 0)
The range for extra timer of action should be 0/127
Have you tried to create a your (for plugin) action trigger and it doesn't support extra timer?

Well, today I found a lot of bug warns (also from other threads), so now I'll try to fix them (or most of them).
It will be necessary some day, I suppose.
Paolone is offline   Reply With Quote
Old 19-01-17, 11:46   #157
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default

Quote:
Sending a message to disk log. The SendErrorToDiskLog() function
void SendErrorToDiskLog(char *pMessage, DWORD PluginID, bool TestMsgBox)

...

Example:

SendErrorToDiskLog("ERROR: this plugin cann't work with current version of tomb_nextGeneration.dll. The plugin will quit");
This will be very complicated one day later, I think.
(I mean, not the log message, but the compatibility thing.)

I mean, for example, what if a level builder wants:
Plugin A, works only with TRNG X, and
Plugin B, works only with TRNG Y, and
Plugin C, works only with TRNG Z?

Two examples to prevent that problem:

1.
I want to save Animating positions in savegames which possible only with a trigger nowadays. Let's suppose you solve it in a new trng.dll, we don't need that trigger any more.
What you do is:
- don't remove the trigger from the TRG list,
- the trigger code is unhurt in the DLL,
- the contents (functions etc. referred by the trigger code) still exists. If it refers to Thing X which isn't important any more, you don't remove Thing X.

Okay, it is not a plugin thing, but similar situations can be even in a plugin.

2.
See again that "int IndexOfAimedEnemy;". After you modified it to "StrItemTr4 *pStrAimedEnemy;", and I updated TRNG, I needed to change the trigger code what we have been talking about before. (It was not a big problem, though. )
But what if you let that index there as well, also adding a convert command (or what) to the code? (I mean, not telling me what to do, because that means the plugin maker needs to check the whole code, find the error and change it. But our main theory is now we don't need to update the code if TRNG is updated. So you need to add that conversion directly in the source. - Note: if you add a general converter as well, for that reason, that is a bonus, naturally.)

THE CONCLUSION:
Never remove or modify, only add.

If you want to remove/modify something, then the new code will skip the old one, and you don't remove/modify the old one.

The old code will get some chance to be converted to the new one.
Or, at least, if there is no connection between the old and the new code, you just leave the (workable!) old code there. Trng.dll will skip the old code directly, but the plugin can still refer to that successfully.

OR:
Independently of having history files or not, another file added, where you describe for the plugin builder what he needs to change in the code, exactly, step by step. (Another error source if something is not clear or misunderstandable.)
In this case the plugin builder needs to update continuously:

- Original Plugin 1.0.0.0 for TRNG 1.3.2.9 users
- Updated Plugin 1.0.0.1 for TRNG 1.3.3.0 users
- Updated Plugin 1.0.0.2 for TRNG 1.3.3.1 users
etc.

OR:
Is there a way for a game to use more than one trng.dll?
- One for what the level builder chose to build general things.
- Each further ones will be installed with the plugin (max once, naturally), used only by that plugin.

------
I know what I wrote here is a very hard work, but perhaps there is an acceptable solution?

Last edited by AkyV; 19-01-17 at 12:05.
AkyV is offline   Reply With Quote
Old 19-01-17, 20:33   #158
LGG_PRODUCTION
Member
 
LGG_PRODUCTION's Avatar
 
Joined: Jul 2010
Posts: 858
Default

I have a big problem:
I can't open the inventory because almost everytime I try to open it the game crashes..
LGG_PRODUCTION is offline   Reply With Quote
Old 19-01-17, 22:06   #159
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default

I also had something similar, it looks some windowed mode bug.
My solution is:
I also have a classic TRLE installed, where ALT+ENTER works to swap between windowed mode and fullscreen. If TRNG-game crashes due to menus, then I start TRLE-game, hit ALT+ENTER twice, forth and back, perhaps also start a level first, where perhaps I open/close the inventory (successfully) - and TRNG-game is useable again in menus!

Last edited by AkyV; 19-01-17 at 22:36.
AkyV is offline   Reply With Quote
Old 27-01-17, 14:02   #160
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default

Something else.
This F355 bug perhaps is older but I don't remember I encountered it earlier.

I often use F355 triggers to test conditions: if the condition is true, then the spectacular colored flash of F355 indicates that.
I removed this GlobalTrigger/TriggerGroup from the script, also removing the related things from the map. However, if I started the level (after quitting the exe), the (deleted) effect kicked in, as if the (deleted) condition were true.
I repeated it a few times, with similar outcomes.
Then I edited some ColorRGB in the script (unrelated to that test). I started the exe again - and that bad flash was disappeared at last.

------
Another bug for today:
Please check pushable OCB values, some combinations seems messy (eg. 64+256+512 to forbid pushing+eastwest), Lara detects only an unuseable collision on the object, bumping to it.

Last edited by AkyV; 28-01-17 at 14:39.
AkyV is offline   Reply With Quote
Reply

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 18:10.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.