Thanks, tousuki, for sending me a logo! I put the old logo in media below.
Welcome to OpenNXT, the first RuneScape 3 server framework focused on everything NXT. After a few years of working on NXT I have decided to help the scene move forward by making a project hopefully unlike any other. One aim for the OpenNXT project is to be completely independent of other tools in the RSPS scene.
OpenNXT aims to update as frequently as possible (without breaking content or hindering server progression) to stay up-to-date with RuneScape.
If you have not checked out my tutorials and resources on NXT, I highly recommend you check them out before reading this post:
Features / Completion
Scroll down below for more information on some of these. I highly recommend you read the entire thread!
Framework
- Powerful CLI tooling system
- Dynamic packet definition system
- Js5 server
- Built-in HTTP server
- Built-in proxy server
- Lobby
- World login
- Region updating (Rebuild normal)
- Region updating (Rebuild dynamic)
- Player info packet
- Npc info packet
- Anything content related.
Once the framework is at a point where content can be worked on, I will update the list above.
Tooling
- Client downloader Code
- RSA key generator Code
- Client/Launcher patcher Code
- Cache downloader Code
- Cache editor
- NPC spawns dumper
Other
- Tutorial: "How to update OpenNXT to latest version"
- Tutorial: "How to identify packet data structures in the NXT client"
- Creating Github Wiki and and mirroring my tutorials
Features - In-depth
This list might not contain all features OpenNXT has to offer. If something is missing please let me know so I can document it.
Powerful CLI tooling system
Gone are the days of 50 Main files. Gone are the days of weird config values being hardcoded in the server. Gone are the days where you need 10 different Intellij tabs open to develop one RSPS.
OpenNXT has one Gradle project with one main, and everything is bundled in it. You only need one Intellij window open to get started with OpenNXT. From client downloading and cache downloading to dumping anything from RuneScape, everything is accessible through one main.
To achieve this, a mixture of classpath scanning (To detect tools) and Clikt (A CLI library) are used. Simply run "./server --help" for command usage! It's that simple.
Dynamic packet definition system
OpenNXT has a super-simple packet definition system, allowing you to quickly and easily upgrade or downgrade versions without changing a lot of the source code. Every packet supporting this system has a simple text file in the repository with the packet structure written in plaintext. It's really as simple as that. In the future, these definitions will be hot-reloadable, to support even more awesome features.
Here is an example of the VARP_LARGE packet definition in 918:
Code:
id ushortle
value intle
Js5 server
The built-in Js5 server and cache library automatically handle the following for you:
- Prefetch table generation (aka "Grab" keys). There's sadly a small issue in one of the prefetches that causes the client to display an "incomplete" cache state. Of course I will fix this. Soon TM (meaning: never).
- Checksum table generation and encryption.
- Serving the music index and checksum table over HTTP.
Built-in HTTP server
The built-in http server serves all client files (jav_config.ws and binaries) as well as the js5 protocol. No need to mess around with Apache/Nginx and running into http headers or content type issues.
Built-in proxy server
This is the, in my opinion, main selling point of OpenNXT.
As most people involved in the RS3 scene know, the Java client has unfortunately been discontinued. Many people used this to dump data from RuneScape (eg. adding System.out.println to all packet decoders, then playing the game). You can't really do this with NXT. The only option would be memory reading or injecting hooks, but that's all very difficult. To avoid the RS3 scene coming to a grinding stop, I have implemented a very cool feature, which is the proxy.
The proxy is essentially a headless RuneScape client. When you start the server with the "--enable-proxy-support" flag, the server will enable everything it needs to proxy your local connection to RuneScape. If your login meets the requirements for a proxy connection (I'm going to add an username whitelist in the future), the server will open a connection to RuneScape in the background. If the connection to RuneScape succeeds, the server will pass packets on from your client to RuneScape's live servers (and vice-versa). Packets that can be decoded can then be handled to dump data from RuneScape. This allows you to play the game now, and when you want to work on your RSPS, you can implement anything you did on real RuneScape!
Currently the proxy only functions in the lobby.
Long story short: You connect to server. Server connects to RuneScape. Server sniffs data between your client and RuneScape. You can use this data to make new content.
Client downloader / patcher & RSA key generator
Client downloader downloads all of the clients for the current game version.
RSA key generator generates RSA keys you can use. You only have to do this once. If you re-run this, old launchers won't work with newly-patched files.
Client patcher patches the clients and launcher based on the RSA keys generated by the tool above.
Cache downloader
Simply downloads the cache, but it's multithreaded and has a few big bugs such as randomly spitting out a billion errors. Have fun fixing it, I just restarted every time it happened, and it worked fine.
Tbh I don't know if it's faster than RSCD, but I managed to cap my internet connection (250mbps) with 3 js5 threads and 8 http workers, I was bottlenecked on disk I/O. But it's bundled so hey, can't complain right!
Other
I might add/remove/edit the above section to reflect the features that stand out the most.
Source code
The source code is fully licensed under GPLv3 and can be found on my GitHub profile. Fork, watch, star and PR away!
Credits
Without the contributions
- All contributors on the GitHub repository, for their obvious contributions to the project.
- Everyone who motivated me to work on RSPS and NXT or who I talked with about RSPS. While I cannot remember everyone, here's a few: velocity, Log, Daron, woahscam, Ceikry, Kermit, Summer, ARMAR X K1NG, freeezr, Tommeh, Displee and more
- Cjay0091 for Matrix. While OpenNXT is written from scratch, it does/will contain code inspired by Matrix.
- Displee for his cache library. While OpenNXT's cache library is written by me, I took some inspiration from Displee's cache library.
- Velocity, Cube and all other contributors of the Great NXT Beta Dump Thread
Media
There is not a lot of media yet because essentially it's a bunch of framework and tools now.