guilemouse / Overthrow

An effort to balance and fix the dynamic and persistent revolution platform for Arma 3.
https://steamcommunity.com/sharedfiles/filedetails/?id=2572102841
GNU General Public License v2.0
0 stars 3 forks source link

ToDo: Check ALL money transactions to global wallet limit. #43

Open guilemouse opened 3 years ago

guilemouse commented 3 years ago

This is a nerf to global wallet capacity to reduce player carried currency,

Probably going to add something like fn_money.sqf but for checking wallet money and handling it directly into

private _bankArr = server getVariable ["OT_arr_BankVault", [0,0]];
private _serverWalletCap = server getVariable["OT_WalletCap", 2000000];
if (_playerWallet > _serverWalletCap) then {
   private _playerMoney = player getVariable ["money",0];
   private _bankMoney = _bankArr#0;
   private _bankMoney = _bankMoney + _playMoney - _serverWalletCap;
   player setVariable ["money",2000000,true]; // or use call OT_fnc_money;
   player setVariable ["OT_arr_BankVault", [_bankMoney, _bankArr#1], true];
}; 

Mechanically applying after finishing #42 #24.

Kept here to be a documentation of modifying the original Overthrow code.

Purpose: To SKIM away extra money into the bank, but not BLOCK earning more money if player happen to have more loot to sell. Reducing exploit harming backend Arma servers.

Hypothesis: Players cannot carry more than "OT_WalletCap" worth of money, thus reducing import/export trade and moving end-game money to priests.

Prediction: Probably priest becomes the new exploit, but is easier on server load compared to import/export exploit currently.