Sign in to follow this  
strawberryjuice

How does one make a structure/item reskin mod without a modmain at all ?

Recommended Posts

I've been wondering on how people make reskin mods where the mod files are only the icons, anim, modinfo, but either no modmain.lua or the modmain.lua is empty. How do they do that? Is it just simply exporting the anim into animation exports and done? I don't think it's like that, is it?? 

Here's 2 examples of mods without modmain.lua(s)
https://steamcommunity.com/sharedfiles/filedetails/?id=1292913714
https://steamcommunity.com/sharedfiles/filedetails/?id=1806500091
 

Share this post


Link to post
Share on other sites
rawii22    29

What they did was simply add an anim folder with the same name as something already in the game. I took a look at the wigfridge mod and this is all it is. If you want to make your own, look for an in-game object, make sure you know where it is in the anim folder (usually it's the same name as the prefab name). Inside is going to be a file called atlas-0.tex or something. Also, I suggest you download a program called TexTool and TexCreator. These allow you to save and create file back and forth from .tex to .png. Here: 

 

Choose 1.4.1

  1. Convert the .tex to a .png. Open it in TexTool (you must open it from inside the program), click file/save and save it as a .png
  2. Edit the pieces of the prefab in an editor to whatever you want. If you're just reskinning something, then make sure the pieces are not moved.
  3. Use TexCreator to convert it back to a .tex. You'll have to put in an output location for it work.

This next part may be weird. The original folder for the prefab's respective anim will be zipped. Unzip it, copy the anim.bin and the build.bin to a new folder, copy in the new custom atlas-0.tex, and then re-zip the folder with the same name it had in the game files. In your mod, make a new anim folder and add the zipped folder to it. It should contain the three files.

Now, hopefully, you will see your changes inside the game, but only you can see them since you cannot alter someone else's anim files unless you make a modmain and tell each prefab to refer your own anim files (most likely using an add prefabpostinit containing a function that redefines the anim files to something else using AnimState:SetBank and AnimState:SetBuild, but that could be wrong...)

Hopefully this helps!

For extra reading, I just came across this forum from not that long ago:

 

Edited by rawii22

Share this post


Link to post
Share on other sites

Ah,  I See, thanks a lot ! 
Just 1 question left, does this mean we as the creator will have to live with our reskin mod? because you said we're replacing our own gamefiles, right? 

Share this post


Link to post
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
Sign in to follow this