LecksC / ASOR_Bugs

ASOR Bug Tracker
http://asor.com.au
1 stars 0 forks source link

Assigning possible non-combatants #74

Closed LecksC closed 5 years ago

LecksC commented 7 years ago

So the bug last night was caused by syncing issues. It seems like syncing to players only really (usually) works when the mission first starts; not when JIPping or reconnecting.

The only solution I can think of to this is having something like the vehicle selector objects' "fake" syncing mechanism. A tick box on players is another possible solution (like [x] Allow Non Combatant ).. but then i guess this attribute would only be reliable on the server (if at all) too.

We always had access to the module ASOR_NonCombatantModule.. so we can for example check a list of names/ids directly on that.

Since this doesn't work though.. I don't understand how syncing anything to players works reliably (like ace assigning medics, etc). If you use the module script on server only.. it will only call for players who are there when the mission starts (the rest will be null). If you use the module script on clients.. it won't be synced when people JIP. So for people who JIP I can't see any possible way that you can tell if they were synced to a module (without workarounds like the asorvs objects).

LecksC commented 7 years ago

Another option is to just run the script for everyone if the module is down.

suitsy commented 7 years ago

I did try to use the ace medical stuff one time at the start of the tanoa campaign, found it didnt work very well if at all. Seemed to change settings back to default at random.

Maybe the best way to do this then is have an attribute tickbox on the units individually, can add it to the asoredit unit settings no probs. Just need it to be accessible locally though so when the NC module kicks off we run it on all players, including jip, if the variable is false it quits?

That would still require that 'fuckedattributes' fix though yeah to set it on players? Isnt there a setting on the module settings to run it server or everywhere?

suitsy commented 7 years ago

// 0 for server only execution, 1 for global execution, 2 for persistent global execution isGlobal = 1;

suitsy commented 7 years ago

ASOREdit_NonCombatantModule is set to 2 btw

LecksC commented 7 years ago

Yeh the 'fuckedattributes' fix won't fix attributes on players though (it just runs postinit when the mission starts). I don't know if there's some kind of event like 'playerjoined' or something that we could use to send the attributes across (like the fuckedattributes fix does). Might be worth properly testing the ace tick boxes with JIP and stuff, and if they work properly, copying what ace does.

LecksC commented 7 years ago

That server execution thing unfortunately doesn't seem to 'spread' the attributes if it's already 2; I guess it just controls where the module's SQF is called which unfortunately doesn't help us here.

suitsy commented 7 years ago

In the module sqf though we are not assigning the attribute to the player though, its only set to the module. So if we had something like: if(hasInterface) then {player setVariable ["aeNonCombatant",(_logic getVariable ["aeNonCombatant",false])];};

Technically should run JIP also. could include the call for the handle_nc there as well.

LecksC commented 7 years ago

Hmm.. not following.. that would be for a tick box on the module, but then there'd just be 1 tick box for all players?

suitsy commented 7 years ago

ah shit yeah still thinking about units being synced.

well then it shouldnt be required at all NC should be able to just run on server just need to ensure the attribute is saved locally for unit, is that what doesnt happen? Thats so retarded if it doesnt.

could check it with the setPersistant that i already have on the units, see if it comes up locally on the unit.

LecksC commented 7 years ago

Not sure about where/if the 3den attribute is saved on player units.

For AI/objects/modules, 3den attributes are loaded on the server when them mission starts (some time before postinit). At this point JIP units would be null though (so it couldn't set them).

One possibility is that it's not so much the server where they're set, but where the objects are local, in which case a tick box probably would just work (NC only needs it to be local on the client).

suitsy commented 5 years ago

Task: Do new checks using AllPlayers, local attributes and local execution.

suitsy commented 5 years ago

Moved to new ticket ASOR Incogneto - closing.