Jump to content

Pushing Events from slave to master server


Recommended Posts

Hello,

I've been trying to push events from a slave server to a master server. I naively thought that I can use the net_variables the same way they are used in all the shard_something.lua components attached to the shard_network prefab. Unfortunatly, the events are pushed only when the master set these net variables and changing these variables from a slave server is just ignored.

Is there a way to push an event from the slave to the master? I'm quite sure there is, because when a player connect directly to the cave server, or die in the cave server, the amount of player registered on the slave is beeing pushed to the master through the event "master_slaveplayerschanged". There is also this TheNet:SendSaveRequestToMaster() function which I'm not able to see.

 

Unfortunatly, how this event is called is not accessible to us, poor modders. Did someone managed to do it already, or maybe my luck will bring PeterA  or V2C on this forum for an answer?
Edited by ZupaleX
Link to comment
Share on other sites

This is possible since there are functions which Klei's guys use for synchronizing the saves (TheNet:SendSaveRequestToMaster()) for instance. We just don't have access to this functionnality as modders, or I don't know what to use.

If it's the first case scenario, then I request a way for modders to use this functionnality.

If it's the second, I'm asking what to use.

:-)

Link to comment
Share on other sites

I thought about it but it's quite a complicated process while I'm sure the request to sync the saves on the shard and stuffs like that are using much simpler protocols.

I just want the other servers on the shard to react to event pushed on other servers, like if an earthquake begin on a slave.

 

By using net variables, you can make slaves react to event pushed by the master, but not the opposite. So I'm just wondering what's hiddent in functions such as this famous TheNet:SendSaveRequestToMaster()

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...