Jump to content
The Dark Mod Forums

Inventory Grid


Durandall

Recommended Posts

I just downloaded 0.17 from 29-Jan so I can try it tonight. I see it contains a game dll and new engine. Just checking, did you have to modify and recompile those? If it's only GUI changes I'll test it with my svn build, but if you've had to modify the game I'll need to use a 2.03 build. I assume you did have to modify the compiled files... they have the later modified date too.

Link to comment
Share on other sites

If I'd add one comment, it could use a little unobtrusive border work along the lines of the lightgem.

I originally wanted to use some sort of tight dense ironwork as a background and

remove the translucent background squares, but I'm no artist. I'm not a fan of

the public domain clip-art arrow I squeezed in either.

 

Also maybe scale it down so it only takes up the bottom 1/3 to bottom 1/2 of the screen? More akin to how System Shock 2 did the inventory.

 

Systemshock2_ingame_final.jpg

 

Also, instead of just black background behind each item, maybe stretch the papyrus page and use that as a background?

I'm not sure a System Shock 2 design would work, no room for names and having to

scroll over items would be time consuming. I don't see much use in seeing the game

field while in the grid.

 

 

The grid entries mimic the current inventory items 1:1 to maintain compatibility.

Making them smaller would require using a smaller font or risking item name runoff.

I think the large entries are easy on the eyes and 16 items is good for 1 page.

Perhaps removing the category lines would make it less busy?

 

If anyone wants to try their hand at a different design, feel free to mock something up.

All it would require is modifications to the guis/tdm_invgrid.gui file.

Information on the format can be found by googling doom 3 gui.

You can also take a look at the per-existing TDM guis in tdm_gui01.pk4.

 

You can view your changes "live" by editing and saving the gui file while TDM is running

and using the console command reloadGuis.

You would probably need a second monitor or play in windowed mode.

 

It is possible to alter the number of grid items available on a page by copy/pasting

existing entries and increasing their variable numbers/names and screen positions.

Don't forget to change gui::PageSize in InitInventoryGridGUI.

 

 

I just downloaded 0.17 from 29-Jan so I can try it tonight. I see it contains a game dll and new engine. Just checking, did you have to modify and recompile those? If it's only GUI changes I'll test it with my svn build, but if you've had to modify the game I'll need to use a 2.03 build. I assume you did have to modify the compiled files... they have the later modified date too.

The inventory grid has source code changes, it is not just a gui file. There is no way this could be done with just a gui unfortunately.

Link to comment
Share on other sites

The inventory grid has source code changes, it is not just a gui file. There is no way this could be done with just a gui unfortunately.

 

Cool, thanks for confirming. It's not surprising you had to extend the game API. I'll try it with 2.03.

Link to comment
Share on other sites

It's working great and a pleasure to use. I'll be forgetting my inventory hotkeys after we get this in the dev build :) Except for lockpicks, which I still like to toggle with P. I've been playing a proper map and not got too far yet so have yet to gather enough inventory items to try multipaging, but so far everything is good. The UI vanishes on any click or by re-pressing the key... great. It fits the hud very nicely.

Link to comment
Share on other sites

Sure, if Durandall is ready to share the dll/engine source code patch then I'll check and merge it. We can't use his TDM 2.03 game dll with our svn build because we have script changes in svn that're incompatible with a 2.03 dll.

 

p.s. @Durandall: no need to get the GUI 100% finished for us to merge the source code into the trunk. We can deploy GUI patches later, if you're still working on it. And we can try out your new code with TDM 2.04 in the meantime.

Link to comment
Share on other sites

Finally got TDM compiled in Debian Jessie.

TDM_InvGrid_0.17_Linux.tar.bz2

 

2.03 source patch.

TDM_InvGrid_0.17.patch

 

If the patch isn't working against 2.04, just hand me a copy and I'll apply the changes by hand and re-diff.

Point out anything that sucks or I missed. I'm sure it could use some polishing. I wasn't sure when/if it would get approval.

Link to comment
Share on other sites

Thanks. That looks fine at first glance and doesn't look like it'll cross with 2.04 code. I'll try it out tomorrow because it's well past midnight here now *yawn*. Why did you end up tweaking the code that destroys the objectives gui by the way? Did it screw up when transitioning between the two?

Link to comment
Share on other sites

Thanks. That looks fine at first glance and doesn't look like it'll cross with 2.04 code. I'll try it out tomorrow because it's well past midnight here now *yawn*. Why did you end up tweaking the code that destroys the objectives gui by the way? Did it screw up when transitioning between the two?

That was just a little extra. We can leave it out. Allows the player to click the objectives gui closed.

Hopefully there aren't too many whitespace issues.

Link to comment
Share on other sites

No other features are included. Just the grid and objectives changes.

If no one has reported any bugs by now, I assume it's all okay.

 

The DEV comment in UpdateInventoryGridGUI() can be removed. Didn't make sense when I wrote it.

I wish I could have solved attacks propagating through weapon_GUI without the need for a delay.

Link to comment
Share on other sites

I did manual merging and some reformatting: not your fault, it's because of repetitive code in player.cpp and because it turned out that we do have some GUI bugfixes in 2.04, plus some of our current code conventions aren't obvious from older surrounding code. I'll post my 2.04 patch after a successful test.

 

I'll try Maxwell16's test map and if that works ok I'll restart BCD which I got halfway through last night. I can't port my savegame from 2.03 to 2.04 so I'll probably be gone some time :)

 

Is your to-do list complete now? I mean the various features you mentioned on page 1 that you wanted to tweak or add?

 

p.s. kudos for getting your head round so much code without asking any questions btw! Your first patch touches every level of TDM architecture except the renderer and sound world!!

 

Edit2: Hmm either I screwed up somewhere on the merge (likely), or we have a 2.04 change that changes outcomes (less likely, but possible). Mousewheel-down works in both 2.03 and 2.04, but mousewheel-up works only in 2.03. I'm not familiar with the human interface device setup. Any clues to where I might need to spot the difference?

Edited by SteveL
Link to comment
Share on other sites

I did manual merging and some reformatting: not your fault, it's because of repetitive code in player.cpp and because it turned out that we do have some GUI bugfixes in 2.04, plus some of our current code conventions aren't obvious from older surrounding code. I'll post my 2.04 patch after a successful test.

 

I'll try Maxwell16's test map and if that works ok I'll restart BCD which I got halfway through last night. I can't port my savegame from 2.03 to 2.04 so I'll probably be gone some time :)

 

Is your to-do list complete now? I mean the various features you mentioned on page 1 that you wanted to tweak or add?

 

p.s. kudos for getting your head round so much code without asking any questions btw! Your first patch touches every level of TDM architecture except the renderer and sound world!!

 

Edit2: Hmm either I screwed up somewhere on the merge (likely), or we have a 2.04 change that changes outcomes (less likely, but possible). Mousewheel-down works in both 2.03 and 2.04, but mousewheel-up works only in 2.03. I'm not familiar with the human interface device setup. Any clues to where I might need to spot the difference?

 

I believe it has all the features I originally wanted and now more.

 

First thing that comes to mind is PerformImpulse in Player.cpp, that is where objective and inventory grid updates occur for those buttons.

Maybe place the calls to updateInventoryGridGUI() before the broadcastNamedEvent call? I was curious as to why objective updates occured before the event was broadcast.

 

I can try applying the changes to 2.04 and see whats up if that doesn't work. I might see something different in 2.04 that I need to work with.

Edited by Durandall
Link to comment
Share on other sites

  • First thing that comes to mind is PerformImpulse in Player.cpp, that is where objective and inventory grid updates occur for those buttons.
  • Maybe place the calls to updateInventoryGridGUI() before the broadcastNamedEvent call? I was curious as to why objective updates occured before the event was broadcast.
1. Yes that was it. That list of IMPULSE_XX responses is where the repeated code was that made me do a manual merge. I was missing one of the 11 calls to UpdateInventoryGridGUI(), the one for prevWeapon.

2. It's inconsistent. I spotted it too while looking for the missing line in my merge. I think it's a simple bug.... I'd not noticed this before, but I see it takes 2 mousewheel-ups to scroll up in the in-game objectives but only 1 to scroll down! Probably because the mousewheel-down "nextWeapon" message gets broadcast to the GUIs before the objectives GUI gets updated, but the mousewheel-up "PrevWeapon" message gets broadcast after the objectives GUI update. Testing that hypothesis...

 

EDIT: yes, switching the order of those lines means you only need one mousewheel move to scroll objectives in either direction.

Link to comment
Share on other sites

Mockups, you say? Well I had a few ideas about this, I don't know how feasible they are but here's the pitch.

post-37271-0-46705900-1454590224_thumb.jpg

post-37271-0-20940500-1454590232_thumb.jpg

1) How about slots for buttons that expand/contract the different inventory categories already present. Besides making it easier to sift through large inventories, they would serve as nice bookends to delineate the categories without category lines on every slot. I think having the categories open by default would be best. Categories which usually have 3 or less items in them like the lockpicks and maps wouldn't need such a button as well. Good/bad? Feasible?

2) Another way to make it easier to pick out items at a glance is color-coding the categories. I, myself, feel this is problematic for several reasons: a) the colors would be arbitrary, B) making the thing look like a rainbow would look really busy, c) it's a useless feature if you're color blind.

3) I feel some flourishes at the borders would be nice. I've done a quick mockup of those too.

4) Adding a scrollbar? Hm, dunno.

Also, for some criticism, I feel like the inventory items are not centered in the rectangles properly.

Edited by Spooks
  • Like 1

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

I like the minimalist quality of it, and would be hesitant to add much in the way of flourishes or colour. Perhaps some very minimal brackets in the corners, but nothing beyond that.

 

The icons and the cursor did strike me as quite large, but that might have more to do with recently switching from a 20" CRT to a 27" widescreen monitor. But my immediate thought was that they could be half the size they are now.

 

The only issue I've noticed so far is that the compass icon did not show properly for me.

Link to comment
Share on other sites

Also, for some criticism, I feel like the inventory items are not centered in the rectangles properly.

The grid is an identical copy of the normal inventory display. I did this for compatibility.

Although it should be possible to center them.

 

I like the minimalist quality of it, and would be hesitant to add much in the way of flourishes or colour. Perhaps some very minimal brackets in the corners, but nothing beyond that.

 

The icons and the cursor did strike me as quite large, but that might have more to do with recently switching from a 20" CRT to a 27" widescreen monitor. But my immediate thought was that they could be half the size they are now.

 

The only issue I've noticed so far is that the compass icon did not show properly for me.

 

I'm not sure it's wise to make the grids any smaller or the names/categories might run off.

They are all designed for the current inventory system.

I'll do some test and see what I can come up with though.

 

I'm unsure as to why the cursor is so big, but on the main menu it is normal.

I will take a look and see if it's anything I can do.

 

The only reason I can think that the compass would not show up is that you are missing the new icon.

You should have a dds/guis/assets/grid folder with 4 files for the arrows and dds/guis/assets/hud/inventory_icons/compass_icon.dds for the compass.

 

Edit: or the tdm_playertools.def file doesn't contain the modified compass entry that now lists the icon.

Edited by Durandall
Link to comment
Share on other sites

The compass icon worked for me. I'll double check what I committed when I get home in about 30 mins.

 

Edit: personally I wouldn't embellish it at all. Decoration would be distracting and it already holds lots of images. I vote for minimalism.

Edited by SteveL
  • Like 1
Link to comment
Share on other sites

The only issue I've noticed so far is that the compass icon did not show properly for me.

The compass icon worked for me. I'll double check what I committed when I get home in about 30 mins.

Yep, my fault again. I added the dds icons (5 of them) to my local copy before committing, but I forgot to mark them for version-control before I committed the changes.

 

SVN users please update to get the icons.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...