Jump to content

Recommended Posts

a mod that works without caves but not with caves is a mod that doesn't work at all; this means your mod doesn't work for clients

when you play on your world without caves, your client and server are running on the same single process, so they don't have to communicate any information between each other, since they'll obviously already share everything they know

when you play on your world with caves, then your client and server will run on separate processes, meaning they would have to communicate information between each other: client sends input, server receives input, server sends output, client receives output, repeat

without caves:

1st process - server and client

with caves:

1st process - client - parent process

2nd process - server - forest shard

3rd process - server - caves shard

they'll communicate in the same way other players' clients connected to your server would

2 minutes ago, Jessie223 said:

a mod that works without caves but not with caves is a mod that doesn't work at all; this means your mod doesn't work for clients

when you play on your world without caves, your client and server are running on the same single process, so they don't have to communicate any information between each other, since they'll obviously already share everything they know

when you play on your world with caves, then your client and server will run on separate processes, meaning they would have to communicate information between each other: client sends input, server receives input, server sends output, client receives output, repeat

without caves:

1st process - server and client

with caves:

1st process - client - parent process

2nd process - server - forest shard

3rd process - server - caves shard

they'll communicate in the same way other players' clients connected to your server would

is there a way to fix it?

2 minutes ago, Jessie223 said:

yes, and how to fix it depends on what you're doing

in the future, when testing/debugging your mod, make sure you're doing it on a world with caves enabled

so where can i find possible solutions? looking for cave keywords in forums does not return results that satisfy me

9 minutes ago, Parusoid said:

so where can i find possible solutions? looking for cave keywords in forums does not return results that satisfy me

It really depends on what you're doing.  No one size fits all, as they say.

 

Adding interactions between client and server stuff?  RPCs + Netvars.

Doing simple things like editing components?  Probably just a server check is all that's needed.

More cases, etc.

3 minutes ago, CarlZalph said:

It really depends on what you're doing.  No one size fits all, as they say.

 

Adding interactions between client and server stuff?  RPCs + Netvars.

Doing simple things like editing components?  Probably just a server check is all that's needed.

More cases, etc.

mod is just supposed to gather data stored in default character's component and then display it using bigpopupdialog widget.
Is server check this "if GLOBAL.TheNet and GLOBAL.TheNet:GetIsServer() then" bcos i have it 

Edited by Parusoid
Just now, Parusoid said:

mod is just supposed to gather data stored in default character's component and then display it using bigpopupdialog widget
is server check this "if GLOBAL.TheNet and GLOBAL.TheNet:GetIsServer() then" bcos i have it 

You'll need a netvar if you want S->C data transfer to happen, then it'd be up to the client to listen for when the variable is dirty to refresh the widget you're using.

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
×
  • Create New...