Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure!

- Street Legal Modding


http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP 👤 ⍰❎
9 captures 20 f 🐦
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Welcome, Please Register or Login


You're not logged in | |
Custom Search Search

GOM-TEAM.COM
#1 Source For Street Legal Mods

Home Forums Downloads Tutorials Articles Search GOM Facebook Upload Images

Tutorials \ Street Legal Modding \ Noob-Proof Guide To RPK Structure!


Author / Submitted by: Defiant

Noob-Proof Guide To RPK Structure!

Okay here is the simplest guide to


RPK scripting! By the end of this you'll be scripting like a pro! The first thing to remember is that it looks a lot harder than it really is. This is
something ANYONE can do, it just looks confusing which turns a lot of people away! If you still can't do it after this guide, then what can I say, you
need serious help

Okay first things first, you need two .exe's: resdecode and resconvert. Chances are, you already have these two files in your slrr folder!

You want to copy BOTH and PASTE them into a new folder. I made a new folder in my documents and put them there.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 1/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Now notice I have a third file: resource converter. This takes the work out of converting rpk and rdb files back and forth. You can download the
resource converter here: http://streetlegalmods.com/downloads/game/tools/Resource-Converter (if a warning message pops up hit ignore. It's safe I
promise).

Okay, now you're ready to get started. For this tutorial, I will be using the rpk from my drag wheel mod as an example. You can use any rpk because
they're all very similar. But for simplicity sake, I will use this.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 2/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Now we need to convert this rpk to an rdb (readable/writable) file. You're in luck, the resource converter makes this really easy!

Just DRAG the rpk onto the resource converter EXE like this:

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 3/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

The program will open. Everything on the left is in rdb format, and everything on the right is rpk format. If you double click the name of the rpk on the
right, it will convert to rdb. So once you double click it will look like this:

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 4/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Close the resource converter. You will now see you have another file in your folder. This is the rdb that has been converted. Right click it and open
with notepad

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 5/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

When it opens it will look like this:

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 6/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Okay here is where the fun starts. Pay attention to these </FILE> lines. Every snippet of code is separated by these and it is important to not forget
them when making new bits of code. Also <FILE RES> and <FILE RSD> go hand-in-hand. (ignore the numbers they don't matter). A good way to tell
where a piece of code ends and where another starts is by looking for the RSD bit. So we look at <FILE RSD> and see right below it is the location
of the texture I'm using. This is where the piece of code ends. Right below it is another </FILE>, this signifies a new piece of code starts.

I've highlighted the entire piece of code so you can visualize it better.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 7/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

I have THREE textures, so I need THREE pieces of code locating each of them!

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 8/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Simple right?

Next we have the "typeof" and "superid" lines. The typeof line tells the game what type of resource this piece of code is.

Common ones you will see:

typeof 5: this is for meshes (.scx files)

typeof 8: this used for scripts (cfg and class files)

typeof 7: this is for textures

typeof 9: this is for the physical mouse click on a mesh

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 9/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
typeof 14: this is for renders (will talk about renders later)
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

When defining textures we use typeof 7 and for the superid we use 0x00030003

The superid helps the game find the file. I will explain the superid's later..

This right here is a typeid, these are always unique and are always made up by YOU

I completely made up 0x000000C4, 0x00000BD4, and 0x00000DC4. BUT they are all unique! So before you make up a typeid, hit CTRL F and
search for it to make sure it isn't used already.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 10/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
Imagine parking a red car in a car park full of red cars. How will you ever find it? You must make it UNIQUE, ifGoit is APR
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure exactly
AUG theSEP
same as all the
👤
others
you will have problems. This is basically what the game does, it needs to be able to tell two pieces of code apart. A typeid helps the game find what
9you want it to find.
captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture
Ignore alias and isparentcompatible, these are not important. I personally just copy the source file name and paste it in the alias slot, and I never had
to touch isparentcompatible.

Hey guess what? You now understand how to read SLRR rpk code, what each line means, and why it's there! Take a moment to pat yourself on the
back.

Take a breather now, we're about to learn about "SECTIONS" of code. You learned what a piece of code looks like, now you will learn what a section
looks like. This is possibly the most important thing to know.

Remember those three textures above? Notice how I grouped all three together and at the top. They make up a "section" of code. In this example,
this is the texture section. I like to put them at the very top for ease.

Everything highlighted is the "texture section", or "section one".

Let's go to section TWO!

Notice that it is very similar except for some numbers and names. These numbers and names are what define a section pretty much.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 11/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Here section two is .scx meshes. Notice the typeof 5 line and the superid 0x00030001 line. We use these for meshes. Now look at the typeid's, they
are again all unique. I just made up whatever I can think of that is easy to remember because we WILL be using this again later (you might want to
write these down if you have bad memory).

Side note: never confuse a superid with a typeid. Think of it this way: a superid is SUPER STRONG, you can't change it (unless you know what you
are doing). And a typeid means you need to TYPE a unique name. This stuff gets easier the more you use it, trust me.

Since it is a mesh that we want to script, notice that the sourcefile line at the end points to my meshes folder. This is where all my 3d meshes are
located. Now, to help me remember all the typeid's and match them to the file. I tend to make a pattern.

So you'll see there is a pattern with the mesh file number and typeid number.

<FILE 00000004.res >


typeof 5
superid 0x00030001
typeid 0x000000D1
alias Rim_01
isparentcompatible 1.00
</FILE>
<FILE 00000004.rsd >
sourcefile parts\defiantpack\meshes\Rim_01.SCX
</FILE>
<FILE 00000005.res >
typeof 5
superid 0x00030001
typeid 0x000000D2
alias Rim_02
isparentcompatible 1.00
</FILE>
<FILE 00000005.rsd >
sourcefile parts\defiantpack\meshes\Rim_02.SCX
</FILE>
<FILE 00000006.res >
typeof 5
superid 0x00030001
typeid 0x000000D3
alias Rim_03
isparentcompatible 1.00
</FILE>
<FILE 00000006.rsd >
sourcefile parts\defiantpack\meshes\Rim_03.SCX

Again, there are few conditions. Each typeid has to be unique and has to be used only ONCE. But I also make them a pattern: D1 - Rim 1, D2 - Rim
2, D3 - Rim 3 etc.. Just to make it easy to remember. YOU DON'T HAVE TO DO IT THIS WAY, BUT IT IS RECOMMENDED. Also, if I'm lazy I don't
bother to make a pattern..

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 12/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
Let's go to section THREE. This part may get confusing, so if you don't understand the first time then don't worry. You might need to take a break
9and reread this part over.
captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture
This is where I realize I should have picked a simpler rpk because section 3 and 4 are sort of mixed, but I'll try my best to not complicate things.

Lets name each section:

Section 1: textures

Section 2: meshes

Section 3: click

Section 4: render

Section 5: script

This section is a mix of 3 & 4 by choice. You can make them separate if it is easier for you. We can tell this is a new section because we look at the
"typeof" line, and we see that it is different now. For click (mouse click) we see typeof 9, and for render we see typeof 14. Also the alias says "click"
and "render".

So remember when you are scripting a click code, you have to use type of 9 and superid 0x00030007. The typeid is unique once again, "B1". If you
search in the file you will not find another "0x000000B1" anywhere. If you do you will have problems!!!

Now look at shape parts\defiantpack\meshes\rim_01.SCX. This is in the "click" section, it basically gives the mesh a clickable shape based on how
it's modeled.

Now we are getting close to the end! Have a cookie. Let's talk about section 4 or the render section.

Section 4 (render) is a little bit different and you must be able to differentiate different bits of code here.

Again these have unique typeid's, and they will be used in the cfg.

So let's take a close look at this bit of code:

</FILE> <----- start

<FILE 00000017.res >

typeof 14 <---- remember this? 14 is always for


renders

superid 0x00030002 <---- use this superid for renders too, don't touch this

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 13/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
typeid 0x000000A1 <---- same thing, just a unique id
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP 👤
9alias render
captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture
isparentcompatible 1.00

</FILE>

<FILE 00000017.rsd >

mesh 0x000000D1 <---- this is the only place you want to copy a unique typeid. Go to section 2 (meshes) and look at the typeid for rim_01. These
have to match. This render is used for rim_01. The next render is used for rim_02. etc..

flags 8.0 <---- flag 8 gives your part a shadow. No flag no shadow.

lod_amp 3.5 <--- ignore this

texture 0x000000C4 <---- end (the end of a render is always the last texture id) Also go all the way to the very top and look at the id of the first
texture. This render uses the texture 0x000000C4, also known as "chrome". Without this, the part will not be chrome!

When exporting something from 3DS MAX to .scx, a texture folder will be printed. Inside this folder tells you the name of the textures and what order
they need to be in. In this case, the rim only uses chrome so I only applied 0x000000C4 (chrome to it).

It's important to get these textures in order if you have more than one.

For example, if you export a 3DS MAX file to .scx and it prints out these textures:

carbon.png

paintable.png

chrome.png

Then you would have all three textures in the render in that order! That way, when it renders in the game carbon will be on the bottom, paintable in
the middle and chrome on top.

Finally, we have the last section. Let's call it section 5 (script). This part is easy, and very simple. I have highlighted the piece of code for rim 1:

This ties everything together. This section brings all the other sections together through the cfg file and the class and java files.

Notice:
typeof 8 - script

superid - 0x0002F235 this is the only time you will choose what superid to use. The purpose of this superid is to put the file in a catalog category.
Since I used 0x0002F235, this file will show up in the rims section. This link has all the superid categories listed:
http://streetlegalmods.com/tutorials/street-legal-modding/221-MWM-Catalog-SuperIDs
https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 14/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
Let's say I want these rims to show up in the engine blocks section, I will change the superid from 0x0002F235 to 0x0000025C.
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

FINALLY!

We will copy our unique typeid's into the correct cfg folder. So let's open up rim_01.cfg

I need to paste the render typeid for rim one, click typeid for rim one, and mesh typeid for rim one here.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 15/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP 👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Aaaaannd you're done!

Remember to go back and convert your new RDB file back to RPK format using the resource converter.

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 16/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP
👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

Tags: Guide , Help , Noob , Rpk , Script , Slrr , Structure

9. moh supercharged

2016-08-23 17:34

thanks alot defiant

8. moh supercharged

2016-08-23 17:34

thanks alot defiant

7. Zeprarex

2016-08-22 21:46

Now I need to try to mod for the 1st time

6. Defiant

2016-03-16 20:08

Whatever works for you.

5. mindedrift

2016-03-16 03:13

That's odd. </FILE> should be the end and <FILE ... > should be the start

4. Defiant

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 17/18
8/5/2018 GOM-TEAM.COM - Noob-Proof Guide To RPK Structure! - Street Legal Modding
2016-02-29 13:52
http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure Go APR AUG SEP 👤
9 captures 20
1 Apr 2016 - 31 Jan 2018 2016 2017 2018 ▾ About this capture

3. Fireful0

2016-02-28 07:47

Thank you so much for uploading this!


Now I can get into more major SLRR editing!
This is by far the best .rpk tutorial I have ever seen!
Thanks again!

2. RedCarDriver

2016-02-28 02:39

This is a great write-up!

One minor gripe: Seriously, disable "Hide extensions for known file types" on your computer. It'll save you a lot of headaches with other kinds of modding.

1. Sterling

2016-02-28 02:35

Gives Cookie!

Only registered users can post new comments

Contact Info
Put your e-mail, skype, phone numbers or any other contact information here so that your visitors could easily get in touch with you.

Powered By Cotonti Siena 9.15


Operated by Defiant & owned by Singh. All rights reserved.
Site Designed by Peerless Conception Studios of Singh Enterprises
Copyright © 2004-2016 www.GOM-TEAM.com | www.streetlegalmods.com
The owner and management team is not responsible for the content posted by the members on this website.
Page created in 0.28 secondsSQL total time: 0.027 seconds - SQL queries: 29 - Average SQL time: 0.00094 seconds

https://web.archive.org/web/20170820130346/http://streetlegalmods.com:80/tutorials/street-legal-modding/Noob-Proof-Guide-To-RPK-Structure 18/18

You might also like