In Progress Tier 5 or 6 items with a good modifier are TOO rare in towns.

Users who are viewing this thread

Version number
1.2.11
Branch
Main
Modded/unmodded
No, I didn't use any mods.

世界知名伟人

Sergeant at Arms
Summary:
Tier 5 or 6 items with a good modifier are TOO rare in towns.
Workshops in this game do craft high-tier items at a reasonable rate, with decent chance for a good item modifier. However, every town will remove items with any modifier with a 50% chance everyday, which is too high for items produced by workshop. A newly crafted legendary tier 6 item is very likely to be removed from the store at the second day.

C#:
        private void DeleteOverproducedItems(Town town)
        {
            ItemRoster itemRoster = town.Owner.ItemRoster;
            for (int i = itemRoster.Count - 1; i >= 0; i--)
            {
                ItemRosterElement elementCopyAtIndex = itemRoster.GetElementCopyAtIndex(i);
                ItemObject item = elementCopyAtIndex.EquipmentElement.Item;
                int amount = elementCopyAtIndex.Amount;
                if (amount > 0 && (item.IsCraftedByPlayer || item.IsBannerItem))
                {
                    itemRoster.AddToCounts(elementCopyAtIndex.EquipmentElement, -amount);
                }
                else if (elementCopyAtIndex.EquipmentElement.ItemModifier != null && MBRandom.RandomFloat < 0.5f)
                {
                    itemRoster.AddToCounts(elementCopyAtIndex.EquipmentElement, -1);
                }
            }
        }

This code is found at ItemConsumptionBehavior. It will remove any item with any modifier with a 50% chance everyday.

How to Reproduce: Start a new campaign and travel around the calradia and visit towns. Try to find any legendary or masterwork tier 6 armor in stores.
 
Hey, i have forwarded the issue to the devs for further inspection. Thank you for your time and sorry for the inconvenience.
 
Back
Top Bottom