Jump to content

Why most of mods need to be host to be used ?


Recommended Posts

Hello, I'm wondering, I've looked for some mods but I don't understand why some of them need to be host to be used (not aiming the one which add new weapons...and so on) :

Example : display value foods mod, it can only be used by the host whereas it's just a ui mod...

or extended indicators (only works for the host)

and so on...

Link to comment
Share on other sites

  • Developer

Hello,

For Display Food Values, I don't have any idea.

 

But concerning Extended indicators, only the host know where are every other players. A client only knows the player that are close to him, that is why the extended indicator does not work

 

Link to comment
Share on other sites

@Odinfrom, The reason DFV only works for hosts is because the data it's accessing only exists on the host. What the client sees is that they have a food item "seeds", they tell the host that they want to eat "seeds", then the host says "okay, you ate the seeds, and it gave you 5 hunger"-- so until the eating event actually occurs, the client doesn't know the hunger value of the food.

Link to comment
Share on other sites

@Odinfrom, The reason DFV only works for hosts is because the data it's accessing only exists on the host. What the client sees is that they have a food item "seeds", they tell the host that they want to eat "seeds", then the host says "okay, you ate the seeds, and it gave you 5 hunger"-- so until the eating event actually occurs, the client doesn't know the hunger value of the food.

 

So the developer will have to dump all the informations and save them locally on the mod to make it work for clients? I can't understand why it's not possible for the client to get these informations, they should be in the client somewhere, but i know nothing about how DST works or mod development so i guess i'm not the best person to comment about this.

Link to comment
Share on other sites

the developer will have to dump all the informations and save them locally on the mod to make it work for clients?
 Pretty much, yes. Either this or write some new networking to test-eat and get the results from that-- which would probably be the better route in the long run, but it would be harder to write.
Link to comment
Share on other sites

 Pretty much, yes. Either this or write some new networking to test-eat and get the results from that-- which would probably be the better route in the long run, but it would be harder to write.

 

Or make the mod auto-update the dumps, you would have to write code to dump it anyways, so all you would have to do after any update is create a lobby where you are host and do something like ctrl + alt + g to "update" the mod, sounds like a viable auto-update solution. Not sure if you can write files with mods though.

Link to comment
Share on other sites

@Scrumilation, Well, the reason the custom networking approach would be desirable is that there could be host-only mods that just change tuning values, and thus the values from eating things. So even though the client had a dump from hosting previously, the dump would be incorrect. 

 

Didn't think of that, but do you think that the other alternative is even possible? Juding by how things are looking right now the server probably wouldn't allow people to eat foods that they don't even have on their inventory

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...