www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 22-10-19, 10:55   #591
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 391
Default

Anyone have a function to push item out of static like ItemPushLara ?
it's impossible with TRNG, it just detect if collided with static but it's not possible to push item, the GetBoundAccurate is for StrItemTr4 not StrMeshInfo.
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old 28-10-19, 18:46   #592
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,736
Default

Quote:
Originally Posted by AkyV View Post
Thanks, guys, Paolone's Get functions for animations have been clear also previously, but... I don't know, I do not brave enough yet to try to modify basic TR functions like using pistols or such. I suppose I will try some workaround like this, instead:
Let's suppose the Anim object of the required weapon has four animations, from Anim0 to Anim3. I place the reloading animation into Anim4 slot.
I will try a condition: if ammo amount is 0, then anim base is not Anim0 but anim base+2, so when the "starts shooting" Animation2 should be executed (anim base+2 = Anim0+2 = Anim2) for CTRL, then the reloading animation will be executed (anim base+2 = Anim2+2 = Anim4), and the ammo counter will be increased for a new clip, so the next time when the player uses CTRL, then normally Animation2 will be executed again.
(Plus, perhaps this way I can get away with those hardcoded barriers you said.)

I will tell if I could do it or not...

Ehmm... I cannot make it. Whatever animation I choose amongst the few animations of the ANIM object, always the first one will play (not rewriting the function, as I said, but with the quoted method).
So GET.pSlot->IndexFirstAnim will always be the default one - unless it is out of that ANIM object anims, but naturally that looks a big mess.

So I thought what if I make it harder with making it more simple?
I mean, what if I place all the reloading anims as LARA object animations, instead of weapon ANIM objects, saying that Lara can reload only
- if she is standing still (Animation 103), and
- if she is holding the weapon, and
- if the ammo in the weapon is 0.

Now it is clearly an easier setup to build, but it is harder for Lara, because now she has to be always stop to reload. However, isn't it more exciting for the player?

Anyway, isn't it more realistic? I mean, for example, if Lara is just jumping aside, just being upside down when the player reloads, and she is able to do it, then it sounds very unbelievable, doesn't it?

So I think I go on this path developing this setup.

I am still not sure to add other base animation than 103. Yes, for a harpoon gun a custom situation (idle floating in water) is probably needful. And perhaps somebody thinks that idle crouching would look also nicely to reload. So, yes, probably I should say that the level builder can choose one or a few base animations via Script, not directly I set 103...

Last edited by AkyV; 28-10-19 at 18:48.
AkyV is online now   Reply With Quote
Old 28-10-19, 19:48   #593
Joey79100
Professor
 
Joey79100's Avatar
 
Join Date: Mar 2012
Location: France
Posts: 2,863
Default

Animations or StateIDs maybe? I mean, using State Changes. You send a specific (currently unused) StateID for reload, and the builder sets up the animations he wants using that StateID (so he can even create more for particular transitions if he's willing to make more variations). I'm aware not everyone would be happy with that kind of setup, because it requires more step to set it up, but I think the benefits would be great.

Well to be honest I like the idea. It could make the combat more interesting, because you'd have to be careful about your bullets and hide, instead of shooting endlessly. And it makes the reload gimmick not useless, because if it was possible everywhere, then it's just a delay while shooting, for a cosmetic effect. Here it would add to the gameplay.

Now, I think you already know, but it's important to be able to set an animation for every kind of weapon that needs it, which should be up to the builder (cause he might not be using the UZI_ANIM slot for uzis, for example);

Last edited by Joey79100; 28-10-19 at 19:51.
Joey79100 is online now   Reply With Quote
Old 28-10-19, 21:05   #594
TokyoSU
Historian
 
TokyoSU's Avatar
 
Join Date: Mar 2019
Location: France, Caen
Posts: 391
Default

like i through the one_hand and two_hand is hardcoded, since the pistols/revolver/uzi have custom struct for defining animation:
TR3 one:
Code:
typedef struct {
	short ObjectNum;
	char Draw1Anim2;
	char Draw1Anim;
	char Draw2Anim;
	char RecoilAnim;
}PISTOL_DEF;

static PISTOL_DEF PistolTable[4] = {
	{        0,  0,  0,  0,  0 },		// LG_UNARMED
	{  PISTOLS,  4,  5, 13, 24 },		// LG_PISTOLS
	{   MAGNUM,  7,  8, 15, 29 },		// LG_MAGNUMS
	{      UZI,  4,  5, 13, 24 }		// LG_UZIS
};
i can probably setup the reload anim later when reworking the weapon system, for now it's not possible :x
__________________
"Life is Dream, just a dream"
TokyoSU is offline   Reply With Quote
Old 28-10-19, 22:12   #595
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,736
Default

Quote:
Originally Posted by Joey79100 View Post
Animations or StateIDs maybe? I mean, using State Changes. You send a specific (currently unused) StateID for reload, and the builder sets up the animations he wants using that StateID (so he can even create more for particular transitions if he's willing to make more variations). I'm aware not everyone would be happy with that kind of setup, because it requires more step to set it up, but I think the benefits would be great.
The "Parameters" script command setup will look kind of this way (simplified, there are more parameters, anyway):

Trigger for pistol=Pistol custom key to reload, Pistol custom reloading LARA anim, Pistol custom base LARA anim1, Pistol custom base LARA anim2 (optional), Pistol custom base LARA anim3 (optional)
Trigger for Uzi=Uzi custom key to reload, Uzi custom reloading LARA anim, Uzi custom base LARA anim1, Uzi custom base LARA anim2 (optional), Uzi custom base LARA anim3 (optional)
Etc.

Three bases per weapon should be enough...

Quote:
Well to be honest I like the idea. It could make the combat more interesting, because you'd have to be careful about your bullets and hide, instead of shooting endlessly. And it makes the reload gimmick not useless, because if it was possible everywhere, then it's just a delay while shooting, for a cosmetic effect. Here it would add to the gameplay.
Thank you. Honestly, as you also say, I don't mind that it isn't possible in ANIM object, forcing the player to be hidden with Lara to reload in actions sounds really exciting!

Quote:
Now, I think you already know, but it's important to be able to set an animation for every kind of weapon that needs it, which should be up to the builder (cause he might not be using the UZI_ANIM slot for uzis, for example);
Honestly, I am a bad animator, I asked Krystian to send me pistol and shotgun reloading animations, I can test only with this. I will ask Krystian if I can add it to the pack. For other weapon reloads, the result hence will be theoretical only... (Though, I bet pistol anim look nicely for Uzis as well, but I shall see...)

Quote:
Originally Posted by TokyoSU View Post
like i through the one_hand and two_hand is hardcoded, since the pistols/revolver/uzi have custom struct for defining animation:
TR3 one:
Code:
typedef struct {
	short ObjectNum;
	char Draw1Anim2;
	char Draw1Anim;
	char Draw2Anim;
	char RecoilAnim;
}PISTOL_DEF;

static PISTOL_DEF PistolTable[4] = {
	{        0,  0,  0,  0,  0 },		// LG_UNARMED
	{  PISTOLS,  4,  5, 13, 24 },		// LG_PISTOLS
	{   MAGNUM,  7,  8, 15, 29 },		// LG_MAGNUMS
	{      UZI,  4,  5, 13, 24 }		// LG_UZIS
};
i can probably setup the reload anim later when reworking the weapon system, for now it's not possible :x
Great! So then, people can choose between to use the two versions.
AkyV is online now   Reply With Quote
Old 08-11-19, 19:23   #596
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,736
Exclamation

I'd like to share my revelations I just fully realized only now about trng.h contents.
Status: after PU-8 (TRNG 1.3.0.7) update:

Legend:
S - Missing in "plugin_trng_start_vc2010_sources" pack
F - Missing in "plugin_trng_final_vc2010_sources" pack

...at least on my PC.

S, F:
char *FormatText(char *szFormat, ...);

F:
bool FromNgleStaticIndexToTomb4Indices(int IndiceNgle, int *pRoomIndex, int *pStaticIndex);
char *ReadTextVariable(int Code);
int Convert(int CONV_Type, int Index, int SecondaryIndex, void * pPointer);
int ReadMemVariable(int Code);
int ReadNumVariable(int Code);
void WriteMemVariable(int Code, int Value);
void WriteNumVariable(int Code, int Value);
void WriteTextVariable(int Code, char *pText);
AkyV is online now   Reply With Quote
Old 09-11-19, 14:28   #597
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,736
Default

As I said, I can't start a reloading animation from a weapon ANIM object:
- but it would be good, so it can be started whatever Lara's main animation is,
- but it would be bad, because Lara can start it any times, even eg. being upside down when jumping aside, which is naturally irrealistic.

So I placed the reloading animation as a LARA object animation.
So now Lara needs specific main animations to start it, which must be something that is not irrealistic like that jumping aside. So naturally it should be same idle animations, like idle standing or crouching (or idle floating for the harpoon gun). As we discussed it is some extra game experience, because the player first needs to hide for idle mode to reload, during the shooting action, amongst enemies.
But there is still a problem, you need to live with it if you try this setup: different base animations means different reloading animations to be made even for one weapon, for example:

- Sixshooter base animation in idle standing (Anim103) + sixshooter reload animation in idle standing.
- Sixshooter base animation in idle crouching + sixshooter reload animation in idle crouching.

The setup lets you have three different reloading animations per weapon at the same time. It should be enough.

But it works!

There were one more issue I needed to fix:
Casual arm weapon-holding position were forced when Lara was performing the reloading animation, so the reloading animation wasn't seeable.
I could solve it:

"Lara. Hands. Attached Lara Status (Short)" Savegame Memory Zone field values:

0: empty hands or holding a flare
...
4: holding a weapon, a torch, igniting/throwing a torch, igniting with a torch, picking up (last moves) the torch

So I simply need to force 0 here when the reloading animation starts, restoring 4 after the animation.
AkyV is online now   Reply With Quote
Old 13-11-19, 19:39   #598
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,736
Default

Does anybody know where can I find mist or reflection room flag intensities in the code?
AkyV is online now   Reply With Quote
Old 13-11-19, 21:27   #599
ChocolateFan
Historian
 
ChocolateFan's Avatar
 
Join Date: Dec 2017
Location: I am female
Posts: 262
Default

It depends. What do you want to do?
ChocolateFan is offline   Reply With Quote
Old 13-11-19, 21:50   #600
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,736
Default

The actual trng.dll F117 about room flag intensities has two imperfections:
- it works with tomb4 room indices, which are changeable, so after some time the trigger may indicate a wrong room or a non-existing room,
- the effect is only on snow/rain.

What I want is a new trigger for this, with these features:
- using ngle room indices, which are constant,
- I suspect where I can find snow/rain intensities, to add them,
- also adding the water intensity (which I also suspect where it is), suspecting this is also the quicksand intensity, if quicksand is set instead of water,
- and also adding reflection and mist intensities which I couldn't find.

It would be appreciated if you could tell all the rain, snow, water, quicksand, reflection, mist intensity routes you know, so I can check my discoveries.

(There are more parameters in this, anyway, but those are not important in this question.)

And more thought is here: I still don't know how this new trigger work on this trng.dll trigger:

F361: Weather. Set in advance the rain/snow setting using the intensity of <&>Room

F361 is useful if you have at the border between Room A and B, still in Room A, staring into RoomB, seeing the wrong intensity in Room B before entering Room B.
And I still don't know if I could have similar issues with the other intensity types if I change them with triggers. I'll need to check it when this new trigger is done.

Last edited by AkyV; 13-11-19 at 21:52.
AkyV is online now   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:31.


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