Jump to content

Recommended Posts

Hello! I hope it's appropriate to post this here - if it seems slightly off-topic it's because it is, I wasn't sure where to go and report this bug I'm having right after updating the mod (twice, hehe - so I made sure it's updated!).

First of all, I'm very grateful for the work you've put in and you have still been putting in! What an amazing human/genius*!

It's a very small bug - to me, at least, so I don't need nor want it fixed right away - not at all, just reporting. It seems the mod doesn't recognize whether you own an heirloom skin of the corresponding skin. I used to own the 'classic' skin, but I unraveled it because it didn't make sense to me to keep two of the same. Maybe other people did the same thing too.

Here's 2 screenshots I took just now, if it's needed or helpful. 

Again, thank you so much for the effort thus far and if this helps or is just spam, take it as you will. Maybe others have reported this already too, in which case I'll be more than glad to edit this comment here or remove it ^^ 

 

*yes, a Brooklyn 99 reference... why not, haha. Sorry 

  • Thanks 1
1 hour ago, gooeydelight said:

[snip]

Thank you for the report! This will be fixed soon.

For future reference: Feel free to visit the Bug Report discussion on the mod page to report issues.

Edited by Hornete
  • Health 1
On 4/22/2023 at 10:41 PM, Hornete said:

Hiya. It's no worry and you are right it was missed.

Unfortunately I encountered complications when designing so I had opted to just have the 'ExcludeClothingSymbolForModCharacter' function you mentioned work properly and have glasses not function at all. Hope that's alright.

It'll be in the next patch soonish(for real this time!)

I added ExcludeClothingSymbolForModCharacter( "charactername", "swap_face" ) to my modmain and his items are still broken the exact same way as before (glasses are hidden, but symbol is cleared) as of version 2.5.4. The Estemplate dummy build I sent last year has the same issue.

Have I not implemented it correctly on my end, or is it just not working?

5 minutes ago, Chesed said:

I added ExcludeClothingSymbolForModCharacter( "charactername", "swap_face" ) to my modmain and his items are still broken the exact same way as before (glasses are hidden, but symbol is cleared) as of version 2.5.4. The Estemplate dummy build I sent last year has the same issue.

Have I not implemented it correctly on my end, or is it just not working?

I had tested and everything! Admittedly the tests were quite a while ago, I am so sorry for the inconveniences over this.

I will conduct some re-tests once I return home and I'll come back to you, thank you for putting up with this!

On 1/10/2024 at 12:19 PM, Chesed said:

I added ExcludeClothingSymbolForModCharacter( "charactername", "swap_face" ) to my modmain and his items are still broken the exact same way as before (glasses are hidden, but symbol is cleared) as of version 2.5.4. The Estemplate dummy build I sent last year has the same issue.

Have I not implemented it correctly on my end, or is it just not working?

I have pushed a patch earlier today, I missed a single edge case but it should all be good now. :pray:

  • Thanks 1
14 hours ago, Hornete said:

I have pushed a patch earlier today, I missed a single edge case but it should all be good now. :pray:

THE PROPHECY IS REAL... NO MORE BALD MASKS. I've tested him out and it looks like his swap_face is staying put properly now!

Thank you very much for fixing him! I actually started working on his mod again after a hiatus only a few days before you updated the API, so this gives me a lot of motivation to keep chipping away at his skins. (Redrawing the faces and heads of 15+ character builds is... no joke, as it turns out.)

If a future update breaks him again somehow, I'll let know.

  • Like 1
53 minutes ago, Chesed said:

THE PROPHECY IS REAL... NO MORE BALD MASKS. I've tested him out and it looks like his swap_face is staying put properly now!

Thank you very much for fixing him! I actually started working on his mod again after a hiatus only a few days before you updated the API, so this gives me a lot of motivation to keep chipping away at his skins. (Redrawing the faces and heads of 15+ character builds is... no joke, as it turns out.)

If a future update breaks him again somehow, I'll let know.

YIPPIE! Thank you for dealing with me, haha. It had taken a while since I hadn't the motivation for a bit to do anything (til I got the push/energy to produce the new update this past winter break).

Happy modding!

  • Like 2

Hi! I am having trouble with setting skin of an item placer. Basically what I am doing is that I am adding my own fence prefab and it's own skins. I can manage to add skins to the fence itself, and when i link a placer to the fence and use that in the recipe, the game uses the skin for the placer.  the problem arises when i try to generate items to place the fence, just like normal fences. the normal skin works just fine, but when i try to place a modded skin one, the placer is looking for the skin name without the "ms_" in the beginning. Hence, it doesn't exist and falls back to the default skin.
I've tried overriding the init and clear function for the placer, but it didn't work. can you help me with solving this issue?
Thanks so much

On 3/31/2024 at 3:09 AM, kk.orbit said:

Hi! I am having trouble with setting skin of an item placer. Basically what I am doing is that I am adding my own fence prefab and it's own skins. I can manage to add skins to the fence itself, and when i link a placer to the fence and use that in the recipe, the game uses the skin for the placer.  the problem arises when i try to generate items to place the fence, just like normal fences. the normal skin works just fine, but when i try to place a modded skin one, the placer is looking for the skin name without the "ms_" in the beginning. Hence, it doesn't exist and falls back to the default skin.
I've tried overriding the init and clear function for the placer, but it didn't work. can you help me with solving this issue?
Thanks so much

Hiya!

If i'm understanding and remembering correctly, It might relate to this hack done in the Vanilla game's `playercontroller.lua` component

local placer_skin = placer_item.AnimState:GetSkinBuild() --hack that relies on the build name to match the linked skinname

Can I ask if your skin name, (skin) build name and linked skinname differentiate in any way?

Happy Modding!

local prefs = {}

local function MakeFenceSkin(build_name)
    table.insert(prefs, MakePlacer(build_name, build_name, build_name, "idle"))
    table.insert(prefs, CreatePrefabSkin("ms_"..build_name,
        {
            assets = {
                Asset("ANIM", "anim/" .. build_name .. ".zip")
            },
            base_prefab = "ec_fence",
            type = "item",
            build_name_override = build_name,
            rarity = "ModMade",
            skin_tags = {"MUSHLIGHT", "CRAFTABLE"}
        }
    ))
    table.insert(prefs, CreatePrefabSkin(
        "ms_" .. build_name .. "_item",
        {
            assets = {
                Asset("ANIM", "anim/" .. build_name .. ".zip")
            },
            base_prefab = "ec_fence_item",
            type = "item",
            build_name_override = build_name,
            rarity = "ModMade",
            skin_tags = {"MUSHLIGHT", "CRAFTABLE"}
        }
    ))
end

MakeFenceSkin("ec_fence_1")

return unpack(prefs)

This is the actual code that I am using to make my fence skins. The ec_fence and ec_fence_item prefabs are literal copies of the DST fence.lua

That line of code you mentioned is precisely as far as i could go, but I couldn't change that skin builder name.
To answer your question, yes, the build and skin name are different because of the ms_ that is added to the beginning. I didn't think to set my build to that. but the linked skin name and the skin name are the same, because i had to do it so that the placer places the fence with the skin i wanted. here is the override that i use: (copied the vanilla one from prefabskin.lua and modified it)

 

GLOBAL.ec_fence_item_init_fn = function(inst, build_name)
    if build_name then
        build_name = "ms_"..build_name
    end
    inst.linked_skinname = build_name --hack that relies on the build name to match the linked skinname
    inst.AnimState:SetSkin(build_name, "ec_fence") --same hack is used here by the deployable code in player controller
    inst.AnimState:PlayAnimation("inventory")
    inst.components.inventoryitem:ChangeImageName(inst:GetSkinName())
end
GLOBAL.ec_fence_item_clear_fn = function(inst)
    inst.linked_skinname = nil
    inst.AnimState:SetBuild("ec_fence")
    inst.components.inventoryitem:ChangeImageName()
end
GLOBAL.ec_fence_init_fn = function(inst, build_name)
    if inst.components.placer == nil and not GLOBAL.TheWorld.ismastersim then
        return
    end
    inst.AnimState:SetSkin(build_name, "ec_fence")
end
GLOBAL.ec_fence_clear_fn = function(inst)
    inst.AnimState:SetBuild("ec_fence")
end

 

I just finished testing, compiled my anim file for the fence once more with "ms_" in the beginning of the build name. loaded it into the game assets and I still see the default skin as the placer, i should mention that the override of the init function fixed the final fence's skin, so the placed item has no problem

34 minutes ago, kk.orbit said:

[snip]

Hmmm, if you are comfortable with sharing may you send your mod over either here or in private messages? Otherwise I'll be happy to scrounge up some debug prints/let me think about what the issue may be and we'll figure the issue in due time.

Thanks and apologies for any inconveniences

That sounds good to me! Since the texture im working on right now is a recolor of an official fence skin, I will send it to you via DM after cleaning things up, leaving the barebone so you dont have to scavenge through the whole thing. The base art doesn't belong to me, so I cant make it public.

  • Big Ups 1
On 10/8/2023 at 5:43 PM, LowFatBananamil said:

Hello! This is my first time ever looking into DST mods and this modded skins API looks amazingly made :love_heart:

I was wondering if someone can help me figure one thing out:
I'm trying to make a simple mod that adds a vignette of my own.

I've copied someone else's homework and got my personal art to show up on a loading screen so far!preview.thumb.png.35a72caa8bc49fb011788bfcd831521d.png

What I'm having problem is the icon for the vgnette in the curio cabinet..2023-10-08172550.thumb.png.8e0a3006b2eadaff791948bf3afce71b.png
(I used some other animation's zip and dyn file in order for the game to not crash for this screenshot; It shows up as empty as names and what-nots arn't matching I'm assuming)

I think I can properly make my Spriter project for it to export as zip. But this one mod and the another one I'm referencing, both requires the dynamic animation files, which I have no idea how to make one.

ModdedCurios = {
	ms_kaity_bananamilk_sar = {
		type = "loading",
		skin_tags = {"LOADING"},
		rarity = "ModMade",
		assets = {
			Asset("ATLAS", "images/bg_loading_ms_kaity_bananamilk_sar.xml"),
			Asset("IMAGE", "images/bg_loading_ms_kaity_bananamilk_sar.tex"),
			
			-- These I don't know how to make one of my art
			Asset("DYNAMIC_ANIM", "anim/dynamic/ms_kaity_bananamilk_sar.zip"),
			Asset("PKGREF", "anim/dynamic/ms_kaity_bananamilk_sar.dyn"),
		},
	}
}

 

How can I go around making the zip and the dyn file for the icon?
Or are there ways I can achieve this using just regular animation zip file, not dynamic ones?
Or should I be asking this question somewhere else, like the "[API] Mods In Menu"?

First time posting anything; Feel free to point thigns out for me :)

can i bump my question like this? :>

Hi! I've been trying to add a skin to my modded character Wramp! When I try to boot up a server with API modded skins and Wramp the game closes, without crashing I'm not sure where I went wrong so I looked in the client crash log and it says there's something wrong with my prefab file. Any help would be really awesome, thank you in advance!

client_log.txt wramp_none.lua

I've been checking through my code for a few hours now, I'm not sure where I went wrong and the game closes immediately after the world loads. Here's my updated none file where the problem is apparently, Please help!

wramp_none.lua client_log.txt

having weird issues with the portraits and skin selection? the skins themself work perfectly no crashing no nothing, however since adding these skins to my character their bigportrait doesnt work anymore, whenever i go to select them in the character select when hosting a server they just have the portrait of the character last moused over (this did not happen before) i have all of the big portraits in the bigportraits folder (the character has 2 skins, so its the base portrait, then the two skin portraits), they compile fine when i check them in textool, and the files are named how i assume they should be?( eg. my characters identifier is writer, so the skins are named ms_writer_skin1 and ms_writer_skin2) and when ingame the portraits appear in the self inspect. anyone knowwww?

10 hours ago, nt3000s said:

having weird issues with the portraits and skin selection? the skins themself work perfectly no crashing no nothing, however since adding these skins to my character their bigportrait doesnt work anymore, whenever i go to select them in the character select when hosting a server they just have the portrait of the character last moused over (this did not happen before) i have all of the big portraits in the bigportraits folder (the character has 2 skins, so its the base portrait, then the two skin portraits), they compile fine when i check them in textool, and the files are named how i assume they should be?( eg. my characters identifier is writer, so the skins are named ms_writer_skin1 and ms_writer_skin2) and when ingame the portraits appear in the self inspect. anyone knowwww?

Just guessing, but did you make sure to make a bigportrait named "writer_none" for your default skin? I rebuilt my mod recently and had this issue and that turned out to be the source of the problem for me.

Hi! I've been trying to add a roseate skin to my character's custom item, I currently keep getting a crash when I try to load the item in with skins API. I was hoping for a example of a equitable item, any help would be awesome! I'll attach my crash and zip of my mod

Roseate Dark septer.zip client_log - Shortcut.lnk

Whoops! Uploaded the wrong file for my log, here's my crash

 


[00:01:32]: Mod: workshop-2369560337 (Rotate Character Model)      Registering default mod prefab    
[00:01:32]: Mod: custom_wramp_staff Roseate backup! (ROSEATE WRAMP STAFF TEST)    Registering prefabs    
[00:01:32]: Mod: custom_wramp_staff Roseate backup! (ROSEATE WRAMP STAFF TEST)      Registering prefab file: prefabs/dark_scepter    
[00:01:32]: Mod: custom_wramp_staff Roseate backup! (ROSEATE WRAMP STAFF TEST)        dark_scepter    
[00:01:32]: Mod: custom_wramp_staff Roseate backup! (ROSEATE WRAMP STAFF TEST)      Registering prefab file: prefabs/dark_scepter_none    
[00:01:32]: error calling LoadPrefabFile in mod custom_wramp_staff Roseate backup! (ROSEATE WRAMP STAFF TEST): 
[string "scripts/mainfunctions.lua"]:160: Error loading file prefabs/dark_scepter_none
[string "../mods/custom_wramp_staff Roseate backup!/scripts/prefabs/dark..."]:14: '<eof>' expected near 'end'
LUA ERROR stack traceback:
        =[C] in function 'assert'
        scripts/mainfunctions.lua(160,1)
        =(tail call) ?
        =[C] in function 'xpcall'
        scripts/mods.lua(188,1)
        scripts/mods.lua(665,1) in function '_RegisterPrefabs'
        local MS_MODNAME = 'workshop-2812783478';local a = {}

I checked through my mod and it looks like I had some things wrong, I tried to load in my mod with Skins API and I got a weird error. I feel like there's something I'm missing I'll put my crash here, any help would be really appreciated! 

I added the table to a prefabfile in my mod, for some reason, it looks like the game isn't seeing it.

 

  type = "glasses",
rarity = "ModOfficialRequired",
required_skin = 
[00:00:47]: [string "../mods/custom_wramp_staff Roseate backup!/..."]:2: bad argument #1 to 'insert' (table expected, got nil)
LUA ERROR stack traceback:
        =[C] in function 'insert'
        ../mods/custom_wramp_staff Roseate backup!/scripts/prefabs/dark_scepter_skins.lua(2,1) in function 'fn'
        scripts/mainfunctions.lua(163,1)
        =(tail call) ?
        =[C] in function 'xpcall'
        scripts/mods.lua(188,1)
        scripts/mods.lua(665,1) in function '_RegisterPrefabs'
        local MS_MODNAME = 'workshop-2812783478';local a = {}

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...