Overview
The Ranking plugin displays a ranking window right in the game. Data is taken from the database, the same as the website ranking page, not from GameServer memory. Players can:
- Switch between boards using the tabs in the top row.
- Filter by character class family using the drop-down list in the top right corner (if class filtering is enabled for that board).
- See the "Your rank" line (their own rank), even when they are not in the top list.
- Click a row to view the 3D model of that ranked character, and use the "View equipment" button to open a window showing that character's equipment, Artifacts, costumes and stats (online characters use live data; offline characters use data from the database).
- See an advertising banner (image) above the board; clicking the banner opens a web page if a link is set.
Requirements
- The
Rankingplugin has been purchased and[Plugin] Ranking = 1inData\Plugin\Plugin.ini. If it is not allowed, the client does not show the trophy button and does not respond to the hotkey. [Ranking] Enable = 1inData\Plugin\Ranking\config.ini, and at least one board is enabled.- The client needs a new version of
Main.dlland the interface fileRankingBoard.ozginData\Interface\GFx. - Character class names are taken from the client's
text.bmd(custom lines ID 1 to 76). - The game database has the tables
rank_board,rank_board_stateandchr_inspect_stat. GameServer creates them automatically on startup if they do not exist.
Two configuration locations: which file to use?
Data\Plugin\Ranking\config.ini controls the current ranking board. The [Ranking] section in Data\Plugin\Plugin.ini (the keys Hotkey, UpdateMinutes, ShowGM, show_stt, show_name, show_class, show_reset, show_level, show_masster3, show_totallevel) is currently not read by the ranking board, so editing those keys has no effect. Edit the hotkey and update time in config.ini.The old table chr_ranking (which recorded character stats periodically) is still declared in GameServer, but the data writing part is temporarily disabled, so this table is not updated. The in-game ranking does not use this table.
Configuration Data\Plugin\Ranking\config.ini
Section [Ranking]
| Key | Value | Default (code / bundled file) | Meaning |
|---|---|---|---|
Enable |
0 / 1 | 0 / 1 | 1 = on. 0 = off (the hotkey and trophy button do nothing). Turns off automatically if no board is enabled or the data tables cannot be created. |
Hotkey |
F1 to F12 |
F8 / F8 | Key to open / close the window. Any other value (or empty) = no hotkey; it can still be opened with the trophy button. |
UpdateMinutes |
number of minutes >= 0 | 10 / 10 | Interval for recalculating the top lists. 0 = no automatic calculation; the boards keep the data saved last time. Only the first GameServer (sub) to come due calculates for all subs (using a lock in the rank_board_state table); GameServer checks every 30 seconds. |
MaxRows |
1 to 100 | 100 / 100 | Maximum number of rows per board (values out of range are clamped to 1 or 100). |
Section [Boards] - enable / disable each board
Each key takes 0 or 1; the default in the code is 1 (a missing key = enabled). Tab order in the window: Level, Master, Advancement, Reset, Money, PK, Killers, Gens, Guilds.
| Key | Value | Default (code / bundled file) | Meaning (how it is ranked) |
|---|---|---|---|
Level |
0 / 1 | 1 / 1 | Character level (ties are broken by Master + Majestic level). |
Master |
0 / 1 | 1 / 1 | Master + Majestic level (ties are broken by normal level). |
Advancement |
0 / 1 | 1 / 1 | Class advancement tier 1 to 5 (derived from the class code, then by total level). |
Reset |
0 / 1 | 1 / 1 | Number of resets (ties are broken by level). The value is shown as "reset (level)". |
Money |
0 / 1 | 1 / 1 | Zen in the character's inventory. |
PK |
0 / 1 | 1 / 1 | Number of player kills (PkCount). |
Killers |
0 / 1 | 1 / 1 | Number of monsters killed (total Hunting Record of the character). |
Gens |
0 / 1 | 1 / 1 | Gens contribution points (only characters who have joined a Gens faction). |
Online |
0 / 1 | 1 / 0 | Characters currently online (most recent login first). There is no tab in the window; leave it at 0, because if enabled the server still calculates it every cycle without using it. |
Guilds |
0 / 1 | 1 / 1 | Guild score. The character displayed is the highest-Ranking character in the guild (the guild master). There is an extra column for the number of members. |
WCoin |
0 / 1 | 1 / 0 | Account board: in-game WCoin plus WCoin deposited in the web bank. There is no tab in the window. |
GoblinPoint |
0 / 1 | 1 / 0 | Account board: in-game Goblin Point plus the amount deposited in the web bank. No tab. |
WebCredits |
0 / 1 | 1 / 0 | Account board: credits on the web. No tab. |
Votes |
0 / 1 | 1 / 0 | Account board: number of votes on the web. Requires a valid [Web] Database setting. No tab. |
Online have no tab in the current window; set them to 0 so GameServer does not calculate them needlessly.Account boards only list accounts with a value greater than 0 and show the name of that account's highest-level character.
Section [ClassFilter] - enable class filtering
It has the same list of keys as [Boards] (Level, Master, Advancement, Reset, Money, PK, Killers, Gens, Online, Guilds, WCoin, GoblinPoint, WebCredits, Votes). A value of 1 (the default, both in the code and in the bundled file) = that board has an "All + each class family" drop-down list (16 families). Character boards filter by character class; the Guilds board filters by the guild master's class; account boards filter by the class of the highest-level character. 0 = no list. Each class family stores its own top list, so enabling filtering produces more data each cycle.
Section [Web]
| Key | Value | Default | Meaning |
|---|---|---|---|
Database |
web database name (letters, digits and _ only) |
empty | Name of the website database on the same SQL Server. Used for the Votes board, adding WCoin / Goblin Point from the web bank, and excluding web admin accounts. Empty = no Votes board, no web bank amounts added, no web admins excluded. Requires the tables web_portal_votes, web_admin_users, web_bank; if a table is missing, GameServer writes an error to the log and turns off the web part. |
Section [Exclude] - exclude from the boards
| Key | Value | Default (code / bundled file) | Meaning |
|---|---|---|---|
WebAdmin |
0 / 1 | 1 / 1 | 1 = do not show accounts that are web admins (web_admin_users with status = 1). Only takes effect when [Web] Database is valid. |
Blocked |
0 / 1 | 0 / 0 | 1 = do not show accounts that are blocked or currently banned. |
Accounts |
list of names, separated by commas | empty | Account names that are never shown, for example admin, gmtest. |
Characters |
list of names, separated by commas | empty | Character names that are never shown (applies only to character boards). |
Sections [Banner_Character], [Banner_Guild] (and [Banner_Account])
| Key | Value | Default | Meaning |
|---|---|---|---|
Image |
http:// / https:// address of the image, or a file name in the client's Data\Interface\GFx |
empty | Banner image (up to 250 characters). Formats: PNG, JPG, BMP, GIF (animated GIF up to 60 frames) and WEBP (only when Windows has the WebP codec). The image is stretched to fit an 887 x 44 frame, so make the image exactly 887 x 44. The class filter list and the "Your rank" line are drawn over the image. Empty = no image. |
Link |
http:// / https:// address |
empty | Web page opened when a player clicks the banner (up to 250 characters). Empty = clicking does nothing. |
The Character banner group is used for the character boards, Guild for the Guilds board. The [Banner_Account] section is still read, but the account boards have no tab in the window.
Example
[Ranking]
Enable = 1
Hotkey = F8
UpdateMinutes = 10
MaxRows = 100
[Boards]
Level = 1
Master = 1
Advancement = 1
Reset = 1
Money = 1
PK = 1
Killers = 1
Gens = 1
Online = 0
Guilds = 1
WCoin = 0
GoblinPoint = 0
WebCredits = 0
Votes = 0
[Exclude]
WebAdmin = 1
Blocked = 0
Accounts =
Characters =
[Banner_Character]
Image =
Link =
Text in the window (Lang)
All text in the window comes from the group Type="50" (Ranking Board) in Data\Lang\*.xml: tab names (ID 5 to 18), column names (ID 20 to 39), "Your rank: %s" (40), "Not ranked" (41), "Updated: %s (every %d minutes)" (42), "Tier %d" (43), "You have no guild" (46), "View equipment" (47), plus the labels of the character info window (ID 48 onward). To change the text, edit the Lang file.
Reloading the configuration
- Settings in
Data\Plugin\Ranking\config.ini: use the Reload button / reload-config command on the GameServer control panel (it reloads and resends the hotkey and the board list to players in game), or restart GameServer. - The
[Plugin] Rankingflag inPlugin.ini: click Reload plugin.
[NEEDS CHECKING: the exact name of the GameServer button/menu used to reload Data\Plugin\Ranking\config.ini. The code calls RankingBoard::Load() in the plugin reload function (Reload plugin) and in another config reload path; the site owner should compare with the actual interface. The config.ini file says "GameServer menu Reload, reload config".]
[NEEDS CHECKING: the client checks the Ranking plugin flag (Plugin::RANKING), but the GameServer code in RankingBoard.cpp does not call Feature("Ranking") by itself; it needs to be confirmed whether GameServer sends the board configuration when the plugin has not been purchased. The final effect for players is still blocked by the client.]