[#bugs] The `GenericInventoryRestockerPopulationTable` tag no longer exists, hence the `...

Issue #11477 resolved
Freehold Games Bot Account created an issue

Marked for crossposting by: kernelmethod

Message (jump):

<kernelmethod> The GenericInventoryRestockerPopulationTable tag no longer exists, hence the Village zonebuilder always uses the default Village Tinker 1 / Village Apothecary 1 poptables when setting the population tables for nonhuman apothecary and tinker merchants.

When generating nonhuman/"immigrant" apothecaries/tinkers, both the generateApothecary and generateTinker methods of the Village zonebuilder construct a parallel human version of the merchant, and then extract the merchant's population table by checking the GenericInventoryRestockerPopulationTable tag. This table then gets applied to the nonhuman merchant.

However, the GenericInventoryRestockerPopulationTable tag no longer exists. As a result, the retrieved tag is always null, and nonhuman merchants get their tables set to the default of Village Tinker 1 / Village Apothecary 1 instead. I believe that the generateTinker / generateMerchant parts should instead be extracting the table via something to the effect of
csharp string table = baseMerchant.GetPart<GenericInventoryRestocker>()?.Table ?? "Village Tinker 1";
See issue #11451; the fundamental issue there is correct (nonhuman tinkers and apothecaries are always using the level 1 village tables) although the cited cause is somewhat inaccurate. I have verified this issue manually using the attached Harmony patch.

Comments (4)

  1. kernelmethod

    Guessing this is not intentional; looks like GenericInventoryRestockerPopulationTable was removed between late November 2023 / early December 2023 but the logic in the Village zonebuilder was preserved. Previous to that, the various human tinker/apothecary blueprints (HumanApothecary_VillageX and HumanTinkerX) had the tags correctly set, so the population tables for nonhuman merchants were being set correctly as well.

  2. Log in to comment