iceman77 18 Posted October 28, 2014 (edited) Solved. Trying to addscore prematurely before I had control of the unit. The variable was infact being stored into profilenamespace properly. On another note a discussion has begun on namespaces in general. Feel free to jump in and lend advice. ------------------------------------------------------------------------------------------------------------------------------------------------------ What exactly is needed to save the player's score in to his profile so that it's persistent when he rejoins? I'm tinkering with profileNameSpace in the MP editor. I can't get the score to stick when I restart. I would like to avoid any external database stuff.. or w/e. I should be able to save a variable to the player's profile? Any help is appreciated. Some client script if (isDedicated) exitWith {}; waitUntil {!(isNull player)}; _score = profileNameSpace getVariable ["PLAYERSCORZ", 0];// default to zero if the variable is nil in the namespace, else retrieve the data ( ?? ) player addScore _score; // Add the saved score to the player some other script _score = score player; profileNameSpace setVariable ["BCMPLAYERSCORE", _score]; // Set the player's score (number) to the variable, in profilenamespace ( ?? ) saveProfileNamespace; // Save the profilenamespace Edited October 29, 2014 by Iceman77 Share this post Link to post Share on other sites
dreadedentity 278 Posted October 29, 2014 Glad I could help Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 He's glad. That he could help. Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 Incidentally (and this is one of those annoying and unhelpful comments), wouldn't those in the know be able to exploit such a scoring system? Share this post Link to post Share on other sites
iceman77 18 Posted October 29, 2014 (edited) Yeah. Luckily, in arma, a guy with a pistol can > a guy with an AR with a TWS. If someone wants to exploit cheat, then by all means. Cut half of the purpose of the game mode out for themselves :p ---------- Post added at 02:02 ---------- Previous post was at 01:43 ---------- Now that you bring it up though.. would it be better (possible even) to store the player's UID and score, in an array, on the server. When the player connects, check against the UID, and add the saved score? Edited October 29, 2014 by Iceman77 Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 I guess you could do that but, 1. The data would be lost across restarts 2. When you say 'add the saved score' I assume you mean initialise the player's score from the data stored by the server, and not add the player profile score to the server saved score What happens on a dedicated server when you saveProfileNamespace? That might be a simple option for persisting score data when the server session ends or restarts, but could possibly lead to slower operations at some points if the profile file gets too big. I'm a noob, so take all this with a pinch of salt. Share this post Link to post Share on other sites
iceman77 18 Posted October 29, 2014 What happens on a dedicated server when you saveProfileNamespace? Was wondering this. Share this post Link to post Share on other sites
cuel 25 Posted October 29, 2014 i think it's reset on every restart Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 If it works like a client, and I don't see why not, then it should get written to the profile .vars file. When setting up a dedi server, you configure the profile folder, so there's gotta be a reason. Wouldn't take much to test it, I guess. @Iceman77: do you have the requirement to persist scores across sessions at all? If it's a round based game mode then perhaps our discussion is moot. Share this post Link to post Share on other sites
iceman77 18 Posted October 29, 2014 It's a game mode with ranks. Player's rank up via their score. The BI respawn inventory menu populates based on the players rank. I chose to store the score instead of rank. I've my reasons atm for that. Anyhow, If not full persistence, I would atleast like some sort of persistence. Seems it's a balancing act of longevity and security. Which do i care more about atm? Idk LOL. On one hand it doesn't bother me personally if others want to take away one of the goals of the game mode by being douchebags ( dabbling with their profile variables ). On the other hand, it's technically not considered fair. People will complain. People will complain no matter what.. but why give them one more reason you know? Even though a guy with basic gear can > a guy with "superior gear". Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 Yeah skill based is fair enough but it still might ruin game mode for others. Sounds like you definitely need some form of persistence. I'll be watching this thread to see what happens. Share this post Link to post Share on other sites
iceman77 18 Posted October 29, 2014 If I can't get legit persistence, I may tone down the scores needed to obtain the upgrades. So it's all obtainable by the end of the scenario if you've been kicking but. MmM. Idk, I guess at that point I could just go with temporary server persistence. /sigh, there are choices, but no good simple ones. ( ?? ) Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 Are the database options too complex? I've not looked at them myself. Share this post Link to post Share on other sites
iceman77 18 Posted October 29, 2014 Idk. I never messed with any of those things. That would require whoever hosts the scenario to have the database setup and such ? Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 I'd assume so, but I also assumed the game mode was meant for a hosted scenario. The db approach would probably give you beat performance and scalability long term, but perhaps you can design your approach so that you can use a simpler interim method while being able to switch to db mechanism easily in future without many changes. Share this post Link to post Share on other sites
das attorney 858 Posted October 29, 2014 If you're looking at stat systems and soforth then it's worth browsing Unknown Cheats forum to see weaknesses in designs and how they try to beat any security you put in the system. Lots of good info on there. Share this post Link to post Share on other sites
iceman77 18 Posted October 29, 2014 LOL yeah. Some pretty funny angering posts on there. You just know the person or persons involved in any of the topics there are part of the reason why arma public MP is a cesspool :p. But I digress. I guess countering what they're doing is the only effective ways.. Share this post Link to post Share on other sites
A.Cyprus 16 Posted October 29, 2014 Know your enemy and all that... Share this post Link to post Share on other sites