[Gameplay] - Host Client-Side Light and Grue on non-dedicated servers.


Kzisor

Recommended Posts

Bug Submission:

Category: Gameplay
Issue Title: Host Client-Side Light and Grue on non-dedicated servers.
Issue Description: The grue component checks to see if the player is not IsInvincible, not IsDead and not IsInLight.

The thresh hold for light is set at 0.075 and the lowest light thresh hold where a person can see is at 0.20.

There is no possible way to create a client side light source which is also usable by the host as a non-dedicated server host with how the current light mechanics function.

Note:
On a dedicated server this is irrelevant because the "host" isn't actually the server. This means that the "host" is able to use the client-side light sources as a normal client would.

Steps to Reproduce: Create a minimal client side light source on a non-dedicated server.

Have the client stand in the "radius" of light, but light will not be shown.

Change the phase to night and wait for the grue to attack.

Note:
As a non-dedicated server host this light source will protect other players.

Link to comment
Share on other sites

  • Developer

Hey Kzisor, wanted to make sure I'm understanding your issue correctly. You're playing on a dedicated server (which means, necessarily, that you're a client player), and trying to debug spawn a light using the console. You can see the light in your game, but it doesn't work to protect you or other players from Charlie. Is that correct?

 

Just to clear up how dedicated servers and the console interact: if you DON'T have admin on the server, nothing you enter in the console will work properly. If you DO have admin on the server, you can enter console commands, but you have to press Control in order to toggle on the console's Remote functionality.

Link to comment
Share on other sites

@SethR, No, he's saying that for all players EXCEPT hosts, you can make light that's purely visual, but if the host makes a light, it protects people from Charlie if they're nearby.

 

He's been working on getting night vision to be a functional and consistent property (which will be needed if Woodie is to function the same way). As you can imagine, having a character's night vision protect other players from darkness is not something you want, so having no way to make it work for hosts is a major limitation.

Link to comment
Share on other sites

Hey Kzisor, wanted to make sure I'm understanding your issue correctly. You're playing on a dedicated server (which means, necessarily, that you're a client player), and trying to debug spawn a light using the console. You can see the light in your game, but it doesn't work to protect you or other players from Charlie. Is that correct?

 

This is incorrect. The issue that I tried to propose is very difficult to put into text; I'll try to use an example.

 

Example:

If we try to create Woodie and his Werebeaver form, once the Werebeaver goes into that mode anyone near him within the light radius is actually protected by Charlie/Grue on non-dedicated servers.

 

If you were to play Woodie in Werebeaver form on a dedicted server, the light would not protect others from Charlie/Grue.

 

The issue is in how the servers are handled inside the Don't Starve Together client. You are acting as the host/server and any type of light source you add to your character will automatically be transmitted across the network. However, when you play on a dedicated server because you are not the "host/server" you can effectively use the light source without affecting other players.

 

If you are still having issues understanding, you can install this mod and play as Wilson on a non-dedicated server and then on a dedicated server with another player as a different character. You will see that whenever you host the server through the Don't Starve Together Client that all additional players will become immune to Charlie/Grue. You should also notice on the dedicated server that they are not immune to Charlie/Grue; this is the effect which we want for nightvision.

 

The direct cause is how the server is hosted. This is probably a well know issue inside Klei, but I wanted to point it out specifically that the cause is from how the server is hosted in the Don't Starve Together Client. If there is a way to replicate the dedicated server while hosting a server from the Don't Starve Together client the problem should be completely fixed. (I.E. create a host slot and make the person creating the server a client.)

 

I hope that I explained this a little better in this post. As always if you have additional questions I'm more than happy to give as much information as humanly possible.

 

~Kzisor/Ysovuka

Link to comment
Share on other sites

If I understand, it's like if you were to import moggles to DST and put them on as the host, others would be protected by the light you're seeing by, right? But this only happens on non-dedicated servers, as nobody is the host?

 

Can you remove the network component of a light source, so it becomes invisible to everyone except the person with night vis or warebeaver? or am I thinking to simplistically?

Link to comment
Share on other sites

So are we looking to modify the grue light calculations area to only protect you if ThePlayer.components.nightvision is the source of the light? Else just handle it like normal, as the light source is not from a warebeaver nightvision, so everyone should see it?

Link to comment
Share on other sites

So are we looking to modify the grue light calculations area to only protect you if ThePlayer.components.nightvision is the source of the light? Else just handle it like normal, as the light source is not from a warebeaver nightvision, so everyone should see it?

 

If you download the mod you'd see I already did the calculations and math in the original post. The problem specifically is that even with my modifications the light thresh hold for darkness and light are too low that it's impossible to create nightvision where a player can see, but other players won't be protected. If we increase the thresh hold then we need to rework all light sources.

 

The only solutions to the problem is to not treat the admin/host as the server such as with dedicated servers. This will require Klei to change how servers are hosted in the game client. It would also mean Klei could force Remote on the console as the default option and reduce the need for the additional code associated with it.

 

They could also indicate the source of the light in the grue component and if it hastag(player) and not source == ThePlayer then grue still attacks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.