www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 09-01-15, 01:18   #1101
Boobandie
Professor
 
Boobandie's Avatar
 
Join Date: Jul 2012
Location: New Zealand
Posts: 3,223
Default

Quote:
Originally Posted by Lwmte View Post
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?
As far as I know HEAVY's are activated by any movable/shatterable that isn't a part of the LARA object or accessories. It asks "Is something other than LARA active on my square?" if yes, activate, if no, don't.
Boobandie is offline   Reply With Quote
Old 09-01-15, 06:14   #1102
Nickotte
Historian
 
Nickotte's Avatar
 
Join Date: May 2010
Location: Italy
Posts: 257
Default

Added first prototype for the inventory!
Check my fork for pulls! It's a very simple attempt at a ring inventory (I plan on doing many different type of inventories following the suggestions, but I want to remake the ring and the TR4/5 one first, then merge them into a new, customizable type ). It can be opened and closed with ESC.

Also, I added colored lines in the console to make it more readable (colors are fully editable of course) and changed the text graphic, the green boxes were really making my eyes bleed. I was also messing a bit with the camera, so beware of that!

I wanted to make a video for the inventory, but it's 7:15 am here, so....... I think I'll do it tomorrow

Last edited by Nickotte; 09-01-15 at 06:16.
Nickotte is offline   Reply With Quote
Old 09-01-15, 06:30   #1103
Zebra
Legend
 
Zebra's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 25,145
Default

If you want to know which fonts I used in my mock-up or need someone to make icons, etc. for the inventory, just ask .
__________________
Wozu zuhören, wenn man reden kann?
Zebra is offline   Reply With Quote
Old 09-01-15, 06:31   #1104
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,679
Default

Quote:
Originally Posted by Lwmte View Post
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?
http://www.tombraiderforums.com/showthread.php?t=205381

With additional, TRNG information.

Quote:
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.
http://www.tombraiderforums.com/showthread.php?t=206750

And if you want to why ANTITRIGGER is TRIGGER for CD:

http://www.tombraiderforums.com/showthread.php?t=205393

Last edited by AkyV; 09-01-15 at 06:56.
AkyV is offline   Reply With Quote
Old 09-01-15, 07:12   #1105
Ado Croft
Historian
 
Join Date: Apr 2013
Posts: 253
Default

Well, I compiled the source code from Federico Barlotti and press ESC button in engine but it doesn't show the inventory at all. Is it necessary to add anything to config file?

OK, now it works. I forgot to add "bind(act.inventory, KEY_ESCAPE);" to config file. I was fool
Great job, finally open tomb has ring inventory menu

Last edited by Ado Croft; 09-01-15 at 08:23.
Ado Croft is offline   Reply With Quote
Old 09-01-15, 11:49   #1106
Ado Croft
Historian
 
Join Date: Apr 2013
Posts: 253
Default

Quote:
Originally Posted by Boobandie View Post
As far as I know HEAVY's are activated by any movable/shatterable that isn't a part of the LARA object or accessories. It asks "Is something other than LARA active on my square?" if yes, activate, if no, don't.
As far as I know HEAVY is activated by any moveables, except of enemies and Lara and moreover it is also activated by flyby camera
Ado Croft is offline   Reply With Quote
Old 09-01-15, 12:22   #1107
Lwmte
Explorer
 
Join Date: Aug 2010
Location: Russia
Posts: 935
Default

Quote:
Originally Posted by Nickotte View Post
Added first prototype for the inventory!
Wow, that was quick! Thank you SO much, I'll check out changes as soon as possible - right now I'm in the middle of re-writing trigger engine, so this makes merging a bit difficult...

Quote:
Check my fork for pulls! It's a very simple attempt at a ring inventory (I plan on doing many different type of inventories following the suggestions, but I want to remake the ring and the TR4/5 one first, then merge them into a new, customizable type ).
Sounds very promising! I always opt for as much customization as possible, as I did with bars and faders - because different game versions had different bar styles, etc.

Quote:
Also, I added colored lines in the console to make it more readable (colors are fully editable of course) and changed the text graphic, the green boxes were really making my eyes bleed.
Oh yes, it was quite annoying for me, also purple console background gave me a headache sometimes... I think it also could be changed.

By the way, how did you managed to "disable" game loop while being in inventory? Original TRs had 3 or 4 states (I don't remember exactly) dealing with main loop pipeline, one for game mode, one for inventory mode, one for text menu mode and one for flyby. Maybe I'm wrong, but you got the idea...

Quote:
I wanted to make a video for the inventory, but it's 7:15 am here, so....... I think I'll do it tomorrow
OK, I'll be waiting! I got to sleep only in 8 AM myself yesterday, so I understand you! I'll post a video to Twitter once ready!

Edit: tested inventory prototype! Works great!


Debug info now has to go now, by the way! At least in inventory/console modes. Also use commands has to be implemented some way, I'm not sure how to do it, however... Best way is through script command (so we have to implement some kind of "useItem" command which will activate per-item function, which can be implemented into some kind of item function array... I don't know! ).

Few bugs I've noticed:

1. Item rotation resets when you scroll the item. In originals, item rotation gradually returned to initial state, so the item front side was faced "outside" ring center.

2. Up/down keys are changing item focus without scrolling. Also, you have put item inventory control into DebugKeys function, I think it's better to relocate it to Controls_Key function and make the use of action states instead of strict SDLK states.

3. Item order doesn't comply with original order; I guess, we can sort items by ITEM_TYPE and item index values, e. g. at first we enumerate supplies (weapons, ammo, flares, medipacks), then we enumerate quest items, etc. Although sorting by ITEM_TYPE doesn't make sense if you plan to make three-ring system, as in TR1-3!

4. If inventory is activated, console commands like setlevel won't work unless you'll exit inventory. It's not actually a bug, as it should work this way, but fader with loading screen confused me a bit.

Anyway, sorry for my rant about these bugs, I understand it's only prototype, and it indeed works great!

Quote:
Originally Posted by Zebra View Post
If you want to know which fonts I used in my mock-up or need someone to make icons, etc. for the inventory, just ask .
Sure, I think that eventually we'll need new fonts for dialogs and menus, as current VeraMono font is too... geeky!

AkyV: Thanks, that's exactly what I needed - although the setup for HEAVY_SWITCH trigger still doesn't make sense to me. I mean, in TR1 we had perfectly working HEAVY_TRIGGER which did deactivation if item left trigger sector (first movable block in St. Francis Folly), why they developed HEAVY_SWITCH in the first place... I think I won't trash my head with this for now, I'll try to implement at least basic Lara's triggers and leave others for later.

Last edited by Lwmte; 09-01-15 at 15:09.
Lwmte is offline   Reply With Quote
Old 09-01-15, 16:39   #1108
Nickotte
Historian
 
Nickotte's Avatar
 
Join Date: May 2010
Location: Italy
Posts: 257
Default

Ah, you beat me to it! XDD

Quote:
Originally Posted by Lwmte View Post
By the way, how did you managed to "disable" game loop while being in inventory? Original TRs had 3 or 4 states (I don't remember exactly) dealing with main loop pipeline, one for game mode, one for inventory mode, one for text menu mode and one for flyby. Maybe I'm wrong, but you got the idea...
I was lazy, so I just added the check for the inventory at the top of the Game_Frame() function, where it only updates the audio if the console is open.

Quote:
Originally Posted by Lwmte View Post
Few bugs I've noticed:

1. Item rotation resets when you scroll the item. In originals, item rotation gradually returned to initial state, so the item front side was faced "outside" ring center.

2. Up/down keys are changing item focus without scrolling. Also, you have put item inventory control into DebugKeys function, I think it's better to relocate it to Controls_Key function and make the use of action states instead of strict SDLK states.

3. Item order doesn't comply with original order; I guess, we can sort items by ITEM_TYPE and item index values, e. g. at first we enumerate supplies (weapons, ammo, flares, medipacks), then we enumerate quest items, etc. Although sorting by ITEM_TYPE doesn't make sense if you plan to make three-ring system, as in TR1-3!

4. If inventory is activated, console commands like setlevel won't work unless you'll exit inventory. It's not actually a bug, as it should work this way, but fader with loading screen confused me a bit.
Thanks for pointing them out, no prob at all!
The item rotation is a pain, I managed to make it work a bit for the moment, but it has two flaws I have to correct: first, the rotation is absolute so if the item rotated 100 times around it'll rotate 100 times back instead of only one; also, for some reason it's not consistent, sometimes it'll skip a frame and look like it's been reset instead of gradually rotating back, although I assure you it does rotate back.

The up/down keys originally scrolled between the rows of the inventory table, now they just make the selection jump from the first to the last item since I didn't completely replace the functions yet. Also, yeah, the keys functions were originally in the debug section, but I'm gonna port them to the controls eventually.

The item order only obeys the adding order for now, I'll add some stuff to the item struct to make it easier (hopefully without ruining compatibility!)

Finally, yeah, since I just copy-pasted the inventory into the console update check, that's why it doesn't set the level and other stuff until you turn it off.


Quote:
Originally Posted by Lwmte View Post
Sure, I think that eventually we'll need new fonts for dialogs and menus, as current VeraMono font is too... geeky!
I'm using Roboto 500 set to size 13

EDIT:
Fixed item rotation!
Why overcomplicating it? I just moved the angle values from the inventory struct to the item node struct

Last edited by Nickotte; 09-01-15 at 17:29.
Nickotte is offline   Reply With Quote
Old 09-01-15, 23:00   #1109
Lwmte
Explorer
 
Join Date: Aug 2010
Location: Russia
Posts: 935
Default

Quote:
Originally Posted by Nickotte View Post
I was lazy, so I just added the check for the inventory at the top of the Game_Frame() function, where it only updates the audio if the console is open.
It's ok for now, but eventually we'll need to develop some kind of "state switch" for game modes - i. e. game, inventory, pause menu, maybe diary menu or whatever... On second thought, console should remain as separate flag - because it could be called from any other game mode, as in any other console-based game engines.

Quote:
The item order only obeys the adding order for now, I'll add some stuff to the item struct to make it easier (hopefully without ruining compatibility!)
Regarding this, and also item rotation variables... Maybe it should be saved somewhere else than inventory nodes themselves? Here's my point - inventory nodes contain actual inventory items, which include ammo, while inventory menu can bypass ammo if, for example, we have both shotgun and ammo. Therefore, we need some seperate array which will be populated on entering inventory. This array could be kept inside InventoryMenu class, which is more logical. We may have special methods for populating inventory menu, also we may have three different menus (quest items / supplies / game options) kept inside whole class - i.e. three seperate arrays which are reallocated and re-populated every time InventoryMenu::Populate() method is called.

Here's my idea of inventory menu item struct:
Code:
typedef struct gui_invmenu_item_s
{
    float                       current_angle;
    float                       original_angle;
    float                       size;
    uint32_t                    id;
    uint32_t                    count;
    char*                       title;
    char*                       description;
}
As you see, we should think of keeping info on item size, initial rotation and probably name / description somewhere, to use it for each item in inventory. Maybe even in the same struct, but names and descriptions should be loaded from Lua script anyway - hence pointers to title/description strings.

Another thing to note is that we must somehow manage to define each item's possible actions, e.g. for weapons its equip, choose ammo and possibly combine with lasersight. For normal items it's use or combine. This info can also be kept in Lua script, as different game versions may contain different item layouts (like in TR1-3 shotgun only had one type of ammo, while it had three in TR4-5).

Quote:
I'm using Roboto 500 set to size 13
Great font, it reminds me of the font Zebra used for his prototype; also I wasn't aware of this Google Fonts project, I guess we should get any fonts we need from there, as all of them are open source.

Last edited by Lwmte; 09-01-15 at 23:07.
Lwmte is offline   Reply With Quote
Old 09-01-15, 23:13   #1110
Gh0stBlade
Archaeologist
 
Gh0stBlade's Avatar
 
Join Date: Dec 2010
Posts: 1,899
Default

Excellent work guys. I'm dying to try this out but it looks like SourceForge is currently down... Well it claims to be.
__________________
Link removed. I appreciate why, but the rule applies to everyone.
Gh0stBlade 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 10:44.


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