jpcsupplies / Economy_mod

Basic Economy System for Space Engineers
13 stars 12 forks source link

[ENH] Further Automation of Default Pricing #98

Open jpcsupplies opened 8 years ago

jpcsupplies commented 8 years ago

Several elements of pricing can by combining with API calls to extract blueprint/build requirements be possible to Automate the process of pricing. The server admin would then only really need to set their base ore pricing, and then depending on the server efficiency settings the rest of the pricing table could be generated all the way to the final construction chain point. This allows for NPC prices to automatically be effected by server refinery/assembler efficiency setting changes.

For example, the amount of ore consumed to create an ingot can hopefully be accessed via the mod API; and would be effected by the server refinery efficiency setting. With basic ore pricing set, this could be used to calculate what value the ingots have in raw ore consumed value.

The amount of ingots consumed to create items or components would also fall under this system. It also tends to vary now depending on server assembler efficiency settings - thus the need to automate to avoid economic exploits. (For example last week tool buy from player prices were now significantly higher than their manufacturing component cost, and could have been exploited to clean out lots of NPC's money)

Some Sell to player pricing (tools/weapons) would need some pricing modifications for game balance. But in general the buy from player price should be consistent all along the manufacturing chain to avoid the issue of price exploiting by "XP grinding" tool making or other out of balance items.

Eg. (not actual component cost just mathematical example)
1x iron ore = $0.1, 100x Iron Ore = 1 Iron Ingot. Logically 1 Iron ingot is worth $10. ($0.1 x 100)

1x Steel plate = 10x Iron Ingot, Logically 1 Steel plate is then worth $100. ($10 x 10)

1x Steel Block = 25x Steel Plate. Logically 1 Steel Block is worth $2500 ($100 x 25)

Sell price on the other hand introduces entropy, so could be a formula, much like my xl sheet, For ores (although this is most likely going to be set by player the following is a rough price guide) if buy cost per unit is under 0.5 use 64% markup (multiply by 1.64) for sell if buy cost per unit is between 0.5 and 1, use 56% markup (multiply by 1.56) for sell if buy cost per unit is between 1 and 2, use 32% markup (multiply by 1.32) for sell if buy cost per unit is between 2 and 5, use 24% markup (multiply by 1.24) for sell if buy cost per unit is 5 or up use flat 11% markup for sell (multiply by 1.11)

For ingots Use value of ore required to make a unit of ingot is the buy from player price. For sell to player price, multiply ore sell price instead of ore buy price. Otherwise same formula as buy price.

For components Use buy from player value of ingots/components required to make a single unit of that component as unit buy price. For sell to player price, same formula but we use the sell price for the number of ingots/components.

For tools For buy from player price calculate buy value of ingots/materials needed For sell to player price calculate sell value of ingots needed PLUS $10

For explosives/ammo For buy from players price would be based on component/material buy value. For sell to players price we probably should push up the sell price(+$50) and/or just push up the sell price of magnesium which is used to make them.

In general it should be possible for new players to afford certain tools, welder/drill. But Costly to buy other tools (grinders, rifles, ammo) to avoid new player gun battle/griefing sprees.

This logic would only apply to the default new NPC pricing, all other player markets, or established NPC markets would still have adjustable pricing all down the manufacturing chain. So this would mainly effect pricing on newly installed servers, or on new items that are added by an update or a mod.

It may also be necessary to create a command that can be used to recalculate all the pricing on existing servers NPC market pricing. (/recalculate ? ) This will allow existing servers to tweak pricing across the board when updates change build requirements or manufacturing losses for refining.

jpcsupplies commented 8 years ago

Potentially players can still "XP grind" player controlled markets, (as their pricing would not be in sync with the NPC defaults) but in this case it would economically stimulate that element of trade; as players would only put pricing up for items they actually wanted, as such it would offer an incentive to haul over a pile of stuff to sell to that players station.

jpcsupplies commented 8 years ago

See also #87