Jump to content

Recommended Posts

Hi all,
I'd like to better understand the JIP parameter used in remoteExec command. I read tons of pages (most of them are rather questions than answers) and of course several times the BIKI pages about remoteExec and JIP things.

If I clearly understand, the JIP is set to FALSE by default. That means the code will not fire for a JIP as there is no "message" in queue. I guess the message is a kind of string code but there is no example or plain explanation about that.

 

Anyway, here is my 2 cent question:

I'm testing a mod on a server dedicated + client on the same PC.

A script allows me modifying the loadout on pylons of a jet. This script is located on server where the aircraft is spawned.

So, as  setPylonLoadout is effect local effects_local.gif , (really strange for a recent command!), I have to remoteExec this command everywhere. I forget the JIP thing, just remoteExecuting the command.
OK. All is fine so far.

Now, testing the mission,  as client of my own dedicated server, I can see the new pylons and they are operational.

BUT:

If I disconnect and reconnect (the server is set to let the mission run when no player), I'm joining the ongoing mission and , by some way I can't understand, I can see the new pylons on the aircraft.

 

On my mind, if no JIP parameter on remoteExec, the client has no info on what was remoteExecuted, so should see the standard loadout of the spawned aircraft.

 

So, JIP or not, in what cases?  Is there some exception on vehicles/objects? Isn't it a waste of net resource to JIP for nuts some parameters? but which ones?

Thanks for reading.

 

  • Like 1

Share this post


Link to post
Share on other sites

I can see two possible reasons.


First, have you actually verified that it is not an error on the wiki? That the command might be argument-local?

 

The second is: it is the job of the server to synchronize with joining players so they are up-to-date on the world. So a joining player's machine will receive data about all vehicles among other things. And since the command earlier was run everywhere the server has modified the pylon in its "view". Aside from wasting memory to remember the "original" loadout of the vehicle, it would also be non-nonsensical to transmit it, since the server can presume its current data is the most up-to-date (it is in fact the authority on the matter).

 

Edit: to give a guideline, you can expect most things that are under server control (local to the server) to be state sent to joining players.  Whats excluded here is variable namespaces (e.g. setVariable, getVariable, that has not been synced), and some visual commands like setObjectTexture.

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, pierremgi said:

If I clearly understand, the JIP is set to FALSE by default.

Yes.

1 hour ago, pierremgi said:

hat means the code will not fire for a JIP as there is no "message" in queue.

Yup.

1 hour ago, pierremgi said:

I guess the message is a kind of string code but there is no example or plain explanation about that.

Its a engine thingymabob.

1 hour ago, pierremgi said:

really strange for a recent command!

no, opposite actually. Adding netcode stuffs is ALOT of work and often not worth it.

1 hour ago, pierremgi said:

I have to remoteExec this command everywhere.

Are you sure? Doesn't just running it locally at the vehicle owner work?

 

https://github.com/acemod/ACE3/blob/d034324e888d28e103a401990e9446683d4df1eb/addons/rearm/functions/fnc_rearmSuccessLocal.sqf#L34

ACE only runs it locally on the owner, and it works for them.

 

1 hour ago, pierremgi said:

I'm joining the ongoing mission and , by some way I can't understand, I can see the new pylons on the aircraft.

Well the vehicle syncs its loadout to other players. Same as player inventories, or vehicle inventories or tons of other stuff.

 

1 hour ago, pierremgi said:

On my mind, if no JIP parameter on remoteExec, the client has no info on what was remoteExecuted

Correct.

 

1 hour ago, pierremgi said:

so should see the standard loadout of the spawned aircraft.

No.

 

1 hour ago, pierremgi said:

So, JIP or not, in what cases?

Depends on the commands/stuff you want to do.

For example hideObject would need JIP flag, as the object itself doesn't even know its hidden (if its remote).

 

1 hour ago, Muzzleflash said:

First, have you actually verified that it is not an error on the wiki? That the command might be argument-local? 

The wiki is correct, its effect local, technically arg global, but arg global won't work in practice, as the vehicle owner will re-sync its loadout.

So practically its arg and effect local.

local/global indicator on biki doesn't always give you a accurate indication on whether networking is used.

For example (pre Arma 3)

https://community.bistudio.com/wiki/addMagazine

Arg Local, Effect global. The command itself doesn't do any (pre-Arma3) networking, its effect is not actually global, it only adds a magazine to a local unit, and the unit itself then syncs the loadout change along with its position, animation, damage state.

It looks global in the end, but thats not the commands fault.

Basically same thing for setPylonLoadout, its also Effect Local (Same as addMagazine with how I explained it) but what you see in the end, seems like Effect Global, but thats not the command itself, but the engines independent state synchronization.

 

1 hour ago, Muzzleflash said:

And since the command earlier was run everywhere the server has modified the pylon in its "view"

Not quite. The command ran on the vehicle owner, and the vehicle owner synced its state to the server.

 

1 hour ago, Muzzleflash said:

it is in fact the authority on the matter

Arma is famous about the server basically having no authority.

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you very much for all detailed answers. I appreciate!

 

 

Well, I'm confused with the remote execution only local... on server.

I did a test and that works as far as I'm a client of my own dedicated server. But, that probably does the trick for other clients on net. I can't test.

 

I assume my code runs on server only because I'm starting with:
if ( !isServer && hasInterface ) exitWith {};  // this way, only server and headless clients (I don't have) can run the code.

 

So, understandable:

- without remoteExecution, the jet pylons are emptied (with an error on cfgWeapons in the rpt),   on client(s) of the dedicated server.   Of course, all is fine for hosted, or single player.

- that's OK as intended with remoteExecution global (everywhere)  like for any Effect Local command to be shared, I guess,

 

But, I don't understand why:

- that's seems OK for remoteExecution only where the jet is (spawned on server!) BUT fails if the command (not remoteEx) is run on server...

 

What's the difference between a command running on server and the command remoteExecuted from server... to server!  :huh2:

 

 

NB: that could be fine if someone, not in a hurry, could refine some commands about pylons:

A global command could be more useful than a local one: setPylonLoadoutGlobal   like setObjectTextureGlobal  .. For this game,  I guess it's more important to broadcast a loadout than a texture...

Share this post


Link to post
Share on other sites
2 minutes ago, pierremgi said:

only where the jet is

A vehicle is local to its driver.

If its spawned on the server, its local to the server.

A player gets in driver, its now local to the player.

The player leaves the vehicle, still local to the player until someone else gets into driver, or the current owner disconnects from the server.

 

3 minutes ago, pierremgi said:

What's the difference between a command running on server and the command remoteExecuted from server... to server!

None, commands don't know if they were remoteExecuted (generally)

Share this post


Link to post
Share on other sites
2 hours ago, Dedmen said:

A vehicle is local to its driver.

If its spawned on the server, its local to the server.

A player gets in driver, its now local to the player.

The player leaves the vehicle, still local to the player until someone else gets into driver, or the current owner disconnects from the server.

 

None, commands don't know if they were remoteExecuted (generally)

 

Yep, i know that locality changes. And there is not the case here as the (empty) jet spawns on server and nobody jumps into it.


In fact, the command works without any remote Execution on hosted server.

The script is on server.

On dedicated, the command fails but a remote execution on server (where the jet spawn) is fine for client. The Effect Local feature should need a global remote.

Difficult on understand!

 

EDITED.

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

×