HM Adventskalender - Configuration
All settings live in config.lua. Most of them are starting values: doors, wheels, switches and appearance are easier to change in the tablet under Management – that is saved in data/*.json and takes precedence.
General
Section titled “General”| Setting | Default | Meaning |
|---|---|---|
Config.Locale | 'de' | Language: 'de' or 'en' |
Config.Command | 'adventskalender' | Command to open the calendar |
Config.Aliases | { 'advent' } | further commands that work the same |
Config.OpenKey | nil | Key to open, e.g. 'F7' (every player can change it in the GTA settings); nil = none |
Config.OnlyAtNpc | false | true = calendar can only be opened at Santa (the command then only works for admins) |
Config.Identity | 'license' | 'license' = one calendar per player account (recommended), 'character' = one per character |
Config.Layout | 'shuffle' | 'shuffle' = doors mixed up (same every year), 'ordered' = 1 to 24 |
Config.ShowOdds | true | players see the odds of the wheels |
Config.Sounds | true | soft clicking while the wheel spins |
Config.Announce | true | show big wins (prizes with announce = true) to all players |
Config.SpinSeconds | 7 | how long the wheel spins; the prize arrives once it stops |
Date and time
Section titled “Date and time”| Setting | Default | Meaning |
|---|---|---|
Config.TimeZone | 'Europe/Berlin' | Time zone with daylight saving time (also Vienna, Zurich, Amsterdam, Paris, Brussels, London); a number = fixed hours from UTC; 'server' = clock of the server machine |
Config.Month | 12 | month of the calendar |
Config.Days | 24 | number of doors (24 = up to Christmas Eve, max. 31) |
Config.OpenHour | 0 | hour from which the day’s door opens (e.g. 18 = only in the evening) |
Config.ShowUntil | { month = 1, day = 6 } | the review stays visible until then, after that it pauses until next December |
Config.CatchUpDays | 0 | catch up missed doors: 0 = only today’s, 2 = up to two days back, 24 = all |
Appearance
Section titled “Appearance”All of this can also be changed in the tablet under Management → Settings → Appearance.
| Setting | Default | Meaning |
|---|---|---|
BrandName | 'HypeModding' | server name top left and on the calendar |
Title | 'Adventskalender' | title on the calendar |
Subtitle | '' | empty = “server name · year” |
LogoUrl | '' | your own logo top left (https://… or nui://…) |
Print | 'markt' | print image: 'markt' (Christmas market), 'dorf' (winter village), 'flach' (simple), 'eigen' (own image) |
PrintUrl | '' | your own image in 16:9, e.g. 2560×1440 |
Accent | '#b3262b' | color for today’s door, buttons and numbers |
NumberStyle | 'kreis' | 'kreis' (circle), 'gold' or 'schlicht' (simple) |
ShowTitle | true | print the title on the calendar |
Paper | true | subtle paper texture on picture and doors |
Permissions
Section titled “Permissions”Only admins see the management (gear icon top right), and the server checks every action itself as well. One of these rules is enough:
Config.Permissions = { Ace = 'hm_advent.admin', -- server.cfg: add_ace group.admin hm_advent.admin allow Groups = { 'admin', 'superadmin' }, -- ESX group or QBCore/Qbox permission Identifiers = {}, -- single players, e.g. 'license:…'}ACE only? Set Groups = {}. Custom rules can be added in open/server.lua in the function Open.IsAdmin.
| Setting | Default | Meaning |
|---|---|---|
Enabled | true | show Santa at the calendar |
Model | 'hm_santa' | ped model (resource hm_santa must be running) |
FallbackModel | 'a_m_m_bevhills_02' | used if the model can’t be loaded |
Coords | Legion Square | starting location; can be set in the tablet with To my position |
Scenario | 'WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT' | Santa’s animation |
Distance | 2.2 | range for E / ox_target |
Blip | on | map blip (sprite, color, size, name) |
Vehicles
Section titled “Vehicles”Vehicles won end up in the player’s garage. With hm_garage this uses its export, otherwise the framework’s vehicle table directly (owned_vehicles or player_vehicles, on Qbox via qbx_vehicles).
| Setting | Default | Meaning |
|---|---|---|
Garage | nil | hm_garage garage (nil = first public car garage) |
PlatePrefix | 'XMAS' | plate = prefix + digits (max. 8 characters) |
EsxParking | nil | ESX: value for owned_vehicles.parking |
QbGarage | 'pillboxgarage' | QBCore: garage in player_vehicles.garage |
GarageName | nil | jg-advancedgarages / cd_garage: garage ID |
ExtraColumns | {} | extra columns for your garage script, e.g. { in_garage = 1 } (only if they exist) |
Item images
Section titled “Item images”Config.ItemImages = 'auto' detects ox_inventory, qb-inventory and ps-inventory. For other inventories enter the path, e.g. 'nui://my_inventory/html/images/%s.png'.
Doors and wheels
Section titled “Doors and wheels”The easiest way to set the content is the tablet. config.lua holds the starting values:
Config.Doors = { [1] = { rewards = { { type = 'item', name = 'bread', count = 3 } } }, [6] = { wheel = 'advent', title = 'Nikolaus' },}A door has either fixed rewards (rewards, all are handed out together) or a wheel (wheel). title is shown on the door.
| Type | Fields | Example |
|---|---|---|
item | name, count | { type = 'item', name = 'bread', count = 3 } |
money | account ('money', 'bank', 'black_money'), amount | { type = 'money', account = 'bank', amount = 5000 } |
weapon | name, ammo | { type = 'weapon', name = 'WEAPON_SNOWBALL', ammo = 10 } |
vehicle | model, label | { type = 'vehicle', model = 'sultan', label = 'Karin Sultan' } |
custom | label, event, data, icon | { type = 'custom', label = '7 days VIP', event = 'myserver:vip', data = '7' } |
For all types, label overrides the displayed name.
Wheels: weight = weighting (chance = weight ÷ sum of all weights), limit = how often the prize may be won in the whole year (after that it disappears from the wheel), announce = true = all players see the win, plus color and icon (Font Awesome 6 name, e.g. 'car-side'; a dropdown in the tablet).
Custom content
Section titled “Custom content”The custom type triggers TriggerEvent(event, source, data, label) on the server. This way you can hand out anything your server knows – VIP time, coins, licenses. If you need something else, adjust Open.GiveCustom in open/server.lua. After every delivery Open.OnClaim is called as well, e.g. for your own logs or Discord.