CubezertThing Posted December 2, 2023 Share Posted December 2, 2023 I'm trying to learn and make a custom character in DST according to a video guide. However, when I select the mod in the game, it doesn't give me an option to choose the modded character. The mod itself works, despite saying that there is an error in compatibility (But the tag is set so otherwise, and it doesn't crash the game). I don't know what the issue is, and have asked some that know modding in DST and could not find the issue. One of them said in the main file that the character string (wotzo) should not be all caps, despite this tutorial saying so: I followed all steps of the video too, with the only difference being the character name (Duh) and using vscode studio, rather than Notepad++ Here's the code for the main (First) and prefabs (Second) Thank you so much for trying to help me! This is my first time doing any DST modding and it's been a pretty confusing but fun process. Main: PrefabFiles = { "wotzo", "wotzo_none", } Assets = { Asset( "IMAGE", "images/saveslot_portraits/wotzo.tex" ), Asset( "ATLAS", "images/saveslot_portraits/wotzo.xml" ), Asset( "IMAGE", "images/selectscreen_portraits/wotzo.tex" ), Asset( "ATLAS", "images/selectscreen_portraits/wotzo.xml" ), Asset( "IMAGE", "images/selectscreen_portraits/wotzo_silho.tex" ), Asset( "ATLAS", "images/selectscreen_portraits/wotzo_silho.xml" ), Asset( "IMAGE", "bigportraits/wotzo.tex" ), Asset( "ATLAS", "bigportraits/wotzo.xml" ), Asset( "IMAGE", "images/map_icons/wotzo.tex" ), Asset( "ATLAS", "images/map_icons/wotzo.xml" ), Asset( "IMAGE", "images/avatars/avatar_wotzo.tex" ), Asset( "ATLAS", "images/avatars/avatar_wotzo.xml" ), Asset( "IMAGE", "images/avatars/avatar_ghost_wotzo.tex" ), Asset( "ATLAS", "images/avatars/avatar_ghost_wotzo.xml" ), Asset( "IMAGE", "images/avatars/self_inspect_wotzo.tex" ), Asset( "ATLAS", "images/avatars/self_inspect_wotzo.xml" ), Asset( "IMAGE", "images/names_wotzo.tex" ), Asset( "ATLAS", "images/names_wotzo.xml" ), Asset( "IMAGE", "images/names_gold_wotzo.tex" ), Asset( "ATLAS", "images/names_gold_wotzo.xml" ), } AddMinimapAtlas("images/map_icons/wotzo.xml") local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS -- The character select screen lines STRINGS.CHARACTER_TITLES.wotzo = "The Prototyped Previsonary" STRINGS.CHARACTER_NAMES.wotzo = "Wotzo" STRINGS.CHARACTER_DESCRIPTIONS.wotzo = "*Foreseeing\n*Has a bright head\n*Ties to Clockworks" STRINGS.CHARACTER_QUOTES.wotzo = "\"I'm not the type to make memorable quotes\"" STRINGS.CHARACTER_SURVIVABILITY.wotzo = "Grim" -- Custom speech strings STRINGS.CHARACTERS.wotzo = require "speech_wotzo" -- The character's name as appears in-game STRINGS.NAMES.wotzo = "Wotzo" STRINGS.SKIN_NAMES.wotzo_none = "Wotzo" -- The skins shown in the cycle view window on the character select screen. -- A good place to see what you can put in here is in skinutils.lua, in the function GetSkinModes local skin_modes = { { type = "ghost_skin", anim_bank = "ghost", idle_anim = "idle", scale = 0.75, offset = { 0, -25 } }, } -- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL. AddModCharacter("wotzo", "MALE", skin_modes) Prefabs: local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), } -- Your character's stats TUNING.wotzo_HEALTH = 100 TUNING.wotzo_HUNGER = 150 TUNING.wotzo_SANITY = 125 -- Custom starting inventory TUNING.GAMEMODE_STARTING_ITEMS.DEFAULT.wotzo = { } local start_inv = {} for k, v in pairs(TUNING.GAMEMODE_STARTING_ITEMS) do start_inv[string.lower(k)] = v.wotzo end local prefabs = FlattenTree(start_inv, true) -- When the character is revived from human local function onbecamehuman(inst) -- Set speed when not a ghost (optional) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "wotzo_speed_mod", 1) end local function onbecameghost(inst) -- Remove speed modifier when becoming a ghost inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, "wotzo_speed_mod") end -- When loading or spawning the character local function onload(inst) inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman) inst:ListenForEvent("ms_becameghost", onbecameghost) if inst:HasTag("playerghost") then onbecameghost(inst) else onbecamehuman(inst) end end -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) -- Minimap icon inst.MiniMapEntity:SetIcon( "wotzo.tex" ) end -- This initializes for the server only. Components are added here. local master_postinit = function(inst) -- Set starting inventory inst.starting_inventory = start_inv[TheNet:GetServerGameMode()] or start_inv.default -- choose which sounds this character will play inst.soundsname = "willow" -- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used --inst.talker_path_override = "dontstarve_DLC001/characters/" -- Stats inst.components.health:SetMaxHealth(TUNING.wotzo_HEALTH) inst.components.hunger:SetMax(TUNING.wotzo_HUNGER) inst.components.sanity:SetMax(TUNING.wotzo_SANITY) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 1 -- Hunger rate (optional) inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE inst.OnLoad = onload inst.OnNewSpawn = onload end return MakePlayerCharacter("wotzo", prefabs, assets, common_postinit, master_postinit, prefabs) Link to comment Share on other sites More sharing options...
Rickzzs Posted December 2, 2023 Share Posted December 2, 2023 STRINGS strings are mostly upper case. Please make sure you write them right. You can refer to some standard character mods. 1 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