Do textures in tex/true need to be declared somewhere?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 550
- Joined: Tue, 15. Aug 06, 13:36
Do textures in tex/true need to be declared somewhere?
Hello,
I am trying to mod laser muzzle flashes(Launch effects) but I ran into a problem.
Let's take the HEPT laser as an example:
-I made my own bitmap texture file called "1237.jpeg" and placed it in tex/true
-inside the bod file (that is referenced in the scene file that is used for effect 24 used by HEPT), I changed the number representing the reference to the texture file(original is 376), to the name of my own texture file(1237)
-however it did not work, when firing the gun in the game, the effect is just a black mass
Instead if I leave the material reference as the original one(376) and instead simply replace the file tex/true/376.jpeg with my own image, then it works.
Do i need to declare new textures I add in tex/true somewhere in an XML file in order for the game to pick them up?
Please help !
Thanks
I am trying to mod laser muzzle flashes(Launch effects) but I ran into a problem.
Let's take the HEPT laser as an example:
-I made my own bitmap texture file called "1237.jpeg" and placed it in tex/true
-inside the bod file (that is referenced in the scene file that is used for effect 24 used by HEPT), I changed the number representing the reference to the texture file(original is 376), to the name of my own texture file(1237)
-however it did not work, when firing the gun in the game, the effect is just a black mass
Instead if I leave the material reference as the original one(376) and instead simply replace the file tex/true/376.jpeg with my own image, then it works.
Do i need to declare new textures I add in tex/true somewhere in an XML file in order for the game to pick them up?
Please help !
Thanks
-
- Posts: 571
- Joined: Sat, 23. Feb 08, 12:38
Re: Do textures in tex/true need to be declared somewhere?
As far I know (if remember correctly), there are no such file, must be correctly defined texture name/number into the 3D bod file and mod cat/dat address to texture, like "tex/true/" for numbered textures.Do i need to declare new textures I add in tex/true somewhere in an XML file in order for the game to pick them up?
Check if correctly texture name is written into the bod file in the textures parameters.Instead if I leave the material reference as the original one(376) and instead simply replace the file tex/true/376.jpeg with my own image, then it works.
-
- Posts: 550
- Joined: Tue, 15. Aug 06, 13:36
Re: Do textures in tex/true need to be declared somewhere?
Hello,
Thanks for your reply.
The HEPT bullet launch effect is "24". Effect "24" is composed from 3 effects. Let's look at the first one just as an example(it's the green "flame" of the HEPT laser), it points to scene file 4252
Scene file 4252 looks like this:
So it uses body file 444. Looking into body file 444 we see(truncated, content is longer):
That first line "MATERIAL3: 0;376;". 376 is the name of the texture file it uses. I tried changing that to the name of my texture file(pretty sure I put it correctly). But I put it exactly as "1237".
Like:
Thanks for your reply.
The HEPT bullet launch effect is "24". Effect "24" is composed from 3 effects. Let's look at the first one just as an example(it's the green "flame" of the HEPT laser), it points to scene file 4252
Scene file 4252 looks like this:
Code: Select all
/===============================================================
/ 3D Scene Information from 3ds file: f:\src\xtract\export\04252.3ds
/===============================================================
VER: 3;
P 0; B 444;
{ 2; 0; 0; 0; 0.000000; 0.000000; 0.000000; 0.000000; 75; 1; } // 0
{ 18; 0.500000; 0.000000; 0.000000; -1.000000; 75; 2; } // 1
{ 18; 0.500000; 0.000000; 0.000000; -1.000000; -1; -1; } // 2
Code: Select all
/===============================================================
/ Automatically generated bodyfile. from 3ds file: f:\src\xtract\export\00444.3ds
/===============================================================
MATERIAL3: 0;376; 150;150;150; 150;150;150; 229;229;229; 49;100;10;0; 1;1;0; 100; 0;0; 0;0;
1000; / Automatic Object Size
/Center: 0, 0, 1031
-10085; 0; 98969; /0 (ex 2)
-10084; 0; -489; /1 (ex 0)
10086; 0; 98969; /2 (ex 3)
10085; 0; -489; /3 (ex 1)
0; -10085; 98969; /4 (ex 6)
0; -10084; -489; /5 (ex 4)
0; 10086; 98969; /6 (ex 7)
Do you mean I have to give it the full path ?As far I know (if remember correctly), there are no such file, must be correctly defined texture name/number into the 3D bod file and mod cat/dat address to texture, like "tex/true/" for numbered textures.
Like:
Code: Select all
MATERIAL3: 0;tex/true/1237; 150;150;150; 150;150;150; 229;229;229; 49;100;10;0; 1;1;0; 100; 0;0; 0;0;
-
- Posts: 550
- Joined: Tue, 15. Aug 06, 13:36
Re: Do textures in tex/true need to be declared somewhere?
Writing it with the full path as "tex/true/1237" or even with the file extension "1237.jpg" will cause X3 to crash when I fire the weapon . So this is out of the question. The only way it works is to write it as only the filename(without extension)
I am 100% sure I am writing the name of my texture correctly. I know this because when I import my body file into 3ds max, it loads correctly with my custom texture. It simply refuses to display correctly in game.
What is strange is that this only happens with objects that are part of scenes. This never happens when I mod "bullet" objects for example.
Any ideas?
I am 100% sure I am writing the name of my texture correctly. I know this because when I import my body file into 3ds max, it loads correctly with my custom texture. It simply refuses to display correctly in game.
What is strange is that this only happens with objects that are part of scenes. This never happens when I mod "bullet" objects for example.
Any ideas?
-
- Posts: 571
- Joined: Sat, 23. Feb 08, 12:38
Re: Do textures in tex/true need to be declared somewhere?
If into the BOD file texture parameters are like this, with MATERIAL3:
39.jpg texture will loaded automatically only from tex/true/ folder, in that case don't need to write address to texture in bod file, you need to put your texture in the mod with address to texture - tex\true\39.jpg
If you have MATERIAL6: in the bod file, then you need to write address to texture - environments\asteroids\asteroids_02_diff.dds and put texture in the mod also in the same address environments\asteroids\asteroids_02_diff.dds.
I'm not sure about how it is in X3, but in the X2, all textures numbers in tex/true/ folder are hardcoded in game engine, only vanilla texture numbers working in the game, all other new texture numbers simply not working into the game.
Maybe try to change BOD file texture parameters to MATERIAL6:, simply copy 1 texture parameter from any other vanilla BOD file and change texture address and save your texture to DDS format.
example:
If still not working, then send me your test mod link in PM, I will try to help.
Code: Select all
MATERIAL3: 0;39; 16;46;14; 51;141;45; 229;229;229; 0;0;25;5; 0;0;0; 100; 0;0; 0;0;
If you have MATERIAL6: in the bod file, then you need to write address to texture - environments\asteroids\asteroids_02_diff.dds and put texture in the mod also in the same address environments\asteroids\asteroids_02_diff.dds.
Code: Select all
MATERIAL6: 0; 0x2000000; 1; ... t_DiffuseTexture;SPTYPE_STRING;environments\asteroids\asteroids_02_diff.dds; ...
Maybe try to change BOD file texture parameters to MATERIAL6:, simply copy 1 texture parameter from any other vanilla BOD file and change texture address and save your texture to DDS format.
example:
Code: Select all
MATERIAL6: 0;2;effects\explosions\exp_p1_diff.tga; 0;0;0; 255;255;255; 255;255;255; 1;100;10;0; 1;0;0; 100; NULL;0; NULL;0; NULL;0; NULL;0; NULL;0;
-
- Posts: 550
- Joined: Tue, 15. Aug 06, 13:36
Re: Do textures in tex/true need to be declared somewhere?
Yeah, I was afraid of that. If they are hardcoded in X2 then they most likely are in X3 as well. The symptoms I am experiencing certainly point in that direction.
Interesting idea to change MATERIAL3 to MATERIAL6. I will try that now.
Interesting idea to change MATERIAL3 to MATERIAL6. I will try that now.
-
- Posts: 550
- Joined: Tue, 15. Aug 06, 13:36
Re: Do textures in tex/true need to be declared somewhere?
Hey, it worked ! I changed the material to MATERIAL6 and it's working. It looks different than MATERIAL3, but I guess I need to fiddle around with the material settings to get it to look just right.
Thank you !
Thank you !