[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: 170
Joined: Fri Sep 06, 2013 2:40 am

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

Post by DevilBlackDeath »

Valken wrote: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.
I believe ENDGAME puts an actual end to the game, which is why UAC and Wadsmooch completely override these. THOUGH I guess you could try using changemap. If the inventory is still in the player's possession during the endgame screen then this should work. Though it might be a case where the player actually don't exists anymore and GZDoom will refuse changing map because you're not "playing". Though it is probably technically feasible, it would mean having an option to "reset" the inventory in the options because I wouldn't be able to differentiate between players wanting to start an actual new game and wanting to start a new episode while carrying their progression.

As for adding another mod, as you said, GZDoom won't agree with loading "different" sets of mods. Plus after "removing" the previous weapon mods, GZDoom would technically have no access to the previous weapons source code ;) Afaik this would not be possible unless GZDoom goes through massive changes (which will not happen in terms of these particular changes)
Valken
Posts: 281
Joined: Mon Jun 08, 2015 7:32 am

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

Post by Valken »

Thanks for answering and let me clarify.

For ENDGAME, I actually tried the NEXTMAP command but it would not proceed, if I ADDED a NEXTMAP to ENDGAME in the MAPINFO as per this example off the top of my head:

map E1M8
{ nextmap ENDGAMEC
blab blah blah
}

map ENDGAMEC
{ nextmap E1M2
blab blah blah
}

I guess I have to manually type in CHANGEMAP E2M1 or XXXX when I reach the engame sequence?

EDIT - I manually did a CHANGEMAP during an ENDGAME TEST with a mod (Russian Overkill 3.0c which just got released) and it worked! It kept my inventory! But it kept my inventory even when I did not load this mod. I guess it works as you had intended.

Lastly, regarding the weapons and inventory carryover, the example should be:

Play with Brutal Doom + this mod across X maps.
Save and Quit.
Play with Brutal Doom + this mod + a new weapons addon.
Would it then work?
User avatar
DevilBlackDeath
Posts: 170
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
So I'm about to upload the new version and it DOES handle ResetInventory (not ResetHealth for now, gonna come in the next version). I though I had to use PlayerSpawned but was somehow able to find an execution order that does not. So I've maintained backwards compatibility with some older GZDoom versions. I wanted to for at least one of the major GZDoom 3 version as 4.5 breaks some mods UI and stuff like that, and I managed to even though it's the VERY LAST GZDoom 3 major release, 3.8.0 !

So yeah, you'll soon be able to play full megawads with no inventory reset regardless of ZMAPINFO trying to enforce it and Death exits.

Funny thing is, Eviternity somehow does both, and I don't really know why. Death exits make sense because they force even mods using UNDROPPABLE and UNTOSSABLE to reset their inventory, but adding RESETINVENTORY to MAPINFO just enforces it further on using "changemap". Oh well it works, I won't complain :)

@Valken
I might try to include that but I'm not super confident. Detecting the current level is an ENDGAME should be fairly easy, finding what maps should load, and doing it even more universally than Dinosaur's mod ? Might be trivial, might be really hard ! Probably easy enough on a mapset going with the good old "ExMx" naming pattern. However (not sure if it's even possible), if megawads following custom name patterns or the "MAPxx" can define episodes and have endgame screens, one would have to hope the following map actually is "MAPxx" or whatever "PATTERNxx" where xx is the previous level + 1. Gonna look a small bit into that, but honestly, I think you're much better off manually editing wads for that, since it actually plays around with level order. I also feel like it's probably beyond the scope of this mod since I mostly try to prevent forced inventory reset, whereas starting a new episode isn't really as much.

As for adding mods, that won't work. Only way to do that would be to have both mods loaded to begin with, but that would require a compatibility patch to disable one or the other and handle random replacements. And this won't be a feature ever IMO because that introduces way too many technical challenges that would require arbitrary decisions.

Edit : Now I think about it even if I did try to make it so you keep playing episodes normally, I don't know how I would make it do it AFTER the credits/story section. Pretty sure it's impossible without making a custom ENDGAME screen =/
Last edited by DevilBlackDeath on Sun Feb 07, 2021 8:31 am, edited 1 time in total.
User avatar
DevilBlackDeath
Posts: 170
Joined: Fri Sep 06, 2013 2:40 am

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

Post by DevilBlackDeath »

Updated on 2/7/2021 :
- The mod now is able to ignore the ResetInventory tag in MAPINFO, successfully leaving the player with desired inventory
- Change option labelling to reflect the option is also now responsible for whether or not you keep your weapons/ammo/armor or only your inventory after starting a map tagged with ResetInventory
- Fixed a small potential issue with default inventory giving on Death Exits where mods giving inventory items could give duplicate
- Fixed a potential issue where respawning in multiplayer would still mark the player as "dead" on level exit
User avatar
Twitchy2019
Posts: 176
Joined: Wed Jan 04, 2017 8:27 pm
Location: My Foot,Your Face! (Team Monster)

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

Post by Twitchy2019 »

Gotta say, I've been waiting for a mod like this for a long time. Now I can add this to my toolbox. Many thanks!
User avatar
DevilBlackDeath
Posts: 170
Joined: Fri Sep 06, 2013 2:40 am

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

Post by DevilBlackDeath »

Captain J wrote: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!
Oh just saw your answer sorry ! Thank you :) Now it even works better since "forced" inventory resets through ZMAPINFO won't be enforced. Afaik that was the last thing, aside from actual ENDGAME screens, that could still force a player reset.
Twitchy2019 wrote:Gotta say, I've been waiting for a mod like this for a long time. Now I can add this to my toolbox. Many thanks!
You're welcome :) I feel like with the latest version it finally became a useful tool for gameplay mods yeah. Still room for SOME improvements but at least there's a use case for the average GZDoom player now !
User avatar
openroadracer
Posts: 447
Joined: Mon Sep 23, 2019 1:03 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 7 Professional 64-bit SP1
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Martinez, GA, 30907

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

Post by openroadracer »

DevilBlackDeath wrote:Oh just saw your answer sorry ! Thank you :) Now it even works better since "forced" inventory resets through ZMAPINFO won't be enforced. Afaik that was the last thing, aside from actual ENDGAME screens, that could still force a player reset.
So, in other words, this should work with a mapset like DUMP 3?
User avatar
DevilBlackDeath
Posts: 170
Joined: Fri Sep 06, 2013 2:40 am

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

Post by DevilBlackDeath »

openroadracer wrote:
DevilBlackDeath wrote:Oh just saw your answer sorry ! Thank you :) Now it even works better since "forced" inventory resets through ZMAPINFO won't be enforced. Afaik that was the last thing, aside from actual ENDGAME screens, that could still force a player reset.
So, in other words, this should work with a mapset like DUMP 3?
Theoretically yes ! Not sure what method of pistol starting DUMP3 uses but I'm pretty sure I covered every possible ways of resetting the inventory that is not a hardcoded ZScript removal (can't do much about that unfortunately, though using ZScript for inventory reset on a mapset would really be the dumbest thing...)

Edit : Just checked, it uses the "ResetInventory" tag in MAPINFO, so yeah it should work perfectly ;)

Edit 2 : Actually to detail that ZScript thing a bit more, only mods should touch that, meaning a mod trying to reset the inventory itself overriding my "rules" should probably do it since it does its own thing !
User avatar
Nems
Posts: 674
Joined: Wed Jan 12, 2005 1:09 pm
Graphics Processor: nVidia with Vulkan support
Location: Your forum thread

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

Post by Nems »

I think I might have run into a potential bug. It's bypassable but it's there.

When using this with Doom Incarnate, loading into the next level will mess with whatever DI's ZMovement settings you have. I have it set to zip and move around pretty fast so when my movement got messed with I moved much slower. I'm assuming if any other mods use ZMovement that it'll cause similar issues but I don't know of any other mods that use it to try it with this.

As I said before, it's avoidable at least. Make sure to save before hitting the exit switch or passing an exit line to the next level. A reload fixes it.

This mod is another one I have on autoload. <3

EDIT: Disregard the bug report I made. What happened is that Doom Incarnate has a map as a title screen and it's possible to die on that if a level set uses DeHacked to replace certain things as monsters. The monsters will immediately wake up and kill the player. Loading a save and then reloading fixes it. :V

EDIT 2: I did see this error pop up in the console though:

Code: Select all

Script 17, line 1: no such function: 'ls'
EDIT 3: Okay so it still seems to be doing it. I've noticed that sometimes when I hit an exit switch or pass an exit line the weapon I hold tries to lower itself as if I'm switching weapons. When it does that, the movement settings for the next level are slow. Reloading a save and hoping the weapon doesn't lower when hitting the exit switch can bypass it. I'm gonna continue playing with it and monitoring it to see if I can better pinpoint when it does it.
User avatar
DevilBlackDeath
Posts: 170
Joined: Fri Sep 06, 2013 2:40 am

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

Post by DevilBlackDeath »

Nems wrote:I think I might have run into a potential bug. It's bypassable but it's there.

When using this with Doom Incarnate, loading into the next level will mess with whatever DI's ZMovement settings you have. I have it set to zip and move around pretty fast so when my movement got messed with I moved much slower. I'm assuming if any other mods use ZMovement that it'll cause similar issues but I don't know of any other mods that use it to try it with this.

As I said before, it's avoidable at least. Make sure to save before hitting the exit switch or passing an exit line to the next level. A reload fixes it.

This mod is another one I have on autoload. <3

EDIT: Disregard the bug report I made. What happened is that Doom Incarnate has a map as a title screen and it's possible to die on that if a level set uses DeHacked to replace certain things as monsters. The monsters will immediately wake up and kill the player. Loading a save and then reloading fixes it. :V

EDIT 2: I did see this error pop up in the console though:

Code: Select all

Script 17, line 1: no such function: 'ls'
EDIT 3: Okay so it still seems to be doing it. I've noticed that sometimes when I hit an exit switch or pass an exit line the weapon I hold tries to lower itself as if I'm switching weapons. When it does that, the movement settings for the next level are slow. Reloading a save and hoping the weapon doesn't lower when hitting the exit switch can bypass it. I'm gonna continue playing with it and monitoring it to see if I can better pinpoint when it does it.
Huh, my guess is ZMovement uses some stuff in inventory to keep track of the player's movement. Probably gonna make a direct compatibility patch but this is exactly the kind of situation for which I wanted to add an exception list. Sure that would be long and annoying but being at least able to tell the mod what to "keep" at all times would be better.

What were your options by the way ? That could help me pinpoint what happened in code ;)
User avatar
Nems
Posts: 674
Joined: Wed Jan 12, 2005 1:09 pm
Graphics Processor: nVidia with Vulkan support
Location: Your forum thread

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

Post by Nems »

I didn't know if you wanted my ini file or screenshots so here's some screenshots of my ZMovement settings in Doom Incarnate. \ :V /






Also I was able to pinpoint better how it happens. It's definitely related to deaths. If I die in a level, reload, then exit the level, the weapon state jumps to a lowered state as it transitions to the intermission screen. When I enter the next level, that's when I encounter movement issues despite not having touched them. Simply saving and then reloading that save before I exit the level prevents the issue from happening.

Hope this helps diagnose the problem better. :)
User avatar
DevilBlackDeath
Posts: 170
Joined: Fri Sep 06, 2013 2:40 am

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

Post by DevilBlackDeath »

Oh I was meaning Inventory Keeper settings sorry ;) as far as ZMovement is concerned I only need to know what classes are inventories, which I can easily do by opening it in Slade.

There should only be 2 settings in Inventory Keeper iirc.
User avatar
Nems
Posts: 674
Joined: Wed Jan 12, 2005 1:09 pm
Graphics Processor: nVidia with Vulkan support
Location: Your forum thread

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

Post by Nems »

I'm only seeing one setting on my end and it's "Keep Weapons/Armor/Ammo after special level exits", which is set to On. Let me redownload it to be sure I'm not using an older version. :P

EDIT: Yep, that's the only option I see I can set for Inventory Keeper and I was using the latest version.
User avatar
kadu522
Posts: 212
Joined: Fri Mar 03, 2017 12:32 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Location: Brasil,Rio de janeiro

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

Post by kadu522 »

This and Pistol starter are both GREAT aditions for anyone that wants a more curated experience. i'm linking these over a doom live-streamer i watch and hopefully he will make good use of them and spreed the word around!
User avatar
Shatter-Thought[V-4]
Posts: 54
Joined: Tue Apr 06, 2021 8:21 pm
Graphics Processor: Not Listed

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

Post by Shatter-Thought[V-4] »

Hello, I've found your mod to be quite excellent on it's own, the only trouble is that I do not wish the keys to be kept as that can make certain maps confusing when trying to figure out the expected path to get through them, which can be troublesome at times if one keydoor proves to lead to a locked down path/area that I cannot escape from, locking me out from many important items to resupply. It is a mild problem perhaps, but I think it would be good if the keys alone at least could be excluded somehow from the items kept.

Thanks for making this amazing mod!

Return to “Gameplay Mods”