Jump to content

[Modded Skins API Tutorial] Creating Custom Skins for Mods


Hornete
 Share

Recommended Posts

7 hours ago, Mr.Rickzzs said:

TheSim:ReskinEntity(c_spawn("abigail").GUID,nil,"abigail_handmedown",c_spawn("abigail_flower").GUID)

This crash the game, but it shouldn't, is it?

params:

1. Abigail's GUID

2. Abigail's skin name. It is acceptable to pass param nil as "abigail_none"

3. New skin name

4. one possible fake skin id, it should have been Abigail's Flower's skin_id.

Ah I confused for the skin name, I had forgotten about the 4th parameter. I am not actually too aware on the purpose of the skin id but I know that it is not necessary when calling the ReskinEntity function. I am curious as to what you need to use the 4th parameter for.

Link to comment
Share on other sites

3 hours ago, Hornete said:

Ah I confused for the skin name, I had forgotten about the 4th parameter. I am not actually too aware on the purpose of the skin id but I know that it is not necessary when calling the ReskinEntity function. I am curious as to what you need to use the 4th parameter for.

Only when two skins are attached should you use 4th param. For example Abigail and her flower, boat and boat plank. I, too, do a workaround by avoiding 4th param now. But it used to cause no crash and worked well. It is something I can report to the bug tracker?

Link to comment
Share on other sites

20 hours ago, Mr.Rickzzs said:

It is something I can report to the bug tracker?

If you personally would like to, then shoot for it. I personally don't think it necessary for myself because it is very easy to work around the 4th parameter.

Edit:

I believe I fully understand the purpose of the 4th parameter now. Generally with something like the clean sweeper the userid of a player is used to check the ownership of a skin through ReskinEntity, in cases like lureplants or boat kits and such however where the player who originally created these skinned objects is gone, a skin id unique to each skin and is different in every world is used for ownership purposes. So again, I do not understand the purpose of this parameter for your usage as it's main purpose is simply an ownership check essentially, and not anything vital to the actual skinning process of something.

Edited by Hornete
Link to comment
Share on other sites

4 hours ago, Pinkamena11FazP said:

But what if you cannot use the API and want to make a skin without the API mod for DST? I've been having so many problems with my none file and modmain file that I really need an updated example file I can download for (chararter)_none file and modmain.

Apart from this one you can also try Glassic API, or write your own one. But for animation file I think if Hornet can provide an up-to-date one it would be best.

Link to comment
Share on other sites

My mod crashes upon trying to load into the world at the moment. I can't figure out why, I've cross-referenced with several other mods that work just fine and I don't see any issues. Here's the client log, and the entire mod in question. Please help if you're able to. I'm sure it's something tiny that I'm overlooking.

client_log.txt Woodrow Alt.zip

Link to comment
Share on other sites

1 hour ago, zvxaxvz said:

My mod crashes upon trying to load into the world at the moment. I can't figure out why, I've cross-referenced with several other mods that work just fine and I don't see any issues. Here's the client log, and the entire mod in question. Please help if you're able to. I'm sure it's something tiny that I'm overlooking.

client_log.txt 55.85 kB · 0 downloads Woodrow Alt.zip 35.19 MB · 0 downloads

You are loading an asset by the name of "anim/woodrow_ghost.zip". But this does not exist, I see the asset that you actually do have is named "anim/woodrow_ghost_build.zip".

Link to comment
Share on other sites

1 hour ago, Hornete said:

You are loading an asset by the name of "anim/woodrow_ghost.zip". But this does not exist, I see the asset that you actually do have is named "anim/woodrow_ghost_build.zip".

Yep, that fixed it. Thank you so so much!

  • Big Ups 1
Link to comment
Share on other sites

I tried following the tutorial, but either my skin isn't showing up, or the game crashes when I try loading a world.

What changes should be made in modmain.lua? Should there be a separate prefab file for the skin? I'm kinda new to all this :spidercowers:

client_log.txt

Edited by Mizzen
Link to comment
Share on other sites

13 hours ago, Mizzen said:

I tried following the tutorial, but either my skin isn't showing up, or the game crashes when I try loading a world.

What changes should be made in modmain.lua? Should there be a separate prefab file for the skin? I'm kinda new to all this :spidercowers:

client_log.txt 51.42 kB · 1 download

There is a syntax error at line 41 of your tsabisuki_skins file. If I had to guess, there is a missing comma somewhere.

For the next time you encounter an error in your log, you can Ctrl + F for "[string" and that will generally bring you to the error in your log right away.

Link to comment
Share on other sites

1 hour ago, icantevenname said:

I get how to lock a skin, but what do I do to unlock it? I've been working on a mod and want to lock one of the character's skins behind a Re-Gorge-Itated victory.

See:

Spoiler

Now as for actually unlocking the skin, we’ll be using a RPC that the API adds for you that’ll allow you to pass the id of your skin to be unlocked.

if CLIENT_MOD_RPC[“ModdedSkins”] then --This is necessary to make sure the RPC actually exists as depending on your mod a user may not always have the API enabled.
	SendModRPCToClient(GetClientModRPC("ModdedSkins", "UnlockModdedSkin"), sender_list, "skinid") --sender_list can either be nil to send the rpc to all clients, or be the string for a single clients user id, OR an array that includes multiple user id’s to send the rpc to all the clients bearing those user id’s. Skinid should be filled out with the id of the skin you’d like to be unlocked.
end

 

Link to comment
Share on other sites

18 hours ago, Hornete said:

See:

  Reveal hidden contents

Now as for actually unlocking the skin, we’ll be using a RPC that the API adds for you that’ll allow you to pass the id of your skin to be unlocked.

if CLIENT_MOD_RPC[“ModdedSkins”] then --This is necessary to make sure the RPC actually exists as depending on your mod a user may not always have the API enabled.
	SendModRPCToClient(GetClientModRPC("ModdedSkins", "UnlockModdedSkin"), sender_list, "skinid") --sender_list can either be nil to send the rpc to all clients, or be the string for a single clients user id, OR an array that includes multiple user id’s to send the rpc to all the clients bearing those user id’s. Skinid should be filled out with the id of the skin you’d like to be unlocked.
end

 

Hornet is there any up to date animation files for DST characters? I've been told that the Custom Sample Character that is the cat is missing a lot of files like the swap_face file, I'd really like something up to date to continue working on my DST mods. It doesn't have to be anything very detailed I just want an up to date base.

Link to comment
Share on other sites

14 minutes ago, Pinkamena11FazP said:

Hornet is there any up to date animation files for DST characters? I've been told that the Custom Sample Character that is the cat is missing a lot of files like the swap_face file, I'd really like something up to date to continue working on my DST mods. It doesn't have to be anything very detailed I just want an up to date base.

I have no up-to-date character templates.

Link to comment
Share on other sites

4 hours ago, TheSkylarr said:

I've been meaning to put together a more up to date one based on my own modded character, since I kept it relatively up to date compared to the sample character.

I'm working on this. I intend to output all wilson bank animation. Do you have some tips and suggestions? I think these animations are enough for creating  mod characters?

Link to comment
Share on other sites

46 minutes ago, Day Pie said:

It says "Could not find anim build ms_jacob_gladiator"??? i thought i did everything finely.

Are you sure this is the actual problem? There are many syntax errors in your jacob_none/jacob_skin.lua files(You are also loading both which seems unnecessary).

Link to comment
Share on other sites

Quote

Are you sure this is the actual problem? There are many syntax errors in your jacob_none/jacob_skin.lua files(You are also loading both which seems unnecesary).

It is a problem! It's invisible and whatever i do/add reoverwrite or anything it still appears blank invisible! I did fix some errors and deleted lines from the "jacob_none" and its still invisible! I think somethings wrong with the zip itself but dunno what.

Edited by Day Pie
Link to comment
Share on other sites

On 2/19/2023 at 8:21 AM, Day Pie said:

It is a problem! It's invisible and whatever i do/add reoverwrite or anything it still appears blank invisible! I did fix some errors and deleted lines from the "jacob_none" and its still invisible! I think somethings wrong with the zip itself but dunno what.

Have you fixed it yet?

Link to comment
Share on other sites

On 2/18/2023 at 8:21 PM, Day Pie said:

It is a problem! It's invisible and whatever i do/add reoverwrite or anything it still appears blank invisible! I did fix some errors and deleted lines from the "jacob_none" and its still invisible! I think somethings wrong with the zip itself but dunno what.

I think I got confused on your problem, my apologies, I thought you were crashing. What do your new files look like?

Link to comment
Share on other sites

On 3/10/2023 at 10:00 AM, doyle_sherry said:

How do I use the API?  If I want add an skin for a mod character, do I just subscribe to the API and do nothing else or I should subscribe to the API and use the function CreatePrefabSkin at the same time?

Have you done it yet?

Link to comment
Share on other sites

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
 Share

×
  • Create New...