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

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: In-game manufacturing profitability view
« Reply #60 on: April 04, 2015, 04:09:30 pm »
Sorry for a late reply, but does it display just straight up millions (+$7M), or decimal fractures too (not sure whats the term, probably sounds stupid :) ), like +$7.4M$ or even +$7.44M?
It could, and the PR hasn't been accepted yet, so it' s not too late.  The code currently intentionally simplifies the number to avoid cluttering the UI and to avoid locale formatting concerns.  When I wrote it, I felt the simplified number was appropriate since the numbers on the finance graph aren't exact anyway.  I do like your example though -- precise to two or three significant digits regardless of how many significant digits there are to the left of the decimal point.  I'll have to look into locale formatting, though.  In some locales that would be "+$7,44M".

Edit:  it looks like the locale bits there could get complicated.  I'll keep this pull request as it is (simple and easy to review) and see if I can look into adding the decimal point a bit later.
« Last Edit: April 06, 2015, 09:25:05 am by myk002 »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #61 on: April 06, 2015, 06:39:04 pm »
I'm against it, for 2 reasons, both of which were already mentioned here, btw:

1. Uselessness
Why do I need to all the time see something which I need to see only once and then forget about it? "OK, I'm playing XCom first time. Looks like Laser Cannons have the highest profit ratio". Case closed. I won't ever need to see this info again. I won't ever need to check comparisons again, like ex. Avalanche vs. Stingray as there is a single best item and that's it.

2. Wrong emphasis
This game isn't an economic manager. Pushing such info into player's face makes it one. There is no such thing as pure information: each menu item conveys a message. Here the message would be: "Making profit on manufacturing is one of key aspects of this game". It is not a good message. The place for such info is in the Ufopaedia, if anywhere (all you'd need is to slightly modify entries for Laser Cannon & Motion Scanner or whatever sells best).
« Last Edit: April 06, 2015, 06:44:28 pm by Dioxine »

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: In-game manufacturing profitability view
« Reply #62 on: April 06, 2015, 08:49:29 pm »
On the other hand... there are enough total conversions (like PirateZ) that it may be difficult to automatically know what is profitable or not.  I have spreadsheeted a few items by manually crawling the .rul and it is painful, that I can attest.  I would very much like to have this functionality in the game for specifically this reason. ;)

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: In-game manufacturing profitability view
« Reply #63 on: April 06, 2015, 09:26:17 pm »
Xeno Operations mod solve the issue very nicely by providing dedicated manufacturing topics "Defense Contract Work", then "Laser Weapon Defense Contacts" which gets unlocked at the same time as Laser cannons.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #64 on: April 06, 2015, 09:26:46 pm »
On the other hand... there are enough total conversions (like PirateZ) that it may be difficult to automatically know what is profitable or not.  I have spreadsheeted a few items by manually crawling the .rul and it is painful, that I can attest.  I would very much like to have this functionality in the game for specifically this reason. ;)

Grog, $16 per workerhour, Rum, $24 per workerhour, Counterfeit Money, around $32/workerhour net earnings when workshop's at full capacity. See? Case closed :) Compund items, like craft, could be even more profitable, but will such module track all components to their basic costs? Even these that in turn are made from their own components? :) What would be cool, however, is some out-of game tool for making these calculations (or in-game, but only accessible from options menu or sth, or for expanded hi-res GUI).
« Last Edit: April 06, 2015, 09:28:17 pm by Dioxine »

Offline Jstank

  • Colonel
  • ****
  • Posts: 247
  • 100% Un-Professional XCOM Lets Player
    • View Profile
    • FINAL MOD PACK LP OUT SOON NOW RECRUITING! SIGN UP TODAY!
Re: In-game manufacturing profitability view
« Reply #65 on: April 07, 2015, 02:52:33 am »
Couldn't you just pre calculate it and throw it into the UFO Pedia entry?

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: In-game manufacturing profitability view
« Reply #66 on: April 07, 2015, 03:35:21 am »
Grog, $16 per workerhour, Rum, $24 per workerhour, Counterfeit Money, around $32/workerhour net earnings when workshop's at full capacity. See? Case closed :) Compund items, like craft, could be even more profitable, but will such module track all components to their basic costs? Even these that in turn are made from their own components?
We discussed what the calculation should be earlier in this thread.  Originally I did have the number tracking used materials and facility maintenance costs, but we decided it was much clearer and simpler to just answer the question "how much will my available funds change per month if I assign this many engineers to make this many items."  It gives you information regardless of whether you're selling.  I.e. it will tell you how much your funds will change if you manufacture items for use as well.  You can compare the number you see here to the difference between your income and expenditure graph lines to figure out how easily you can afford to make something.  No, not absolutely required, but not useless either.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: In-game manufacturing profitability view
« Reply #67 on: May 07, 2015, 03:42:54 am »
I finally fought with VS2010 for two nights to set myself up to compile my own executables.  This PR was at the top of the list of features that motivated me to do this.  Thanks for putting this together, myk002!  Its a great feature and I really enjoy it!

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: In-game manufacturing profitability view
« Reply #68 on: May 07, 2015, 04:41:20 am »
Hum.. looks like I need to research that rum distillation process. The info is there, sure, but it can be quite painful to obtain (am I really to trawl through Piratez.rul to find what is most profitable? That's one big ruleset!) when that pain could easily be avoided.

I would agree that the extra info would be welcome and useful. If included in the options, and turned off by default, then there is no message problem: A new user would likely keep the defaults (unless they care and then they would just go to a website like ufopaedia to find the answer) and advanced users are beyond the "message". They already know the game and what they want out of it.

I'll have to look into how to pull different pull requests and add them to my repo before compiling next time..

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: In-game manufacturing profitability view
« Reply #69 on: May 19, 2015, 04:29:14 pm »
Well, I went and did it, I am now a happy user of this extra little bit of info!

On "issue" I am having though: If I have 60 runts producing rum, it tells me I'll make +$1M. If I have 30 runts, it is actually +$729K. So the rounding is "hiding" 458K from the report, which is almost 50% of the reported value! Similarly, I expect that with a few more runts, it would report +$2M when it is actually +1.5M$, which is a significant overestimate as well.

Would it be possible to display a few more decimals? always showing 3 significant digits, so +$1.XYM, would be great. If the decimal point is an issue (taking up a character?), then rounding at the first decimal would still be quite an improvement. Showing +$1.5M is still not exact (exact values would look ugly) but would be a whole lot more accurate already.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5420
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: In-game manufacturing profitability view
« Reply #70 on: May 19, 2015, 05:38:24 pm »
After seeing this in work on Ivan's LP, I have to admit the way it's implemented is quite subtle, unlike what I've seen on the first screenshots. After deliberation I think it could be safely implemented in the main build, as a switchable option. Frankly speaking, the code base of these "little helpers" is increasing to a point where too many people have to compile their own .exes. Maybe it's time to move this one into the main branch as an optional feature (maybe along the flashing healthbar when you have Fatal Wounds, which is unobtrusive but IMMENSELY helpful).

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: In-game manufacturing profitability view
« Reply #71 on: October 02, 2015, 02:45:52 pm »
Well, this is pretty dead but I hope at least a few people still use it as it is a great little feature. As I mentioned above, one has to be aware that the report is rounded down, so "+$1M" could actually be hiding pretty much half of a profit of $1,999,999 or actually be a profit of $1M exactly. It is generally not a problem when manufacturing for up to +$1M, since thousands grow quickly and hundreds are largely irrelevant, but at that turning point of a million, you end up losing a lot of information. Am I producing for +$1.005M or +$1.8M?

So I bring you: My first code contribution to OpenXCom, albeit a tiny one that modifies something that modifies OpenXCom. As you can see in the screenshots below, if your profit is less than 10 thousands/millions/billions, the display will change from +$X to +$X.Y, so you have a bit better idea of what is happening. Like the original, numbers are rounded down, so if it displays +$1.2M, you could be making 1.2 or 1.299,999 millions, but tens of thousands aren't that big a deal here. This keeps the error of the estimate under 9%, instead of under 99%.

The changes are in the patch file. Just type "git am < Patch_MonthlyMfgProfit3.patch" in your git repository (or do whatever your git gui asks for to patch). It is not changing much, so you can also just go in the code to apply them yourself. Not that this modifies what Myk002 did and requires it. It is not a stand-alone feature.

Offline Boltgun

  • Colonel
  • ****
  • Posts: 252
  • [UTTERANCES]
    • View Profile
    • Piratez let's play
Re: In-game manufacturing profitability view
« Reply #72 on: October 02, 2015, 05:41:02 pm »
Seeing it only when you press the sell button is actually nice. I put grog on repeat in piratez but never bothered to calculate how much of the monthly cost it would fund me.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: In-game manufacturing profitability view
« Reply #73 on: October 02, 2015, 05:58:57 pm »
It's on all the time, not just when you sell.

If you don't press the sell button, it tells you how much money you are losing to manufacturing cost. If you press the sell button, it tells you how much your funds will change, from total sell value - total manufacturing cost

Either way, it is quite convenient, as I have been taken aback sometimes by how fast my funds dropped from mass making guns or armors, even though I saw the unit prices when I ordered them.

Offline Cristao

  • Colonel
  • ****
  • Posts: 404
    • View Profile
Re: In-game manufacturing profitability view
« Reply #74 on: December 22, 2015, 02:51:59 pm »
I think I would prefer two things (i) straight up profit per item and (ii) length of time to manufacture info e.g. laser cannon: sale price - cost of manufacturing and how many manhours it requires. I can now calculate on my own how much profit i need to make.