Jupiters Posted August 16, 2015 Share Posted August 16, 2015 I found a mod "Drop yer Stuff" on steam workshop. But unfortunately, it crashed my dedicated server. The code in the modmain.lua is quite simple : AddComponentPostInit("playerspawner", function(PlayerSpawner, inst) inst:ListenForEvent("ms_playerdespawn", function (inst, player) if player and player.components.inventory then player.components.inventory:DropEverything(false,false) end end) end) I just dont understand why.Will help me figure out the reaason why my server crashed. And by the way, the mod make all player drop everthing when they left the game. How to add I whitelist which can be added and deleted in game? Link to comment Share on other sites More sharing options...
DarkXero Posted August 16, 2015 Share Posted August 16, 2015 @Jupiters, I don't find anything wrong with that code.Post the log.txt of your dedicated server crashing. How to add I whitelist which can be added and deleted in game? AddPlayerPostInit(function(inst) local _OnSave = inst.OnSave inst.OnSave = function(inst, data) if _OnSave then _OnSave(inst, data) end data.dontdrop = inst.dontdrop end local _OnLoad = inst.OnLoad inst.OnLoad = function(inst, data) if _OnLoad then _OnLoad(inst, data) end inst.dontdrop = data and data.dontdrop endend)local function Whitelist(num) local player = GLOBAL.AllPlayers[num] if player then player.dontdrop = true print("Player ", player.name, " using ", player.prefab, " with id ", player.userid, " got added to the whitelist.") endendlocal function Outlist(num) local player = GLOBAL.AllPlayers[num] if player then player.dontdrop = nil print("Player ", player.name, " using ", player.prefab, " with id ", player.userid, " got removed from the whitelist.") endendlocal function SeeList() print("Start whitelist") for k, v in pairs(GLOBAL.AllPlayers) do if v.dontdrop then print("Player ", v.name, " using ", v.prefab, " with id ", v.userid) end end print("End whitelist")endGLOBAL.w_add = WhitelistGLOBAL.w_rm = OutlistGLOBAL.w_see = SeeListnum being the number on the left of the avatar, on the list you see when pressing tab. w_add(num) adds the player with that num to the whitelist.w_rm(num) removes the player.w_see() prints the whitelist on the server console. Link to comment Share on other sites More sharing options...
Jupiters Posted August 17, 2015 Author Share Posted August 17, 2015 @DarkXero : The server did crash exactly. It functions normally. The problem is that I can not log in. When I tried to log in as a client, the game became no response and I had to shut it down. Howerver, the server still functioned. Link to comment Share on other sites More sharing options...
Doctor Donna Posted August 17, 2015 Share Posted August 17, 2015 @DarkXero : The server did crash exactly. It functions normally. The problem is that I can not log in. When I tried to log in as a client, the game became no response and I had to shut it down. Howerver, the server still functioned.@Jupiters @DarkXero need this file from your dedicated server to check out the problem. Link to comment Share on other sites More sharing options...
Jupiters Posted August 17, 2015 Author Share Posted August 17, 2015 need this file from your dedicated server to check out the problem. @EulenMarie : Sadly, I can't see the picture... @DarkXero : Now I can add whitelist. Thx. But,,,if players are not in the server at present and I used the command: w_see(), the list is blank. It seemed that the command only displayed the player who was in the server and in the whitelist. How to show all whitelist. I know it sounds difficult. But I still hope you may give me some sweet solutions. Link to comment Share on other sites More sharing options...
Doctor Donna Posted August 17, 2015 Share Posted August 17, 2015 @EulenMarie : Sadly, I can't see the picture... @DarkXero : Now I can add whitelist. Thx. But,,,if players are not in the server at present and I used the command: w_see(), the list is blank. It seemed that the command only displayed the player who was in the server and in the whitelist. How to show all whitelist. I know it sounds difficult. But I still hope you may give me some sweet solutions. Oh oO Go to your server host in your files and search "log.txt" Link to comment Share on other sites More sharing options...
Jupiters Posted August 17, 2015 Author Share Posted August 17, 2015 Go to your server host in your files and search "log.txt" @EulenMarie : Thanks @DarkXero : The dedicated server is normal but my client connected time out.Here are some line in log.txt of DST, not the Dedicated server: [00:01:18]: Could not find anim build temperature[00:01:18]: Could not find anim bank [temperature][00:01:18]: Can't find prefab globalicon_network [00:01:18]: Error deserializing lua state for entity chester[100037] - Failed to read net var data[00:01:18]: RakNet detected a missing replica (12801)[00:01:18]: RakNet detected a missing replica (8705)[00:01:18]: RakNet detected a missing replica (83972)[00:01:18]: RakNet detected a missing replica (56912)[00:01:18]: RakNet detected a missing replica (165163)[00:01:18]: RakNet detected a missing replica (200835)[00:01:18]: RakNet detected a missing replica (32917)[00:01:18]: RakNet detected a missing replica (196896)[00:01:18]: RakNet detected a missing replica (120861)[00:01:18]: RakNet detected a missing replica (92276)[00:01:18]: RakNet detected a missing replica (182685)[00:01:18]: RakNet detected a missing replica (149143)[00:01:18]: RakNet detected a missing replica (166684)[00:01:18]: RakNet detected a missing replica (93808)[00:01:18]: RakNet detected a missing replica (157)[00:01:18]: RakNet detected a missing replica (8195)[00:01:18]: RakNet detected a missing replica (117951)[00:01:18]: RakNet detected a missing replica (140288)[00:01:18]: RakNet detected a missing replica (33280)[00:01:21]: CURL ERROR: Connection timed out after 5000 milliseconds Can your find out what's going on? And I attached the whole log.txt.log.txt Link to comment Share on other sites More sharing options...
DarkXero Posted August 18, 2015 Share Posted August 18, 2015 @Jupiters, maybe it's the "Complete Your Map" mod. Try disabling it? But,,,if players are not in the server at present and I used the command: w_see(), the list is blank. It seemed that the command only displayed the player who was in the server and in the whitelist. How to show all whitelist. I know it sounds difficult. But I still hope you may give me some sweet solutions. Ah, yes, the idea is that the whitelist is regenerated by looping through the players present. But we can make the list get saved somewhere else. I attach a new thing. Commands:num being the number on the left of the avatar, on the list you see when pressing tab. w_add(num) adds the player with that num to the whitelist.w_rm(num) removes the player. w_see() prints the whitelist on the server console.Prints ID and name associated with the ID at the moment of adding it to the list.w_addid(id, name) adds the ID and a name to the whitelist.So if you know the ID, you can insert it, with any name you want.If empty, the name will say "Unspecified".w_rmid(id) removes the ID from the whitelist.Useful with w_see().Test.zip Link to comment Share on other sites More sharing options...
Jupiters Posted August 18, 2015 Author Share Posted August 18, 2015 @DarkXero : Thank you, I will try this and disable the mod. One more question, how to disable fire spread? The fire is so annoying. Link to comment Share on other sites More sharing options...
DarkXero Posted August 18, 2015 Share Posted August 18, 2015 how to disable fire spread? AddComponentPostInit("propagator", function(self) local _OnUpdate = self.OnUpdate self.OnUpdate = function(self, dt) self.propagaterange = 0 _OnUpdate(self, dt) endend) Link to comment Share on other sites More sharing options...
Jupiters Posted August 19, 2015 Author Share Posted August 19, 2015 AddComponentPostInit("propagator", function(self) local _OnUpdate = self.OnUpdate self.OnUpdate = function(self, dt) self.propagaterange = 0 _OnUpdate(self, dt) endend)@DarkXero : It seems that these codes will make players can not gain heat from the fire and players' temperature stays the same even if eating ice. Link to comment Share on other sites More sharing options...
DarkXero Posted August 19, 2015 Share Posted August 19, 2015 @Jupiters, players gain heat and lose temperature from ice, I can confirm that.However, what does happen is that players become immune to fire.AddComponentPostInit("burnable", function(self) local _StartWildfire = self.StartWildfire self.StartWildfire = function(self) endend) Link to comment Share on other sites More sharing options...
Jupiters Posted August 19, 2015 Author Share Posted August 19, 2015 players gain heat and lose temperature from ice, I can confirm that. However, what does happen is that players become immune to fire. Oh, it's my mistake. AddComponentPostInit("burnable", function(self) local _StartWildfire = self.StartWildfire self.StartWildfire = function(self) end end) What is this code for? To disable wild fire? Link to comment Share on other sites More sharing options...
DarkXero Posted August 19, 2015 Share Posted August 19, 2015 What is this code for? To disable wild fire? Fires can happen via lightnings, for example.Now stuff can't smolder, so that stops the propagation. Fire propagates like this:- Object starts burning- Object is propagator- Object generates heat- Different propagators receive the heat- When reaching flash point, they smolder- When they finishing smoldering, they ignite No smolder, no propagation. Link to comment Share on other sites More sharing options...
Jupiters Posted August 20, 2015 Author Share Posted August 20, 2015 @DarkXero : Use this code instead of the code before? I will try this. Thx. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now