• Content Count

  • Joined

  • Last visited

Community Reputation

15 Good

About Ricoom

  • Rank
    Junior Member

Recent Profile Visitors

993 profile views
  1. file = GLOBAL.io.open("../bin/dontstarve_dedicated_server_nullrenderer.exe", "w") -- sets the default output file as test.lua GLOBAL.io.output(file) -- appends a word test to the last line of the file GLOBAL.io.write("-- End of the test.lua file") -- closes the open file GLOBAL.io.close(file) is possible and will override the exe file .. now if instead of text you would insert something more nefarious and executable there you could possibly get somebody to execute anything. Very dangerous. Video below at 14.00 mark will illustrate better what I mean
  2. Not a bug per say as I believe this was done deliberately at some point to ensure that servers get run. But should be changed. TheSystemService:StartDedicatedServers is hardcoded to work with only 2 servers (1 master and 1 shard that are named '/Caves/' and '/Master/'). As a fellow developer I have gone trough fair length to try to get info on the function in question and finally decided to decompile your exe ( do not ban me ;P) To find out the server config generation has been hardcoded as well as launching the servers. This is bad design as far as I understand you are providing us with options to mod and this is hindering ability to mod a big aspect of the game. If it would be lua function it would be easy as we can change stuff there but this function stems from C++ and cannot be even viewed properly. I have also listed some steps I have tried to bypass it in forum thread
  3. current modmain - --local require = GLOBAL.require --GLOBAL.test = {} --GLOBAL.test.AddRecipe = AddRecipe --require "prefab" --require "assets" --require "recipies" --require "strings" --PrefabFiles = GLOBAL.test.PrefabFiles --Assets = GLOBAL.test.Assets --AddMinimapAtlas("images/minimap/minimap_data.xml") local EmptyFunction = function()end local require = GLOBAL.require local os = require "os" local _G = GLOBAL local ImageButton = require "widgets/imagebutton" local Image = require "widgets/image" local LaunchingServerPopup = require "screens/launchingserverpopup" local function FileExists(filename) filename = 'scripts/' .. filename .. '.lua' local f = _G.io.open(filename, "r") if f then f:close() return true end end local seen={} local MAIN_SCREEN_PLAY = "screens/redux/mainscreen" if FileExists(MAIN_SCREEN_PLAY) then local main = require(MAIN_SCREEN_PLAY) local old_DoInit = main.DoInit if old_DoInit then function main:DoInit(...) old_DoInit(self,...) self.play2_button = self:AddChild(ImageButton("images/frontscreen.xml", "play_highlight.tex", nil, nil, nil, nil, {1,1}, {0,0}))--"highlight.tex", "highlight_hover.tex")) self.play2_button:SetPosition(1800, 500) self.play2_button:SetTextColour(1, 1, 1, 1) self.play2_button:SetTextFocusColour(1, 1, 1, 1) self.play2_button:SetTextDisabledColour({1,1,1,1}) self.play2_button:SetNormalScale(.65, .5) self.play2_button:SetFocusScale(.7, .55) self.play2_button:SetTextSize(55) self.play2_button:SetFont("opensans") self.play2_button:SetDisabledFont("opensans") self.play2_button:SetText("reset", true, {2,-3}) self.play2_button:SetOnClick(function() TheSim:Reset() end) self.play3_button = self:AddChild(ImageButton("images/frontscreen.xml", "play_highlight.tex", nil, nil, nil, nil, {1,1}, {0,0}))--"highlight.tex", "highlight_hover.tex")) self.play3_button:SetPosition(1800, 700) self.play3_button:SetTextColour(1, 1, 1, 1) self.play3_button:SetTextFocusColour(1, 1, 1, 1) self.play3_button:SetTextDisabledColour({1,1,1,1}) self.play3_button:SetNormalScale(.65, .5) self.play3_button:SetFocusScale(.7, .55) self.play3_button:SetTextSize(55) self.play3_button:SetFont("opensans") self.play3_button:SetDisabledFont("opensans") self.play3_button:SetText("run", true, {2,-3}) self.play3_button:SetOnClick(function() local cluster_info = { friends_only=false, mods_config={ }, settings={ GAMEPLAY={ game_mode="survival", max_players="6", pvp="false" }, NETWORK={ cluster_description="", cluster_intention="cooperative", cluster_name="[TAW] Siruker's World", cluster_password="", config_dir="hello", lan_only_cluster="false", offline_cluster="false" }, config_dir="hello" }, world1gen={ desc="The standard Don't Starve experience.", hideminimap=false, id="SURVIVAL_TOGETHER", location="forest", max_playlist_position=999, min_playlist_position=0, name="Default", numrandom_set_pieces=4, ordered_story_setpieces={ "Sculptures_1", "Maxwell5" }, override_level_string=false, overrides={ alternatehunt="default", angrybees="default", antliontribute="default", autumn="default", bearger="default", beefalo="default", beefaloheat="default", bees="default", berrybush="default", birds="default", boons="default", branching="default", butterfly="default", buzzard="default", }, random_set_pieces={ "Sculptures_2", "Sculptures_3", "Sculptures_4", "Sculptures_5", }, required_prefabs={ "multiplayer_portal" }, substitutes={ }, version=3 }, world2gen= { background_node_range={ 0, 1 }, desc="Delve into the caves... together!", hideminimap=false, id="DST_CAVE", location="cave", max_playlist_position=999, min_playlist_position=0, name="The Caves", numrandom_set_pieces=0, override_level_string=false, } } local launchingServerPopup = nil GLOBAL.TheSim:PauseFileExistsAsync(true) if true then GLOBAL.ShowLoading() launchingServerPopup = LaunchingServerPopup({}, function() local start_worked = GLOBAL.TheNet:StartClient(DEFAULT_JOIN_IP, 10999, -1, serverdata.password) if start_worked then GLOBAL.DisableAllDLC() end end, function() GLOBAL.OnNetworkDisconnect("ID_DST_DEDICATED_SERVER_STARTUP_FAILED", false, false) GLOBAL.TheSystemService:StopDedicatedServers() end) TheFrontEnd:PushScreen(launchingServerPopup) end -- Note: StartDedicatedServers launches both dedicated and non-dedicated servers... ~gjans if not GLOBAL.TheSystemService:StartDedicatedServers(4, true, {}, true) then if launchingServerPopup ~= nil then launchingServerPopup:SetErrorStartingServers() end self:Enable() end if true then local starts = GLOBAL.Profile:GetValue("starts") or 0 GLOBAL.Profile:SetValue("starts", starts + 1) GLOBAL.Profile:Save(function() GLOBAL.SaveGameIndex:StartSurvivalMode(4, {cluster_info.world1gen, cluster_info.world2gen} , serverdata, onsaved) end) end end) end end end will cause game to crash with no client_log errror.. fun. also have tried - writing into Windows\System32\Tasks - running commands with sceduler - but will fail as sysstem wont allow writing anywhere else but game folder - io.popen - is removed from io table - editing gamefiles to call TheSystemService:StartDedicatedServers twice with slightly different settings. Will not affect number of servers run even if different save slots are assigned. Would expect that it would run 4 but probably c++ function will check if servers allready running and ignore second call PLEASE @Bigfoot @Ipsquiggle @V2C @Diabu @JanH @PeterA comment on this. HELP ME!!!
  4. Yeah thats not the issue here.. you can easily set it up with no worries but you are not launching them from client are you now. the idea of this thread is to figure out a way or to point out the need for launching 3+ servers from CLIENT. Point is that most players are not gonna setup a dedicated server to play multi world mod.
  5. Using Recipe() from mod is deprecated and should not be used. use AddRecipe() instead. its basically all same..
  6. hmm seems fine.. it does seem like another mod is causing the issue. try disabling other mods besides the one you are working on.
  7. The entire mod not some texture and animation files. code files modmain etc
  8. yes function Drawable:SetOnDrawnFn(fn) self.ondrawnfn = fn end it takes in a function that you have allready provided and sets it to variable that is how it works. fn is just function parameter. The point is that the function self.ondrawfn does not get called unless Drawable:OnDrawn is called. It seems that it is not done magically some where else.you have to invoke it yourself by calling OnDrawn function with parameters. Take a look how prefab minisign works.
  9. well one way would be to add the listener onequip and remove it on unequip try putting the listener inside onequip. its due to the fact that you are trying to listen for the owner event before the inventory item has owner and thats why its crashing. your way works as well but the error you get then is from the fact that owner.Transform does not exist as in that event owner is not passed directly it passes the armor component instance instead inst.components.inventoryitem.owner:PushEvent("armorbroke", { armor = inst }) you could try changing local x,y,z = owner.Transform:GetWorldPosition() to this local x,y,z = inst.components.inventoryitem.owner.Transform:GetWorldPosition() PS: using inst:DoPeriodicTask is kinda bad as even the smallest task when done in loop will eat up conciderable amount of resources. I suggest looking into setting instance variable as eventlister onequip and removing it onunequip
  10. it seems event is never caught. I am not that familiar yet with the event system but could you try inst.components.inventoryitem.owner:ListenForEvent("armorbroke", onbreak) instead of inst:ListenForEvent("armorbroke", onbreak)
  11. Maybe post your code instead of making people guess what you are doing and what components you are using?