🌐
Instant built-in translation
English✓ Built-in

ROCODE CUSTOMER GUIDE

ROCode Customer Guide — Complete Android Setup Guide for rAthena & Hercules
ROCode Customer Guide — Complete Android Setup Guide for rAthena & Hercules

This guide walks you through the complete process of setting up your Ragnarok Online server for the ROCode Android client. Follow the steps in order, especially for a first-time setup.

NEW SERVER→BUILD APK→SETUP rATHENA→PATCH EMULATOR SRC→PATCH HAT TABLE→SETUP HAT EFFECT→PATCH iteminfo.lua→PATCH SYSTEM & AI→UPDATE APK→FINAL TEST

1Create a New Server

New Server — ROCode Owner Tools setup overview
New Server — ROCode Owner Tools setup overview

Start by creating your server configuration in ROCode Owner Tools.

Steps

  1. Log in to your ROCode account.
  2. Open Owner Tools.
  3. Click New Server.
  4. Enter your Server Name, Server IP / Hostname, Login Port, Char Port, and Map Port.
  5. Configure the available server/client options.
  6. Save the server.
Important: Make sure your server IP and ports are correct before building your APK. Your Ragnarok server must also allow connections from players outside your VPS/local network.
Result: Your ROCode server profile is now ready.

2Build Your Android APK

Build APK — Android application builder overview
Build APK — Android application builder overview

After creating the server, generate the first Android client for your server.

Steps

  1. Open your server in Owner Tools.
  2. Go to APK Builder.
  3. Configure App Name, Package Name, App Icon, Splash Screen, server branding, and the available Android client options.
  4. Review your configuration.
  5. Click Build APK.
  6. Wait for the ROCode Builder to complete the build.
QUEUED
   ↓
BUILDING
   ↓
COMPLETED

Install Test

Download the generated APK and install it on an Android device or supported Android emulator. At this point the APK is created, but the server-side ROCode setup is not finished yet.

3Setup rAthena

Setup rAthena — server configuration and verification overview
Setup rAthena — server configuration and verification overview

Prepare your rAthena server configuration for the ROCode Android client.

Before You Start: Create a backup of your current rAthena source. Keep a clean copy before applying server modifications.

Steps

  1. Open Owner Tools.
  2. Select your server.
  3. Open Setup rAthena.
  4. Follow the generated server configuration.
  5. Confirm your normal rAthena server is working before continuing.

Verify

login-server starts normally
char-server starts normally
map-server starts normally
No critical server errors

Do not continue if your base server is already failing.

4Patch Emulator SRC

Patch Emulator SRC — Smart Source Analyzer workflow
Patch Emulator SRC — Smart Source Analyzer workflow

The emulator source patch adds the server-side compatibility required by the ROCode Android client.

Steps

  1. Open Owner Tools → Server → Smart Source Analyzer.
  2. Upload or select your current emulator source as instructed.
  3. Let the Smart Source Analyzer inspect the source structure.
  4. Apply the compatible ROCode patch generated by the analyzer.
  5. Replace/add the generated files as instructed.
  6. Recompile the server.

Example Linux build process:

./configure
make clean
make server

Restart the Server

login-server
char-server
map-server

Verify

No patch conflicts
Compilation successful
Login Server starts
Char Server starts
Map Server starts
Android client can connect

Do not continue with custom client data until basic connectivity works.

5Patch Hat Table

Patch Hat Table — accname.lua and accessoryid.lua import workflow
Patch Hat Table — accname.lua and accessoryid.lua import workflow

The Hat Table maps your accessory/headgear IDs to the correct sprite names used by the Android client.

Required PC Client Files

accname.luaaccessoryid.lua

Steps

  1. Open Owner Tools → Server → HatTable Manager.
  2. Open Import Hat/View IDs and Sprite Names.
  3. Import your current accname.lua.
  4. Import your current accessoryid.lua.
  5. Let ROCode process the Hat/View ID and sprite-name information.
  6. Open the HatTable entries and review the imported data.

Verify

accname.lua imported
accessoryid.lua imported
View IDs detected
Sprite names detected
Custom headgear detected
Entries verified

6Setup Hat Effect

Setup Hat Effect — effect import and in-game verification
Setup Hat Effect — effect import and in-game verification

Hat Effect setup allows the Android client to recognize and display the supported/custom hat-effect data configured for your server.

Steps

  1. Open your server in Owner Tools.
  2. Go to Hat Effect.
  3. Upload/select the required Hat Effect files.
  4. Configure your Hat Effect entries.
  5. Generate the ROCode-compatible files.
  6. Apply the generated files to their specified client locations.

Verify

Item equips correctly
Expected effect appears
Correct sprite/effect
No missing-resource errors
Client does not crash

7Patch iteminfo.lua

Patch iteminfo.lua — custom item information workflow
Patch iteminfo.lua — custom item information workflow

iteminfo.lua contains important client-side item information such as names, descriptions, and related item configuration. Whenever you add or modify custom items, Android needs the corresponding updated ItemInfo data.

Steps

  1. Open Owner Tools and select your server.
  2. Open ItemInfo Patcher.
  3. Upload the latest iteminfo.lua from your working PC client.
  4. Apply/generate the required ItemInfo patch.
  5. Verify that your custom items are included.
Important: Always patch your latest iteminfo.lua. Do not upload an older file after adding new custom items.

Verify

Correct item name
Correct description
Correct item icon
Correct equipment information
Custom items/cards included
No unexpected Unknown Item

8Patch System & AI

Patch System & AI — correct client folder structure
Patch System & AI — correct client folder structure

The Android client may require updated client-side Lua/configuration files from your PC client's System and AI folders.

Important Folder Structure

System and AI must remain in their correct client locations.

Ragnarok/
├── System/
├── AI/
├── data/
├── BGM/
└── ...
Wrong:
Ragnarok/
└── data/
    ├── System/
    └── AI/
Do not accidentally package System or AI inside the data directory.

Steps

  1. Prepare your latest System/ folder.
  2. Prepare your latest AI/ folder.
  3. Open System & AI Patcher.
  4. Upload/select the required files.
  5. Generate the updated package.
  6. Verify the generated paths before applying it.
  7. Apply the patch to your client files.

Verify

/System/ is in the correct location
/AI/ is in the correct location
Required Lua files exist
No required files are missing

THOR Patcher — New main.ini Remote Mode

THOR Patcher — New main.ini Remote Mode workflow
THOR Patcher — New main.ini Remote Mode — remote plist.txt and .thor patch workflow

ROCode now supports the newer THOR workflow where your uploaded main.ini becomes the authoritative remote patch configuration. ROCode reads [Main] file_url and [Patch] PatchList, checks the live remote patch list, and sends only the active patches to the Android client.

Recommended Web Layout

patcher/
├── main.ini
├── plist.txt
└── data/
    ├── patch_1.thor
    ├── patch_2.thor
    └── patch_3.thor

main.ini Example

[Main]
allow=true
Force_Start=false
policy_msg=
file_url=https://your-domain.com/patcher/data/

[Patch]
ClientSum=
PatcherSum=
ClientPath=
PatcherPath=
PatchList=plist.txt
Important: file_url is the public HTTP/HTTPS folder containing the .thor payloads. When it ends in /data/, ROCode resolves PatchList=plist.txt from the parent patcher folder, so the example above uses https://your-domain.com/patcher/plist.txt for the list and https://your-domain.com/patcher/data/ for the patch files.

Activate main.ini Remote Mode

  1. Open Owner Tools → THOR Patcher.
  2. Under Auto Detect THOR Configuration, upload your current main.ini.
  3. Click DETECT MAIN.INI.
  4. Confirm the detected Patch URL, Patch List, List URL, HTTP status, latest patch, and next patch number.
  5. If the patch list does not exist yet and returns HTTP 404, ROCode treats it as a NEW/EMPTY PATCH REPOSITORY; you can create the list when your first patch is ready.
Remote Mode: Once main.ini is uploaded, the remote patch list becomes authoritative. Legacy/manual THOR rows are retained for history but are disabled for delivery, legacy upload-date scheduling is inactive, and the old manual Add THOR Patch flow is unavailable while remote mode is active.

Remote plist.txt Patch Order

Use one patch per line in this format:

1 patch_1.thor
2 patch_2.thor
3 patch_3.thor

Active patches are applied in numeric Patch ID order from lowest to highest. A line beginning with // disables that patch:

1 patch_1.thor
//2 patch_2.thor
3 patch_3.thor

In this example, patches 1 and 3 are active while patch 2 is disabled. Do not use duplicate active Patch IDs. Malformed active lines or duplicate active IDs are rejected instead of being silently applied.

Correct THOR Archive Paths

The path stored inside the .thor archive controls where the file is installed. Keep root folders at the Ragnarok client root when that is where they belong.

Ragnarok/
├── System/
├── AI/
├── data/
├── BGM/
└── ...
Wrong:
Ragnarok/
└── data/
    ├── System/
    └── AI/
Do not move System/ or AI/ under data/. ROCode preserves the archive-relative path; it does not force root files into data/.

Android Runtime Behavior

In the current remote mode, THOR patches remain an ordered, reversible runtime layer instead of being permanently merged into the downloaded base GRFs. Existing installations that previously used the old merged THOR behavior perform a one-time clean refresh of ROCode-managed downloaded GRFs when the new remote mode is first confirmed.

APK requirement: If the customer's APK was built before ROCode v4.0.46, build/update the APK once so it receives the new THOR cleanup/runtime behavior. After that, normal plist.txt and .thor changes do not require rebuilding the APK.

Verify

main.ini detected successfully
file_url points to the public .thor folder
PatchList resolves to the correct remote list
Remote plist HTTP status is valid
Active patch IDs are unique
// prefixed patches are disabled
Active patches are numeric ascending
System/ and AI/ remain at the correct root paths
Client downloads only the expected patches
Patcher/client reports the latest patch state
Result: THOR updates are now controlled by your live remote main.ini + patch list repository.

9Update APK

Update APK — latest Android client build workflow
Update APK — latest Android client build workflow

After the server and client data are ready, publish the changes to your Android client. You normally do not need to create a new server profile just because game data changed.

Steps

  1. Open Owner Tools.
  2. Select your existing server.
  3. Open Update APK.
  4. Review the latest prepared client files/configuration.
  5. Start the APK update/build process.
  6. Wait until the builder reports Completed.
  7. Download/install the latest APK if a new APK build was generated.
QUEUED
   ↓
BUILDING
   ↓
COMPLETED

Do not release the update to players until the Final Test passes.

10Final Test

Final Test — complete Android release checklist
Final Test — complete Android release checklist

Test the finished Android client against your actual server before releasing it to players.

Login
Character selection
Map loading
Movement
NPC interaction
Inventory / Storage
Equipment / Skills
Custom items
Item descriptions / icons
Custom headgear / Hat Table
Hat Effects
System / AI features
Custom maps/resources
Android controls
Reconnect/login again
Application restart
Monitor login-server, char-server, map-server, and the ROCode builder logs while testing. Fix errors before release.
Result: Once all tests pass, your server is ready for Android players.

Updating an Existing Server

For future updates, you normally only need to update the part that changed.

New Custom Items

Update Server Database
→ Patch iteminfo.lua
→ Update APK
→ Test

New Hat / Sprite Data

Patch Hat Table
→ Setup/Update Hat Effect if required
→ Update APK
→ Test

System / AI Changes

Patch System & AI
→ Update APK
→ Test

THOR / Game-Data Updates

Create/upload new .thor on your patch host
→ Add the next numeric entry to remote plist.txt
→ Verify Remote plist.txt Patch Order
→ Test Android client patch download
→ No APK rebuild required for normal plist/.thor changes

Server Source Changes

Patch/Update Emulator SRC
→ Recompile Server
→ Restart Server
→ Test Android Client

Before Releasing Any Update

Keep backups of your important server and client data:

rAthena sourceSystem/AI/iteminfo.luaGRF / client dataROCode server configuration
Never release an update to all players before testing it on at least one Android device.