Textures in CSM

matyilona200
New member
 
Posts: 9
Joined: Sun May 20, 2018 14:41
GitHub: matyilona

Textures in CSM

by matyilona200 » Sat Jun 15, 2019 10:50

Looking through client_lua_api.txt I don't see any mention of textures. I tried adding them in the textures folder like in a ssm, but it did not work, I get "Could not load image xyz while building texture; Creating a dummy image". Is there any way of adding new textures in a csm, for use with formspecs/hud? I added a mwe, which just tries to adds a hud element with an image.
Attachments
csm_texture_mwe.zip
(1.11 KiB) Downloaded 11 times
 

User avatar
Lone_Wolf
Member
 
Posts: 2179
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: Textures in CSM

by Lone_Wolf » Sat Jun 15, 2019 20:35

You may have to put the textures in a texturepack (Inside Minetest/textures) for it to work
 

matyilona200
New member
 
Posts: 9
Joined: Sun May 20, 2018 14:41
GitHub: matyilona

Re: Textures in CSM

by matyilona200 » Wed Jun 26, 2019 20:16

That's a good workaround, but I'd like to have it bundled in the mod.
The example file structure of a csm suggests that it can have textures, although the client_lua_api.txt does not seem to show it.

An other problem which I think is related is using dofile() in a csm.
In a server side mod, I can use get_modpath() with get_current_modname() and append the filename that I want to include.
I tried
Code: Select all
dofile("file.lua")
dofile("modname/file.lua")
dofile("clientmods/modname/file.lua")

All return "Coudln't find script" errors.

It all seems connected to how clientmods are interpreted, I'll try looking into it a bit more and see if there are any issues on github that could be related.
 

User avatar
Lone_Wolf
Member
 
Posts: 2179
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: Textures in CSM

by Lone_Wolf » Wed Jun 26, 2019 20:19

matyilona200 wrote:That's a good workaround, but I'd like to have it bundled in the mod.
The example file structure of a csm suggests that it can have textures, although the client_lua_api.txt does not seem to show it.

A lot of the CSM doc is just copied from the SSM doc. This has lead to a few confusing cases like this
 


Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 2 guests