Author Message

Gastroker

us
Posts: 180

Location: United States
Occupation:
Age:
V$:
#1   2014-08-26 04:46          
I'm learning a bit about scripting and can't figure out how to solve this rather nooby problem.

SOOO I wanted to try something simple with the original SLRR I4 textures. The engine block, transmission, exhaust pipe etc.. all use "inline4.dds" as a resource. I want to change the turbo exhaust pipe so that it has its own custom texture. I made one and named it "tube.png" and placed it in the texture folder.

Next I go to edit the rdb and set it to /textures/tube.png instead of /textures/inline4.dds. Now the exhaust pipe uses the texture, but so does everything else! I need everything else to use inline.dds and only the exhaust pipe to use tube.png

Here's a short snippet of what I'm dealing with:

</FILE>
<FILE 00000212.res >
typeof 5
superid 0x00000001
typeid 0x00000028
alias turbocharger
isparentcompatible 1.00
</FILE>
<FILE 00000212.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\meshes\LOD3\turbocharger_air_out_pipe.scx
</FILE>
<FILE 00000213.res >
typeof 5
superid 0x00000001
typeid 0x0000002A
alias turbocharger
isparentcompatible 1.00
</FILE>
<FILE 00000213.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\meshes\LOD3\turbocharger_exhaust_pipe.scx
</FILE>
<FILE 00000214.res >
typeof 7
superid 0x00040005
typeid 0x00000002
alias Einvagen_Duhen_Ishima_Focer
isparentcompatible 1.00
</FILE>
<FILE 00000214.rsd >
</FILE>
<FILE 00000215.res >
typeof 7
superid 0x00000002
typeid 0x00000117
alias tube.png
isparentcompatible 1.00
</FILE>
<FILE 00000215.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\textures\tube.png
</FILE>
<FILE 00000216.res >
typeof 7
superid 0x00000002
typeid 0x0000011A
alias inline4_cylinder_head_cover.dds
isparentcompatible 1.00
</FILE>
<FILE 00000216.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\textures\inline4_cylinder_head_cover.dds
</FILE>

What I'm thinking is I need to add a chunk of code to it so that it can differentiate the textures. But this is where my knowledge tapers off. I tried adding extra code and ended up with the same result. After spending too much time figuring this out I thought I might as well ask on here for some tips.

Any help is appreciated B)

edit: just came across a tutorial on here about adding textures, I will be reading up on that as it looks like it will help a lot

Coprone

ee
Posts: 1366
http://instagram.com/coprone
Location: Estonia
Occupation: x
Age: 24
V$: 16,666
#2   2014-08-26 08:13          
For setting one texture place to two(or more), you need to edit that in 3DS Max. Adding textures tutorial will probably help. You can open .dds files with Photoshop (if stock PS wont open, download a plugin for it just like I did)

Gastroker

us
Posts: 180

Location: United States
Occupation:
Age:
V$:
#3   2014-08-26 14:49          
Ohhh that explains it, thanks. Is it possible to just have it not use the texture at all then?

Holy Shit Man

pl
Posts: 2554

Location: Poland
Occupation: Faking skills like a pro
Age:
V$: No
#4   2014-08-26 15:09          
Just don't write any in loading order. That should do it

Gastroker

us
Posts: 180

Location: United States
Occupation:
Age:
V$:
#5   2014-08-26 16:27          
Thanks, I'll change some stuff later today I hope it will fix it

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#6   2014-08-26 16:35          
# KeeJay : Just don't write any in loading order. That should do it
Nope, removing all texture is equal to set them all to the reflection map.

Find out which texture is bothering you and replace it on part's rendering id with the one you prefer.

For example add this string on your rpk

<FILE 00000216.res >
typeof 7
superid 0x00000002
typeid 0x0000011A <- this must be a 4 digit unique exadecimal id(0x00001234)
alias mytexture.format
isparentcompatible 1.00
</FILE>
<FILE 00000216.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\textures\mytexture.format
</FILE>

then copy its unique id and paste it to replace the one of the part that is bothering you.

How to find your part rendering id? There's nothing easier than it, open its relative CFG file and look the 5th row where it should say "rendering 0x00001234"(1234 = a whatever id), then check for it in your rpk/rdb and when you found it replace the id of the texture that's bothering you with the new one you created.
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O

Gastroker

us
Posts: 180

Location: United States
Occupation:
Age:
V$:
#7   2014-08-26 23:14          
Thanks for your help Bigg Boss93, I think I terribly messed up something. I followed your instruction and as I went to test it out in-game it rendered two version of the turbocharger exhaust pipe lol

I'll paste what I did:
--------------------------------------------------------
<FILE 00000213.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\meshes\LOD3\turbocharger_exhaust_pipe.scx
</FILE>
<FILE 00000214.res >
typeof 7
superid 0x00040005
typeid 0x00000002
alias Einvagen_Duhen_Ishima_Focer
isparentcompatible 1.00
</FILE>
<FILE 00000214.rsd >
</FILE>
<FILE 00000215.res >
typeof 7
superid 0x00000002
typeid 0x0000011G <<< changed it to that from 0x00000117
alias tube.png <<< changed from inline4.dds
isparentcompatible 1.00
</FILE>
<FILE 00000215.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\textures\tube.png <<<< same here
</FILE>

Next I went to the CFG:
"turbocharger_exhaust_pipe.cfg"

--------------------------------------------------------
render 0x0000013C ; "turbocharger_exhaust_pipe - 1 1" I copied what's in red
lod 1 1 //hi-res
render 0x0000002B
lod 2 2 //extr-hi-res
mesh 0x0000002A
click 0x00000073

body 0.0 0.0 0.0 0.0 0.0 0.0 2.0 sphere 0.1
noclick
nocollision

category 1

slot -0.028 0.000 0.000 0.000 0.000 0.000 56 ; turbo_exhaust_pipe_OUT
attach 0x00000048 55 ; turbocharger->turbo_gas_out_IN
attach 0x00000113 55 ;
attach 0x000000F4 55 ;
attach 0x0000010D 55 ;
attach 0x0000010C 55 ;
eof

Next, I went back to the rdb/rpk and searched for "0x0000013C"
--------------------------------------------------------
</FILE>
<FILE 00000241.res >
typeof 14
superid 0x00000114
typeid 0x0000013A
alias turbocharger_air_out_pipe
isparentcompatible 1.00
</FILE>
<FILE 00000241.rsd >
mesh 0x00000139
lod_amp 3.000
texture 0x00000117
</FILE>
<FILE 00000242.res >
typeof 14
superid 0x00000114
typeid 0x0000011G changed it to the new 4 digit exadecimal. It used to be 0x0000013C
alias turbocharger_exhaust_pipe
isparentcompatible 1.00
</FILE>

Im so bad at this I just started learning yesterday so please be nice :)

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#8   2014-08-26 23:23          
wait wait wait, you dont have to replace any id except the texture id on the rendering of your part

Added 57 seconds later:

# Gastroker : </FILE>
<FILE 00000241.res >
typeof 14
superid 0x00000114
typeid 0x0000013A
alias turbocharger_air_out_pipe
isparentcompatible 1.00
</FILE>
<FILE 00000241.rsd >
mesh 0x00000139
lod_amp 3.000

texture 0x00000117 < this

</FILE>
<FILE 00000242.res >
typeof 14
superid 0x00000114
typeid 0x0000011G
alias turbocharger_exhaust_pipe
isparentcompatible 1.00
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O

Gastroker

us
Posts: 180

Location: United States
Occupation:
Age:
V$:
#9   2014-08-26 23:53          
Okay I've changed it accordingly and it's doing the same thing as initially, it just doesn't use the texture at all.

For clarification when you wrote this:

<FILE 00000216.res >
typeof 7
superid 0x00000002
typeid 0x0000011A <- this must be a 4 digit unique exadecimal id(0x00001234)
alias mytexture.format
isparentcompatible 1.00
</FILE>
<FILE 00000216.rsd >
sourcefile parts\engines\Einvagen_Duhen_Ishima_Focer\textures\mytexture.format
</FILE>

then copy its unique id and paste it to replace the one of the part that is bothering you.


I was only supposed to edit that snippet right? Or did you mean I should have copied that entire line of code and added it to the rpk?

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#10   2014-08-27 10:07          
You have to copy that whole string(removing my comments) and set an unique typeid(just press Ctrl+F and check if the id you wrote is somewhere in the rdb, otherwise use 0x0000A001 which is surely not used), then change the texture name, keep your id in mind and past it instead of the texture id of the rendering script(the above with big orange write).

That's it
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O

Jesus Christ

uk
Posts: 2977

Location: United Kingdom
Occupation: Turning water into protein
Age: 33
V$: LOAD£D
#11   2014-08-27 10:12          
why did I bother writing the loading order tutorials.. how to add new texture etc ;)
Why be a KING when you can be a GOD?!

Gastroker

us
Posts: 180

Location: United States
Occupation:
Age:
V$:
#12   2014-08-28 03:51          
Ok got it working it properly now. Next I'm moving onto adding new parts to engines :D