Resolved [Workshop Issue] Every tannery on the continent is going bankrupt after 200 days. All tanneries are gone within 250 days. Two major issues.

Users who are viewing this thread

Summary: All tanneries in the world are starting to go bankrupt after 200 days, and are completely gone within another 50 or so days. Bankruptcy taking 200 days is due to a specific reason: all workshops start with 10000g in capital, and npcs pay 50g in wages per day to workers. So, 10000 / 50 = 200 days before running out of capital, which means that many of the tanneries are not even producing leather a single time. Here is a log of all the tanneries (and a few velvet weaveries) going bankrupt consecutively by using a tracepoint in a debugger at the DeclareBankruptcy line of the HandleDailyExpense method. Also, below to the right, is a screenshot of the dev console in game using the command "campaign.print_workshop_info" over time to show that tanneries are indeed disappearing.

Tracepoint-Workshop-Bankruptcy.png

Tracepoint log in dnSpy debugger
No-Tanneries-Left.png

Dev console workshop info command

There are two major causes of this. First, the base and luxury demand values for leather are set very low (2 and 4 respectively), and demand is a significant contributor to the price of goods. In fact, by modeling the price of hides and leather in a graphing program, you can see that the price of hides is always higher than leather when comparing similar quantities up until they intersect at a quantity of 70 or so (for 4000 prosperity). The screenshot below shows a graph of price vs quantity of hides and leather at a given prosperity. The model used is in the link. (I val = assigned item value in horses_and_others.xml, B and L stand for base and luxury demand respectively, Q = quantity, P = prosperity, S and D are supply and demand values).

EVJbL.png


gZ9b3.png

The second major cause of this imbalance is that too many tanneries spawn at the start of a game due to a quirk in the workshop distribution formula. For the purpose of calculating the input density score of workshops in a town, hides are hardcoded to use a production rate of 3 per day, as shown in the screenshot below (FindTotalInputDensityScore).

2tQef.png

Cow, sheep, and hog villages are all treated as hide producing villages for the purposes of workshop distribution in a newly created game. This results in a high distribution of tanneries because there are a large number animal producing villages around the world. As can be seen in the top right screenshot of the dev console, 32 tanneries spawned in a newly created game, many more than any other non-artisan workshop. The high amount of tanneries causes a surplus of leather to be created, which deflates the price of leather, making it difficult for workshops to turn a profit.

T-4Dq.png

The result of these issues is that tanneries do not operate because they cannot turn a profit, and will eventually go bankrupt and switch productions. This leaves the world without dedicated sources of leather.

Hopefully all of that made sense, and this report wasn't too much of an overkill, lol. The price model can be used to tune other types of workshops as well, because many of them are struggling to turn a profit with the current balance. The model doesn't factor in item substitutions or trade penalties. It also assumes instantaneous changes to the supply value, rather than gradually over time, as it does in game.

As a side note, when workshops go bankrupt, some of them are incorrectly switching to artisans.
 
Last edited by a moderator:
Hopefully this helps them solve it quicker. The overarching issue with workshops might be more deep rooted in the price model, the production/consumption rates, world village and workshop type distribution, etc. This helps for tanneries, but not necessarily for other workshops. Many, many things affect workshop income.
 
So that's why leather is only worth a few gold more than hides in most towns. I thought the devs had nerfed leather prices into oblivion.
Some workshops will never provide alot of profit as their products never sell for that much.
 
Yep! I think they've been tweaking certain workshops lately, and tanneries probably didn't get a proper balance pass. I don't know when it happened, but tanneries no longer turn leather into armor as an additional production; they only turn hides into leather now.
 
Those are for internal usage. You are correct. It helps us to find the threads easier in our internal bug reporting system. Sometimes just searching with URL or titles does not find the issue.
 
Was this meant to migrate to the general forum, lol?
Just a notice that we've removed the 2 "Balancing issues" boards from the "Technical support" section and moved the boards into BL SP and MP feedback boards. Developers will be able to now look at player feedback within a single board for SP and MP.
You can PM me the links of those bug reports and I will handle the rest.
@Apocal I already passed on this one and a few others I could find, if you had any in the BI section that didn't get pushed to devs you might wanna PM MArdA. (I didn't see any from you on my initial pass through tho)
 
I just want to point out something else: tanneries rely on hides as inputs, which are only produced by the artisan workshop, so there is an absolute maximum number of hides that can be produced per day globally. There are 53 towns in the world, and each one produces 4.5 hides per day on averge when they have full access to cows, sheep, and hogs. So if every single town has a steady supply of all herd animals, the absolute maximum rate of production for hides is 4.5 x 53 = 238.5 hides per day globally. One tannery turns 8 hides into 8 leather per day, so if there are 32 tanneries in the world, as there are in the case of the original post, the tanneries will consume 8 x 32 = 256 hides per day as an input globally. That's also not even accounting for the fact that artisans also turn 0.3 hides into leather per day (averaged).

Towns will never have steady access to all herd animals every day, so the actual global hide production rate is probably much lower than 238.5 per day. This means that the global input demand of tanneries can't even be met under optimal conditions and are doomed to fail.
 
@MArdA TaleWorlds Yep, still happens on the latest beta patch e1.5.4. Here's a screenshot of the workshop numbers from the first 250 days of a brand new 1.5.4 campaign using the console:

8lb1D.png


Almost all of the tanneries go bankrupt between day 200 and 250. The other 3 are gone within another 2 weeks or so.

Also, as a side note, you can see that the number of Artisan workshops goes from 53 at the start of the campaign to 56 by day 250, meaning 3 tanneries were converted into artisans when they went bankrupt, which I don't think is supposed to happen. It isn't really a big deal, because any excess artisan workshops get switched to something else when you reload a save, but I thought I'd mention it anyway.
 
I dont have any numbers but I can say I built two tannery work shops in my current game and they both went to zero output quickly and never rebounded.
 
Back
Top Bottom