Jump to content

How do I load textures from a mods folder?


Sejemus

Recommended Posts

Heya fellow survivors. 

My question is, how do I make an item load a icon from the mods folder instead of the game dir?

I've tried everything, at least it feels like it. What I have tried:

1. Put textures in texture folder

2. Put textures in ui folder

3. Put textures in the mods folder (the one with the media folder and mod info file)

4. Put textures in the lua folder with the lua files.

5. Loaded textures with the getTextures function. (How do you properly use this?)

 

Loading the textures with the getTextures function doesn't seem to solve the problem as the textures load without it from the game dir.

 

I'm moding for build 25+ btw. :)

 

 

EDIT3:

Found the reason  :)

The image files has to be in the root folder of the mod, the folder with the media folder and mod info file.  :)

 
Link to comment
Share on other sites

The structure goes like this:

 

[mods]

 

[modname]

 

 

[lua]                                      [scripts]

 

(lua files)              (item script files)             [images]

 

                                                            (put images here)

 

 

All icons must be called of 'Item_iconnamehere'

 

The in the .txt items file, have an icon = iconnamehere line.

 

e.g.

Icon = bow0,

In this scenario, the icon file itself would be called 'Item_bow0'

 

Hope this helps!

Link to comment
Share on other sites

Ok, I havn't tried with a folder called images. Thanks!

I did know the item_itemname thing though :)

But doesn't the item have to load the icon like this?

Icon = bow0.png,

EDIT:

Hmm. It didn't fix the problem, it still doesn't load them from the images folder. Do I have to load them with the getTextures() function?

 

EDIT2:

It might actually be an important thing to add that I mod for 25+, sorry I left that info out earlier >.<

But I do know the structure of most of the files, it's just the textures that won't load :-|

 

EDIT3:

Found the reason :)

The image files has to be in the root folder of the mod, the folder with the media folder and mod info file. :)

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
×
×
  • Create New...