- Jul 8, 2021
- 16
- 11
- 0
Alright so a fuck ton of people are asking how is revision upgrades done.
1) This thread is just to save time for us to stop repeating the same answer this question is very common.
2) Yeah my English grammar won't be the best.
Anyways:
First of all we need to know what deobs are. In here at least everyone call deobfuscated clients deob,
Obfuscated clients are pretty much randomized names / random numbers / and bunch more of random crap to make it harder for human eye to read.
Deobfuscated is opposite of obfuscation, it does not contain that random crap, deobfuscation will make for example: a = new dn to: field1935 = new class15. Add mapping to it and it will make instead of that field1935 = new class15 to: projectiles = new NodeDeque();
Some better example on the left you have obfuscated code on the right you have deobfuscated + mapped class:

Now since you know that lets continue on how we going to upgrade our server from revision 213 to revision 215 using Alter
First of all we will need to refactor buffer meaning (Mappers don't rename these, since most of the mappers that we use are by like RL/OPRS/Botters who don't really need this class) :

All of those method##### to what they are reading/writing as in above example we see --var4 and we see that it's expecting array of bytes and that it's starting point is var3 + var2 + 1 => Which is the end of the array we indicate that it starts from the end so we call it reversed. => We also can see that it reads them out of the array with - 128 (Which shows it's ADD)
One more example:

this.offset += 2; <-- This indicates how many bytes and by that we determine which type it is you can find all of them IBM Documentation
So we now know it's short we also see that it has & 255 in the end -> Which will indicate that it's order is LE aka Little
At first this all can seem to be complicated but after some practice (You will fail some times, but if you will continue trying eventually you will get a hang of it)
Just to make this process some what easier: https://github.com/CloudS3c/meteor-client/blob/main/osrs/src/main/java/Buffer.java Just copy entire line after var1 = or after return and search inside that link. If you can't find some methods name you can ask around R-S Discord (Expect to be trolled) or you can also just call all of the methods p1-4 etc. and Just reverse from reading to writing. I hope this step was some what useful there is really too much to cover and i am no expert at networking maybe someone in the comments will explain this better. But you will be now asking your self why tf do i need this?? Yh dunno.
Jk this is needed to know in what Type / order / transformer we need to send the data that we send from server.
So now we finished refactoring the buffer. Now we going to identify packets p much it's just looking for similarities.

So yeah you go renaming packets looking for similarities like in the screenshot above only IF_SETTEXT has .text)) { in it's block so then you just rename it (If you're using Intellij just hit Shift + F6) It will rename across all classes.
And so on.. Now what to keep in mind that all those values are in random order -> So we need to match it.

Now we have on server that's rev 213[Alter/RSMOD v1]:

And yeah this is why we refactor the buffer first: Blue color:
Var49 = readString => Most of the time if the packets is not new you will only need to send bytes (It's only for strings)
graphic = readIntIME => Now you can see on server side that we have: type: INT, and it's order: INVERSE_MIDDLE which is IME
Now you can see in the screenshot above that they are in a new order meaning we have to move - name: TEXT and type: BYTES bellow hash block.
And yes the order is very important. If you fail to follow the order of the packets values the packet will read them incorrect meaning you will see flying baboons.. Nah you will just be crashing when you will be sending that packet.
Now u see that opcode: 57 (It's pretty much packets ID) => We find them at ServerPackets.java

Now that type: VARIABLE_SHORT -> It's packets size.
If its a fixed length one, then just type FIXED.
If the size is -1, its VARIABLE_BYTE, and if it's -2, it's VARIABLE_SHORT
And yeah pretty much you will need to do that for all the packets.. Fun ones will be Zone Updates / Player Info / Npc Info
Whats so fun about those fuckers? Ohh boyy
Let's start with Zone Updates this one is pretty simple but still need to point out: That when you're doing these packets you need to not forget that when sending UPDATE_ZONE_PARTIAL_ENCLOSED you need to have them in correct order (Not packet order) But in what order the packets are being sent.

If you will send them incorrect expect Dropped items / Objects and etc. To be in incorrect order when you enter that region.
Player Info / Npc Info --> These ones will be the hardest ones.

if (var3 & 2) = 0x2
from Hex to Dec (You can convert them with your calculator or using: Hexadecimal to Decimal Converter)
Most common mistake is that people think oh you just add 0x in front of it nah you fucker. when it will be & 10 it will become : 16 and etc.
Now you will need to follow also how the masks are being readed on client if u fail doing that all other masks will be reading incorrect values as well.

And the fun part is appearance

If you forget to send or send it incorrectly may god be with you it's a son of a bitch to locate where you went wrong. Don't rush with these masks / packets.
With packets it would be recommended to do one by one and test them out. Since it's better to know exactly on which one you is faulty rather than digging trough 100 packets at once.
Default packets that you need to pass login phase: IF_OPENTOP, REBUILD_NORMAL, For RSMOD/ALTER you will need to do RebuildLogin (Which is basically the same packet REBUILD_NORMAL) but it needs extra data.
Anyways yh that's it for masks same will go for NPC_INFO
Also you will need to find and update this:

When it's incorrect. It will be only noticed when you join region that contains npcs. You will be crashed.
Ohh just forgot to include login decoder i guess ill do that later. :S
Overall that should be it , that's the bare minimum that you need to do to upgrade from any rev. Don't get me wrong you will need to put way more work. Especially when doing bigger jumps you.
Also when jagex adds new stuff to packets or change value types. You can't skip a single byte. Entire game runs on one huge ass array if you read something incorrectly the entire array gets fucked and makes other packets read incorrect values.
It's also not recommended to start doing rev upgrading for complete beginners you need to have some coding knowledge. Keep your eyes on comments i hope there will be some more extra notes it's a huge topic to cover but yh these are basically main things you will need to do for first time it can really take long time but the more you practice it the faster it goes.
Also to make easier you can reference to fully refactored client: https://github.com/CloudS3c/meteor-client/tree/main/osrs/src/main/java
1) This thread is just to save time for us to stop repeating the same answer this question is very common.
2) Yeah my English grammar won't be the best.
Anyways:
First of all we need to know what deobs are. In here at least everyone call deobfuscated clients deob,
Obfuscated clients are pretty much randomized names / random numbers / and bunch more of random crap to make it harder for human eye to read.
Deobfuscated is opposite of obfuscation, it does not contain that random crap, deobfuscation will make for example: a = new dn to: field1935 = new class15. Add mapping to it and it will make instead of that field1935 = new class15 to: projectiles = new NodeDeque();
Some better example on the left you have obfuscated code on the right you have deobfuscated + mapped class:

Now since you know that lets continue on how we going to upgrade our server from revision 213 to revision 215 using Alter
First of all we will need to refactor buffer meaning (Mappers don't rename these, since most of the mappers that we use are by like RL/OPRS/Botters who don't really need this class) :

All of those method##### to what they are reading/writing as in above example we see --var4 and we see that it's expecting array of bytes and that it's starting point is var3 + var2 + 1 => Which is the end of the array we indicate that it starts from the end so we call it reversed. => We also can see that it reads them out of the array with - 128 (Which shows it's ADD)
One more example:

this.offset += 2; <-- This indicates how many bytes and by that we determine which type it is you can find all of them IBM Documentation
So we now know it's short we also see that it has & 255 in the end -> Which will indicate that it's order is LE aka Little
At first this all can seem to be complicated but after some practice (You will fail some times, but if you will continue trying eventually you will get a hang of it)
Just to make this process some what easier: https://github.com/CloudS3c/meteor-client/blob/main/osrs/src/main/java/Buffer.java Just copy entire line after var1 = or after return and search inside that link. If you can't find some methods name you can ask around R-S Discord (Expect to be trolled) or you can also just call all of the methods p1-4 etc. and Just reverse from reading to writing. I hope this step was some what useful there is really too much to cover and i am no expert at networking maybe someone in the comments will explain this better. But you will be now asking your self why tf do i need this?? Yh dunno.
Jk this is needed to know in what Type / order / transformer we need to send the data that we send from server.
So now we finished refactoring the buffer. Now we going to identify packets p much it's just looking for similarities.

So yeah you go renaming packets looking for similarities like in the screenshot above only IF_SETTEXT has .text)) { in it's block so then you just rename it (If you're using Intellij just hit Shift + F6) It will rename across all classes.
And so on.. Now what to keep in mind that all those values are in random order -> So we need to match it.

Now we have on server that's rev 213[Alter/RSMOD v1]:

And yeah this is why we refactor the buffer first: Blue color:
Var49 = readString => Most of the time if the packets is not new you will only need to send bytes (It's only for strings)
graphic = readIntIME => Now you can see on server side that we have: type: INT, and it's order: INVERSE_MIDDLE which is IME
Now you can see in the screenshot above that they are in a new order meaning we have to move - name: TEXT and type: BYTES bellow hash block.
And yes the order is very important. If you fail to follow the order of the packets values the packet will read them incorrect meaning you will see flying baboons.. Nah you will just be crashing when you will be sending that packet.
Now u see that opcode: 57 (It's pretty much packets ID) => We find them at ServerPackets.java

Now that type: VARIABLE_SHORT -> It's packets size.
If its a fixed length one, then just type FIXED.
If the size is -1, its VARIABLE_BYTE, and if it's -2, it's VARIABLE_SHORT
And yeah pretty much you will need to do that for all the packets.. Fun ones will be Zone Updates / Player Info / Npc Info
Whats so fun about those fuckers? Ohh boyy
Let's start with Zone Updates this one is pretty simple but still need to point out: That when you're doing these packets you need to not forget that when sending UPDATE_ZONE_PARTIAL_ENCLOSED you need to have them in correct order (Not packet order) But in what order the packets are being sent.

If you will send them incorrect expect Dropped items / Objects and etc. To be in incorrect order when you enter that region.
Player Info / Npc Info --> These ones will be the hardest ones.

if (var3 & 2) = 0x2
from Hex to Dec (You can convert them with your calculator or using: Hexadecimal to Decimal Converter)
Most common mistake is that people think oh you just add 0x in front of it nah you fucker. when it will be & 10 it will become : 16 and etc.
Now you will need to follow also how the masks are being readed on client if u fail doing that all other masks will be reading incorrect values as well.

And the fun part is appearance

If you forget to send or send it incorrectly may god be with you it's a son of a bitch to locate where you went wrong. Don't rush with these masks / packets.
With packets it would be recommended to do one by one and test them out. Since it's better to know exactly on which one you is faulty rather than digging trough 100 packets at once.
Default packets that you need to pass login phase: IF_OPENTOP, REBUILD_NORMAL, For RSMOD/ALTER you will need to do RebuildLogin (Which is basically the same packet REBUILD_NORMAL) but it needs extra data.
Anyways yh that's it for masks same will go for NPC_INFO
Also you will need to find and update this:

When it's incorrect. It will be only noticed when you join region that contains npcs. You will be crashed.
Ohh just forgot to include login decoder i guess ill do that later. :S
Overall that should be it , that's the bare minimum that you need to do to upgrade from any rev. Don't get me wrong you will need to put way more work. Especially when doing bigger jumps you.
Also when jagex adds new stuff to packets or change value types. You can't skip a single byte. Entire game runs on one huge ass array if you read something incorrectly the entire array gets fucked and makes other packets read incorrect values.
It's also not recommended to start doing rev upgrading for complete beginners you need to have some coding knowledge. Keep your eyes on comments i hope there will be some more extra notes it's a huge topic to cover but yh these are basically main things you will need to do for first time it can really take long time but the more you practice it the faster it goes.
Also to make easier you can reference to fully refactored client: https://github.com/CloudS3c/meteor-client/tree/main/osrs/src/main/java
Attachments
Last edited: