Lua world object - VanaDev/Vana GitHub Wiki

Table of Contents

Example World Object

 world = {
 	["name"] = "Scania",
 	["port"] = 7100,
 	["id"] = 0,
 	["channels"] = 19,
 	["ribbon"] = system_ribbon_none,
 	["gm_chat_by_default"] = false,
 	["rates"] = {
 		["mob_exp"] = 1,
 		["quest_exp"] = 1,
 		["drop_rate"] = 1,
 		["drop_meso"] = 1,
 		["global_drop_rate"] = -1,
 		["global_drop_meso"] = -1,
 	},
 	["max_characters"] = 6,
 	["default_characters"] = 3,
 	["default_storage"] = 4,
 	["max_stats"] = 999,
 	["max_multi_level"] = 1,
 	["scrolling_header"] = "",
 	["event_message"] = "",
 	["max_player_load"] = 1000,
 	["fame_time"] = 60 * 60 * 24,
 	["fame_reset_time"] = 60 * 60 * 24 * 30,
 	["map_unload_time"] = 60 * 60,
 	["pianus"] = {
 		["channels"] = {-1},
 		["attempts"] = -1,
 	},
 	["papulatus"] = {
 		["channels"] = {-1},
 		["attempts"] = 2,
 	},
 	["zakum"] = {
 		["channels"] = {4, 5, 6},
 		["attempts"] = 2,
 	},
 	["horntail"] = {
 		["channels"] = {8},
 		["attempts"] = 2,
 	},
 	["pinkbean"] = {
 		["channels"] = {9},
 		["attempts"] = 1,
 	},
 };

Properties

name

Required: Yes

Type: string

Notes: Determines the labeling of the world on the channel selection menus. Does not need to be a real label such as Scania. It can be Glorbax 12.

port

Required: Yes

Type: uint16

Notes: Determines the base port upon which the channels will listen.

id

Required: Yes

Type: uint8

Notes: An identifier between 0 and 9 that indicates what icon the world has on the world selection menu.

channels

Required: No

Type: uint8

Notes: A value between 1 and 20 that indicates how many channels the world is expected to have. Default value is 19.

ribbon

Required: No

Type: ribbon constant

Notes: Indicates what badge the world should have on the world selection menu. Default value is system_ribbon_none.

gm_chat_by_default

Required: No

Type: boolean

Notes: Indicates whether GM chat mode is on by default. Default value is false.

rates

Required: No

Type: rates object

Notes: Determines the rates for the world. Default values are all 1 for non-global rates. Global rates default to -1 (suggesting that the regular rates should be used).

max_characters

Required: No

Type: number

Notes: Determines how many character slots a player can have at maximum. It is generally between 1 and 6. The client does not allow more than 6. Default value is 6.

default_characters

Required: No

Type: number

Notes: Determines how many character slots a player will have by default. It should be less than or equal to the number for max_characters. Default value is 3.

default_storage

Required: No

Type: number

Notes: Determines how many storage slots a player will have by default. The default and minimum value is 4. The maximum is 100.

max_stats

Required: No

Type: number

Notes: Determines how many AP a user can put into a stat at maximum. The minimum is 4, the maximum is 32767. The default is 999.

max_multi_level

Required: No

Type: number

Notes: Determines how many times a user can level up assuming they have enough EXP. 0 means leveling is disabled entire. -1 means as many times as the EXP allows. The default is 1.

scrolling_header

Required: No

Type: string

Notes: Determines what players see scrolling across the top as they play. The default is to not display a header.

event_message

Required: No

Type: string

Notes: Determines what message players see as part of logging in to the world. The default is to display nothing.

max_player_load

Required: No

Type: number

Notes: Used to display population bar percentages on the channel selection menu. Default value is 1000.

fame_time

Required: No

Type: number

Notes: Determines how long (in seconds) before a specific player can fame after faming. 0 means that faming is disabled. -1 means as often as the player wants. The default is 60 * 60 * 24 (a day).

fame_reset_time

Required: No

Type: number

Notes: Determines how long (in seconds) before a specific player can receive fame from a player that has previously famed them. 0 means that faming is disabled. -1 means as often as the faming player wants. The default is 60 * 60 * 24 * 30 (a month).

map_unload_time

Required: No

Type: number

Notes: Determines how long (in seconds) after a map is "not in use" before a map will be unloaded. A value of 0 means that map unloading is disabled. A map is considered "not in use" when it has no players, no drops, etc. for the specified period of time and has no boss spawns (e.g. Pianus, Mushmom) and is not a part of an instance (e.g. the docks for boats). The default value is 60 * 60 (an hour).

pianus

Required: No

Type: major boss object

Notes: Determines how frequently and where players may engage this boss.

papulatus

Required: No

Type: major boss object

Notes: Determines how frequently and where players may engage this boss.

zakum

Required: No

Type: major boss object

Notes: Determines how frequently and where players may engage this boss.

horntail

Required: No

Type: major boss object

Notes: Determines how frequently and where players may engage this boss.

pinkbean

Required: No

Type: major boss object

Notes: Determines how frequently and where players may engage this boss.

⚠️ **GitHub.com Fallback** ⚠️