Jump to content
The Dark Mod Forums

Turning Off new Inventory Grid from Script


grayman

Recommended Posts

Unfortunately, the new 2.04 inventory grid broke WS3, and we didn't catch it during beta.

 

The break occurs during WS3's dream sequence, when I take control of all GUIs to keep them from displaying during the dream.

 

Normally, GUIs include a visibility toggle (i.e. the compass uses "gui::CompassVisible") which can be used to turn their overlay on and off.

 

The inventory grid doesn't.

 

After a couple hours of trying to introduce a similar variable to the inventory grid and not being able to get it to work, I've given up and am requesting help. I simply can't figure out how the inventory grid works. :(

 

All I want to do (from a script) is query whether the grid is displayed, and turn it off if it is.

 

Thanks.

Link to comment
Share on other sites

Maybe include a custom tdm_invgrid.gui in your mission pack and add a conditional at the top of it?

 

For reference if you haven't already traced back the source changes:

http://bugs.thedarkmod.com/view.php?id=4286

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I tried adding the variable to the tdm_invgrid.gui and turning it on and off, but it didn't work.

 

I also found a "closeGUI" command in the gui, and tried that, but that's a toggle on/off, which doesn't do what I need.

 

I've read through the source changes.

 

After trying these simple things that should have worked, based on my previous GUI work, and spending more time on it than I should need to, I decided to look for help. There's something going on here that I'm not grokking.

  • Like 1
Link to comment
Share on other sites

Yeah, it's not a trivial fix I guess.

 

I think the destroyOverlay() script command might be the ticket here but I can't find a good syntax example.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Yeah, neither could I. destroyOverlay() looks like it depends on having created the overlay in the same scope of code, whereas in this case the overlay is created in the SDK and I want to destroy it in the script.

Link to comment
Share on other sites

I don't have a VS compile environment available at the moment.

I'll have to set one up tonight. Can we compile TDM with mingw-w64?

 

Also, does this change fix the problem?

/game/Player.cpp
line 1501:
if (inventoryGridOverlay != -1 || (GetImmobilization() & EIM_ITEM_SELECT))

 

 

 

Since I do not like the new inventory grid (clutter, keys I can't drop, pieces of paper I want to quick select to throw at someone to distract them...) and feel it is not required for this game, it would be very nice to be able to omit it from new (and old) levels.

Hotkeys for keys, picks, readables, keys, weapons, compass, lantern, items, etc... have always been fine for me and I will continue to use them over the new inventory - It is unbound for me.

I hate hoarding items and "quest" items and the like - What's next, can only carry certain loot and have to spend half an hour re-arranging a grid in order to fit that candlestick in my bag..?

I would like an option to turn it off in DR so that it is not available in a level.

 

You suggest that an author should be able to deprive a player of basic engine functionality because they don't like it?

Edited by Durandall
Link to comment
Share on other sites

 

Also, does this change fix the problem?

/game/Player.cpp

line 1501:

if (inventoryGridOverlay != -1 || (GetImmobilization() & EIM_ITEM_SELECT))

 

 

Yes, it does, thanks!

 

The grid can't be on when you enter the dream, because you can't frob the vial to drink it when the grid is up.

 

So the only problem is being in the dream and invoking the grid, which is prevented by the change you suggested.

 

I'll post an issue so the source gets changed in 2.05.

Link to comment
Share on other sites

 

You suggest that an author should be able to deprive a player of basic engine functionality because they don't like it?

Yes.

 

Same as forcing "mission fail" on KO or not giving blackjack.

 

Function is not functionality.

 

Doesn't matter what I think or say anyway - I'm a fart in an elevator around here.

Edited by teh_saccade
Link to comment
Share on other sites

I don't think it's reasonable to turn off interface options per mission. That would get us in the business of having to declare that "this mission allows the inventory grid" and "this mission doesn't allow the inventory grid". Using the grid or not is really the player's business, and since it's something they must explicitly invoke, they can choose to not invoke it if they don't like it.

 

Denying a blackjack or saying the player can't knock people out is a different thing. Those are related to gameplay, not interface, and are usually tied to mission difficulty, objectives, or the story. (By story, I mean that the mission author needs to keep the player from doing certain things so that the forward movement of the mission isn't impaired, i.e. "Don't knock out the guy who's guarding the treasure room door, because the objective is to trick him into opening the door for you".)

  • Like 2
Link to comment
Share on other sites

Yes.

 

Same as forcing "mission fail" on KO or not giving blackjack.

 

Function is not functionality.

 

Doesn't matter what I think or say anyway - I'm a fart in an elevator around here.

 

What everyone says here matters, whether or not everyone agrees is a different subject completely.

 

As for your assertion. I disagree. Disabling a UI element is not the same as forcing "mission fail" on KO. The grid is a choice for players who like to be able to see everything in one go, rather than cycling through individually. Allowing authors to disable the grid because they don't like it would be like allowing them to disable the video settings menu and forcing the player to play at 640 x 480 or something silly like that. lol

Link to comment
Share on other sites

 

What everyone says here matters, whether or not everyone agrees is a different subject completely.

 

As for your assertion. I disagree. Disabling a UI element is not the same as forcing "mission fail" on KO. The grid is a choice for players who like to be able to see everything in one go, rather than cycling through individually. Allowing authors to disable the grid because they don't like it would be like allowing them to disable the video settings menu and forcing the player to play at 640 x 480 or something silly like that. lol

That's the default installation resolution isn't it..? 640x480...?

Link to comment
Share on other sites

Since I do not like the new inventory grid (clutter, keys I can't drop, pieces of paper I want to quick select to throw at someone to distract them...) and feel it is not required for this game, it would be very nice to be able to omit it from new (and old) levels.

 

Hotkeys for keys, picks, readables, keys, weapons, compass, lantern, items, etc... have always been fine for me and I will continue to use them over the new inventory - It is unbound for me.

 

I hate hoarding items and "quest" items and the like - What's next, can only carry certain loot and have to spend half an hour re-arranging a grid in order to fit that candlestick in my bag..?

 

I would like an option to turn it off in DR so that it is not available in a level.

 

Well you already found the solution for you; don't use it. It's in addition to the current system, and adds some functionality, and removes nothing of the original way.

Non of these gripes make any sense.

Why does the presence of an inventory system mean that you are now forced to hoard anything? Why would you change your behaviour at all?

Player inventory has always been infinite. Why would a inventory grid system that is also infinite, change that?

Wait....have you actually tried the inventory grid, or are you just going off of how you think it works?

Because you can drop anything that could be dropped before, keys, letters, books etc etc.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

 

Well you already found the solution for you; don't use it. It's in addition to the current system, and adds some functionality, and removes nothing of the original way.

Non of these gripes make any sense.

Why does the presence of an inventory system mean that you are now forced to hoard anything? Why would you change your behaviour at all?

Player inventory has always been infinite. Why would a inventory grid system that is also infinite, change that?

Wait....have you actually tried the inventory grid, or are you just going off of how you think it works?

Because you can drop anything that could be dropped before, keys, letters, books etc etc.

Yeah, I really don't understand what the stink is all about. It doesn't change existing functionality, nor is anyone forced to use it. It's just a 'different' way for people to 'view' their inventory.

Link to comment
Share on other sites

We just don't understand why you don't like it. I could understand that you don't like the way it looks or the way it's laid out maybe.

However, the reasons you claim you don't like don't actually exist.

 

Can't drop keys?

Yes you can.

Clutter?

You can drop anything you don't want.

 

I hate hoarding items and "quest" items and the like?

As stated you don't have to hoard anything.

 

Just in case you haven't actually USED the new system.

Open your inventory with the special key (I use "i"), then click on an item with your mouse.

The item then appears at the bottom right side of the screen like normal and you can drop it on the ground. throw it, whatever. Just. Like. Normal.

 

What's next, can only carry certain loot and have to spend half an hour re-arranging a grid in order to fit that candlestick in my bag..?

There's no limit to the inventory grid, if the player has 30 items, then the inventory grid will have several pages you scroll through just like objectives ui.

 

So you can understand why people are confused about your reasons for hating it.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Your suggested mappers should be able to disallow usage of it. lol Which makes no sense. It doesn't affect anyone who doesn't wish to use it.

 

Also, please stop deleting your old posts. We've asked you not to do that in the past. It makes conversations difficult to follow. We trust people here not to erase their posts, unlike some forums that limit the ability to edit to a few minutes after posting. So please refrain from doing so. We appreciate it.

Link to comment
Share on other sites

  • 2 weeks later...

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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...