Resolved Workshops can randomly produce copies of weapons crafted by player

Users who are viewing this thread

Carabus

Sergeant at Arms
Summary: Workshops can randomly produce copies of weapons crafted by player, even if player never sold those weapons anywhere, eventually flooding the markets with them if the player crafted a lot of different weapon patterns.
The problem is caused by the logic in WorkshopsCampaignBehavior.cs class, where condition for selecting random items is in this method:
C#:
    private static bool IsProducable(ItemObject item)
    {
      return !item.MultiplayerItem && !item.NotMerchandise;
    }
It lacks check to exclude weapons that were crafted by player.

How to Reproduce: Craft a lot of weapons, don't sell them, visit towns with weapon-producting workshops, eventually you will see copies of your crafted weapons appearing on the markets.
Version: e1.3.1
Installed community-made modifications:
none
Computer Specs:
OS: Windows 7 64-bit
GPU: Nvidia GTX1060 6GB
CPU: Intel i7-7700K
RAM: 16GB
Motherboard: Asus Z270E
Storage Device (HDD/SSD): HDD
 
Last edited:
Crafted weapons appearing as tournament prizes too!
I used cheat to check item lists in game. And I found the game remembers everything I crafted.
Please allow player to decide which crafted weapon remains in game and removed from game.
 
I made mistake in the first post.
It lacks !item.IsCraftedWeapon check.
From my attempt to fix this by modding, it seems that IsCraftedWeapon is true for all weapons, not only crafted ones, so apparently this flag is not enough to determine whether weapon was crafted by player.
So this needs some different check then, I will just leave this to the devs. Corrected my first post.
 
Please allow player to decide which crafted weapon remains in game and removed from game.
Pretty, pretty, pretty please.
I made mistake in the first post.

From my attempt to fix this by modding, it seems that IsCraftedWeapon is true for all weapons, not only crafted ones, so apparently this flag is not enough to determine whether weapon was crafted by player.
So this needs some different check then, I will just leave this to the devs. Corrected my first post.
This needs addressing by the devs. In this case, IsCraftedWeapon needs to be set to 0 for all items BUT those crafted by the player.
I don't smith because I don't want my shops flooded with smithed trash.

While we're at it, to make items of the same name, parts and stats stackable would be a really nice bonus. Some form of equipment ID and unique item ID system could be used to make that possible. Each item in the game would have its own unique ID, but those with the same equipment ID (in all aspects equal to one another) would stack. Whenever an item is crafted, if it has the same parts, stats and name of a previously crafted (or existing) equipment, the same existing equipment ID would be assigned (though it would still have its own unique item ID (or not - not sure if a unique per item ID is necessary for anything in the game). If crafting yields anything different (stats, parts or name), a new equipment ID would be created for the actually new, previously non-existant item and assigned to the crafted weapon.
 
I have been informed that this issue is fixed on our development branch and the fix will be implemented with the upcoming patches. Thanks for reporting!
 
Back
Top Bottom