lords8n 0 Report post Posted August 21, 2017 If this has been placed in the wrong area please advise?1) The real question for this thread: How do I read and write to the Exile database via script? I know this question might seem simple enough, but i've never had to do it, and can't find immediately any example to go by.2) Do you think what I present below is a good idea? Why/Why not?The Idea... The premise of this idea is to have players earn the ability to rearm vehicles at their base via rearm vehicles and/or VG recycling. The desired affect is to slow down people sitting in their bases with tanks and MRAPS, etc... and just firing away with only the minor inconvenience of putting the vehicle away and retrieving it from their VG to rearm, or rearming with a rearm vehicle.How it is imagined to work... All vehicles in the VG are rearmed at restart. Each player or vehicle (undecided which would be the best route here) is given two free rearms at restart. Each player can earn another rearm for a predetermined amount of tabs earned, tracked possibly via SOLD transactions. There would be a cap on how many rearms each player can earn per server session, and rearms reset to two at restart. The intent is hoped to be that, regardless if just hauling a load of loot to the trader to engage in transactions that earn rearms, the player will be forced out of their base. This is hoped to eliminate players spending entire server sessions camping in their bases with armed vehicles shooting at anything that moves. Player or vehicle based: This is a question still undecided. Although per-vehicle sounds good, having 20 Gorgons in a VG, plus the two starting rearms, would give 22 effective rearms at restart. So a player based earning system may be the best direction. I am a very long time MS SQL DB developer in my 9to5. I've done a good amount of work with the Exile DBs via Navicat, and have created a nice library of queries and reports to aid in daily administration of our GADD Militarized Malden and Tanoa Exile servers. So I am well able to handle any DB coding required, I just need to know how to do it from within a script. From the DB side this venture would simply require a new table containing the fields; account_uid, accumulated_tabs, current_rearms. Data types set to match with the current DB and as necessary for the task. A config file would hold the static values; Starting_Rearms, Max_Rearms, Rearm_Cost From a scripting perspective I imagine I would like to leave things as database-centric as possible. Some ideas for functions (thinking from a database point of view of course)...Init_Rearms - Initialize the rearm table at restartCalc_Rearm (account_uid, tabs) - Check current_rearms and deny if equals Max_Rearms...ELSE...Add tabs to accumulated_tabs of account_uid. If > Rearm_Cost add one to current_rearms, set accumulated_tabs to left over tabs, message player that they earned a rearm. Check if left over tabs > Rearm_Cost. If yes loop above...Else exit.bool Allow_Rearm (account_uid) - Check if a player is allowed to rearm (current_rearms > 0). Denied message, or just deny the rearm, if not, allow rearm and subtract one from current_rearms if allowed. I know this is a lot to read and I apologize. I'm just looking for a starting point, and the thoughts of others that may steer me away from this for reason I have yet to think of. Thanks for any help or thoughts on this. lords8n Share this post Link to post Share on other sites