Sign in to follow this  
Parusoid

Cave enabled worlds makes mod not working

Recommended Posts

Parusoid    348

Any idea why mod works fine on server without caves, but suddenly stops working when they are caves enabled, and how to remedy this?

Edited by Parusoid

Share this post


Link to post
Share on other sites
Jessie223    684

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

  • Like 2

Share this post


Link to post
Share on other sites
Parusoid    348
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?

Share this post


Link to post
Share on other sites
Jessie223    684
2 minutes ago, Parusoid said:

is there a way to fix it?

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

Share this post


Link to post
Share on other sites
Parusoid    348
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

Share this post


Link to post
Share on other sites
CarlZalph    3,131
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.

  • Like 2

Share this post


Link to post
Share on other sites
Parusoid    348
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

Share this post


Link to post
Share on other sites
CarlZalph    3,131
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.

Share this post


Link to post
Share on other sites
Parusoid    348
1 minute ago, CarlZalph said:

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.

okay thanks 

Share this post


Link to post
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

Sign in to follow this