A3Antistasi / antistasi-1.x

Antistasi Unofficial Community old version
http://a3antistasi.enjin.com/
39 stars 44 forks source link

Reading an external file to list members #6

Closed StefArma closed 7 years ago

StefArma commented 7 years ago

Coding into the mission the members is not optimal, however that's the only way i know so far.

Would be nice to know if is possible to read a file stored into the server folder that include the IDs of members so that each server can set their own members and avoid useless waste of time in adding people manually all the time.

DukeVenator commented 7 years ago

I'll ask quiksilver the guy behind invade and annex he has this cool member system

DukeVenator commented 7 years ago

had a chat with him and a few other modders they say it could be possible if the mission system was expanded with the ability to access non mission files but at the moment he is got a hard code members list. I don't its possible at this time:(

MooseAteJack commented 7 years ago

Have you had a look at A3Wasteland? That launches with calls to files in a local folder to override configurations in the mission file so you can update config without repacking .pbo

Uses variations on this kind of thing:

if( loadFile(configFile) != '' ) then call compile preprocessFileLineNumbers (configFile);

May be adaptable

StefArma commented 7 years ago

I checked A3wasteland but i can't find any references where it compile a path that is outside the .pbo, could you be more specific? I'm very interested

IrLED commented 7 years ago

I think it's generally a bad idea to store playerUID to publicly accessible files (part of the mission .pbo). Starting from Arma3 those are not anonymized GUIDs but ids directly related to steam profiles (try http://steamcommunity.com/profiles/[playerUID]) - might be the PII subject - BAD. What could be the solution - external member list is stored into serverside mod (in exploded form, not really the mod but data storage) and read into arma with loadfile and @ notation (https://forums.bistudio.com/forums/topic/175141-loading-settings-from-external-files/). That's the read part. To save content - external tool (web registration) has access to the exploded content of the server mod. Then ingame that file is reread (periodically, on admin action, on restart). That's how it might work.

Another solution - to make members list the part of profileNamespace, as it now stores players loadouts and campaign progress.

AlexTriada commented 7 years ago

IrLED, who are talking about the "publicly accessible files"? "A file stored into the server folder' is not the "publicly accessible file". And member list for the current campaign is already the part of profileNamespace. As i know we talking about member list for regular members, but not the member list for the current campaign

IrLED commented 7 years ago

@AlexTriada about publicly accessible files(as it is now): anyone who connects to the server downloads the mission .pbo to MPMissionCache dir. With some tools that file is exploded and content of orgPlayers/mList.sqf is exposed. E.g.

...
"76561198005296652",    //Stef
...
"76561198070770670", //DustinPeak
...

http://steamcommunity.com/profiles/76561198005296652 http://steamcommunity.com/profiles/76561198070770670

It requires some (publicly available) knowledge to perform that, but still i doubt it's the good idea to expose that info.

IrLED commented 7 years ago

And also do i want (as the workshop subscriber) to allow all those people be commanders on my private server(backdoor access), when i just host official antistasi PBO version.

IrLED commented 7 years ago

@AlexTriada I checked Wyqer's KP_Liberation GitHub repo. The mission utilizes the persistence via profileNamespace (see scripts/server/game/save_manager.sqf lines 450-630)

That correlates with

Another solution - to make members list the part of profileNamespace, as it now stores players loadouts and campaign progress.

IrLED commented 7 years ago

My findings so far Loading from external file is possible, but starting from [ARMA3 1.52] (https://dev.arma3.com/post/spotrep-00048) it's not possible by default

Changed: Script commands loadFile, htmlLoad, prepocessFile, exec* now consider file patching settings

Official discussion https://forums.bistudio.com/topic/183049-file-patching/

That behavior can be controlled/overriden by cmd option -filePatching and server.cfg setting allowedFilePatching

A3Wasteland external loading code

Legacy instructions to enable external configuration - https://github.com/A3Wasteland/Release_Files/blob/master/IMPORTANT.txt - doesn't work as is from 1.52+

Other projects on GitHub using external loading - https://github.com/search?q=isFilePatchingEnabled&type=Code&utf8=%E2%9C%93

AlexTriada commented 7 years ago

Idea! Server.cfg - params, look on to that

class Missions {

class Antistasi
{
    template = "Antistasi.lythium";
    difficulty = "Custom"; // "Recruit", "Regular", "Veteran", "Mercenary"
        class Params
        {
            members = [1st_ID... , 2nd_ID... , 3rd_ID... ];             
        };
};

};

mb this metod? do this with mission params?

server.cfg - the file stored into the server folder

IrLED commented 7 years ago

research is done