Sadloy_1 Posted March 5 Share Posted March 5 Hello. I'm creating a custom character mod for Don't Starve Together based on the official mod template. The mod worked before, but after modifying the character sprites and configuration files, the game stopped loading the world correctly. The problem is that when the mod is active, the server starts loading normally. Loading stops before the world appears. The world selection or world generation screen never appears. What I changed was: Replacing the character sprite with a custom visual. Editing the modmain.lua file. Editing the scripts/prefabs/explorer.lua file. Generating .tex and .xml files for the portraits and icons. What I tried after the error was: Clearing the mod cache, Replacing the modmain.lua file with corrected versions. Checking the sprite paths and atlas files, Rebuilding the .tex and .xml files. The problem persists even after restoring most files to the original template. Any help would be appreciated. modmain code: PrefabFiles = { "explorador", "explorador_none", } local GLOBAL = GLOBAL local Asset = GLOBAL.Asset local STRINGS = GLOBAL.STRINGS local require = GLOBAL.require Assets = { -- Save slot Asset("IMAGE", "images/saveslot_portraits/explorador.tex"), Asset("ATLAS", "images/saveslot_portraits/explorador.xml"), -- Select screen Asset("IMAGE", "images/selectscreen_portraits/explorador.tex"), Asset("ATLAS", "images/selectscreen_portraits/explorador.xml"), Asset("IMAGE", "images/selectscreen_portraits/explorador_silho.tex"), Asset("ATLAS", "images/selectscreen_portraits/explorador_silho.xml"), -- Big portrait Asset("IMAGE", "bigportraits/explorador.tex"), Asset("ATLAS", "bigportraits/explorador.xml"), -- Map icon Asset("IMAGE", "images/map_icons/explorador.tex"), Asset("ATLAS", "images/map_icons/explorador.xml"), -- Avatars Asset("IMAGE", "images/avatars/avatar_explorador.tex"), Asset("ATLAS", "images/avatars/avatar_explorador.xml"), Asset("IMAGE", "images/avatars/avatar_ghost_explorador.tex"), Asset("ATLAS", "images/avatars/avatar_ghost_explorador.xml"), Asset("IMAGE", "images/avatars/self_inspect_explorador.tex"), Asset("ATLAS", "images/avatars/self_inspect_explorador.xml"), -- Names Asset("IMAGE", "images/names_explorador.tex"), Asset("ATLAS", "images/names_explorador.xml"), Asset("IMAGE", "images/names_gold_explorador.tex"), Asset("ATLAS", "images/names_gold_explorador.xml"), } GLOBAL.AddMinimapAtlas("images/map_icons/explorador.xml") -- Character select screen STRINGS.CHARACTER_TITLES.explorador = "Explorador Preguiçoso" STRINGS.CHARACTER_NAMES.explorador = "Explorador Preguiçoso" STRINGS.CHARACTER_DESCRIPTIONS.explorador = "*Adrenalina\n*Mente Aberta\n*Apetite Insaciável" STRINGS.CHARACTER_QUOTES.explorador = "\"Quote\"" STRINGS.CHARACTER_SURVIVABILITY.explorador = "Baixa" -- Speech STRINGS.CHARACTERS.EXPLORADOR = require "speech_explorador" -- Nome no jogo STRINGS.NAMES.EXPLORADOR = "Explorador Preguiçoso" STRINGS.SKIN_NAMES.explorador_none = "Explorador Preguiçoso" -- Ghost skin local skin_modes = { { type = "ghost_skin", anim_bank = "ghost", idle_anim = "idle", scale = 0.75, offset = { 0, -25 } }, } GLOBAL.AddModCharacter("explorador", "MALE", skin_modes) lua code: local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), } ---------------------------------------------------------- -- STATS ---------------------------------------------------------- TUNING.EXPLORADOR_HEALTH = 100 TUNING.EXPLORADOR_HUNGER = 250 TUNING.EXPLORADOR_SANITY = 90 ---------------------------------------------------------- -- PERKS ---------------------------------------------------------- TUNING.EXPLORADOR_SPEED_BOOST = 1.2 TUNING.EXPLORADOR_SPEED_TIME = 5 ---------------------------------------------------------- -- STARTING ITEMS ---------------------------------------------------------- TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.EXPLORADOR = { "nightsword", } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.EXPLORADOR end local prefabs = {} ---------------------------------------------------------- -- SPEED BOOST ---------------------------------------------------------- local function RemoveSpeed(inst) if inst.components.locomotor then inst.components.locomotor:RemoveExternalSpeedMultiplier(inst,"explorador_speed") end end local function OnHealthDelta(inst,data) if data.amount < 0 then inst.components.locomotor:SetExternalSpeedMultiplier( inst, "explorador_speed", TUNING.EXPLORADOR_SPEED_BOOST ) inst:DoTaskInTime(TUNING.EXPLORADOR_SPEED_TIME,RemoveSpeed) end end ---------------------------------------------------------- -- GHOST / HUMAN ---------------------------------------------------------- local function onbecamehuman(inst) end local function onbecameghost(inst) end local function onload(inst) end ---------------------------------------------------------- -- CLIENT ---------------------------------------------------------- local common_postinit = function(inst) inst.MiniMapEntity:SetIcon("explorador.tex") end ---------------------------------------------------------- -- SERVER ---------------------------------------------------------- local master_postinit = function(inst) inst.starting_inventory = start_inv[TheNet:GetServerGameMode()] or start_inv.default inst.soundsname = "wilson" inst.components.health:SetMaxHealth(TUNING.EXPLORADOR_HEALTH) inst.components.hunger:SetMax(TUNING.EXPLORADOR_HUNGER) inst.components.sanity:SetMax(TUNING.EXPLORADOR_SANITY) inst.components.combat.damagemultiplier = 1.5 inst:ListenForEvent("healthdelta", OnHealthDelta) end return MakePlayerCharacter("explorador", prefabs, assets, common_postinit, master_postinit) Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/ Share on other sites More sharing options...
Haruhi Kawaii Posted March 7 Share Posted March 7 On 3/6/2026 at 5:11 AM, Sadloy_1 said: Hello. I'm creating a custom character mod for Don't Starve Together based on the official mod template. The mod worked before, but after modifying the character sprites and configuration files, the game stopped loading the world correctly. The problem is that when the mod is active, the server starts loading normally. Loading stops before the world appears. The world selection or world generation screen never appears. What I changed was: Replacing the character sprite with a custom visual. Editing the modmain.lua file. Editing the scripts/prefabs/explorer.lua file. Generating .tex and .xml files for the portraits and icons. What I tried after the error was: Clearing the mod cache, Replacing the modmain.lua file with corrected versions. Checking the sprite paths and atlas files, Rebuilding the .tex and .xml files. The problem persists even after restoring most files to the original template. Any help would be appreciated. modmain code: PrefabFiles = { "explorador", "explorador_none", } local GLOBAL = GLOBAL local Asset = GLOBAL.Asset local STRINGS = GLOBAL.STRINGS local require = GLOBAL.require Assets = { -- Save slot Asset("IMAGE", "images/saveslot_portraits/explorador.tex"), Asset("ATLAS", "images/saveslot_portraits/explorador.xml"), -- Select screen Asset("IMAGE", "images/selectscreen_portraits/explorador.tex"), Asset("ATLAS", "images/selectscreen_portraits/explorador.xml"), Asset("IMAGE", "images/selectscreen_portraits/explorador_silho.tex"), Asset("ATLAS", "images/selectscreen_portraits/explorador_silho.xml"), -- Big portrait Asset("IMAGE", "bigportraits/explorador.tex"), Asset("ATLAS", "bigportraits/explorador.xml"), -- Map icon Asset("IMAGE", "images/map_icons/explorador.tex"), Asset("ATLAS", "images/map_icons/explorador.xml"), -- Avatars Asset("IMAGE", "images/avatars/avatar_explorador.tex"), Asset("ATLAS", "images/avatars/avatar_explorador.xml"), Asset("IMAGE", "images/avatars/avatar_ghost_explorador.tex"), Asset("ATLAS", "images/avatars/avatar_ghost_explorador.xml"), Asset("IMAGE", "images/avatars/self_inspect_explorador.tex"), Asset("ATLAS", "images/avatars/self_inspect_explorador.xml"), -- Names Asset("IMAGE", "images/names_explorador.tex"), Asset("ATLAS", "images/names_explorador.xml"), Asset("IMAGE", "images/names_gold_explorador.tex"), Asset("ATLAS", "images/names_gold_explorador.xml"), } GLOBAL.AddMinimapAtlas("images/map_icons/explorador.xml") -- Character select screen STRINGS.CHARACTER_TITLES.explorador = "Explorador Preguiçoso" STRINGS.CHARACTER_NAMES.explorador = "Explorador Preguiçoso" STRINGS.CHARACTER_DESCRIPTIONS.explorador = "*Adrenalina\n*Mente Aberta\n*Apetite Insaciável" STRINGS.CHARACTER_QUOTES.explorador = "\"Quote\"" STRINGS.CHARACTER_SURVIVABILITY.explorador = "Baixa" -- Speech STRINGS.CHARACTERS.EXPLORADOR = require "speech_explorador" -- Nome no jogo STRINGS.NAMES.EXPLORADOR = "Explorador Preguiçoso" STRINGS.SKIN_NAMES.explorador_none = "Explorador Preguiçoso" -- Ghost skin local skin_modes = { { type = "ghost_skin", anim_bank = "ghost", idle_anim = "idle", scale = 0.75, offset = { 0, -25 } }, } GLOBAL.AddModCharacter("explorador", "MALE", skin_modes) lua code: local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), } ---------------------------------------------------------- -- STATS ---------------------------------------------------------- TUNING.EXPLORADOR_HEALTH = 100 TUNING.EXPLORADOR_HUNGER = 250 TUNING.EXPLORADOR_SANITY = 90 ---------------------------------------------------------- -- PERKS ---------------------------------------------------------- TUNING.EXPLORADOR_SPEED_BOOST = 1.2 TUNING.EXPLORADOR_SPEED_TIME = 5 ---------------------------------------------------------- -- STARTING ITEMS ---------------------------------------------------------- TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.EXPLORADOR = { "nightsword", } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.EXPLORADOR end local prefabs = {} ---------------------------------------------------------- -- SPEED BOOST ---------------------------------------------------------- local function RemoveSpeed(inst) if inst.components.locomotor then inst.components.locomotor:RemoveExternalSpeedMultiplier(inst,"explorador_speed") end end local function OnHealthDelta(inst,data) if data.amount < 0 then inst.components.locomotor:SetExternalSpeedMultiplier( inst, "explorador_speed", TUNING.EXPLORADOR_SPEED_BOOST ) inst:DoTaskInTime(TUNING.EXPLORADOR_SPEED_TIME,RemoveSpeed) end end ---------------------------------------------------------- -- GHOST / HUMAN ---------------------------------------------------------- local function onbecamehuman(inst) end local function onbecameghost(inst) end local function onload(inst) end ---------------------------------------------------------- -- CLIENT ---------------------------------------------------------- local common_postinit = function(inst) inst.MiniMapEntity:SetIcon("explorador.tex") end ---------------------------------------------------------- -- SERVER ---------------------------------------------------------- local master_postinit = function(inst) inst.starting_inventory = start_inv[TheNet:GetServerGameMode()] or start_inv.default inst.soundsname = "wilson" inst.components.health:SetMaxHealth(TUNING.EXPLORADOR_HEALTH) inst.components.hunger:SetMax(TUNING.EXPLORADOR_HUNGER) inst.components.sanity:SetMax(TUNING.EXPLORADOR_SANITY) inst.components.combat.damagemultiplier = 1.5 inst:ListenForEvent("healthdelta", OnHealthDelta) end return MakePlayerCharacter("explorador", prefabs, assets, common_postinit, master_postinit) You should recreate the new world and add no caves; this will make it easier to spot problems. If you can't fix it, zip your code and attach it here instead of uploading the individual files. Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853363 Share on other sites More sharing options...
Sadloy_1 Posted March 7 Author Share Posted March 7 This is the compressed mod. explorador.rar Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853377 Share on other sites More sharing options...
Echsrick Posted March 7 Share Posted March 7 if you changed the sprites, dit you go inside the anim folder and delete everything inside? might be that Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853394 Share on other sites More sharing options...
Sadloy_1 Posted March 7 Author Share Posted March 7 Worse than that, I use Wilson's base and it was working before I added the sprites. Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853401 Share on other sites More sharing options...
Haruhi Kawaii Posted March 8 Share Posted March 8 4 hours ago, Sadloy_1 said: Worse than that, I use Wilson's base and it was working before I added the sprites. I noticed a few issues with your mod: In modmain, you should use AddModCharacter and AddMinimapAtlas directly instead of using GLOBAL. In your explorador_none.lua file, it’s looking for explorador.zip, but that file doesn't exist in your anim folder. It’s actually named explorador.zip.zip because you likely have file extensions hidden and didn't notice the double extension. Also, the explorador.scml file cannot be compiled into a .zip because some files are missing. An SCML file won't compile if the linked .png files are deleted. I suggest copying explorador to explorador_cleared, as that folder has all the necessary images. Any parts you aren't using, like the tail or skirt, simply won't be displayed Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853425 Share on other sites More sharing options...
Sadloy_1 Posted March 8 Author Share Posted March 8 I THINK I fixed it, but it still has an error, and I didn't understand the copying part. This is my first time trying to program something. Is copying the explorer folder to explorer_cleared supposed to be copying and renaming? I sent the updated file so you can tell me where I went wrong. teste.rar Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853470 Share on other sites More sharing options...
kyupita Posted March 8 Share Posted March 8 For the sprites you wanted invisible, there weren't enough transparent sprites in there. For example, the skirt only had 1 transparent image when it's supposed to have 5. I added the right amount and tested to see if it worked, and it loaded in fine. teste.zip Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853474 Share on other sites More sharing options...
Sadloy_1 Posted March 9 Author Share Posted March 9 Thanks for the help, now I understand how to fix this error. Link to comment https://forums.kleientertainment.com/forums/topic/169965-custom-character-mod-causes-dedicated-server-error/#findComment-1853553 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