do I need to copy images from other mods into mine?

Post Reply
pikkio
Posts: 1
Joined: Tue Sep 07, 2021 11:34 am

Tue Sep 07, 2021 1:51 pm

Hello! Probably this is a noob question but I can't find clear info about it... :roll:

I have created a mod which is an extension of another mod from steam workshop, I modified some stuff and the other mod seems to be already set as required for mine.

I haven't published the mod on steam yet, so for now I have only imported the mod from the steam folder into my local mods.

Then I have duplicated an item from that mod which had a custom image/mesh, and I have used it to create another object with different values and name.

I see in FCS the new item has the path of the mesh which is pointing to the ./mods/name-of-other-mod/meshes/name-of-mesh

When I play the game it seems to be working fine, and I can see the object and icon for my new item, but I am not sure if it's just because I am working in locale...

will it work when I upload my mod to steam workshop? Or do I have to duplicate their custom mesh into my mod's folders?

thanks in advance for your help!

User avatar
Shidan
Moderator
Posts: 1234
Joined: Mon Oct 22, 2012 1:41 pm

Tue Sep 07, 2021 2:18 pm

What I would do is copy them to your vanilla folders instead, and link to them there.

So instead of either of these:
.\mods\name-of-other-mod\meshes\name-of-mesh
.\mods\name-of-your-mod\meshes\name-of-mesh

You would do:
.\data\meshes\name-of-mesh

Because of how overriding of files works, as long as the other mod is on, it will be able to see its files from there, and you won't have to reupload someone else's assets. :)

pikkio
Posts: 1
Joined: Tue Sep 07, 2021 11:34 am

Tue Sep 07, 2021 2:37 pm

thanks for your reply Shidan!

though I guess that when I upload the mod to steam workshop then it won't work for the other people because they won't have the mesh in their .\data\meshes\name-of-mesh :roll:

This is actually the thing I am not sure about... when you upload/publish the mod on steam, is FCS converting these local paths to point to the path where the original mod from steam workshop has been stored?

because otherwise I guess I also have to convert the path on my custom images instead of having /mods/my-mod/meshes/name-of-mesh

which is the best practice for these things?
Last edited by pikkio on Tue Sep 07, 2021 2:56 pm, edited 2 times in total.

User avatar
Shidan
Moderator
Posts: 1234
Joined: Mon Oct 22, 2012 1:41 pm

Tue Sep 07, 2021 7:44 pm

The game has a method overriding vanilla files using mods, by placing them in identical locations as vanilla, and using the same file name.

So for example, if I wanted to override the human male mesh, I'd put the modified version the corresponding mod location:
Vanilla file: Kenshi\data\character\meshes\human\human_male.mesh
Mod file: Kenshi\mods\MyModName\character\meshes\human\human_male.mesh

Doing it like that will make it no longer read the vanilla file, but the modded one instead.



My suggestion about your files is tricking the game to use that system. By telling it that the files are in vanilla folders, it will try to load them there. But because of the other mod that you have marked as required, these "vanilla" files get overridden by the mod's files, even though there weren't actually any files to override.

So long story short, as long as you match the names and file paths when putting them in your vanilla folders, it should work fine for anyone that also has the required mod. :)

pikkio
Posts: 1
Joined: Tue Sep 07, 2021 11:34 am

Wed Sep 15, 2021 2:56 pm

Ok! sorry for the belated follow up but I have been busy and didn't have the time to work on the mod.

I've done some tests and it seems to be indeed working as you said, at least in my local environment! Thanks very much! :D

for clarity if someone read this in the future:

when I am duplicating an item which uses a mesh/image that is into another mod's folders, I then manually edit the path of the mesh in the FCS item's options, and I substitute this bit:

.\mods\name-of-other-mod\

with this:

.\data\

and then keep all the other subfolders as the very same as they are in the other mod.

p.s. this would work for the images within your own mod, but I am not sure if it's actually necessary. I would expect FCS to be already considering these things when you publish your mod to Steam and convert these paths automatically... I might write a follow up when I publish the mod. ;)
Last edited by pikkio on Wed Sep 15, 2021 3:02 pm, edited 1 time in total.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests