www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 29-01-17, 15:13   #161
Paolone
Explorer
 
Join Date: Apr 2007
Posts: 720
Default

Quote:
Originally Posted by AkyV View Post
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?
Well, in your post I see two different questions:
1) How to manage plugins requiring different trng versions
2) How to handle the update on sources with Find & Replace method

About point 1 I have to precise that it's NOT advisable requiring in own plugin a specific (and so, only that) trng version.
This choice could really produce an unsolvable problem for level builders that uses many plugins with different required trng versions.
The rule is that you (plugin builder) should only require for your plugin a trng version even or higher that that you used for final building of plugin.
About that version check is not so complicated.
I can show here a code that could be used "as it is", changing only the version numbers for your target.
For instance, supposing you release your plugin when the last trng.dll you tested was 1.3.0.9.
In InitialiseAll() function you type:
Code:
bool InitializeAll(void)
{
	// here you change the trng version numbers to set the last trng
	// version you used to build your plugin
	WORD VetVersion[] = {1, 3, 0, 9};
	char MyMessage[256];

	if (CompareTrngVersion(VetVersion) < 0) {
		sprintf(MyMessage, "ERROR: this plugin has been written for trng version %d.%d.%d.%d or higher. Now you are using an older version of trng. Try to update trng to last version.",
				  VetVersion[0], VetVersion[1], VetVersion[2], VetVersion[3]);
		TryMessageBox(MyMessage);
		return false;
	}
// ************  InitializeAll() function  ****************
Then your plugin will work fine with all tomb_nextgeneration.dll 1.3.0.9 or higher, while it will abort with an error message when the version is lower than 1.3.0.9
At end, the level builder has only to update trng to last release to avoid problems about required version from plugins.

While, about point 2, the rule is that you said:
Quote:
THE CONCLUSION:
Never remove or modify, only add.
Indeed above is own the right rule for "backward compatibility" issue.
I don't remove old triggers replacing with other with different syntax but I'll add new trigger letting the old.
It's true, there has been that "AimedEnemy gate".
Indeed I apologized so much own because it has been a bad mess that.
Following the good rule, I had to add new pStrAimedEnemy field with right pointer and letting old (wrong) IndexOfAimedEnemy field for backward compatibility. Anyway since that wrong field was unusable (excepting using that work around that I suggested) I prefer change it.
Anyway in future I'll try to avoid always that behavior and in that evil case that it was not possible, I'll warn in clear way about the change to do.
Paolone is offline   Reply With Quote
Old 29-01-17, 19:04   #162
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,230
Default

Quote:
Originally Posted by Paolone View Post
The rule is that you (plugin builder) should only require for your plugin a trng version even or higher that that you used for final building of plugin.
About that version check is not so complicated.
If you say that I can be sure that my plugin will be compatible for higher versions that is absolutely okay.
What I was afraid of is the source will be changed in higher versions so the code already compiled will fail.
Older versions compatibility cannot be guaranteed, this is evident.

Quote:
Indeed I apologized so much own because it has been a bad mess that.
Following the good rule, I had to add new pStrAimedEnemy field with right pointer and letting old (wrong) IndexOfAimedEnemy field for backward compatibility. Anyway since that wrong field was unusable (excepting using that work around that I suggested) I prefer change it.
Anyway in future I'll try to avoid always that behavior and in that evil case that it was not possible, I'll warn in clear way about the change to do.
No problem, as I said, I was thoughtful, and I have fixed it already.
AkyV is offline   Reply With Quote
Old 08-02-17, 21:57   #163
Gancian
Student
 
Gancian's Avatar
 
Join Date: Jul 2010
Location: Southern Italy
Posts: 122
Default

Sorry for the bump, but the link on trng webpage for the fixed version WadMerger+Trng_Fixer 1.0.0.4 seems to be dead.
__________________
One side will make me grow taller, the other side will make me grow shorter.
Gancian is offline   Reply With Quote
Old 17-02-17, 12:26   #164
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,230
Default

^Good news, it is fixed.

Quote:
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
Would you add this link to "frogman" window of both sites in the download contents?

------
And a random thought:
Please never stop supporting WinXP, it seems the best (or at least a splendid) way to build levels.
AkyV is offline   Reply With Quote
Old 17-02-17, 17:18   #165
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,146
Default

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

- 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.
Nice ones!

The jittering is gone and with the new collisionboxe the diver does get hit properly.

Something I noticed, which might not have been mentioned before, is the way the diver hits Lara.
Most, if not all, harpoons he fires at her don't hit her. So the diver is hardly dangerous.


Going to have a look at the new OCB values for him.

*** EDIT ***
I'm liking the new OCB codes for the diver.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 17-02-17 at 17:21.
Titak is offline   Reply With Quote
Old 17-02-17, 19:18   #166
Paolone
Explorer
 
Join Date: Apr 2007
Posts: 720
Default

Quote:
Originally Posted by AkyV View Post
Would you add this link to "frogman" window of both sites in the download contents?
It's a good idea, indeed I was just thinking about that.

Quote:
And a random thought:
Please never stop supporting WinXP, it seems the best (or at least a splendid) way to build levels.
Surely.
Indeed I tried to "support" Visual C++ Express 2010 compiler, own for that reason. All next Visual C compiler can manage plugin sources, of course, but the VC 2010 is last release available for Windows XP.
All official and unofficial tools for trle work fine under windows Xp.
Currently I have as main pc for programming own a WinXp portable, then I have also a Windows 10 pc to test with last OS the tools and a desktop with windows8 for video editing.
Anyway only under Windows Xp all programs (and not only mines) worked always fine.
Paolone is offline   Reply With Quote
Old 17-02-17, 19:31   #167
Paolone
Explorer
 
Join Date: Apr 2007
Posts: 720
Default

Quote:
Originally Posted by Titak View Post
Something I noticed, which might not have been mentioned before, is the way the diver hits Lara.
Most, if not all, harpoons he fires at her don't hit her. So the diver is hardly dangerous.
Do you mean that ... in spite the harpoons don't hit her, she will be injured?
I fear that the problem was the same, also lara has very often a collision box greater than that of her main body. Just she had an arm and a leg very distant and her collision box becomes huge, in spite most of this volume will be empty.
Since in the case of lara is not reasonable change all collision box animations, the solution is more complex. I'll try to invent something.
Quote:
Going to have a look at the new OCB values for him.

*** EDIT ***
I'm liking the new OCB codes for the diver.
I'm happy you like them.
Really frog man was rather bugged. Converting enemies from other games it's not easy, I had to replace many AI stuff from scratch.
Paolone is offline   Reply With Quote
Old 17-02-17, 19:47   #168
tomb2player
Explorer
 
Join Date: Jun 2009
Location: Poland
Posts: 929
Default

Paolone, once again thank you for what you are doing.

What about boxes and overlaps? I remember that you said it's possible, but difficult, or so... can you clarify this again? If it's not possible to do because of .TOM file limitations, maybe it's possible to make external application/tool, which will do this with finished compiled level? For example it will correct amount of boxes and overlaps in .TR4 file.
__________________
Tomb Raider: RMS Titanic, checkout: tombraiderforums.com/showthread.php?t=216051
tomb2player is offline   Reply With Quote
Old 17-02-17, 20:03   #169
Paolone
Explorer
 
Join Date: Apr 2007
Posts: 720
Default

Quote:
Originally Posted by tomb2player View Post
Paolone, once again thank you for what you are doing.

What about boxes and overlaps? I remember that you said it's possible, but difficult, or so... can you clarify this again? If it's not possible to do because of .TOM file limitations, maybe it's possible to make external application/tool, which will do this with finished compiled level? For example it will correct amount of boxes and overlaps in .TR4 file.
Now I hope that the solution will be the new editor of Monty.
He's working to this new editor that could replace the NGLE.
I'll help you about adding of trng stuff (trng triggers, plugin management ect.).
The idea is that, once there will an editor with sources easily scalable, it will be possible trying to rewrite all internal format of .tom / .tr4 file and the first changes will be about current limits.
Now I neither remember when The Last Revelation has been developed but surely it happened a long time ago, in old millenium.
Well, in that old time, for eidos programmer was important also saving some bit, using BYTE (0/255) rather words (0/65535). Same speech for using words instead long. Result of above attentions it has been to get many limits that now we could passing over, simply using long instead by word or byte to keep max amount of "some stuff" like boxes and overlaps.
Just thinking that, using 32 bit values (DWORD) to host amount of some stuff, we could having 4 billions of ... everything.
Paolone is offline   Reply With Quote
Old 17-02-17, 20:43   #170
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 29,146
Default

Quote:
Originally Posted by Paolone View Post
Do you mean that ... in spite the harpoons don't hit her, she will be injured?
I fear that the problem was the same, also lara has very often a collision box greater than that of her main body. Just she had an arm and a leg very distant and her collision box becomes huge, in spite most of this volume will be empty.
Since in the case of lara is not reasonable change all collision box animations, the solution is more complex. I'll try to invent something.
She won't be injured either. Well, sometimes, but it is very easy to take out a frogman without getting hurt yourself. He's not a very threatning enemy this way.
So I guess the frogman is a poor shot.
You'll hopefully be able to figure something out.

Not that I want him to be ultra strong and can kill Lara with just a couple of harpoons, but some more damage from him would be nice.
That said, I haven't tried the Enemy= command on the frogman yet.


Quote:
Originally Posted by Paolone View Post
I'm happy you like them.
Really frog man was rather bugged. Converting enemies from other games it's not easy, I had to replace many AI stuff from scratch.
Boy... and here I was thinking you were able to port some code from the other engines. I was very wrong about that I see.
This makes it even harder to get enemies from the other clasic games to work with TRNG.

And speaking of converting enemies from scratch, I take it that the enemy submarine is one of them also.
That thing is pretty deadly when Lara gets hit by one of the torpedo's, so that's good.
But it is a very weird thing if you ask me... I just checked it in WADMerger Animation Editor, only to find just 2 one-frame animations.
Yet ingame it moves it's propulsion/torpedo shooting thingies while it moves around and follows Lara.
I'm also missing a sound it seems... I've added the sound for shooting the torpedo's (soundslot 361) but I seem to remember it making a sound when it turns around. But how to add sounds when there are no animations to assign them to...
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Reply

Bookmarks

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 11:14.


Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2017, vBulletin Solutions, Inc.