File Structure

About files & folders

Here is a quick reference of the source file structure
*Architecture liable to change.

Data/*

  • areas/: Multi-combat chunks by chunk id
  • items/shops/*: All shops in Darkan use this. Has item lists, shop name and is called by NPCs using these JSON files.
  • items/spawns/spawns.json: All item spawns in the game
  • items/config.json: Item information regarding each item, organized by item id.
  • map/*: Contains object spawns no in the cache, doors which change object upon opening and encryption keys(xtea) for the cache.
  • music/*: Contains genre/region music for each area in a system that uses json.

developer-information/*

This folder is not used by the game at all. It contains information about the game such as Object Ids, names and properties, item names/ids, graphics ids, interface configuration properites, animation ids, npc ids, etc.

../cache

The cache is required from every server to draw from. It should be a sibling to world-server/ folder

The cache server contains all the 3D models, animations, sounds, item info, sprites, interfaces, maps, objects, etc. etc.

This makes the world server code able to pull all this info and use it in the server.

build.gradle

Contains all gradle build information, build tasks, dependent libraries for the code. Gradle is an abstraction layer for Maven build tools which more succinctly allows developers to put together the server with dependencies and individual components for the server.

worldConfig.json

Contains all the information for that specific world, here are some notables..

  • "cachePath": In case you want to place the cache somewhere else
  • "mongoUrl": the location of the mongoDB which holds all the player files
  • "lobbyIp": The url of the lobby, there are only two, development & official
  • "lobbyApiKey": Required to post a world to that lobby, the default value here gives you access to development
  • "worldInfo": Specifies how the world itself will behave
    • "number": World number
    • "ipAddress": What is the url location of the world from the lobby...
    • "activity": World description in client lobby
    • "country": Choose a flag for your world
  • "dropModifier": Increases or decreases rare drops, 0.5 is 2x for rare drops 1.0+ means less rare drops.

src/main/java/com/rs/*

  • Launcher.java: The entry point & location of main() for the server.
  • Settings.java: Reads worldConfig.json and sets the server settings from it.
  • Other folders in src/main/java/com/rs/: Explore these. This is where the bulk of the code exists.