jpcsupplies / Economy_mod

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

File Structure #47

Closed midspace closed 8 years ago

midspace commented 8 years ago

Currently we have two files. Bank_GameName.txt Itemlist_GameName.txt

Represented by: BankAccountStruct MarketStruct

From what I see, we will also need to store: Trade Offers - Current sell or buys with other players that have not yet been finalized. Market Listings - Open offers to buy or sell items at player set prices.

I don't want us to go down the path of creating a file for each and every content. As it is: Market items will not grow (unless new mods are added mid game). Trade Offers is a temporary store. Offers will expire and disappear eventually. Market Listings can grow substantially. Player Bank Accounts will only grow dependant on the number of players, and we can control cleanup based on how old an account is.

I recommend combining all this into one file, and not splitting it up. The Xml Serializer is suitable fast to load and save the content, even with thousands of records. The problem I'm most concerned about having too many files to manage and write to the Storage Path. If a Server Administrator decides to copy and rename a game, they will have to find every file we've created and rename them, and hope they got them all. Having one file, makes backup and managing this much easier.

midspace commented 8 years ago

More detail on future plans in the wiki: https://github.com/jpcsupplies/Economy_mod/wiki/5:-Data-Structures-and-logic-considerations

midspace commented 8 years ago

It looks like after talking with @jpcsupplies that we'll split the content into two files, consisting of:

  1. Admin configurable items, like default buy and sell prices for items. (which would only be applied when the item does not yet have a price)
  2. All other content, which the Admin should not be modifying.
jpcsupplies commented 8 years ago

:+1:

jpcsupplies commented 8 years ago

i think we are pretty much sorted now with the in-game commands control all features directive now.; as such concern over friendly to edit files is now redundant, so long as an admin remembers to add his/her self to the admin list on their ds