jpcsupplies / Economy_mod

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

Roadmap notes here for informational / discussion purposes #39

Open jpcsupplies opened 8 years ago

jpcsupplies commented 8 years ago

Roadmap - progress - completed items removed as we go mostly superseded by issues section see also wiki: Most up to date: https://github.com/jpcsupplies/Economy_mod/wiki/4:-Development-Targets-(Roadmap)

Overall Abstract overview: https://github.com/jpcsupplies/Economy_mod/wiki/3:-Abstract-Outline-of-Project-Stages-and-Milestones

Based on the following (now superceded by the roadmap wiki link above) we are quite close to Beta. At which point all core objectives have been met! Which means we can focus on bug/code cleanup - and looking into ENH's that fall outside the core aims of the mod.

jpcsupplies commented 8 years ago
[9:50:36 PM] Nathan (xPhoenixXx): hmm  sounds like the link took you somewhere different.. did you see this message: Quaxo 5 hours ago  Delete
Ok, PhoenixX, I'm missing something. I have two working zones, with two different merchant wallets and stock, we'll just call them A and B. A is working completely as it should. Buying, selling, price changes, everything. Market B is working almost completely right. It's missing something though. I don't know if it's my script or just something inherent in the original. When I make price changes at Market A, it works as it should. When I go to Market B and make price changes, it doesn't change Market B's prices, it still changes Market A's prices. I've upload my script here: http://pastebin.com/WTPsMaMU

Could you have a look and see what I'm doing wrong?
[9:51:14 PM] Chris (midspace): The link you gave me took me striaght to "Usage Summary and LCD operation".
[9:51:34 PM] Nathan (xPhoenixXx): oh? limitations of steam it seems, i was refering to the comments section :)
[9:51:42 PM] Chris (midspace): and "Public Description"
[9:52:08 PM] Chris (midspace): oh, you want me to scroll down 2 dozen pages? :D
[9:54:12 PM | Edited 9:54:43 PM] Chris (midspace): Only 1 market is edited currently. the first one that has the Npc ID.
[9:54:59 PM] Chris (midspace): baby steps in the code.
[9:55:36 PM] Chris (midspace): okay, here are the technical issues.
[9:55:59 PM] Chris (midspace): If you have multiple Npcs, with multiple markets, which market are you trying to set the price for?
[9:56:42 PM] Chris (midspace): Two probably solutions. 1. You need to be inside the market zone you want to change. Makes sense.
[9:56:54 PM | Edited 9:57:02 PM] Chris (midspace): 2. You specify the market name you are adjusting.
[9:57:27 PM] Chris (midspace): That requires some adjustment of course. Unless we swing it both ways.
[9:58:02 PM] Chris (midspace): Don't specify the zone name, it'll affect the one you are in. Specify the zone name, you're a-ok.
[9:58:36 PM] Nathan (xPhoenixXx): Intended logic from my perspective: 
 1:  NPC zones share the central price list
 2:  Faction/Player market zones have their own price list
[9:58:38 PM] Chris (midspace): The issue I mentioned a few days ago. prevent a zone from been created inside another zone. The above is 1 good reason why to prevent it.
[9:58:49 PM] Nathan (xPhoenixXx): so in the case of 1:  not much needed there
[9:59:09 PM] Nathan (xPhoenixXx): in the case of 2: definately need to either specify or lookup the current zone we are in
[9:59:21 PM] Chris (midspace): Currently though, they don't share a price list. We've kind of hacked out own code.
[9:59:54 PM] Chris (midspace): They maintain seperate price lists.
[10:00:05 PM] Nathan (xPhoenixXx): the data he pastebin'ed appears to only be one price list lemme look again
[10:00:51 PM] Chris (midspace): second market starts at line 743
[10:01:22 PM] Nathan (xPhoenixXx): ahh yup i see
[10:01:35 PM] Nathan (xPhoenixXx): so we need a market ID tag then to start with
[10:01:59 PM] Nathan (xPhoenixXx): and cross reference it to the market entity (in this case the two npc markets)
[10:02:47 PM] Chris (midspace): Question. Do you want 1 stock list, along with 1 price list?
[10:03:14 PM] Chris (midspace): Or do you want stock quantities to be seperate for each npc market zone?
[10:04:17 PM] Nathan (xPhoenixXx): I want stock quantities and prices to be seperate for each faction or player market zone,  but potentially shared in the NPCs..   but that appears to complicate matters
[10:04:39 PM] Nathan (xPhoenixXx): bugger it lets make NPC and player faction work the same, give them all their own prices and stock then
[10:05:17 PM] Nathan (xPhoenixXx): that way admins like the commenter can setup some starter stations to get player trade rolling
[10:05:34 PM] Chris (midspace): We can keep the data structure as is. Just apply pricing across NPC markets.
[10:06:07 PM | Edited 10:06:21 PM] Nathan (xPhoenixXx): yup and when we add the player (or faction) markets it somehow links back to a player instead of an NPC only admins can edit
[10:06:50 PM] Chris (midspace): setting quanities is still an issue.
[10:07:01 PM] Chris (midspace): It'll have to be done from within the zone.
[10:07:22 PM] Nathan (xPhoenixXx): can we adapt the steam ID somehow so that it links back to the owning player if it is not the default NPC
[10:07:37 PM] Chris (midspace): yes. part of that code is there already.
[10:07:48 PM] Nathan (xPhoenixXx): setting prices in the zone is how all the 4x games i play work anyway
[10:07:57 PM] Nathan (xPhoenixXx): so that should work out fine
[10:08:44 PM] Nathan (xPhoenixXx): we may need some way to allow admins to refer to a market zone name tho,  for either teleporting, or remote configuring as npc markets not sharing prices makes things fiddly
[10:10:06 PM] Nathan (xPhoenixXx): is there any modifiers we can add to allow adding "portals" to the same market?   Just hoping i can have my cake and eat it too here
[10:12:17 PM] Chris (midspace): I think what I said above, with an extra rule.
set prices or quantities either from within the zone, or by zone name. If "*" , then it is all npc markets.
[10:12:30 PM] Nathan (xPhoenixXx): perfect
[10:14:59 PM] Nathan (xPhoenixXx): now the only spanner in the works, is my desire for the ability to have "roaming traders"     ie, smaller trade zones that follow a particular ship around.  But we can push that down to the bottom of the list for later..   presmably some sort of periodic xyz update to the market coords will do that nicely anyway, so that makes things all tidy for our later desired features
[10:16:19 PM] Chris (midspace): Have you seen the namespace changes for 1.117?
[10:16:50 PM] Nathan (xPhoenixXx): Do we cater for zone spheres specific to each market at the moment?
[10:17:01 PM] Nathan (xPhoenixXx): Not yet only just got home a little while ago
[10:17:39 PM | Edited 10:17:48 PM] Chris (midspace): What do you mean by cater?
[10:18:52 PM] Nathan (xPhoenixXx): does it support it as is, or is it a global setting not market specific
[10:20:09 PM] Nathan (xPhoenixXx): appears to but hard to follow xml lol
[10:20:37 PM] Chris (midspace): :|  I'm not sure I'm getting you. A market zone has it's own physical location. It only responds when someone in range makes a request.
[10:21:47 PM] Nathan (xPhoenixXx): Basically i was thinking along the lines of if we had a roaming trade ship which uses the existing market structure, could we have it much smaller, without it changing all markets,  but I think i answered my own question, it does do that
[10:21:49 PM | Edited 10:22:00 PM] Chris (midspace): Open the xml inside of Visual Studio. You can collapse parts of the structure with the small buttons on the left edge of the document.
[10:23:08 PM | Edited 10:23:23 PM] Chris (midspace): The only difficulties we have current are, when somone goes to buy something, and they are in 2 or more markets. We have not yet written logic to deal with that. It'll only let them trade with the first market they are in.
[10:23:22 PM] Nathan (xPhoenixXx): The only issue I can see is a roaming zone will likely overlap another market.. we need a way that it doesnt break stuff lol
[10:23:33 PM] Nathan (xPhoenixXx): lol jinxed
[10:23:40 PM] Nathan (xPhoenixXx): said the same thing in different words
[10:23:57 PM] Chris (midspace): buy/sell/price look up/LCD
[10:24:24 PM] Chris (midspace): ..buy needs to return market with cheapest price for the item.
[10:24:31 PM] Nathan (xPhoenixXx): we could fall back to the stockmarket logic,  if in two market zones, lowest buy price sells first unless out of stock,  and highest sell price sells first unless market out of money
[10:24:38 PM] Chris (midspace): ..sell need to return marekt with most expensive price for the item.
[10:24:57 PM] Chris (midspace): ..price look up, needs to return prices from all available markets.
[10:25:50 PM] Chris (midspace): That "unless market out of money" is the issue.
[10:26:19 PM] Chris (midspace): I have 4000 Kg of Uranium, and MarketB has the best price, but can only afford to buy 2000 Kg from me.
[10:26:46 PM] Nathan (xPhoenixXx): so sell 2000 to market A and 2000 to market B
[10:27:13 PM] Nathan (xPhoenixXx): hang on let me see if i cant find the stockmarket post i did
[10:27:22 PM] Chris (midspace): How to say, sell to Market A?
[10:27:51 PM] Chris (midspace): multi buyer logic?
[10:28:09 PM] Chris (midspace): automatically span it across all markets?
[10:28:42 PM] Chris (midspace): The seller won't know what he's getting until after he has sold it.
[10:29:30 PM] Chris (midspace): marketB may not be able to afford 2000Kg. It might only be 2Kg. marketA might end up taking the other 3998Kg for a much lower price.
[10:29:33 PM | Edited 10:29:41 PM] Nathan (xPhoenixXx): have it work like the poloniex.com crypto market ?  buy up toavailable stock at desired price, then post a buy offer for the remainder?  but that requires adding the offer system earlier
[10:30:52 PM] Chris (midspace): hmmm. leave standing offer with a market? So when it gets enough money back, it buys the rest of your stock?
[10:31:15 PM] Nathan (xPhoenixXx): something like that ye
[10:31:50 PM] Chris (midspace): But, you are in two markets currently.  Hmm.
[10:32:16 PM] Chris (midspace): were we going to have offers work globally, or per market?
[10:32:46 PM] Nathan (xPhoenixXx): One of the enh i posted which oddly i cannot find, was that the NPC market unlike the player markets has a stockmarket facility
[10:33:18 PM] Nathan (xPhoenixXx): so players could post offers that undercut or out price the NPC, and the NPC simply acts as a participant in this market
[10:33:28 PM] Chris (midspace): so only global for NPC market.
[10:33:43 PM | Edited 10:34:13 PM] Chris (midspace): and if the player market is out of coin, too bad for the seller.
[10:35:18 PM] Nathan (xPhoenixXx): there is a rough hard to follow example here https://github.com/jpcsupplies/Economy_mod/wiki/5:-Data-Structures-and-logic-considerations  using poloniex.com style logic
[10:36:09 PM] Nathan (xPhoenixXx): 
    When posting a buy at a price higher than the lowest price it should purchase all orders to the specified qty up to the price chosen. Example:
    Order book -
    Ice for sale (RRP: 40):
    10 at 40
    20 at 50
    100 at 80
    200 at 100

XXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Player requests to buy 150 ice at 100 each
    The script deducts 10*40 (400) and adds 10 ice to his inventory
    The script deducts 20*50 (1000) and adds 20 ice to his inventory
    The script deducts 100*80 (8000) and adds 100 ice to his inventory
    The script deducts 20*100 (2000) and adds 20 ice to his inventory

XXXXXXXXXXXXXXXXXXX

    After the sale the player has 150 ice, and order book looks like this:
    Ice for sale (RRP: 40):
    0 at 40
    180 at 100

XXXXXXXXXXXXXXXXXXXX

    The player who posted the 10 ice will have increased their balance by 400
    The player who posted the 20 ice will have 1000 more cash
    The player (or NPC) who posted the 100 or shares therin has 8000 more
    The player selling 200 has 200 more
    etc etc
[10:38:01 PM] Nathan (xPhoenixXx): that also clears up our auto market demand driven pricing reqest
[10:38:47 PM] Chris (midspace): I think the point of logic is, when a player is in 2 or more zones, and they try to /buy or /sell something and the preffered market does not have the stock or coin, they should be prompted to make an /buyorder or /sellorder instead.
[10:39:03 PM] Nathan (xPhoenixXx): works for me
[10:39:55 PM] Chris (midspace): I hope you're copying all this down. I'm going to to forget it.
[10:40:04 PM] Chris (midspace): :|
[10:40:30 PM] Nathan (xPhoenixXx): but if the item has stock or funds on the secondary market shouldnt it prompt if they want to trade with the second market instead
[10:41:01 PM] Chris (midspace): how to make that prompt work?
[10:41:21 PM] Chris (midspace): we haven't designed /buy or /sell work with a specific market.
[10:41:52 PM] Chris (midspace): How to make it work intuitively for the player.
[10:41:55 PM] Nathan (xPhoenixXx): if the player doesnt specify a price or a market, just buy whatever it can get from whatever markets it is in range of ?
[10:44:50 PM] Chris (midspace): A trading ship floats past, with lots of Uranium but at a very high price.
A noob is in the station and buys some uranium, but the NPC market happens to just run out, and the noob accidently buys it for an inflated price.
[10:45:17 PM | Edited 10:45:48 PM] Chris (midspace): Hmmm, I suppose if we add that Market Notification thing, said noob will know there is a second market floating by.
[10:45:34 PM] Chris (midspace): unless they happened to hit enter on the buy just as it entered range.
[10:46:09 PM] Nathan (xPhoenixXx): expand our confirmation system to prompt for overflow trades outside of npc?
[10:46:28 PM] Chris (midspace): maybe.
[10:46:30 PM] Nathan (xPhoenixXx): that would only become annoying if thre was 20 trade ships and they all had less than what you buy
[10:46:59 PM] Chris (midspace): I'm just a little concerned about buyer and seller protection. Bill shock.
[10:47:12 PM] Chris (midspace): Sounds like rain in the Eastern suburbs.
[10:47:39 PM] Nathan (xPhoenixXx): had a 10 minute blast of rain here earlier
[10:47:50 PM] Nathan (xPhoenixXx): looked to be more clouds west near you
[10:47:59 PM] Chris (midspace): Unscrouplous traders.
[10:48:20 PM] Chris (midspace): Hmm.. did we discuss trading licences?
[10:49:03 PM] Nathan (xPhoenixXx): i posted a few about it
[10:49:05 PM] Chris (midspace): What was suggested on the steam forum for having player online get a regular payment.  Could work in reverse for traders.
[10:49:27 PM] Chris (midspace): Traders must pay a monthly fee for their trading licence.
[10:49:31 PM] Nathan (xPhoenixXx): ahhhh
[10:49:43 PM] Nathan (xPhoenixXx): that is a good idea
[10:49:47 PM] Chris (midspace): And the fee is equivilant to how big a market zone they operate.
[10:50:33 PM] Nathan (xPhoenixXx): Players should be able to register up to 2 zones too
[10:50:41 PM] Nathan (xPhoenixXx): ie their space station and their flagship
[10:50:55 PM] Chris (midspace): Considering they don't even have to be online for it to work.
[10:51:25 PM] Chris (midspace): Factions could have more?
[10:51:29 PM] Nathan (xPhoenixXx): next question.. if we do faction stations.. who pays
[10:53:10 PM] Chris (midspace): Has to be a Faction account. It'll be in the Faction Founder.
[10:53:14 PM] Nathan (xPhoenixXx): as far as fee vs range..  level 1 trader - trade from a ship, small sphere, small fee, trade station, medium fee, normal sphere,   faction station, biggest sphere, or multiple "portals"
[10:53:45 PM] Chris (midspace): There is only 1 Founder per faction. You can't change it in game. Founders can leave the faction though and start a new faction.
[10:54:09 PM] Nathan (xPhoenixXx): we may need to have the founder and the leader involved
[10:54:35 PM] Chris (midspace): 1 founder. Multiple leaders. Multiple peons... I mean members.
[10:54:59 PM] Nathan (xPhoenixXx): fees (and profits) shared between leaders and founder
[10:55:11 PM] Chris (midspace): that makes sense.
[10:55:39 PM] Nathan (xPhoenixXx): if we go the wages thing, members adding stock get paid a small commission periodically ?
[10:55:56 PM] Chris (midspace): dividend.
[10:56:52 PM] Chris (midspace): A global payment system doesn't sound right to me. But a faction that pays its members does.
[10:57:11 PM] Nathan (xPhoenixXx): yes more roleplay logical
[10:57:31 PM] Chris (midspace): That encourages people to join factions, especially prosporus factions. (can I spell it?)
[10:58:11 PM] Chris (midspace): A starter faction like Blu Mining would work well then, getting people to stay joined.
[11:00:06 PM] Chris (midspace): needs some more thought on how to make the faction money grow, considering if there isn't anyone else to trade with except the npc market, they'll run out of money to pay members.
[11:00:19 PM] Chris (midspace): for the moment, I'm off to bed.
[11:00:36 PM] Nathan (xPhoenixXx): ambient npc traders maybe.. hmm
[11:00:59 PM] Chris (midspace): intriging.