[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 YOUR 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.

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

Postby DevilBlackDeath » Mon Feb 01, 2021 11:54 am

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.
User avatar
DevilBlackDeath
 
Joined: 06 Sep 2013

Re: Universal Inventory Keeper

Postby dmslr » Mon Feb 01, 2021 7:28 pm

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.
dmslr
 
Joined: 06 Aug 2019

Re: Universal Inventory Keeper

Postby DevilBlackDeath » Tue Feb 02, 2021 1:23 am

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
 
Joined: 06 Sep 2013

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

Postby DevilBlackDeath » Thu Feb 04, 2021 8:16 am

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
DevilBlackDeath
 
Joined: 06 Sep 2013

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

Postby Nems » Thu Feb 04, 2021 5:41 pm

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

Many thanks for this utility. <3
User avatar
Nems
"small monster loops"
 
Joined: 12 Jan 2005
Location: Your forum thread
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

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

Postby DevilBlackDeath » Thu Feb 04, 2021 6:45 pm

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
DevilBlackDeath
 
Joined: 06 Sep 2013

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

Postby Nems » Thu Feb 04, 2021 7:46 pm

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
Nems
"small monster loops"
 
Joined: 12 Jan 2005
Location: Your forum thread
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

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

Postby Captain J » Thu Feb 04, 2021 11:28 pm

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
Captain J
That's Amoreee
 
 
 
Joined: 02 Oct 2012
Location: A Year old Pizza Box
Discord: DiscussJ#3128

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

Postby DevilBlackDeath » Fri Feb 05, 2021 4:02 am

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
DevilBlackDeath
 
Joined: 06 Sep 2013

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

Postby twelvenipon » Fri Feb 05, 2021 5:20 am

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
twelvenipon
 
Joined: 29 Apr 2017

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

Postby DevilBlackDeath » Fri Feb 05, 2021 11:34 am

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
DevilBlackDeath
 
Joined: 06 Sep 2013

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

Postby m8f » Fri Feb 05, 2021 11:49 am

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
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit

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

Postby DevilBlackDeath » Fri Feb 05, 2021 4:56 pm

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
DevilBlackDeath
 
Joined: 06 Sep 2013

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

Postby twelvenipon » Sat Feb 06, 2021 3:38 am

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
User avatar
twelvenipon
 
Joined: 29 Apr 2017

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

Postby Valken » Sat Feb 06, 2021 7:33 am

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.
Valken
 
Joined: 08 Jun 2015

Next

Return to Gameplay Mods

Who is online

Users browsing this forum: PresBarackbar and 15 guests