Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
aea13ef
feat: revision 237 (initial copy of 236)
Z-Kris Mar 24, 2026
328d4f7
refactor: rename oploc/opnpc/opobj packets with V1 suffix
Z-Kris Mar 24, 2026
dc2bafa
refactor: rename rebuild packets with V1 suffix
Z-Kris Mar 24, 2026
0072b5b
refactor: define new classes for RebuildLogin/Normal/Region
Z-Kris Mar 24, 2026
ce6afa5
fix: rename REBUILD_WORLDENTITY_V2 -> REBUILD_WORLDENTITY_V3
Z-Kris Mar 24, 2026
1ae46c2
fix: rename REBUILD_WORLDENTITY_V1 -> REBUILD_WORLDENTITY_V2
Z-Kris Mar 24, 2026
69523ec
feat: migrate rebuild packets to new variants
Z-Kris Mar 24, 2026
5300b71
feat: ResumePCountDialogLong data class
Z-Kris Mar 24, 2026
eea3086
feat: op*v2 data classes
Z-Kris Mar 24, 2026
1531d67
feat: crc decoding
Z-Kris Mar 24, 2026
513c9ff
feat: update prots (excluding infos)
Z-Kris Mar 24, 2026
0db3947
feat: info packets
Z-Kris Mar 25, 2026
48bf649
feat: update_zone_partial_enclosed order
Z-Kris Mar 25, 2026
5be844f
fix: add old hits comment marker for player ext info
Z-Kris Mar 25, 2026
04b9cd3
feat: long support in runclientscript
Z-Kris Mar 25, 2026
6cc6247
fix: update worldentity capacity from 2048 to 4096 in older revisions
Z-Kris Mar 25, 2026
4d7b91f
refactor: set toplevel/root world id to 0 in 237
Z-Kris Mar 25, 2026
5293add
feat: typealiases for smoother migration
Z-Kris Mar 25, 2026
e0c0fa8
docs: define what's new in 237
Z-Kris Mar 25, 2026
8c23342
fix: remove unnecessary imports
Z-Kris Mar 25, 2026
add8e67
refactor: delete duplicate player hitmark method
Z-Kris Mar 25, 2026
9c41288
fix: disable now-invalid clienttype check in 237
Z-Kris Mar 25, 2026
f2a3c98
fix: initial capacity for new npc head/body customisations
Z-Kris Mar 25, 2026
a6aa3e7
fix: correct world id for set active root world
Z-Kris Mar 25, 2026
ed70cb0
fix: rebuild_normal_v2 size estimates
Z-Kris Mar 25, 2026
e4ecf16
fix: bind rebuild_worldentity_v4 encoder
Z-Kris Mar 25, 2026
5cde5f3
chore: publish 1.0.0-ALPHA-20260325
Z-Kris Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RSProt

[![GitHub Actions][actions-badge]][actions] [![MIT license][mit-badge]][mit]
[![OldSchool - 221 - 236 (Alpha)](https://img.shields.io/badge/OldSchool-221--236_(Alpha)-9a1abd)](https://github.com/blurite/rsprot/tree/master/protocol/osrs-236/osrs-236-api/src/main/kotlin/net/rsprot/protocol/api)
[![OldSchool - 221 - 237 (Alpha)](https://img.shields.io/badge/OldSchool-221--237_(Alpha)-9a1abd)](https://github.com/blurite/rsprot/tree/master/protocol/osrs-237/osrs-237-api/src/main/kotlin/net/rsprot/protocol/api)

## Status
> [!NOTE]
Expand All @@ -16,7 +16,7 @@ In order to add it to your server, add the below line under dependencies
in your build.gradle.kts.

```kts
implementation("net.rsprot:osrs-236-api:1.0.0-ALPHA-20260315")
implementation("net.rsprot:osrs-237-api:1.0.0-ALPHA-20260325")
```

An in-depth tutorial on how to implement it will be added into this read-me
Expand All @@ -32,12 +32,12 @@ other revisions are welcome, but will not be provided by default.
- Java 11

## Supported Versions
This library currently supports revision 221-236 OldSchool desktop clients.
This library currently supports revision 221-237 OldSchool desktop clients.

## Quick Guide
This section covers a quick guide for how to use the protocol after implementing
the base API. It is not a guide for the base API itself, that will come in the
future. This specific quick guide refers to revision 236. Revisions older
future. This specific quick guide refers to revision 237. Revisions older
than 235 have a significantly different API and will not be explored here.
It is recommented you upgrade to latest, or view an older readme in history.

Expand Down Expand Up @@ -119,7 +119,7 @@ for (worldInfoPackets in infoPackets.activeWorlds) {
packets.send(worldInfoPackets.activeWorld)

// If the world entity is newly added in this cycle, make sure to send the
// RebuildWorldEntityV2 packet for this world, to actually build the
// RebuildWorldEntityV3 packet for this world, to actually build the
// map behind the world entity.
if (worldInfoPackets.added) {
rebuildWorldEntity(worldInfoPackets.worldId)
Expand Down
33 changes: 33 additions & 0 deletions WHATSNEW.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
## What's New?

### Revision 237

> [!IMPORTANT]
> Root/toplevel world id changed from -1 to 0 in this revision.
> Users must make sure their serverside code is using the new constant.
> If you relied on any of the ROOT_WORLD constants in classes such as
> WorldEntityInfo, you should be fine as-is.

#### Additions
- RESUME_P_COUNTDIALOG_LONG added.
- RUNCLIENTSCRIPT supports `long` data type via 'Ï' char code.
- IF_SETMODEL_V2 added, supporting g4() for models.
- Obj customisation section in appearance extended info uses g4() for models.
- Hitmarks and headbars separated into two individual extended infos.
- Hitmarks no longer support soaking.
- Hitmarks now have a 'limit' property, defining the maximum number of hitmarks that can render at once. The default is 4, the upper limit is 20.
- NPC head and body customisation new variants that use g4() for models.
- OPLOC*_V2 packets, supporting subops.
- OPNPC*_V2 packets, supporting subops.
- OPOBJ*_V2 packets, supporting subops.
- REBUILD_NORMAL_V2 which removes XTEA support.
- REBUILD_REGION_V2 which removes XTEA support.
- REBUILD_WORLDENTITY_V4 which removes XTEA support.

#### Removals
- UPDATE_REBOOT_TIMER_V1
- SET_MAP_FLAG_V1
- CAM_MOVETO_V1
- CAM_LOOKAT_V1
- CAM_MOVETO_CYCLES_V1
- CAM_MOVETO_ARC_V1
- WORLDENTITY_INFO_V6

### Revision 236
Revision 236 brings a handful of new variants of existing packets.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {

allprojects {
group = "net.rsprot"
version = "1.0.0-ALPHA-20260315"
version = "1.0.0-ALPHA-20260325"

repositories {
mavenCentral()
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class RebuildWorldEntityV2Encoder : MessageEncoder<RebuildWorldEntityV2>
buffer: JagByteBuf,
message: RebuildWorldEntityV2,
) {
buffer.p2(message.index)
buffer.p2(message.baseX)
buffer.p2(message.baseZ)
encodeRegion(buffer, message.zones)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import net.rsprot.protocol.game.outgoing.codec.logout.LogoutTransferEncoder
import net.rsprot.protocol.game.outgoing.codec.logout.LogoutWithReasonEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildNormalEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildRegionEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityV2Encoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideLocOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideNpcOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideObjOpsEncoder
Expand Down Expand Up @@ -217,7 +217,7 @@ public object DesktopGameMessageEncoderRepository {

bindWithAlts(RebuildNormalEncoder(), RebuildLogin::class.java, RebuildNormal::class.java)
bind(RebuildRegionEncoder())
bind(RebuildWorldEntityEncoder())
bind(RebuildWorldEntityV2Encoder())

bind(VarpSmallEncoder())
bind(VarpLargeEncoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public enum class GameServerProt(
// Map packets
REBUILD_NORMAL(GameServerProtId.REBUILD_NORMAL, Prot.VAR_SHORT),
REBUILD_REGION(GameServerProtId.REBUILD_REGION, Prot.VAR_SHORT),
REBUILD_WORLDENTITY(GameServerProtId.REBUILD_WORLDENTITY, Prot.VAR_SHORT),
REBUILD_WORLDENTITY_V2(GameServerProtId.REBUILD_WORLDENTITY_V2, Prot.VAR_SHORT),

// Varp packets
VARP_SMALL(GameServerProtId.VARP_SMALL, 3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal object GameServerProtId {
const val CLEAR_ENTITIES = 128
const val SET_ACTIVE_WORLD = 129
const val HIDEOBJOPS = 130
const val REBUILD_WORLDENTITY = 131
const val REBUILD_WORLDENTITY_V2 = 131
const val HIDENPCOPS = 132
const val HIDELOCOPS = 133
const val WORLDENTITY_INFO = 134
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import net.rsprot.protocol.message.OutgoingGameMessage
* @property baseZ the absolute base z coordinate of the world entity in the instance land
* @property zones the list of zones that will be built into the root world
*/
public class RebuildWorldEntity private constructor(
public class RebuildWorldEntityV2 private constructor(
private val _index: UShort,
private val _baseX: UShort,
private val _baseZ: UShort,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class RebuildWorldEntityV2Encoder : MessageEncoder<RebuildWorldEntityV2>
buffer: JagByteBuf,
message: RebuildWorldEntityV2,
) {
buffer.p2(message.index)
buffer.p2(message.baseX)
buffer.p2(message.baseZ)
encodeRegion(buffer, message.zones)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import net.rsprot.protocol.game.outgoing.codec.logout.LogoutTransferEncoder
import net.rsprot.protocol.game.outgoing.codec.logout.LogoutWithReasonEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildNormalEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildRegionEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityV2Encoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideLocOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideNpcOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideObjOpsEncoder
Expand Down Expand Up @@ -223,7 +223,7 @@ public object DesktopGameMessageEncoderRepository {

bindWithAlts(RebuildNormalEncoder(), RebuildLogin::class.java, RebuildNormal::class.java)
bind(RebuildRegionEncoder())
bind(RebuildWorldEntityEncoder())
bind(RebuildWorldEntityV2Encoder())

bind(VarpSmallEncoder())
bind(VarpLargeEncoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public enum class GameServerProt(
// Map packets
REBUILD_NORMAL(GameServerProtId.REBUILD_NORMAL, Prot.VAR_SHORT),
REBUILD_REGION(GameServerProtId.REBUILD_REGION, Prot.VAR_SHORT),
REBUILD_WORLDENTITY(GameServerProtId.REBUILD_WORLDENTITY, Prot.VAR_SHORT),
REBUILD_WORLDENTITY_V2(GameServerProtId.REBUILD_WORLDENTITY_V2, Prot.VAR_SHORT),

// Varp packets
VARP_SMALL(GameServerProtId.VARP_SMALL, 3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal object GameServerProtId {
const val MESSAGE_PRIVATE = 127
const val RESET_INTERACTION_MODE = 128
const val SET_NPC_UPDATE_ORIGIN = 129
const val REBUILD_WORLDENTITY = 130
const val REBUILD_WORLDENTITY_V2 = 130
const val SET_ACTIVE_WORLD = 131
const val CLEAR_ENTITIES = 132
const val HIDEOBJOPS = 133
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import net.rsprot.protocol.message.OutgoingGameMessage
* @property baseZ the absolute base z coordinate of the world entity in the instance land
* @property zones the list of zones that will be built into the root world
*/
public class RebuildWorldEntity private constructor(
public class RebuildWorldEntityV2 private constructor(
private val _index: UShort,
private val _baseX: UShort,
private val _baseZ: UShort,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class RebuildWorldEntityV2Encoder : MessageEncoder<RebuildWorldEntityV2>
buffer: JagByteBuf,
message: RebuildWorldEntityV2,
) {
buffer.p2(message.index)
buffer.p2(message.baseX)
buffer.p2(message.baseZ)
encodeRegion(buffer, message.zones)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import net.rsprot.protocol.game.outgoing.codec.logout.LogoutTransferEncoder
import net.rsprot.protocol.game.outgoing.codec.logout.LogoutWithReasonEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildNormalEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildRegionEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityV2Encoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideLocOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideNpcOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideObjOpsEncoder
Expand Down Expand Up @@ -219,7 +219,7 @@ public object DesktopGameMessageEncoderRepository {

bindWithAlts(RebuildNormalEncoder(), RebuildLogin::class.java, RebuildNormal::class.java)
bind(RebuildRegionEncoder())
bind(RebuildWorldEntityEncoder())
bind(RebuildWorldEntityV2Encoder())

bind(VarpSmallEncoder())
bind(VarpLargeEncoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public enum class GameServerProt(
// Map packets
REBUILD_NORMAL(GameServerProtId.REBUILD_NORMAL, Prot.VAR_SHORT),
REBUILD_REGION(GameServerProtId.REBUILD_REGION, Prot.VAR_SHORT),
REBUILD_WORLDENTITY(GameServerProtId.REBUILD_WORLDENTITY, Prot.VAR_SHORT),
REBUILD_WORLDENTITY_V2(GameServerProtId.REBUILD_WORLDENTITY_V2, Prot.VAR_SHORT),

// Varp packets
VARP_SMALL(GameServerProtId.VARP_SMALL, 3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal object GameServerProtId {
const val IF_SETNPCHEAD_ACTIVE = 21
const val REBUILD_NORMAL = 22
const val SERVER_TICK_END = 23
const val REBUILD_WORLDENTITY = 24
const val REBUILD_WORLDENTITY_V2 = 24
const val UPDATE_RUNENERGY = 25
const val VARCLAN_ENABLE = 26
const val IF_SETNPCHEAD = 27
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import net.rsprot.protocol.message.OutgoingGameMessage
* @property baseZ the absolute base z coordinate of the world entity in the instance land
* @property zones the list of zones that will be built into the root world
*/
public class RebuildWorldEntity private constructor(
public class RebuildWorldEntityV2 private constructor(
private val _index: UShort,
private val _baseX: UShort,
private val _baseZ: UShort,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class RebuildWorldEntityV2Encoder : MessageEncoder<RebuildWorldEntityV2>
buffer: JagByteBuf,
message: RebuildWorldEntityV2,
) {
buffer.p2(message.index)
buffer.p2(message.baseX)
buffer.p2(message.baseZ)
encodeRegion(buffer, message.zones)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import net.rsprot.protocol.game.outgoing.codec.logout.LogoutTransferEncoder
import net.rsprot.protocol.game.outgoing.codec.logout.LogoutWithReasonEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildNormalEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildRegionEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityEncoder
import net.rsprot.protocol.game.outgoing.codec.map.RebuildWorldEntityV2Encoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideLocOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideNpcOpsEncoder
import net.rsprot.protocol.game.outgoing.codec.misc.client.HideObjOpsEncoder
Expand Down Expand Up @@ -221,7 +221,7 @@ public object DesktopGameMessageEncoderRepository {

bindWithAlts(RebuildNormalEncoder(), RebuildLogin::class.java, RebuildNormal::class.java)
bind(RebuildRegionEncoder())
bind(RebuildWorldEntityEncoder())
bind(RebuildWorldEntityV2Encoder())

bind(VarpSmallEncoder())
bind(VarpLargeEncoder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public enum class GameServerProt(
// Map packets
REBUILD_NORMAL(GameServerProtId.REBUILD_NORMAL, Prot.VAR_SHORT),
REBUILD_REGION(GameServerProtId.REBUILD_REGION, Prot.VAR_SHORT),
REBUILD_WORLDENTITY(GameServerProtId.REBUILD_WORLDENTITY, Prot.VAR_SHORT),
REBUILD_WORLDENTITY_V2(GameServerProtId.REBUILD_WORLDENTITY_V2, Prot.VAR_SHORT),

// Varp packets
VARP_SMALL(GameServerProtId.VARP_SMALL, 3),
Expand Down
Loading
Loading