Author Topic: In-game manufacturing profitability view  (Read 52815 times)

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: In-game manufacturing profitability view
« Reply #90 on: December 24, 2015, 04:48:03 pm »
Well, for one thing, it shouldn't get out of hand with pricing. Let's face it: If you wanna produce just one Avenger for each base (meaning 8 Avengers), you're gonna have a hard time doing that in decent time, if you have to pay horribly for 100 engineers. Or Research (which really is key in this game). With 50 scientists, it feels like taking forever, to get all the fancy (but necessary) stuff researched. If it doesn't cost double, to have 100 of them working for you, but, let's say, 10 times, it will get unfair really soon.

[Edit:] It's like with Dungeon Keeper. Every new imp costs 150 gold more, than the last one. If one get's killed, the price drops by 150 gold. However, it's getting quite expensive to actually get an increase in working capacity, once you reach a certain level. That can block you quite a lot. It's the question, if that would be an intention. At this point, it's not about money any more. As said before: Once you reach this level of development in Openxcom, you mostly don't need the production capacity to make money, any more. You simply sell that stuff, the aliens »leave behind« and produce what you need (Avengers, armor, Psi-amps, hwps, ...).
« Last Edit: December 24, 2015, 04:53:20 pm by 7Saturn »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: In-game manufacturing profitability view
« Reply #91 on: December 24, 2015, 05:18:25 pm »
I actually agree, the scale I had in mind is rather the first scientist costing -10% (compared to the theoric price), and the 150th costing +25%.
For soldiers, the scale can be harsher, to dissuade meat shield tactics. Dead soldiers can't be put back on the market, so the offer/demand system will make it more and more expensive to replace your casualties.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11464
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: In-game manufacturing profitability view
« Reply #92 on: December 24, 2015, 05:25:35 pm »
For soldiers, the scale can be harsher, to dissuade meat shield tactics. Dead soldiers can't be put back on the market, so the offer/demand system will make it more and more expensive to replace your casualties.

But what if you don't lose many soldiers, only increase their numbers? Having 8 bases, each one protected by a squad of at least 10 soldiers, means 80 soldiers at minimum, but in reality it's more like 120 for me. I'm not saying it shouldn't be expensive, but why would you pay more per soldier when you hire more of them?

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: In-game manufacturing profitability view
« Reply #93 on: December 24, 2015, 05:45:10 pm »
I don't find it irrealistic : The recruitment can be cheap at the very beginning when people volunteer to join XCOM, but when you need more people, it becomes more expensive to print the nice XCOM recruitment posters, locate possible candidates and get them to defect from their current engagement/job to work for you.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #94 on: December 24, 2015, 06:33:19 pm »
I find it funny, these attempts to paint X-Com as something which is affected by free markets in the slightest... Especially since the project has all the cash it needs (as opposed to wants - resources are limited so the commander won't go completely crazy, also because that's how Western government organizations work). However, free markets can be fun for a modder... If someone programmed them, that is :)

Faceless Government Bureaucrat: Now that you have your bases, we'd like you to build some equipment for the government, strictly on the QT. We'll pay you for them at the posted rate. Here's the list.

Xcom Commander: [scans the list] Great, we can make a lot of profit off Laser Cannons. You'll be getting about 1000 per month from now on.

Implying they didn't want to get Laser Cannons in the first place... After all, this might be the most useful weapon in the x-com repertoire... (lasguns are cool, but you can't shoot at nuclear missiles or fighter jets with 'em; and Elerium stuff has little future, as it needs a rare resource). You really need to work on your paranoia, dude :)

First, we need a base price level for each item that can be manufactured. Suggestion: Calculate how many engineers could work on something using a single workshop, producing as many of those something as possible for a month. Total up all the costs of production. Divide by the number of items produced in a month. Multiply by 1.2. That's your Base Sale Price for the item. It's fixed and never changed.

Second, the month research gives a new item to be produced and sold:
Current Sale Price = Base Sale Price * (3 + .2 * random number) 

Next each month the actual sale price of an item is recalculated as follows:
Current Sale Price = Current Sale Price * .95 * .95 for each time the item was sold during that month.

So what happens? A newly discovered item is worth a lot of money, but that price degrades by 5% each month, and by 5% more each time the item is sold. It will eventually drop below the value of other items which can be manufactured and sold.

That's IPhoney economy. Loses value so you need to make a new model every year (here! buy! a new Laser Cannon i8 Cherry Cupcake! Totally not a cash grab!). An item could be risen in sell value through marketing, but marketing is a separate topic.
Marketing apart, goods with real value will always find buyers, so the price has to be dynamic (it drops if you're selling more than they're willing to buy, and goes up if your stock doesn't meet demand). NOT drop all the time.

- The effect of player's sales should probably be applied on each unit (sell 1: 100$, sell 3: 100$+98$+97$), otherwise the player would be encouraged to hoard items and sell large amounts at a time.

If we talk about real economy, that's precisely how you speculate. I think the limiting factor should be the capacity of the buyer; you cannot sell more than people are willing to buy (more bases = more simultaneous buyers?). So drop in price not on item-per-item basis, but on buyer-per-buyer basis. The price drops only when the word of big sales gets out, not immediately. Big-scale merchants always had huge storage capacity for precisely that purpose.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: In-game manufacturing profitability view
« Reply #95 on: December 24, 2015, 10:56:24 pm »
If we look at things through offer and demand, it makes little sense for things to vary much.

XCom is tiny compared to the military of any country. It's demand on large rockets should have no bearing on their prices. I can't see a reason it would be particularly difficult to recruit scientists or engineers either. There should be a lot of people who would like to work with super secret alien tech. Soldiers.. that's a bit different since casualties can be high..

Similarly, demand for laser or plasma weapons, or tank like personal armor, especially in the context of an alien invasion, should be in very high demands and not really within the capacity of XCOM to overcome. Except maybe if you make thousands of plasma cannons.. but I bet that as an aircraft and tank weapon that doesn't need ammo, it'd be quite popular.

What might make more sense are random changes to the prices, to represent variations of the market globally instead of pretending that xcom is the main driver. But that's not really what the thread is about any ways. If you'd like varying prices, that's a great suggestion, in another topic where the details can be discussed...
« Last Edit: December 24, 2015, 10:59:28 pm by Arthanor »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #96 on: December 24, 2015, 11:27:48 pm »
Soldiers.. that's a bit different since casualties can be high..

While I completely agree with your post, this gave me an idea. Why rookies' stats are so poor (and the salary rather modest)? Because they're not the elite - the risk is just too damn high for real pros, so you're basically hiring what comes through the door - either those with an obsession with killing aliens, or those who really want the cash (if you're lower class citizen, especially in a country like Philipines or Bulgaria, $20k/month (in 1999 dollars!) minus tax & insurance sounds really like something worth the risk...

Offline Leprechaun

  • Sergeant
  • **
  • Posts: 45
  • Linux Mint Enthusiast
    • View Profile
Re: In-game manufacturing profitability view
« Reply #97 on: December 28, 2015, 06:48:18 pm »
I am gratified that something I found interesting has generated so much discussion.

But someone has to do the work, so anything that is done has to be reasonable in terms of the effort required. That means that a full scale economically accurate pricing model is not appropriate. What is needed is something that is a reasonable simulation of real world economy that makes the game more fun and retains playability.

My opinion on variable prices :
- The random variation (The one which doesn't reflect player's sales) could be applied once every month : This should be frequent enough to have an effect, without the player having to re-check prices every 3 days in case what he's building has suddenly dropped price without warning.
- The effect of player's sales should probably be applied on each unit (sell 1: 100$, sell 3: 100$+98$+97$), otherwise the player would be encouraged to hoard items and sell large amounts at a time.

That's approximately what I intended. The price of an item would be set when the item is available to be produced. It would decline by 5% per month thereafter, plus 5% more in a month where any of the item had been sold. (In other words, there is no recalculation with every sale, but simply a boolean flag set which says the item was sold in that month.)

Let's consider an example. The Motion Scanner requires 4 spaces to build, plus 1 for every engineer working on them. 220 engineer hours are required to make a Motion Scanner. $34,000 in supplies are required per scanner.

How COULD we set a base cost for the scanner? Let's suppose a Manufacturing base which has 8 Workshops, 8 Living Quarters, and 200 Engineers. (Not that it can't have other things, but this is for establishing a base cost.)

With this setup, 196 Engineers could work on scanners at the same time. That gives you 141,120 Engineer hours per month. (720 hours * 196 Engineers.) At 220 hours per scanner, this group would make 641 scanners every month. That costs $34,000 * 641 or $21,794,000 for supplies plus $5,000,000 for engineer salaries, plus $360,000 maintenance on the Workshops and Living Quarters, or $27,154,000. Dividing that by 641 means it costs you an average of $42,362 to make a Motion Scanner.

Now, based on my earlier suggestion, in the month the Motion Scanner is available for manufacture, it's sale price is set at 3 times the base cost + a random value between 0 and .2 times the base cost. In this case, let's say that value is $130,000. Each month after that, the sale price drops by 5%, or $121,600, $115,500, $109,700, $104,300, $99,000 ... and so on (rounded to nearest 100.) If any Motion Scanners are sold in a month, and additional 5% is knocked off at the end of that month. (Which is unrealistic, but it make it easier to account for increasing supply and helps encourage the player to manufacture other things.) Even without sales, the price of a newly researched item to be produced would drop below production cost in 2 years. If you add in monthly sales, that would drop to a single year.

Hoarding would not be an issue because any sale, from 1 to 100000 is going to trigger an additional drop in price at the beginning of next month. Therefore if you sell whatever you are going to sell as soon as possible.

Why do this? First, it would mean that instead of initially having financial problems, but after a few months you have more than you can possibly spend, the opposite becomes true. A year after you can produce something, it's no longer a viable product for financing. Why? Because surely someone in the government, even with secrecy being a requirement, is going to want a piece of the money you are raking in and is going to set up production in a secret factory and cash in.

- The items which can be bought could also have prices affected by player's demand. If the price of large rockets rises every time you buy one, you are rewarded if you adapt, rather than stick to all-rocket equipment.

I think the purchase price represents the cost of items currently in use by the world's militaries. The effect on supply and demand of sending even hundreds of these items to XCom would be negligible compared to worldwide requirements.

-
The recruitment can be cheap at the very beginning when people volunteer to join XCOM, but when you need more people, it becomes more expensive to print the nice XCOM recruitment posters, locate possible candidates and get them to defect from their current engagement/job to work for you.

I find it funny, these attempts to paint X-Com as something which is affected by free markets in the slightest... Especially since the project has all the cash it needs (as opposed to wants - resources are limited so the commander won't go completely crazy, also because that's how Western government organizations work).

Solarius says that according to canon, the XCom operations and the existence of aliens is a secret. So no recruiting posters, and no free market, but that doesn't mean the XCom commander is an idiot. He needs funds beyond what is allocated to him by the 13 governments which are in the know. If he's not smart enough to build the most profitable item, then he's not smart enough to be the XCom commander.

Let's take an even simpler example. An Alloy Cannon takes 20 spaces to build plus 1 per engineer, and $95,000 in supplies, plus an Alien Alloy which is built at a loss. The sale price is $45,000, which means you lose $50,000 per cannon you build, not counting losses on quarters, workshops, and alien alloy. Just how many would you build?

Implying they didn't want to get Laser Cannons in the first place...

Au contraire, in the piece of fiction I wrote, the FGB said he wanted 1000 for the Presidential Guard, but didn't need 12,000 per year in perpetuity. But it does bring up an interesting point. SOMEONE in the 13 governments which fund XCom knows about the aliens, knows about the invasions, and wants everything hushed up. So no public sales. But what about these Faceless Government Bureaucrats? Do you think they don't want their personal asses protected? With each and every item that XCom can produce, the FGBs are going to want anywhere from a few to several hundred for their personal guard forces. In the immortal words of Rosie O'Donnell, "No one should have a gun, but I am a celebrity and I need protection."

Basically, what I am suggesting is there is no free market, no recruiting posters, no competition for new technology, but there still is a semi-free black market for these same items, and such a market makes more sense for the limited quantity of items which XCom can produce.


« Last Edit: December 28, 2015, 07:32:07 pm by Leprechaun »

Offline Leprechaun

  • Sergeant
  • **
  • Posts: 45
  • Linux Mint Enthusiast
    • View Profile
Re: In-game manufacturing profitability view
« Reply #98 on: December 28, 2015, 07:16:05 pm »
What might make more sense are random changes to the prices, to represent variations of the market globally instead of pretending that xcom is the main driver. But that's not really what the thread is about any ways. If you'd like varying prices, that's a great suggestion, in another topic where the details can be discussed...

It would be possible to have some kind of variable pricing that's not too difficult to program and make some kind of sense within the XCom world. Again, because the alien invasion is a big secret, accounting for the entire world isn't necessary, and makes XCom's effect on pricing more reasonable.

I would suggest a Monthly Support Level for each product. If that level or more are produced and sold, the price goes down faster. If less than the support level are sold, the price goes up, or at least down slower.

Calculating a support level would be a guess based on how many would the FGBs want per month. Their personal guard forces can't be too large, but more than just the FGBs need protecting. The FGBs have to know that aliens will try to make deals, or assassinate opposing FGBs, or kidnap relatives of the FGBs, or otherwise blackmail them into cooperation. Items do break and no FGB in the know is going to accept, "We just broke the last Laser Cannon, so we can't protect you against being kidnapped." FGB houses, the private schools their children go to, their favorite golf course, and so on have to be protected discretely. 

Given that the whole thing is a big secret, almost anything produced by XCom would have to have a built in self destruct. If FGBs guard is questioned by the police, he would flip a switch and his laser rifle melts to slag, which is still better than the police getting their hands on a functional laser rifle. And the support level for ammunition is a lot higher. The FGB will want his guard force to be very proficient and this requires expending ammunition for practice. So there will be items expended at least monthly.

Monthly support level for Motion Scanners = 39 ?
Monthly support level for Laser Rifles = 260 ?
Monthly support level for Alloy Cannon Ammunition = 10,000 ?
... and so on.
« Last Edit: December 28, 2015, 07:24:21 pm by Leprechaun »

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: In-game manufacturing profitability view
« Reply #99 on: December 28, 2015, 11:54:04 pm »
I must remind everyone here.
UFO: EU does not care about extra hours. It's a problem caused by truncating floating part in a number.

Quote
With this setup, 196 Engineers could work on scanners at the same time. That gives you 141,120 Engineer hours per month. (720 hours * 196 Engineers.) At 220 hours per scanner, this group would make 641 scanners every month. That costs $34,000 * 641 or $21,794,000 for supplies plus $5,000,000 for engineer salaries, plus $360,000 maintenance on the Workshops and Living Quarters, or $27,154,000. Dividing that by 641 means it costs you an average of $42,362 to make a Motion Scanner.
Unfortunately these engineers will only be able to produce only 360 motion scanner. Why? Because 196 engineers is less than 220 and that means you'll need 2 hours to produce one motion scanner.
This is one specific reason here (https://openxcom.org/forum/index.php/topic,4194.msg56922.html#new) because of which I used simulation instead of direct calculation.
In short: the most profitable thing is to assign a divisor of man hours needed of engineers. In this case the most profitable is 110 engineers, not 196 and thus 3 and 3 living quarters and workshops. Until you get 220 engineers, assigning more to that project is a waste.
« Last Edit: December 28, 2015, 11:57:14 pm by EditorRUS »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #100 on: December 29, 2015, 08:56:39 am »
I must remind everyone here.
UFO: EU does not care about extra hours. It's a problem caused by truncating floating part in a number.

True but the 'TFTD manufacturing formula' is freely available as an option and most people turn it on for sheer convenience (however, in that particular case, the formula indeed changes nothing - it only comes into play when you have more engineers than required workhours to produced a single item, so 440 engineers would be able to make 2 scanners/hour). Hmm, this gives me another idea - maybe there should be an option to add 'maxSpace' requirement for an item production (max number of engineers/project allowed). Probably an option fo Extended.

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: In-game manufacturing profitability view
« Reply #101 on: December 29, 2015, 09:58:58 am »
Quote
however, in that particular case, the formula indeed changes nothing - it only comes into play when you have more engineers than required workhours to produced a single item, so 440 engineers would be able to make 2 scanners/hour
Incorrect. It changes many things.
As I said before - extra hours are wasted

Here's what's happening.
Imagine we have 196 engineers assigned on 220 hours project.
First hour: 196 / 220 done
Second hour: 392 / 220. If you play without TFTD rules, there will be created exactly one item and the timer will revert back to 0 / 220. Therefore you are wasting 172 extra hours. I need not remind you that's a lot. If you DO play with TFTD rules, the timer will revert to 172 / 220 as it is supposed to be.

Therefore you need to waste no hours (therefore engineers) and in order to do that you should only assign a divisor of man hours on a project.
Divisors of 220 are: 220, 110, 55, 44, 22, 20, 11, 10, 5, 4, 2, 1. That will ensure you'll get exactly one item in 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110, 220 hours respectively without losing hours. Since the game is discrete you must do that.
« Last Edit: December 29, 2015, 10:01:01 am by EditorRUS »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #102 on: December 29, 2015, 11:43:30 am »
Oh, so that's how TFTD formula works. So it actually helps a lot and if you're producing in bulk, losses in manhours should be minimal, regardless of the number of engineers (on the last item only); certainly not a constant 40% efficiency drop like in your example. I see that as a straight improvement and there is little point in not enabling this option.

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: In-game manufacturing profitability view
« Reply #103 on: December 29, 2015, 07:32:01 pm »
Yes, but in this case the only thing left which matters is ratio between profit and man-hours. Salaries, maintenance all come to background. If something is profitable with one engineer - it will always be profitable however you setup your base.
« Last Edit: December 29, 2015, 07:38:45 pm by EditorRUS »

Offline Leprechaun

  • Sergeant
  • **
  • Posts: 45
  • Linux Mint Enthusiast
    • View Profile
Re: In-game manufacturing profitability view
« Reply #104 on: December 30, 2015, 02:41:17 am »
I must remind everyone here.
UFO: EU does not care about extra hours. It's a problem caused by truncating floating part in a number.
Unfortunately these engineers will only be able to produce only 360 motion scanner. Why? Because 196 engineers is less than 220 and that means you'll need 2 hours to produce one motion scanner.
This is one specific reason here (https://openxcom.org/forum/index.php/topic,4194.msg56922.html#new) because of which I used simulation instead of direct calculation.
In short: the most profitable thing is to assign a divisor of man hours needed of engineers. In this case the most profitable is 110 engineers, not 196 and thus 3 and 3 living quarters and workshops. Until you get 220 engineers, assigning more to that project is a waste.

I read the post you linked to, and downloaded your excellent tools. And while I am playing from an XCom: UFO Defense base and have never seen this issue, that doesn't mean it shouldn't be looked into. The first obvious choice is to turn on TFTD economics. But an alternative is to just do a recalculation based on smaller number of engineers.

The Motion Scanner requires 4 spaces to build, plus 1 for every engineer working on them. 220 engineer hours are required to make a Motion Scanner. $34,000 in supplies are required per scanner.

Let's consider 1 Workshop, 1 Living Quarters, and 50 Engineers. 46 Engineers could work on scanners at the same time. That gives you 33,120 Engineer hours per month. At 220 hours per scanner, this group would make 150 scanners every month. That costs $34,000 * 150 or $5,100,000 for supplies plus $1,250,000 for engineer salaries, plus $45,000 maintenance on the Workshop and Living Quarters, or $6,395,000. Dividing that by 150 means it costs you an average of $42,633 to make a Motion Scanner. This isn't a whole lot larger than the earlier calculation. There is, of course, some loss due to math issues, but less than when having 196 engineers working. (After the 5th hour, 230 engineer hours were used, and 10 of those were wasted.)