cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
696 stars 272 forks source link

All inventory hotkeys constantly get unset #4837

Open chaosvolt opened 4 months ago

chaosvolt commented 4 months ago

Describe the bug

Every few in-game days, all of my inventory hotkeys are being unlinked from the associated items. I have no idea what's triggering it.

Steps To Reproduce

  1. Assign hotkeys to an item.
  2. Wait a few in-game days, maybe play normally? I don't know.
  3. Eventually at some point you'll notice your item no longer has its hotkey assigned to it.
  4. Enter the hotkey menu and you'll see that the keys still say they're bound, but not to the items you assigned them to.

Screenshots

image

Versions and configuration

Additional context

No response

chaosvolt commented 4 months ago

So it's a few builds later, and I haven't encountered this again. I'm still not sure what triggered it in the first place. I'll leave this open for a bit more and try to mess with stuff, but will close if it doesn't come back up soon.

chaosvolt commented 4 months ago

So I noticed something while testing a new character on my still-active laptop playthrough... image

It might be in some way related to hotkeys evidently not being instanced per character. At some point on both my desktop playthrough and my laptop playthrough I likely tested something in that world by starting up a new character, then did something as that character that fucked up the hotkeys for the playthrough's main character.

Dying as the new character so far seems to be ruled out as a trigger, I'm testing further to see if I can get a proper trigger to come up.

chaosvolt commented 1 month ago

Okay uh.

Fuck. I'm having this happening again, in build 2024-09-17.

Coolthulhu commented 1 month ago

It might be in some way related to hotkeys evidently not being instanced per character. At some point on both my desktop playthrough and my laptop playthrough I likely tested something in that world by starting up a new character, then did something as that character that fucked up the hotkeys for the playthrough's main character.

That's possible: the "invlet" data is saved on the item itself. Now that items exist in "item space" and are only referenced in "reality", it may be possible to implement a separate, per-character invlet map. It probably wouldn't be easy and may take a ton of work, but it's doable.

chaosvolt commented 1 month ago

Main thing that's bugging me here is I don't yet have a way to consistently trigger this issue.

chaosvolt commented 1 month ago

It is once again happened, build 2024-09-25 this time. I still can't fucking figure out exactly when it triggers or why but like once a day I lose my assigned hotkeys.

I even tried favoriting my primary inventory staple items and assigning the hotkey twice to change it from a yellow invlet to a white one and they STILL all fucking unset.

chaosvolt commented 1 month ago

HOLY SHIT. I've made a breakthrough. I don't know if it's the SOLE cause of this but it's A cause. I found out that the assigned keys are consistently being unset after you hit the g menu to check items on the tile under me, was checking how many rocks I had in inventory.

I wasn't able to reproduce this in a new world, so have the save zipped together with the nessecary third-party mods: Save And Mods.zip

What I do on loading this save:

  1. Check if my wielded slingshot cannon has the r hotkey assigned. If not, assign it again after loading save.
  2. Hit g, then . to check on the stack of rocks I'm standing on top of.
  3. Back out of this menu and check inventory again, slingshot cannon should consistently have its hotkey unset.
  4. If the hotkey is still set, try waiting a turn with . then repeating the g-.-esc test.
RoyalFox2140 commented 1 month ago

I mentioned on the Discord but a mod you supplied is throwing errors for me and I don't know why (Cata++, maybe others, or because of patchmods/etc? idk. Can't load in) Something about monster groups and I don't know why it's throwing them. I'm on a pretty recent build so not sure why.

https://cdn.discordapp.com/attachments/830917522680446976/1288775649552629781/image.png?ex=66f6695b&is=66f517db&hm=aa3fad81b9072c6dc7804f34df71012fa113ed10b756fba62d588535650aa4e3&

chaosvolt commented 1 month ago

It works fine on my end? You may need the most recent release instead of one from 3 days ago, since I'd updated to include foldable turret changes pretty much immediately after it was merged, but that shouldn't cause problems with a monstergroup JSON.

I just grabbed nightly release 2024-09-25 specifically and dumped the relevant folders in to test for myself, and it loads in fine: image

RoyalFox2140 commented 1 month ago

Yeah my version is the 9-24 copy, yours is 9-25. That's weird.

RoyalFox2140 commented 1 month ago

Why do you put your mods in data aaaaaa

chaosvolt commented 1 month ago

They go in data/mods when you update your stuff manually and don't use launchers D:<

RoyalFox2140 commented 1 month ago

They go in data/mods when you update your stuff manually and don't use launchers D:<

Wha, I've been using the mods folder next to gfx save and config for nearly two years now. Anyways uh. Don't really know why 9-25 release works but 9-23 doesnt. I'll chalk it up to using the data folder. image

RoyalFox2140 commented 1 month ago

I WANT TO KNOW HOW. image

RoyalFox2140 commented 1 month ago

CHAOS WHAT DARK SECRETS DID YOU UNCOVER IT ONLY HAPPENS IF THE DAMN THING IS UNLOADED! image

chaosvolt commented 1 month ago

I'm hoping this means someone who knows how breakpoints work can get some use out of that, now that we seem to have confirmation that the save file indeed shits itself in the expected manner when tested by someone else and doesn't do this just for me. XD

chaosvolt commented 1 month ago

Also that sounds even more fucking cursed, try also setting a hotkey on one of the worn items before the g test, see if it unsets the hotkey for that too or only the hotkey for the wielded weapon. I didn't think to test that.

Also I need to actually sleep I've been up all night. :<

RoyalFox2140 commented 1 month ago

Also that sounds even more fucking cursed, try also setting a hotkey on one of the worn items before the g test, see if it unsets the hotkey for that too or only the hotkey for the wielded weapon. I didn't think to test that.

Also I need to actually sleep I've been up all night. :<

I triggered it just by messing around in the inventory btw. If it's unloaded it really hates to keep its assignment

RoyalFox2140 commented 1 month ago

image Weirdly it doesn't trigger on worn items image

chaosvolt commented 1 month ago

Damn, then this only gives us an insight into half the problem. I still don't have a reliable way to trigger the other resets. XD

ZChris13 commented 1 month ago

I just had this happen to me while playing around with zone actions (building a long stretch of chickenwire fencing). Interestingly, I was able to work around it and get my inventory hotkeys back by dropping my entire equip load and inventory and picking it up/wearing it all again.

RoyalFox2140 commented 1 month ago

I just had this happen to me while playing around with zone actions (building a long stretch of chickenwire fencing). Interestingly, I was able to work around it and get my inventory hotkeys back by dropping my entire equip load and inventory and picking it up/wearing it all again.

* OS: Windows

  * OS Version: 10.0.19045.4894 (22H2)

* Game Version: [5ac3d7a](https://github.com/cataclysmbnteam/Cataclysm-BN/commit/5ac3d7a9f5beb89afaa36e2d4e9cff94f0801da0) [64-bit]

* Graphics Version: Tiles

* LAPI Version: 2

* Game Language:  []

* Mods loaded: [
  Bright Nights [bn],
  Disable NPC Needs [no_npc_food],
  Simplified Nutrition [novitamins],
  No Rail Stations [No_Rail_Stations],
  Limit Fungal Growth [limit_fungal_growth],
  Teleportation [teleportation_tech],
  Craftable Gun Pack [craftgp]
  ]

We're just waiting for someone to figure it out.

chrsrns commented 1 week ago

I just had this happen to me while playing around with zone actions (building a long stretch of chickenwire fencing). Interestingly, I was able to work around it and get my inventory hotkeys back by dropping my entire equip load and inventory and picking it up/wearing it all again.

* OS: Windows

  * OS Version: 10.0.19045.4894 (22H2)

* Game Version: [5ac3d7a](https://github.com/cataclysmbnteam/Cataclysm-BN/commit/5ac3d7a9f5beb89afaa36e2d4e9cff94f0801da0) [64-bit]

* Graphics Version: Tiles

* LAPI Version: 2

* Game Language:  []

* Mods loaded: [
  Bright Nights [bn],
  Disable NPC Needs [no_npc_food],
  Simplified Nutrition [novitamins],
  No Rail Stations [No_Rail_Stations],
  Limit Fungal Growth [limit_fungal_growth],
  Teleportation [teleportation_tech],
  Craftable Gun Pack [craftgp]
  ]

If it helps in any way, this occurred to me too. After the game cleared my invlets, I re-assigned them, saved, then did a "Repair vehicle" zone action and immediately cancelled. All of my invlets, including worn ones, got cleared. They are also restored when dropping and re-grabbing the items.

ZChris13 commented 4 days ago

I haven't experienced it again since. I'm willing to point at zone actions being involved.