Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 07-01-15, 20:39   #1091
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Thank you very much guys, I have added a patch which should fix console input. I've chosen Tonttu's solution, as it seems SO simple, and SDL already supports raw text input... much cleaner and easy solution!

Also, I have done a simple patch which should give you an idea what I'm going to do with OpenTomb trigger system. You remember that in TRs, almost all sector properties were originally stored as a chain of FloorData functions, and beforehand, OpenTomb used this legacy system. Now I'm going to change that; instead of storing deprecated FloorData chain, we're migrating sector properties (as climb flags, death flag, minecart left/right, trigger triggerer and beetle marks, footstep sounds etc.) to flag bitfield directly stored in sector structure. This will be much more intuitive and simple solution, as we can check sector properties without re-parsing floor data every time. Additionally, we'll finally be able to resolve known TR3/4 function index conflict - in TR3, functions 0x14 and 0x15 were reserved for minecart railway flags, while in TR4 they were re-used for trigger triggerer and beetle flags.

As for trigger floordata functions, these are going to be re-interpreted to Lua function array with IDs similar to FloorData index - this way, we'll get rid of FloorData itself while reusing sector's FD index as a reference to Lua trigger function array. Voila!

Now I only should have a bit of patience to program all that stuff...

Last edited by Lwmte; 07-01-15 at 20:43.
Lwmte is offline   Reply With Quote
Old 07-01-15, 22:31   #1092
Nickotte
Member
 
Nickotte's Avatar
 
Joined: May 2010
Posts: 256
Default

That's great! Gonna pull ASAP!

And you know, things sound very cool when they're addressed like that
Can't wait for more amazing features! I think I'm gonna mess a bit with the GUI if no problem for everyone... After all, that'd be one of the few things I might be actually capable of doing at the moment.

Oh, almost forgot: do you guys have any kind of IRC/email thread/stuff where you talk on the project or you just email singular people when needed?

Last edited by Nickotte; 07-01-15 at 22:35.
Nickotte is offline   Reply With Quote
Old 07-01-15, 23:03   #1093
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Quote:
Originally Posted by Nickotte View Post
That's great! Gonna pull ASAP!
I've just pushed another small patch which fixed a bug with stray backquote printed on console exit. It still prints tilde if pressed with shift, but I left it as it is for now.

Quote:
I think I'm gonna mess a bit with the GUI if no problem for everyone... After all, that'd be one of the few things I might be actually capable of doing at the moment.
Of course, it's just great! We still haven't prototyped proper interface, and it will be very generous if you will take the task; you can refer to early pages of this thread, particularly beginning from the post #806 - fellows here tried to make some interface sketches; my favorite is the one by Zebra.

Quote:
Oh, almost forgot: do you guys have any kind of IRC/email thread/stuff where you talk on the project or you just email singular people when needed?
We have only this thread, no more places to discuss; I guess we'll need to make an IRC channel/chat/whatever eventually, because project interest is getting larger. But for now yes - it's only this thread!
Lwmte is offline   Reply With Quote
Old 08-01-15, 01:02   #1094
Nickotte
Member
 
Nickotte's Avatar
 
Joined: May 2010
Posts: 256
Default

Quote:
Originally Posted by Lwmte View Post
I've just pushed another small patch which fixed a bug with stray backquote printed on console exit. It still prints tilde if pressed with shift, but I left it as it is for now.
It seems to be doing it with '\' in my layout. Is it possible to fix it without removing the possibility to print '\' (or other keys) in other layouts?

Last edited by Nickotte; 08-01-15 at 01:46.
Nickotte is offline   Reply With Quote
Old 08-01-15, 03:42   #1095
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Well... I suspected that such straightforward way of dealing with keycodes won't work... I can only think of checking scancode or simply clear console input on close. I'll try to fix that.

By the way... When trying of re-organizing trigger parser, I got REALLY annoyed by ultra-complicated level loading function (TR_GenWorld) and decided to make it more logical and simple. And, in the process, I have finally found water scheme, alternate room and group properties for TR5 levels! Minus three other unknown parameters. Check out changes in VT loader!

Last edited by Lwmte; 08-01-15 at 04:31.
Lwmte is offline   Reply With Quote
Old 08-01-15, 14:25   #1096
Ado Croft
Member
 
Joined: Apr 2013
Posts: 343
Default

OMG, this is great news! I'm looking forward to the whole trigger system Keep up this amazing engine, guys. From now, this is the best custom engine ever Good luck and I will keep my fingers crossed for this amazing project
Ado Croft is offline   Reply With Quote
Old 08-01-15, 22:50   #1097
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

I'm prototyping trigger parser slowly but steady, but there are few things that I've stumbled upon. Basically, it's very obscure TR trigger workflow. Particularly:

1. Infamous one shot flag. I clearly remember that it doesn't act as it should, i. e. it WON'T make ALL trigger commands execute once; instead, only few commands are affected, which are they? And, on contrary, which commands are not affected by one shot flag?

2. Switch trigger, when switch is un-pulled, basically does the same thing as ANTITRIGGER function?

3. One-way switch... how to accomplish that? I suppose, make switch trigger one-shot, but I want to be sure...

Also I have some questions regarding TR4's trigger triggerer (which is a uber-cryptic invention by Core Design, additionally complicated by ridiculous trigger chain layout involving ex-MINECART function ), but I'll leave it for later, as I just want to make basic trigger functions for now.
Lwmte is offline   Reply With Quote
Old 08-01-15, 23:25   #1098
Boobandie
Member
 
Joined: Jul 2012
Posts: 4,286
Default

TRIGGER will always make something "on" (open door), ANTI-TRIGGER will always make something "off" (close door), and repeatedly running on them does nothing as you're re-triggering a door to be open that is already open and vice versa. Wheras the SWITCH trigger acts as both, changing the state from on to off and back again depending on which state the switch object it is linked to is, and allows the triggers to be repeated indefinitely.

If you place a switch and only activate it with a TRIGGER rather than a SWITCH lara will only be able to pull it once.

Trigger-Triggerer as i understand it is a very roundabout way of controlling when lara can activate a trigger. The trigger-triggerer, when placed over a normal trigger, will disable it, allowing the player to run over it again and again without activating it. The player needs to trigger the trigger-triggerer to remove it, only then can they trigger the original trigger.
Boobandie is offline   Reply With Quote
Old 09-01-15, 00:18   #1099
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

I just checked TR4 engine with a test level built in Dxtre3d, and it seems some strange stuff is going on.

First of all, I have placed two SWITCH triggers with reference to two different switches, but activating the same door. Also, one of these triggers was set to one shot, while another was not. When I pushed non-one-shot switch back and forth, door was opening and closing as usual, then I left door in opened state (hence pushed non-one-shot switch) and additionally pushed one-shot switch. Door closed, altough both switches were now in pushed state, and - most interesting - I wasn't able to re-open door with non-one-shot switch!

This leads me to a conclusion that one-shot flag actually modifies internal movable flag which prevents to change its state again, no matter if by the same trigger or not - hence, any movables activated with one-shot trigger can't be deactivated again.

And, regarding switch state vs. movable state - looks like it acts simply as "bit flip", i. e. any change in switch state produces inversion of movable state. As for keyhole trigger - it seems to only activate movable, i. e. it's rather "bit set" than "flip".

I suppose, one shot flag and "anti-" trigger types doesn't affect any commands except movable activation? I. e. if I put CD trigger for ANTITRIGGER type, it will play it anyway, if I put END_LEVEL trigger for it, level will end, etc.

What about HEAVY trigger/antitrigger? Is there any info on which item types can activate it? I know heavy triggers are activated by rollingballs, baddies and flyby cameras with specific flag set, maybe something else?
Lwmte is offline   Reply With Quote
Old 09-01-15, 00:31   #1100
Nickotte
Member
 
Nickotte's Avatar
 
Joined: May 2010
Posts: 256
Default

What if the trigger doesn't simply comply the opening/closing action of the door, but writes a state to the door whenever the trigger activates, thus having the engine to be continuously reading the state and only after that, complying the action?

This way, the one-shot trigger would be continuously writing the "open-to-be" state to the door, and while the non-one-shot tries to write other states, they are immediately overridden by the one-shot one.

Just another way to look at it, I guess But I don't know anything else on how it works, so I may be wrong.
Nickotte 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 09:38.


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.