2kpr/AllNPCsHaveGuns

Randomizer Mod compatibility

Opened this issue · 0 comments

Hi,

I've been sort of maintaining the Randomizer mod, mostly adding new kinds of random generators and keeping it up to date with the latest versions of Hitman: https://github.com/warriorstar-orion/ZHM5Randomizer/tree/v3.110.1

I'd like to be able to have both All NPCs Have Guns and the Randomizer working together.

At the moment, for v1.0, attempting to replace any of the civilian inventories with anything but the Bartoli 75R (55ed7196-2303-4af6-9fa3-45b691134561) or Bartoli 75S (2953e9ac-e25b-41ae-afbf-4a47f86c4f54) causes a crash when the civilians attempt to equip their weapons.

I have no idea how things work on the RPKG side, but it seems like NPCs need specific animation/behavior packages for different weapons, which it seems like the v2.0 configurator is meant to do: add the right packages depending on which weapons are chosen in the UI. In my version of the randomizer, it's possible to specify which weapons an NPC has on a completely arbitrary set of strings: https://github.com/warriorstar-orion/ZHM5Randomizer/blob/v3.110.1/sample/hitman_randomizer.toml#L55 For example, if you put "assaultrifle" and "shotgun" in that list, NPCs will spawn with one of the available assault rifles/shotguns.

Would it be possible to choose which packages are needed dynamically? What I was thinking was something like, instead of placing any specific weapon in a civilian's inventory, a sentinel item is used instead, and when the randomizer runs in-game, it looks for instances of that sentinel item and replaces it with a weapon based on the randomizer logic.

Cheers!