[Universal] Inventory Keeper : Usefuler Edition [Up. 2/7/20]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

[Universal] Inventory Keeper : Usefuler Edition [Up. 2/7/20]

Post by DevilBlackDeath »

Image
     Based on a user request

Download Inventory Keeper

Features list
- Lets you keep weapons in occurences where the game or map might try to enforce you to lose all your inventory
- Lets you choose to lose weapons but keep items in such occurences
- Lets you keep most gameplay mods progression when encountering these "resets" in a map pack

x It won't let you keep your inventory after an episode "end-screen" that forces you to start a New Game for the next episode

What does this mod do?
With Inventory Keeper you can keep playing with your player inventory after Death Exits. This way you can keep your progression when playing with gameplay mods such as Embers of Armageddon, RPG mods, mods that give you weapon upgrades... You can toggle between keeping your weapons or not so you can Pistol Start as intended by map makers. (by default weapons are kept)

Combining weapon-keeping with Dinosaur_Nerd's Universal Automatic Continuation, this should let you play every megawad, episodic or otherwise, regardless of them having death exits, without losing your inventory and progression.

This is compatible with my other mod, Pistol Starter. Combined together, they're only ever useful for gameplay mods with actual non-weapon items tied to the played inventory. BE CAREFUL however, you need to turn on "Keep Inventory Items" in Pistol Starter for the combo to work properly, otherwise Pistol Starter WILL wipe your inventory on a map change. "Keep Weapons" from Inventory Keeper has no use however, as Pistol Starter will always wipe your weapon (I mean, it's the whole point of the Pistol Starter mod, what did you expect ?)
Spoiler: Usage example of this mod combo
Further notes
You will still restart the level with 100 health and no armor on Death Exit and will, in most cases, lose ongoing effects (quad damage, stuff like that). This is impossible to solve since it's impossible to differentiate the damage MEANT to kill you to finish the level and any other incoming damage. Also the mod MAY not work with mods that enforce removing inventory items on death (I don't see why a mod would do that except for very specific coop/MP functionality, so pretty rare). I personally tested with Death Foretold and Ashes 2063 Weapons and it worked perfectly in the case of Scythe 2's MAP10 and Eviternity MAP06 for example.

A potentially known problem is that the ResetInventory MAPINFO tag may override my behaviour. I'm currently testing it and looking for solutions to get around it.
I'm also looking into adding a way to let the players choose whether to lose inventory or not on a Sector 75 exit. While this is often used for end-of-episode or end-of-megawad exits, this could, combined with Dinosaur_Nerd's mod, let players keep progression between episode while still losing all weapons as intended by id Software.

You may reuse this, modify it, do whatever you want with it except sell it as is (I don't mind usage in commercial products however), all I require is credits in said project and maybe even a shoutout in MP.

Credits :
- Me for the code of the mod
- Jimmy and id Software for the font (mod logo)
- id Software for the backpack icon (mod logo)
- JPLeBreton for their "Always Pistol Start" mod, the files served as a rough basis for this mod (though barely recognizable now, aside from common GZDoom mods with ZScript)
Spoiler: Technical mumbo jumbo
Minimum Recommended GZDoom version : 2.5.0
(feel free to correct me, the used ZScript version IS 2.5.0, but I don't know if this is directly tied to GZDoom's version)
Spoiler: Changelog
Download : Mediafire - inventorykeeper_v2.zip
Spoiler: Usage
ENJOY !
Last edited by DevilBlackDeath on Sun Feb 07, 2021 8:28 am, edited 20 times in total.
dmslr
Posts: 74
Joined: Tue Aug 06, 2019 2:11 am

Re: Universal Inventory Keeper

Post by dmslr »

Wow. I'll never need it but I'm still impressed by both your enthusiasm to help users and your capability. I didn't believe this could be done. Also, what about this (someone made a post in Doomworld):
Spoiler:
Of course I'm not expecting you to make a mod. :lol: Just asking if it is possible.
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

Re: Universal Inventory Keeper

Post by DevilBlackDeath »

dmslr wrote:Wow. I'll never need it but I'm still impressed by both your enthusiasm to help users and your capability. I didn't believe this could be done. Also, what about this (someone made a post in Doomworld):
Spoiler:
Of course I'm not expecting you to make a mod. :lol: Just asking if it is possible.
That would be much harder to do universally afaik but probably not impossible. Without pushing to the 50% idea if we can modify what items are tagged we could probably start by removing the tag that makes those items always pickuppable. Main problem I'd see with that solution is I'm pretty sure Doom uses this tag to make a LOT of items count towards the level item count, so you'd end up with an item count very close to 0.
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by DevilBlackDeath »

Updated on 2/4/2021 :
- Added an option to strip the player of their weapons so as to "Pistol Start" as intended by map makers
- Fixed a potential problem with not restoring all players' inventories during a multiplayer session
- Fixed a problem where killing the player through the console then using changemap would sometimes fail at restoring the inventory (as far as the engine is concerned this IS a Death Exit and should be treated as such)
- Small code improvements
- Changed menu labels

-Fancy new presentation for the original post ! WOW so shiny ;)

So now it becomes something that I feel is much more useful overall for gameplay mod players. Megawads with death exits often had to be avoided in progression-heavy gameplay, now not so much, thanks to this mod ! And since it has a pretty old zscript version compatibility this should ease the burden further !
User avatar
Nems
Posts: 689
Joined: Wed Jan 12, 2005 1:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Your forum thread

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by Nems »

Now I don't have to manually edit MAPINFO in WADs to keep my inventory! :D

Many thanks for this utility. <3
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by DevilBlackDeath »

Nems wrote:Now I don't have to manually edit MAPINFO in WADs to keep my inventory! :D

Many thanks for this utility. <3
Sadly as far as the ResetInventory tag in MAPINFO I don't think this works. But if it does not I think I have an idea to fix it. Would you happen to know of a map set that uses it and which maps exactly ? (well I really just need one map in the set actually) :)
User avatar
Nems
Posts: 689
Joined: Wed Jan 12, 2005 1:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Your forum thread

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by Nems »

DevilBlackDeath wrote:
Nems wrote:Now I don't have to manually edit MAPINFO in WADs to keep my inventory! :D

Many thanks for this utility. <3
Sadly as far as the ResetInventory tag in MAPINFO I don't think this works. But if it does not I think I have an idea to fix it. Would you happen to know of a map set that uses it and which maps exactly ? (well I really just need one map in the set actually) :)
Eviternity has inventory resets, as does Joy of Mapping 1 for sure (I think maybe 2 as well). Joy of Mapping implements an inventory reset at the start of each map and Eviternity does it episodically (from map 5 to map 6, 10 to 11, etc.) Hope that helps. :)

EDIT: Last time I played Isolation it also had inventory resets. Here's the link to it:

https://www.dropbox.com/s/qk1qy4f0pz007 ... 2.zip?dl=1
User avatar
Captain J
 
 
Posts: 16890
Joined: Tue Oct 02, 2012 2:20 am
Location: An ancient Escape Shuttle(No longer active here anymore)

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by Captain J »

Excellent and merciful change for any map pack with death exit because it kinda really ruins the whole experience and the achievements. Felt that a lot when i played Aeons of Death and Guncaster. So yeah, very nice mod!
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by DevilBlackDeath »

Nems wrote:
DevilBlackDeath wrote:
Nems wrote:Now I don't have to manually edit MAPINFO in WADs to keep my inventory! :D

Many thanks for this utility. <3
Sadly as far as the ResetInventory tag in MAPINFO I don't think this works. But if it does not I think I have an idea to fix it. Would you happen to know of a map set that uses it and which maps exactly ? (well I really just need one map in the set actually) :)
Eviternity has inventory resets, as does Joy of Mapping 1 for sure (I think maybe 2 as well). Joy of Mapping implements an inventory reset at the start of each map and Eviternity does it episodically (from map 5 to map 6, 10 to 11, etc.) Hope that helps. :)

EDIT: Last time I played Isolation it also had inventory resets. Here's the link to it:

https://www.dropbox.com/s/qk1qy4f0pz007 ... 2.zip?dl=1
Ok ! So I had time to do a bit of investigating. Thanks to MartinHowes' recommendation a few days ago I was able to find a way to put this in my own code. However it does cause some issues after most map loads. It's just warnings mind you, but big scary warnings that should clearly not happen. I know setting inventory items to static is not intended behaviour, but as long as I restore the inventory before the per-level autosave everything should be fine for everybody :P
User avatar
twelvenipon
Posts: 26
Joined: Sat Apr 29, 2017 7:12 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by twelvenipon »

I have a just idea to add more options for this mod, what about nice mapmarkers on automap ? keys, exit, switches ? Well, keys is easy, but i stil dont figured out how to with exit and switches, hope somebody know and make this done
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by DevilBlackDeath »

twelvenipon wrote:I have a just idea to add more options for this mod, what about nice mapmarkers on automap ? keys, exit, switches ? Well, keys is easy, but i stil dont figured out how to with exit and switches, hope somebody know and make this done
That's a good idea for complicated maps. As far as keys go I think it's already possible with the automap "switches", switches and exits might be harder to detect. I also don't know if "drawing" to the automap is possible, this MIGHT require a fully custom automap (like the universal minimap I saw some days ago. I actually have no idea if differentiating an exit switch would be possible. Marking Death Exits would be outright impossible (at best you could mark enemies with a boss tag). Though to be honest I feel like Keys would be the main one here. The main issue I've encountered in "badly designed" keyhunt maps is not finding the keys.

For a general switch finder, I guess using Toby Accessibility mod as a basis would be a solution. I don't think I'll work on that personally or at the very least not right now. I still have this mod to make "feature complete" as well as Pistol Starter, and I have a D4T addon I'm almost done with, I just waited for a recompiled from Michaelis I just received ! Don't hesitate to post that in Resources Request, I have a feeling some of the modders who worked on automap stuff would be able to whip out some basic stuff that could get that idea started ;) Code request are on the rare side but they do exist.
User avatar
m8f
 
 
Posts: 1440
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by m8f »

GZDoom has an option to always display keys on automap. Automap Options -> Always show keys.

Differentiating exit switches - Hellscape Navigator does that for highlighting exit sectors.

If someone wants to display something custom on automap, there is MapMarker.

Also take a look at SwitchTracker and Ultimate Classic Minimap by Redxone.
User avatar
DevilBlackDeath
Posts: 171
Joined: Fri Sep 06, 2013 2:40 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by DevilBlackDeath »

m8f wrote:GZDoom has an option to always display keys on automap. Automap Options -> Always show keys.

Differentiating exit switches - Hellscape Navigator does that for highlighting exit sectors.

If someone wants to display something custom on automap, there is MapMarker.

Also take a look at SwitchTracker and Ultimate Classic Minimap by Redxone.
Well that was an efficient answer :P I might use SwitchTracker in the future cause to be honest there are some maps (it's VERY rare though) that make non-secret mandatory switches a bit too hidden.

On another note : I will be able to override the ResetInventory MAPINFO tag ! It was not easy but it can be done. I should even be able to create an option to let the player keep health on ResetHealth as well and make it so that if the player decides to NOT keep weapons they start the new episode with their inventory intact but pistol start in terms of weapons. So YAY ! I was almost driven mad reading over and over Inventory.zs, Inventory_utils.zs and so and so on in the github but hey, at least I found a solution :lol:
User avatar
twelvenipon
Posts: 26
Joined: Sat Apr 29, 2017 7:12 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by twelvenipon »

m8f wrote:GZDoom has an option to always display keys on automap. Automap Options -> Always show keys.

Differentiating exit switches - Hellscape Navigator does that for highlighting exit sectors.

If someone wants to display something custom on automap, there is MapMarker.

Also take a look at SwitchTracker and Ultimate Classic Minimap by Redxone.
Mapmarkers is better and with more possible options like marks items when founds and with nice looking sprites which make map more usefull too, thanks so much for help with switches and exit , hope i finally got from that how it works
Valken
Posts: 281
Joined: Mon Jun 08, 2015 7:32 am

Re: [Universal] Inventory Keeper : Useful Edition [Up. 2/4/2

Post by Valken »

Does this mod work when the player reaches ENDGAME? Example, play Doom Episode 1, reach ENDGAME, see credits the start Episode 2 and etc...

The reason I ask is I want to see the ENDGAME credits, but want to carry my weapons progression to the next episode as well. If I use UAC or Wadsmooth's continuous progression, the ENDGAME sequences are technically skipped when I dugged into the MAPINFO.txt files.

I assume this keeps all weapons and inventory so long as we do NOT change mods.

What if we ADD ANOTHER mod?

Will it keep the previous mod's weapons, and allow progression to collect new weapons with another addon, if they are compatible that is?

Example - Run Brutal Doom through X levels. Add a weapons addon, then continue?

Normally GZDoom would not allow loading the save file due to mod changes.

Return to “Gameplay Mods”