Edit: The unpackConfig error has been fixed, Now it won't need you to replace.
GTFO THIS TOPIC IF YOU FULFIL ANY OF THESE:
Code:
0 Creativity
Faggot
Wannabe Rs Leacher
Flamer
Leacher
McDonalds worker
The Tech Guys worker
Please don'tpost.
Purpose: To add custom character model chunks, and maybe finally get some creativity in rsps. This will pack it into the cache, So should you EVER decide you dont like the things, just set customChunks to 0, save compile and run, let it load and replace ur IDK with the original one. You will be able to do this:

Difficulty: 4/10?
Assumed Knowledge: Refactoring values, making values static
Classes Modified: IDK.java
Refactored/Non-Refactored?: Refactored
First, Backup your IDK.java and cache(this IS important, miss this and u cud regret it), Then follow these steps:
Step 1:
Replace your readValues(Stream stream) method with this
Code:
private void readValues(Stream stream) {
do {
int i = stream.readUnsignedByte();
randval1 = i;
if (i == 0)
return;
if (i == 1)
partID = stream.readUnsignedByte();
else if (i == 2) {
int j = stream.readUnsignedByte();
randval2 = j;
models = new int[j];
for (int k = 0; k < j; k++)
models[k] = stream.readUnsignedWord();
} else if (i == 3)
noInterface = true;
else if (i >= 40 && i < 50)
originalModelColor[i - 40] = stream.readUnsignedWord();
else if (i >= 50 && i < 60)
reassignedModelColor[i - 50] = stream.readUnsignedWord();
else if (i >= 60 && i < 70)
headModels[i - 60] = stream.readUnsignedWord();
else
System.out.println("Error unrecognised config code: " + i);
} while (true);
}
Step 2:
Declare this:
Code:
public void readValues(int i) {
switch (i) {
case 1:
models = new int[1];
models[0] = 3;
headModels[0] = 3;
noInterface = false;
partID = 0;
break;
}
}
Step 3:
Replace your unpackConfig method with this:
Code:
public static void unpackConfig(StreamLoader streamLoader) {
Stream stream = new Stream(streamLoader.getDataForName("idk.dat"));
int olength = stream.readUnsignedWord();
length = olength+customChunks;
if (cache == null)
cache = new IDK[length];
for (int j = 0; j < olength; j++) {
if (cache[j] == null)
cache[j] = new IDK();
cache[j].readValues(stream);
}
for (int j = olength; j < customChunks+olength; j++){
if (cache[j+olength] == null)
cache[j+olength] = new IDK();
cache[j+0length].readValues(j);
}
}
Step 4:
Declare these somewhere near the bottom of the class
Code:
public int randval1;
public int randval2;
Step 5:
And declare this somewhere easy to remember:
Code:
public static int customChunks = 1;
Step 6:
Rename these values
Code:
Origional - New
aBoolean662 - noInterface
anIntArray661 - headModels
anIntArray660 - reassignedModelColor
anIntArray659 - originalModelColor
anIntArray658 - models
Step 7:
Make variable 'length' static
Ok now then, for every new one you add, increase customChunks by 1
Now a run through
Lets look back to
Code:
public void readValues(int i) {
In there, you should see the following:
Code:
case 1:
models = new int[1];
models[0] = 3;
headModels[0] = 3;
noInterface = false;
partID = 0;
break;
That is the basic one, really no recolours etc
3 is the model id, you can add more but you need to change the length of it (in the line above it)
This is the head model (on the chat interface box for dialogues), This ONLY applies to heads and the center should be at x=y=z=0
This is what type the part is.
Here is a list of them
Code:
0 - Male head
1 - Male jaw
2 - Male torso
3 - Male arms
4 - Male hands
5 - Male legs
6 - Male feet
7 - Female head
8 - Female jaw
9 - Female Torso
10 - Female Arms
11 - Female hands
12 - Female legs
13 - Female feet
Code:
noInterface = false;
If this is set to true, then it will not load on the character design interface.
If this is set to false, It will show up on the character design interface.
By default this should be true.
Now thats that, get creating
Credits
99% Me - For making it
1% Jagex - For giving us this file structure of IDK.dat
Example:
Shirtless peoples (Credits to Slay No More seeing as he will cry until he gets credits)
Code:
case 0: // MALE
originalModelColor = new int[4];
reassignedModelColor = new int[4];
originalModelColor[0] = 43072;
reassignedModelColor[0] = 4550;
originalModelColor[1] = 7056;
reassignedModelColor[1] = 8741;
originalModelColor[2] = 22416;
reassignedModelColor[2] = 4550;
originalModelColor[3] = 22424;
reassignedModelColor[3] = 4550;
models = new int[1];
models[0] = 11390;
partID = 2;
noInterface = false;
break;
case 1:// FEMALE
originalModelColor = new int[4];
reassignedModelColor = new int[4];
originalModelColor[0] = 43072;
reassignedModelColor[0] = 4550;
originalModelColor[1] = 7056;
reassignedModelColor[1] = 8741;
originalModelColor[2] = 22416;
reassignedModelColor[2] = 4550;
originalModelColor[3] = 22424;
reassignedModelColor[3] = 4550;
models = new int[1];
models[0] = 1030;
partID = 9;
noInterface = false;
break;