CloverOcean Posted January 13, 2019 Share Posted January 13, 2019 I am trying to edit Eusong's "Clones" mod to be able to change the Base Skin of a clone during dressup. Currently, you can only change, Body, Hands, Legs and Feet. I am not skilled enough to figure out how to incorporate the ability to change the skin itself. (i.e. If player is Triumphant Wendy, the Clone of Wendy will be original, not triumphant. Player can right-click the clone and access the Dressup widget, where all is changeable but not the skin.) I believe the function to edit / add is in the clone_common.lua Spoiler local function ondressedup(inst, data) local avatardata = { name = data.doer ~= nil and data.doer:GetBasicDisplayName() or nil, prefab = data.doer ~= nil and data.doer.prefab or nil, } if data.skins ~= nil then for k, v in pairs(data.skins) do avatardata[k.."_skin"] = v end end inst.components.playeravatardata:SetData(avatardata) end local function onload(inst, data) if data ~= nil then data = inst.components.playeravatardata:GetData() data = { name = data ~= nil and data.name or nil, prefab = data ~= nil and data.prefab or nil, } for k, v in pairs(inst.components.skinner:GetClothing()) do data[k.."_skin"] = v end inst.components.playeravatardata:SetData(data) end end I am also almost certain the key to my answer lies within scripts/.../dressuppanel.lua Spoiler This function stands out to me; function DressupPanel:GetBaseSkin() return (self.base_spinner and self.base_spinner.GetItem()) or nil end As well as this; if slot == "base" then spinner_group.GetItem = function() local which = spinner_group.spinner:GetSelectedIndex() local skin_options = self:GetSkinOptionsForSlot(slot) if which <= #skin_options then local item = skin_options[which].item --if item == nil then print("######$$$$$$ ERROR NO ITEM") dumptable( skin_options ) end return item, skin_options[which].build == "random_skin" But I could be wildly off with those assumptions. I am barely a novice and would really appreciate any help at all. Little Bit o' Backstory: I'm from a large family of gamers who've moved far apart but all login to our private server to don't starve together as a family. We often add new mods and edit them to fit our needs and or skill-levels. Our server / mod edits are privately used only, (not uploaded anywhere) we respect and are grateful to the mods and their creators full-heartedly. As a lot of us in our family have little kids, that sometimes snuggle with us while we play before their nap-time, we have aimed to incorporate them into our DST experience. It was our aim, with Eusong's mod, to make it so they'd be able to differentiate "their characters." When they snuggle in for a viewing. Thanks for reading. Link to comment https://forums.kleientertainment.com/forums/topic/101727-need-help-adding-a-baseskin-option-to-a-dressuppanel-mod-editing/ Share on other sites More sharing options...
CloverOcean Posted January 27, 2019 Author Share Posted January 27, 2019 2 Weeks later, I'm still trying to figure out how to implement the ability to change skins. I've given up on the original idea of adding a universal skin-changer to the dressup widget. And decided to instead pick a single skin and add it to the character file itself. Which in essence, looks like this: local function common_fn(inst) inst.AnimState:SetBuild("wendy") inst.clonetype = "wendy" inst.soundsname = "wendy" inst.talker_path_override = "dontstarve/characters/" end But regardless of everything I try; from local skin_lookups = { formal = "_formal", to inst.components.skinner.skin_name The Wendy in question always ends up invisible. I'm at the point where I'm no longer sure it's even possible to achieve this without exporting the skins formal, triumphant, etc and adding them to the mod, which I don't want to / can't do. I'm just out of ideas at this point. Any suggestions / ideas on this at all, before I give up on the project would be very needed / appreciated. Link to comment https://forums.kleientertainment.com/forums/topic/101727-need-help-adding-a-baseskin-option-to-a-dressuppanel-mod-editing/#findComment-1148239 Share on other sites More sharing options...
Thomas_klei Posted January 27, 2019 Share Posted January 27, 2019 cool Link to comment https://forums.kleientertainment.com/forums/topic/101727-need-help-adding-a-baseskin-option-to-a-dressuppanel-mod-editing/#findComment-1148244 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