Space Engineers

Space Engineers

Paint Gun - realistic painting for survival + special creative features
typekcz 31 Jul, 2020 @ 5:16am
Custom armor skin - can't load texture from mod directory
I'm trying to make custom armor skin, but looks like game doesn't want to load textures from mod directory. When I put custom textures in game's directory, it will load fine.
I tried modifying filepath in script so it would contain absolute path, but that doesn't work either.
When I put absolute path right in the sbc file, that works, but is obviously stupid solution.

Has anyone managed to make custom armor skin with custom texture in mod directory?
Any help would be appriciated.
< >
Showing 1-7 of 7 comments
Digi  [developer] 31 Jul, 2020 @ 7:28am 
Can you link your mod or upload the .sbc? I wanna test it on my end to see what's going on and maybe I can overwrite its path with a full path via script.
Last edited by Digi; 31 Jul, 2020 @ 7:28am
typekcz 31 Jul, 2020 @ 8:00am 
I tried to eliminate as many variables as possible.
So I'm testing with test armor skin copied over to mod folder.
http://paste.kotrzena.eu/MTky
http://paste.kotrzena.eu/MTkz
No matter what I tried, armor always looks like clean armor. It works only if I put absolute path to sbc or refer relatively to texture in game's directory.
Digi  [developer] 31 Jul, 2020 @ 2:42pm 
I tried it too and indeed it simply doesn't load textures from mod folders...

This doesn't seem fixable even with script because they're adding the paths to a different location where we can't edit (MyDefinitionManager.InitAssetModifiersForRender() and MyTextureChange is prohibited).

Bugreport it on the game's support site I guess xD
typekcz 1 Aug, 2020 @ 12:39am 
I think it's intentional, unfortunately. KSH probably doesn't want to allow modding something they are selling.

But I found a way to make it work :D:
Check it out:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2184022909
One assumption was made that Steam downloads workshop items in the same Steam library where the game is installed.
Then I can just:
<Texture Location="SquarePlate" Type="ColorMetal" Filepath="..\..\..\workshop\content\244850\2184022909\Textures\large_square_plate_cm.DDS"/>
Digi  [developer] 10 Feb, 2022 @ 2:36am 
I've made the mod do this texture fixing to any modded asset modifier definitions it finds (along with checking if the file exists in the mod ofc), unless path starts with `..` because then it ignores it :}
typekcz 10 Feb, 2022 @ 6:39am 
Nice. :gearthumbsup:
So you found some hacky workaround or they changed their restrictions?
Digi  [developer] 10 Feb, 2022 @ 8:43am 
I'm adding the mod's path (given by the API, I'm not guessing it) to the texture path, turning it into a full path (which is how it would've ended up if the definition was properly moddable).
< >
Showing 1-7 of 7 comments
Per page: 1530 50