Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item dupe by restarting missions #16

Closed
geist22 opened this issue Jun 13, 2022 · 4 comments
Closed

Item dupe by restarting missions #16

geist22 opened this issue Jun 13, 2022 · 4 comments
Labels
bug since 1996 the issue was already present in the original release of the game

Comments

@geist22
Copy link
Contributor

geist22 commented Jun 13, 2022

(I will be creating issues here for the things I've found, Most are part of the original game, but I will try and doublecheck them in the port beforehand as I go, hope it won't be too spammy)

Known issue from the original game.

If you pick up items with multiple uses (like High Explosives), and then restart the mission, you keep the item but it doesn't show up on the weapon selection menu until you add/remove one from the stack. So you can pick up a High Explosive, restart the mission, pick it up again and repeat until all agents have 4 each. This way you can softlock the space station mission as you can neither pick up nor drop any explosives anymore.

I've tested this with High Explosives and Knockout Gas, it should probably work with all items of that type (Psycho Gas and Nuclear Grenade too, not counting Ion Mine because they cannot be picked up as far as I know).

@mefistotelis mefistotelis added bug since 1996 the issue was already present in the original release of the game labels Jun 13, 2022
@mefistotelis
Copy link
Collaborator

mefistotelis commented Jun 23, 2023

Most likely fixed by swars: Always set amount of consumable weapons and Remade do_weapon_quantities_proper1().

Needs testing though.

Main reason behind this bug is that count of weapons is stored within Player instance rather than within Thing instance for a specific agent. That was an unusual design choice.
It also means that people who do not have Player structure assigned (anything other than the 4 human-controlled agents) do not have weapon counts - they can use the consumables any amount of times, as these are not counted at all. And if they drop it, they drop only a single item.

@geist22
Copy link
Contributor Author

geist22 commented Jun 24, 2023

I did a quick test with High Explosives in Eurocorp Mission 1 (the second mission, as the first is mission 0), and it did fix agents keeping invisible items through mission restarts for the few times I've tried it.

Does this also affect NPC inventory (e.g. enemies not dropping an item if they've used it)? If so that should be toggleable as this might have gameplay changing implications. Though that doesn't seem to be the case, the female Unguided in the lower left area drops only 1 Explosive when killed but will usually place 4 during her scripted run (sometimes she skips placing the first one for some reason, I don't know why).

@mefistotelis
Copy link
Collaborator

Does this also affect NPC inventory

As previously stated, only player-controlled characters have the "four pack" counters which those patches fix.

@geist22
Copy link
Contributor Author

geist22 commented Jun 24, 2023

I see, I had trouble understanding the way you've worded it in the previous post (moving from player to thing or vice versa).

Anyway, since the topic's issue seems to be fixed this can be closed now.

@geist22 geist22 closed this as completed Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug since 1996 the issue was already present in the original release of the game
Projects
None yet
Development

No branches or pull requests

2 participants