Page MenuHomeFeedback Tracker

to solve dozens of your creapy MP syncronisation Problems
Acknowledged, WishlistPublic

Description

to solve dozens of your creepy MP syncronisation problems.
Can you integrate an hidden unit(module), which has no name and no identity to the game?
A unit (module) which can be grouped to players, but never will be shown in the command bar of the leader or is able to become leader itself.

PLEASE!

Details

Legacy ID
839754699
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Feature Request
Additional Information

THANKS

Event Timeline

CHIMERACyborg edited Additional Information. (Show Details)Sep 16 2015, 9:37 PM
CHIMERACyborg set Category to Feature Request.
CHIMERACyborg set Reproducibility to N/A.
CHIMERACyborg set Severity to None.
CHIMERACyborg set Resolution to Open.
CHIMERACyborg set Legacy ID to 839754699.May 8 2016, 12:43 PM

I don't understand the interest but i would;
Do you have some examples for "dozens of problems"?
What difference between your solution and a hidden unit or a logic?

I'm trying to improve my knowledge for MP scripting in the jungle of functions, arguments, effects localities but I can't figure what improvement your method could afford. Please, explain for other dozens of sripters like me.

for example:
select leader should be Argument Local, Effect Global, but this is not correct.

[[_group,_unit],"selectLeader",owner _unit,true] call BIS_fnc_MP;
all other client machines show the leader correct in GUI.

[[_group,_unit],"selectLeader",true,true] call BIS_fnc_MP;
all other client machines really know who is leader now.


group assigned taskmodules can only syncronized to JIP Players if there is a kind of "AI_group_curator" present on map.

I create my own curator unit.

mission.sqm:
class Item0
{
position[]={1166.734,4.3031454,674.03595};
offsetY=9000000;
id=141;
side="WEST";
vehicle="LOGIC";
leader=1;
skill=0.5;
text="Delta_Curator";
init="Delta = group this;this enablesimulation false;this disableAI ""TARGET"";this disableAI ""MOVE"";this disableAI ""AUTOTARGET"";this disableAI ""ANIM"";this disableAI ""FSM"";this disableAI ""AIMINGERROR"";this disableAI ""TEAMSWITCH"";this disableAI ""SUPPRESSION"";this disableAI ""PATHPLAN"";this disableAI ""THREAT_PATH"";this disableAI ""WAYPOINT_STOP"";this setName ["" "","" "","" ""];group this setGroupId [""Delta""];if (isServer) then {null = [this] execVM 'LeaderWatchDog.sqf';};";
syncId=47;
synchronizations[]={31,3,23,19,43,9};
};

the syncronized Objects are the task modules.
the "LeaderWatchDog.sqf" prevent the curator from being Leader and assign the leadership to the right player:
private ["_unit","_group","_highest","_ranks","_highestranks"];
if (!isServer) exitWith {};
_unit = _this select 0;
_group = group _unit;
_ranks = [];
_highestranks = [];
while {alive _unit} do {
waitUntil{sleep (floor random 2 + 1);count units _group > 1 || {_x in units _group} count [_unit] == 0};
waitUntil{sleep (floor random 2 + 1);{isPlayer _x}count units _group > 0 || {_x in units _group} count [_unit] == 0};
waitUntil{sleep (floor random 2 + 1);leader group _unit == _unit || {_x in units _group} count [_unit] == 0};
if ({_x in units _group} count [_unit] == 0) then {[_unit] joinsilent _group} else {

				for [{_i= 0},{_i <= (count units _group) - 1},{_i = _i + 1}] do {if (isPlayer (units _group select _i)) then {_ranks pushback (toUpper(rank (units _group select _i)))} else {_ranks pushback "KIUNIT"};};
															if (_ranks find "COLONEL" != -1) then {_highestranks pushback (_ranks find "COLONEL")};
															if (_ranks find "CAPTAIN" != -1) then {_highestranks pushback (_ranks find "CAPTAIN")};
															if (_ranks find "LIEUTENANT" != -1) then {_highestranks pushback (_ranks find "LIEUTENANT")};
															if (_ranks find "SERGEANT" != -1) then {_highestranks pushback (_ranks find "SERGEANT")};
															if (_ranks find "MAJOR" != -1) then {_highestranks pushback (_ranks find "MAJOR")};
															if (_ranks find "CORPORAL" != -1) then {_highestranks pushback (_ranks find "CORPORAL")};
															if (_ranks find "PRIVATE" != -1) then {_highestranks pushback (_ranks find "PRIVATE")};
															if (_ranks find "KIUNIT" != -1) then {_highestranks pushback (_ranks find "KIUNIT")};
															_highest = (units _group) select (_highestranks select 0);
															[[_group,_highest],"selectLeader",true,true] call BIS_fnc_MP;
															_group selectLeader _highest;
														  _ranks = [];
														  _highestranks = [];
														  sleep 1;
														  			};
										    };

This unit have a Voice,-have a icon,-is present in Leaders GUI and it have a 3d group indicator.
this "sideeffects" have to be removed. :)
and maybe a command like this: http://feedback.arma3.com/view.php?id=25658

with solve dozens i mean the potential of this "AI_group_curator" module, if you call it that way.

btw. sorry for my bad English. :(

"select leader should be Argument Local, Effect Global, but this is not correct.

[[_group,_unit],"selectLeader",owner _unit,true] call BIS_fnc_MP;"

The group should be local not the unit

[group _unit, _unit] remoteExec ["selectLeader", groupOwner group _unit];

Well, this new command seems very powerful. Interesting for signed addon. On the other hand, the cfgRemoteExec class could be a little bit difficult to manage in regard of global/local configs.

hm...?
a group can be local on server even if leader of the group is a player?
i thought that groups are local where the leader is local?
and the "selectleader" command has to be executed where the new leader is local?

in case of Jip and in case that mission editor leader is AI, a client takes his info about leadership from the mission file. If troops leave a plane for example, the client or the server order the pilot to land and collect the lost "cargo". Even if leader is a player. Only a jip persistend execution of selectleader on all clients can prevent this behaviour!

remoteExec seams more powerful than BIS_fnc_MP. whats the exact difference?

Why is this so difficult to understand? selectLeader needs to be executed on the PC where THE GROUP, for which new leader is being selected, IS LOCAL.

the execution of selectLeader was successful when:

A - The new Leader is shown in everyones GUI?
or
B - All Machines know who is Leader?

it should be A, but it is B.

it is´nt difficult, is´nt it?

the execution of selectLeader was successful when

leader _group returns new leader of the _group

To come back to "remoteExec", I understand (reading BI doc), that selectLeader must be declared in a CfgRemoteExec class in config.cpp or description.ext ??
A little bit heavy or i missed something.

in the mission this issue depends to, there was a plain with a players containing AI group in a dedicated environment.

The group should eject from a plain and the Groupleader is AI unit.
The pilot and the copilot are in a different Group!

Now every time the first Units began to jump out, the AI Commander ordered the Pilot to land, and the pilot will do so.

Only when the server executed a command "groupXy selectLeader (some players unit)" and this command is executed in this way:
[[_group,_unit],"selectLeader",true,true] call BIS_fnc_MP;
it was not necessary that the new leader was the first Jumper!

Maybe now its clear?

someting orders the Pilot to land, this happen because the leader is missing soldiers or the pilots are missing cargo. As long as there was one Unit in cargo with a locality which is neither locality of Server nor Group Owner and the selectLeader command is not executed on the client this unit is local, the pilot starts landing!

But anyway, you can close this, because there is way to walkaround.

Chimera, what's your walkaround? I hope it's not your fake unit.

Thanks to KK, there is a way to make things clear for a simple problem: always have a human leader (player), even if leader slot isn't chosen:

for "_i" from 0 to count allPlayers -1 do {
_player = allPlayers select _i;

if (!isPlayer leader _player) then {
    {
        if (isPlayer _x && {!isServer or (isServer && count allPlayers <2)}) exitWith {
            [group _x, _x] remoteExec ["selectLeader", groupOwner (group _x)];
        };
    _x doFollow (leader group _x);
    } forEach units _player;
};

};

The combination of selectLeader, groupOwner and remoteExec works fine: units obeys to the new leader.

And yes, a selectLeaderGlobal could be great, but please change your title and don't add your solution. Describe the problem, the aim and the way to reproduce what you say.

+1 cause there is something to do with leaders in MP.