Jump to content
skruis

Accessing user.arma3profile entries

Recommended Posts

Is there any way, via a scripting command, to access the values of entries in the arma3profile file? Example, I would like to query the gamma and brightness settings of players as they connect.

Thanks!

Share this post


Link to post
Share on other sites

profileNamespace getVariable ["variableName",nil];

Not sure the actual names of the variables your after, I'm sure someone else can help out on that side.

Share this post


Link to post
Share on other sites

I'm also curious whether there's a list with all The accessable variables. Would love to see a netter documentation in the future.

Share this post


Link to post
Share on other sites

To find out the variables you can read them using allVariables.

Code that output the variablenames to log:

{diag_log _x;} forEach allVariables profileNamespace;

With a little bit of work it should be possible to figure out what most does. I recommend using in a read-only fashion though.

Share this post


Link to post
Share on other sites
To find out the variables you can read them using allVariables.

Code that output the variablenames to log:

With a little bit of work it should be possible to figure out what most does. I recommend using in a read-only fashion though.

Are you serious? Will this work? I mean, I once dug through the scripts for options menus and didn't find these. Didn't even think of the allvariables... :mad:

Share this post


Link to post
Share on other sites

I once accidently reset my userprofile using this method so yeah it works alright, just be careful with what you use it for :)

Share this post


Link to post
Share on other sites

I personally don't think the PBO/server/etc should be allowed to perform code such as this:

{profileNamespace setVariable [_x,nil];} count (allVariables profileNamespace);
saveProfileNamespace;

Also I do not believe the scripts run in a server/session/mission should be able to access variables in the clients profileNamespace which aren't defined in the missionNamespace.

Share this post


Link to post
Share on other sites

And before anyone tries the above code: it clears your profile. Be warned. :)

edit.

allVariables profileNamespace didn't return the profile settings like gamma and brightness for example. :(

Edited by Greenfist

Share this post


Link to post
Share on other sites

Booo. I guess I'm out of luck. I was trying to query users brightness/gamma on an ongoing basis throughout the mission to see if players were adjusting it mid-mission as a 'cheat' method (from normal -> max). I know there are other ways but we simply wanted to know if someone was changing it, not necessarily to prevent it's change. Thanks for the comments though...not sure why I didn't get any notifications on this thread, I thought it was automatic for the creator?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×