Paradise icon indicating copy to clipboard operation
Paradise copied to clipboard

[TGUI][Draft] Space Credit Economy Overhaul + Supply Point -> Space Cash

Open Sirryan2002 opened this issue 1 year ago • 4 comments

What Does This PR Do

Completely levels the current economy code and rewrites it from the ground up.

  • Moved economy backend code from Account Monitoring Computer to an Economy Subsystem
  • All Systems using Supply Points now use Space Credits
  • Refactors
    • Money Accounts AND Money Account Databases
    • Conversion to "Economy Machinery" (ATM, Arcade, Slot Machine, Vendors, Merch Comp)
    • Merch Computer & Merch Items [TGUI]
    • Supply Packs and Supply Orders
    • Cargo Shuttle Selling & Buying
  • Department Accounts are being revamped and should be a central management duty of heads now
  • All vendor prices are being adjusted
  • The nominal value of space credits has been decreased significantly in-game
  • Random Mistake crates in cargo are removed, they're not well implemented and need their own overhaul

What needs to be done before this PR will be brought out of Draft

  • [x] Supply Point -> Space Cash Migration
  • [ ] Rebalancing of Vendor Prices
  • [ ] Rebalancing of Supply Crate Pricing
  • [ ] Construction of Job Payment system
  • [ ] Implementation of Job Objective Support (just support, not more objectives)
  • [ ] Economy Management User Interface for Admins & Devs
  • [ ] Econometrics & Blackbox data support

Extra things I'd like to implement but won't hold up development

  • [ ] Space Cash Piles
  • [ ] Custom Player Vendors
  • [ ] Smash and Grab Mechanics for economy machines
  • [ ] Better Admin support for NNO money accounts

Why It's Good For The Game

The current economy code is older than the server itself for the most part and just needed to be completely deleted and redone. This PR does that. I'm not going to explain the technical benefits in detail, just state that the economy now being based in the economy SubSystem will make interacting with it easier and centralized. Also all machinery that interacts with the economy have been standardized.

Please see #18652 for a detailed explanation for some of the design changes being made. a TL;DR:

  • Space Cash currently has no value
  • We struggle to balance in-game scarcity and the prices of objects purchasable in-game
  • The money supply & demand in-game are very out of sync with eachother

Testing

Testing is still ongoing due to active development

A Note for development

This project has been in the works on my end since late June. It is likely it still will take until at least late October before this PR has a chance of being taken out of draft. DO NOT REVIEW THIS PR RIGHT NOW, I won't be accepting posted suggestions or comments describing small nitpick. If you have a concern about design decision I make or larger code structure issue, you should either comment on this PR or ping me in the discord.

This PR's line count and files changed may look large, but I ensure you that it will only get bigger :)

Changelog

:cl: add: creates the economy /:cl:

Sirryan2002 avatar Sep 29 '22 16:09 Sirryan2002

I love this, will this create a economy that carrys over from round to round, or is this still as it is now where its all just for the one round

Carthusia avatar Oct 01 '22 15:10 Carthusia

Persistent economy is not being implemented in this PR. Economy will reset back to original state at the beginning of each round.

Sirryan2002 avatar Oct 01 '22 16:10 Sirryan2002

Even so, i love the idea that a can of soup no longer costs an insane amount of money.

And that people will be handling actually proper cash amounts.

Whats that? You want a can of coke? Fiddy bucks NOT ANYMORE INFLATION!

Carthusia avatar Oct 01 '22 17:10 Carthusia

this will eventually pass tests

Sirryan2002 avatar Oct 04 '22 21:10 Sirryan2002

I would like to note that the job payment system isn't 100% finished, I forgot about that. It's on my TODO list and may manifest itself in terms of things that look half finished or the isolated department datums

Sirryan2002 avatar Oct 31 '22 22:10 Sirryan2002

this just crashed my browser

hal9000PR avatar Nov 02 '22 23:11 hal9000PR

Kicked the tires a bit. Full disclosure I'm just reporting everything I see so if it's a known issue, sorry for the repetition.

I joined in after roundstart as a QM.

  1. The Supply Account is seen twice in this dropdown and in the description under it.

-17_48_06

  1. ATMs are not being assigned IDs.

-17_46_51

  1. Money stacks strangely. I was able to get 15 credits to be described as 15 credits and a stack of 15, but 5 credits described as 1 credit in a stack of 5.

Paradise Station 13-17_48_34

Similarly, if I have e.g. a stack of 136 credits, and remove 50 from the stack, the result is: "That's 20 Credits. It is a tiny item. There are 50 credits in the stack." so I think it's related to stacking.

warriorstar-orion avatar Nov 03 '22 22:11 warriorstar-orion

Kicked the tires a bit. Full disclosure I'm just reporting everything I see so if it's a known issue, sorry for the repetition.

I joined in after roundstart as a QM.

  1. The Supply Account is seen twice in this dropdown and in the description under it.

-17_48_06

  1. ATMs are not being assigned IDs.

-17_46_51

  1. Money stacks strangely. I was able to get 15 credits to be described as 15 credits and a stack of 15, but 5 credits described as 1 credit in a stack of 5.

Paradise Station 13-17_48_34

Similarly, if I have e.g. a stack of 136 credits, and remove 50 from the stack, the result is: "That's 20 Credits. It is a tiny item. There are 50 credits in the stack." so I think it's related to stacking.

this is for the most part fixed

Sirryan2002 avatar Nov 05 '22 17:11 Sirryan2002

Some notes of mine:

  • Since anyone with the mind reader trait can just steal your pin, it might make sense to make pins changeable (though I do see the security options). Following through with a review shortly

lewcc avatar Nov 05 '22 18:11 lewcc

While testing, I've found little mistake in Hydrodrobe. Instead of price, amount was edited, which results in 50 free jumpsuits, 15 free buckets etc. image

Sadhorizon avatar Nov 05 '22 18:11 Sadhorizon

I'm going to rewrite the supply console code for a few reasons

  1. It keeps runtiming
  2. It's intuitive for players at the moment
  3. the code is ugly and not easy to read

Sirryan2002 avatar Nov 06 '22 16:11 Sirryan2002

While testing, I've found little mistake in Hydrodrobe. Instead of price, amount was edited, which results in 50 free jumpsuits, 15 free buckets etc.

this has been fixed in the latest commit

Sirryan2002 avatar Nov 07 '22 23:11 Sirryan2002

In round 33465, we had 140+ runtimes of this. Apologies, unsure when or how it happened, I logged in and saw a multitude of it.

[2022-11-11T06:19:22] Runtime in job_objective.dm,37: check_for_completion() not overridden on /datum/job_objective/make_cyborg
   proc name: check for completion (/datum/job_objective/proc/check_for_completion)
   src: /datum/job_objective/make_cybo... (/datum/job_objective/make_cyborg)
   call stack:
   /datum/job_objective/make_cybo... (/datum/job_objective/make_cyborg): check for completion()
   /datum/job_objective/make_cybo... (/datum/job_objective/make_cyborg): is completed()
   Economy (/datum/controller/subsystem/economy): process job tasks()
   Economy (/datum/controller/subsystem/economy): fire(0)
   Economy (/datum/controller/subsystem/economy): ignite(0)
   Master (/datum/controller/master): RunQueue()
   Master (/datum/controller/master): Loop()
   Master (/datum/controller/master): StartProcessing(0)

Edit: 4 of them showed up on the next round, upon shift start

Miraviel avatar Nov 11 '22 08:11 Miraviel

Clicking on a supply console as a ghost is creating a runtime:
runtimes

Tourte-Yaya avatar Nov 11 '22 09:11 Tourte-Yaya

Consider adding /obj/item/storage/bag/chemistry to the chemist job's loadout (upon spawning), their entire vending machine costs money now, and currently the bag comes from that. Their job is impossible to do without it and it is unfair for them to pay for basic tools necessary for their job.

Either that or make the bag free from the vendor, though it'd look a bit weird.

Miraviel avatar Nov 11 '22 11:11 Miraviel

Ghosts can click between the tabs in the account uplink terminal, even if it seems to do nothing except change which tab is highlighted.

Also, acting heads seem unable to access their departmental pins by any means as the departmental pins only seem to be provided to people in their notes at roundstart/join. Suggest the departmental pins be added to the account console or similarly made available to acting heads either by asking or inherently.

Coolrune206 avatar Nov 11 '22 13:11 Coolrune206

@Miraviel fixed in this commit

The rest I'll look into it

Sirryan2002 avatar Nov 11 '22 14:11 Sirryan2002

  • When people order via the console, it no longer prints a paper. It was used for paperwork/keeping track of who ordered what
  • Pizza crate costs more than literal guns (750 creds vs 500 creds), it's 75 sheets of plasma, seems excessive for something this harmless
  • Properly stamping a paper earns 5 creds, it's an insultingly low number - might wanna bump it up or just remove it, if I order 20 crates and can stamp it all properly (remember, cargo cannot see into locked crates, so if there is something fishy about a crate, they won't know), I get 100 creds. That's a quarter crate of anything and I had a very busy cargo round if I ever had that many manifests
  • Would be cool, though might be out of scope, for departments to sell stuff for their own account. Engineering generates oxygen and plasma with the SM, might be sellable in a canister? Though we need to check for atmospherics cheesing

Miraviel avatar Nov 11 '22 15:11 Miraviel

  • When people order via the console, it no longer prints a paper. It was used for paperwork/keeping track of who ordered what
  • Pizza crate costs more than literal guns (750 creds vs 500 creds), it's 75 sheets of plasma, seems excessive for something this harmless
  • Properly stamping a paper earns 5 creds, it's an insultingly low number - might wanna bump it up or just remove it, if I order 20 crates and can stamp it all properly (remember, cargo cannot see into locked crates, so if there is something fishy about a crate, they won't know), I get 100 creds. That's a quarter crate of anything and I had a very busy cargo round if I ever had that many manifests
  • Would be cool, though might be out of scope, for departments to sell stuff for their own account. Engineering generates oxygen and plasma with the SM, might be sellable in a canister? Though we need to check for atmospherics cheesing

Pizza crate comes with 5 pizzas (150 credits per pizza), chicken soup price i think is 100 credits, the price is fine if we consider the current state of food pricing(and its cargo pizza, it has that nice cold touch to it).

Henri215 avatar Nov 11 '22 16:11 Henri215

Consider adding /obj/item/storage/bag/chemistry to the chemist job's loadout (upon spawning), their entire vending machine costs money now, and currently the bag comes from that. Their job is impossible to do without it and it is unfair for them to pay for basic tools necessary for their job.

Either that or make the bag free from the vendor, though it'd look a bit weird.

I'm just gonna make it free along with the gas mask

Sirryan2002 avatar Nov 11 '22 19:11 Sirryan2002

  • When people order via the console, it no longer prints a paper. It was used for paperwork/keeping track of who ordered what
  • Pizza crate costs more than literal guns (750 creds vs 500 creds), it's 75 sheets of plasma, seems excessive for something this harmless
  • Properly stamping a paper earns 5 creds, it's an insultingly low number - might wanna bump it up or just remove it, if I order 20 crates and can stamp it all properly (remember, cargo cannot see into locked crates, so if there is something fishy about a crate, they won't know), I get 100 creds. That's a quarter crate of anything and I had a very busy cargo round if I ever had that many manifests
  • Would be cool, though might be out of scope, for departments to sell stuff for their own account. Engineering generates oxygen and plasma with the SM, might be sellable in a canister? Though we need to check for atmospherics cheesing

I can drop the price for pizza to like 500, but buying pizza can nullify the kitchen so it worries me if I go below 400

Next on my list is improving cargo beuro, so remaking the cargo manifest thing and then improving printing/stamping behaviour

Sirryan2002 avatar Nov 11 '22 19:11 Sirryan2002

Had a bit of an issue last night where Quartermasters had a lot of trouble with supply orders. They don't seem to get the account information for the Supply account, even as a roundstart. So unless they ask the HoP to give them the account information they can't approve orders made through supply.

A smaller more design issue is that Heads have to come in person to supply or the bridge to approve orders. There doesn't appear to be a way for Heads to approve spending funds without leaving their department.

Pennwick avatar Nov 11 '22 20:11 Pennwick

Assistant tried to order on the "assistant account", and got this. We cannot seem to approve it

image

edit: me as the QM could not, but the captain was able to

Miraviel avatar Nov 12 '22 14:11 Miraviel

When ordering something and the shuttle is docked off-station, approved orders are listed under "Order in Transit". When the shuttle is indeed in transit, they remain there as well.

Also I think I managed to call the shuttle, then approve something while the shuttle was in transit, and the crate was on the shuttle when it arrived.

Miraviel avatar Nov 12 '22 14:11 Miraviel

image Grammar a bit funky at the top, and the card section is there even without a card inserted, a little confusing.

S34NW avatar Nov 12 '22 22:11 S34NW

image this in the singular too

S34NW avatar Nov 12 '22 22:11 S34NW

I try and get to these tomorrow-ish

Sirryan2002 avatar Nov 13 '22 04:11 Sirryan2002

Did a contractor round the other day, chef wasn't making food but still had that mindset of "Im contracting people, ill get cash, it'll be FIIIIIIIIIIINE." It was not fine, I was not getting paid cash by my contracts and only realized this after I went up to a vendor and couldn't buy shit. I swapped around my IDs, added my account number to my agent ID, etc.

Did I miss something or was the money you get from contracting people removed? Will it be added back or is it a permanent decision to not be paid for your work. While yes you do earn TC, TC is a tool to get your objectives done, not your characters payment for their work.

Komrad822 avatar Nov 14 '22 16:11 Komrad822

Did a contractor round the other day, chef wasn't making food but still had that mindset of "Im contracting people, ill get cash, it'll be FIIIIIIIIIIINE." It was not fine, I was not getting paid cash by my contracts and only realized this after I went up to a vendor and couldn't buy shit. I swapped around my IDs, added my account number to my agent ID, etc.

Did I miss something or was the money you get from contracting people removed? Will it be added back or is it a permanent decision to not be paid for your work. While yes you do earn TC, TC is a tool to get your objectives done, not your characters payment for their work.

the feature was temporarily removed in earlier TMs due to me having to rip out lots and lots of code to rework stuff. It was since readded, it should be back in by now, if not it will be later today when the latest commit is updated to the TM.

Sirryan2002 avatar Nov 14 '22 16:11 Sirryan2002

Theres more money inside the vault freezer than the safe? why? I feel like it should all be moved to the freezer or inside the safe.

Henri215 avatar Nov 14 '22 18:11 Henri215