#1 2014-05-15 18:58:04

Moresti
Member

Adding Textures

I'm attempting to add textures to the game and would like to know how I would go about doing that.
I've added a new file to the Tesseract/media/texture file with the texture files name. I've added a texture into the file with the name of office_carpet001a.png along with a tex file with the same name with the .png removed with .tex at the end. I'm still unable to see the texture though.

Offline

#2 2014-05-15 19:59:26

Teh_Bucket
Member

Re: Adding Textures

Each map has a list of textures in the cfg file, there is also a cfg file with a list of all default textures in Tesseract/config/default_map_settings.cfg

Open that file in a text editor, and add texload path/to/your/texture at the end.
The path starts in media/texture, so to access your texture it would be texload office_carpet001a
(you don't put .tex or anything at the end in the config)
It you /newmap after changing the cfg, your texture should now show up at the end of the list of textures in F2 :)

Offline

#3 2014-05-15 20:33:27

Moresti
Member

Re: Adding Textures

Awesome awesome Awesome!! It works! Thanks!

Now I have just one more question. Is there any way to create a new tab in the f2 menu to store all my added textures?

Offline

#4 2014-05-15 20:54:45

RaZgRiZ
Moderator

Re: Adding Textures

.tex is just a config file that sets shader and parameters for a single texture and its maps only. It's not some magical invention that makes the game see rainbows and list your random texture :P

Also suggested you do NOT edit the default_map_settings. They're default for a reason, use texturereset and then define the textures you want in your map config.

Offline

#5 2014-05-15 21:04:10

Moresti
Member

Re: Adding Textures

RaZgRiZ wrote:

Also suggested you do NOT edit the default_map_settings. They're default for a reason, use texturereset and then define the textures you want in your map config.


This is my first time doing any of this so you've lost me. Where can I find "texturereset" and the map config?

Offline

#6 2014-05-15 21:36:21

Moresti
Member

Re: Adding Textures

Ahhh, nevermind. I figured it out. Not sure if I did it right but here it is.
I copied the text in default_map_settings.cfg then found where my custom map file was which was in documents/my games/Tesseract/media/map.
There was no cfg file for the map. So using Notepad++ I created a new file pasted the text from the default_map_settings.cfg into that document and safed it as 2.cfg (Since my custom map is currently named '2'".
I launched my game and the texture was loaded.


I'm hoping this is the right way. If some one wouldn't mind responding.

Last edited by Moresti (2014-05-15 21:38:44)

Offline

#7 2014-05-15 22:11:49

RaZgRiZ
Moderator

Re: Adding Textures

Yes, that is the correct method. If you had changed the textures of default_map_settings, any maps that do not use their own texture config would likely end up displaying the wrong textures.

Offline

#8 2014-05-15 22:26:10

Moresti
Member

Re: Adding Textures

Ah, alright. Now my question for the separate tabs. The f2 menu has 3 tabs-
Listed
Utilized
Replace

I was wondering if there was a way to add one just like them. But this added tab would have only the textures I've added.

Offline

#9 2014-05-15 22:35:54

RaZgRiZ
Moderator

Re: Adding Textures

Moresti wrote:

Ah, alright. Now my question for the separate tabs. The f2 menu has 3 tabs-
Listed
Utilized
Replace

I was wondering if there was a way to add one just like them. But this added tab would have only the textures I've added.

Listed is the one.

Offline

#10 2014-05-16 07:29:08

Calinou
Moderator

Re: Adding Textures

texturereset requires redefining all the textures you want to use. While it will break over time (due to new textures in default_map_settings.cfg), it's probably a better idea to not use texturereset in your map .cfg and only texload.

Offline

#11 2014-05-16 09:22:43

RaZgRiZ
Moderator

Re: Adding Textures

Calinou wrote:

texturereset requires redefining all the textures you want to use. While it will break over time (due to new textures in default_map_settings.cfg), it's probably a better idea to not use texturereset in your map .cfg and only texload.

Adding textures after the defaults is a great way to ensure your map will be fucked up when the defaults DO change, so no, using texturereset should be mandatory.

Offline

Board footer