Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global player balance #175

Open
jpcsupplies opened this issue Nov 13, 2017 · 1 comment
Open

Global player balance #175

jpcsupplies opened this issue Nov 13, 2017 · 1 comment
Labels

Comments

@jpcsupplies
Copy link
Owner

jpcsupplies commented Nov 13, 2017

Look into the possibility of reading/writing a special file in the economy data folder. This file is managed by a 3rd party application which retrieves a given players bank balance from a website and populates that on the current server using one of those special files. It also needs to report changes back to a file that the tool then updates the web based balance with.
Could probably use basic html post/get functionality combined with some sort of security token to prevent people tampering with the balances.

Data file format: steamid, balance

Would need security on both the local files and the data being sent to the website.

This would be an option feature. If it is enabled - then on connect the server would create a query file, the 3rd party app would then pull the players balance down from the website and that is created as the players balance. Likewise changes to player balance (buys/sells/trade zone transactions) would write to the export file to update the server balance.

If the webserver goes down the game still works ok, just transactions build up in the export file, and we never get balance updates back - so it runs off local data. Or something along those lines.

@jpcsupplies
Copy link
Owner Author

jpcsupplies commented Dec 5, 2017

Other misc thoughts. Steam forces a player to play only one game/server at a time. So -
Get player balance from global server on connect +
Update player balance on global server on disconnect

Should work reasonably well theoretically. Only catch may be if player insta travels to another map and the get balance request completes on new server before the old server sends the update balance. Potentially causing money to be lost (or gained) depending what changes to their balance occured on the old server...

Seems I may have to think about this some more..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant