From 8d5c1653664fab8f221058a79eb9b1082b254b24 Mon Sep 17 00:00:00 2001 From: houmgaor Date: Wed, 18 Feb 2026 13:49:35 +0100 Subject: [PATCH] Fix course bitfield table: correct bit positions and values The table had courses renumbered sequentially as bits 0-10, but the code uses value = 2^ID where bit position equals the course ID. Every row was wrong (e.g. HunterLife was listed as bit 0/value 1, actually ID 2/value 4; NetCafe is 2^26, not 256). Fix all values and update the SQL examples accordingly. --- Erupe-Configuration.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/Erupe-Configuration.md b/Erupe-Configuration.md index 090e0cc..c7d4ce7 100644 --- a/Erupe-Configuration.md +++ b/Erupe-Configuration.md @@ -256,30 +256,36 @@ Courses are stored as a bitfield in `users.rights`. Players toggle available cou #### Bitfield Encoding -| Course | Bit | Value | -|--------|-----|-------| -| HunterLife | 0 | 1 | -| Extra | 1 | 2 | -| Premium | 2 | 4 | -| Assist | 3 | 8 | -| N | 4 | 16 | -| Hiden | 5 | 32 | -| HunterSupport | 6 | 64 | -| NBoost | 7 | 128 | -| NetCafe | 8 | 256 | -| HLRenewing | 9 | 512 | -| EXRenewing | 10 | 1024 | +The bit position equals the course ID (`value = 2^ID`), matching [Enumerations](Enumerations#course-types). -Add values together for combinations. Example: HunterLife + Extra + NetCafe = 1 + 2 + 256 = **259**. +| Course | ID (Bit) | Value | +|--------|----------|-------| +| Trial | 1 | 2 | +| HunterLife | 2 | 4 | +| Extra | 3 | 8 | +| ExtraB | 4 | 16 | +| Mobile | 5 | 32 | +| Premium | 6 | 64 | +| Pallone | 7 | 128 | +| Assist | 8 | 256 | +| N | 9 | 512 | +| Hiden | 10 | 1024 | +| HunterSupport | 11 | 2048 | +| NBoost | 12 | 4096 | +| NetCafe | 26 | 67108864 | +| HLRenewing | 27 | 134217728 | +| EXRenewing | 28 | 268435456 | + +Add values together for combinations. Example: HunterLife + Extra + NetCafe = 4 + 8 + 67108864 = **67108876**. #### Manual Database Override ```sql --- Enable all courses for a user -UPDATE users SET rights = 2047 WHERE username = 'player'; +-- Enable core gameplay courses (Trial + HunterLife + Extra + Premium + Assist) +UPDATE users SET rights = 334 WHERE username = 'player'; -- Enable only HunterLife + Extra + NetCafe -UPDATE users SET rights = 259 WHERE username = 'player'; +UPDATE users SET rights = 67108876 WHERE username = 'player'; ``` #### Example Configs