Search the Community
Showing results for tags 'net'.
Found 2 results
Hey, I have a quick question about the networking behind DST. (It seems like @V2C or PeterA talk about networking more than most devs) My brother and I made a mod that allows people to change client mods in-game, and it reconnects people back to the server. We do this in our modmain: GLOBAL.JoinServer(GLOBAL.TheNet:GetServerListing()) Before this update, the world didn't pop up a screen saying "Duplicate Connection" when we used this line. My question is whether you guys may have changed a check in the backend that we can't see (like in TheNet), because now our mod is pretty difficult to adapt... (We have a way of retrieving the server's IP address and using TheNet:StartClient, but we're still figuring out how to make it work properly since it has worked in the past...)
What I'm trying to do: -Have the host choose some configurations and store the settings somewhere -Have the client download those settings and use them I'm a bit confused about where things are stored and retrieved from as well as just basic syntax. For example if in modmain.lua as a host I had: net_size = net_int(inst.GUID, "size", "size_dirty")net_size:set(1)Can the client get at it by doing: local size = net_size:value()And can this be done in the modmain.lua or would I have to go about it like in The Hunt mod and create a component with a class and hook it all in that way? Also, what -is- the proper syntax for creating the net variable, assigning a value, and retrieving a value if any of the above is off the mark?