www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 06-05-19, 18:27   #511
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 406
Default

i'm praticaly sure that S_GetObjectBounds(StrBoxCollision *pBox) is:
Code:
typedef int* (__cdecl *TYPE_S_GetObjectBounds) (short *pFrame);
but TRNG set it to StrBoxCollision but no sense if you see it in IDAPro :x
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old 06-05-19, 20:48   #512
Dustie
Relic Hunter
 
Dustie's Avatar
 
Join Date: Apr 2005
Location: Poland
Posts: 9,212
Default

Quote:
Originally Posted by TokyoSU View Post
just install it, the NG_Center will replace any file that have changed
You mean install the new version as if the old version wasn't there? NG Center will recognize it's an upgrade and won't duplicate plugins?
Dustie is offline   Reply With Quote
Old 06-05-19, 21:18   #513
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 406
Default

Quote:
Originally Posted by Dustie View Post
You mean install the new version as if the old version wasn't there? NG Center will recognize it's an upgrade and won't duplicate plugins?
yes i do it with my plugins to update .script and .btn, if the dll is old, a box will pop "do you want to override the earlier file anyway ?" just click no or yes
and the install is finished
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old 07-05-19, 10:05   #514
Dustie
Relic Hunter
 
Dustie's Avatar
 
Join Date: Apr 2005
Location: Poland
Posts: 9,212
Default

Sweet!
Dustie is offline   Reply With Quote
Old 21-06-19, 08:59   #515
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 406
Default

#FIXED
EDIT: yes it's cbInitGame my bad, i'm an idiot because cbInitGame init the game before title or level, i need to set it in cbInitLevel :x
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; 27-06-19 at 14:25.
TokyoSU is offline   Reply With Quote
Old 27-06-19, 14:27   #516
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 406
Default

#deleted
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; 24-07-19 at 08:49.
TokyoSU is offline   Reply With Quote
Old 23-07-19, 21:26   #517
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,750
Default

Hello!
In my WIP plugin I try to reproduce the AOD walking mode feature. (Short SHIFT = turns it on/off.)
It goes well, but after I started working on the customizable details then there is a tiny detail I can't solve.

What I want for a specific flag, is:
- Up arrow: walk forward without SHIFT
- Standing still: walking mode "on" is kept
- Down arrow: not stepping back, but hopping back, the walking mode turns off by itself.

A simply "if animation is stepping back, then turn off the walking mode" condition is not enough here, Lara will not abort the animation:
- First "Down arrow without SHIFT": it will be a step back everyway - though, the walking mode surely turns off meanwhile.
- Second "Down arrow without SHIFT": now, as I wanted, it will be a hop back.

So I tried to force an animation:

The first animation of stepping back is 41.
The first animation of hopping back is 88.

It looks simple, eg. this way (still needs to be narrowed to "only when the walking mode is on", but that is not my actual issue now):

Code:
			Get (enumGET.LARA, 0, 0);
			if (GET.pLara->AnimationNow == 41) {				
			    GET.pLara->AnimationNow = 88;
			}
The problem is (even if I also try to force State, First Frame etc., it doesn't really matter, even for an "if anim is 88" condition) a huge Speed is generated now that makes Lara making a huge horizontal "jump".

The diagnostic always tells speeds about -32000 and such now. Speed is a "short" value, so I suspect this false speed must be a huge value above 32767, which cannot be presented in "short", that is why it is turned to a negative value.

Anim41 has speed 2.
Anim88 has speed 0.

I suspected that the animation-forcing makes that Speed 2 something really huge, that is why I tried this primitive troubleshooting code (bravely, even out of animation conditions, thinking that speed is never negative under normal circumstances):

Code:
	Get (enumGET.LARA, 0, 0);
	if (GET.pLara->SpeedH < 0) GET.pLara->SpeedH = 0;
But it also failed, no (real) effect, negative huge speed does not seem overwriteable...

Any idea?

Last edited by AkyV; 23-07-19 at 21:27.
AkyV is offline   Reply With Quote
Old 23-07-19, 22:14   #518
Krystian
Explorer
 
Join Date: May 2010
Posts: 889
Default

What if instead of trying to detect stepping back animation you detect the Down key press (GET.Input.GameCommandsRead & enumCMD.DOWN) and use that as condition for turning off the walk mode? And on the 'else' branch (when Down key is NOT detected) you can turn it back on.
Krystian is offline   Reply With Quote
Old 24-07-19, 05:42   #519
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,750
Default

Hi, Krystian!
I tell a bit more details:

The "walking mode" after all is a very simple binary switch:

- If SHIFT is shortly pressed: start forcing SHIFT+present walk icon
- If SHIFT is shortly pressed again: stop forcing SHIFT+remove walk icon

(There is another setup part to present the walk icon while SHIFT is continuously pressed, but that is something else, and not an issue.)

If I force Anim88, the walking mode nicely turns off in that moment, I can see clearly: the icon is removed. (So not the walking mode itself which is buggy.)
However, even if SHIFT is not forced now, the stepping animation is started, and it will be fully executed at the very first time - as if SHIFT were pressed/forced. (As I said, at the second down arrow it works nicely.)

That is why I need to force more with Anim88. Eg. the state ID of the anim (State 5), instead of the state ID of Anim41 (State 16) - but now that big jump happens.
I also tried to force Accel4 for Anim88 (see WADMerger: this is its accel, anyway), which left Lara in her place, but it made her do a neverending chaotic animation mix.

(Anyway, which I use is not the game commands. Eg. "WALK command" cannot be detected shortly enough, that is why instead I use scancodes: "Key left/right SHIFT". Yes, that means I added key fields for the feature in the script, to ask for custom keys if they are.)
AkyV is offline   Reply With Quote
Old 24-07-19, 08:45   #520
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 406
Default

It's probably the same problem as me, i wanted to create a vehicle and somehow the speed wont be updated if i change lara speed. probably a bug that paolone wont fix anymore.
have you tested to force lara animation with SetAnimationAndSpeed() (from Plugin_Trng) or ForceAnimationForLara() ?

else you can change the lara pointer directly from tomb4.exe and not use TRNG:

#define VAR(address, type) (*(type*)(address))
#define Ptr_Lara VAR(0x0080E01C, StrItemTr4*)

use Ptr_Lara->AnimationNow = XX;
__________________
"Life is Dream, just a dream"

Last edited by TokyoSU; 24-07-19 at 08:48.
TokyoSU 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 22:14.


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