Configuration

Getting Started

Configuration

You can find your configuration in config.lua file located in your root folder. Configurations include essential settings for Sea.

Do not forget that apps individually can touch these configurations with their own config.lua located in their directory.

System related

sea.config.systemPrefix defines the prefix of the console outputs.

sea.config.supportedTransferFileFormats defines the formats which are supported in the process of adding new transfer files. These are, in default, the ones that CS2D supports, so it does not make sense to add new ones (or even remove the existing ones).

sea.config.color.system & sea.config.color.team are not recommended to be touched. You can fill sea.config.color.custom manually by yourself or with sea.addColor. When apps attempt to insert new colors as config, they will be inserted into custom table.

Game Setting

Player

info

sea.config.player.info contains the information that the player can see in their main menu. The key of the entry should be the name of the info, and the value should be a function (has player object parameter) returning how and what it displays in the menu.

["Progress"] = function(player) return "Your rank is "..player.rank end

stat

sea.config.player.stat, as you can tell, are the statistics of the player which can be seen in their main menu just like the information. The key of the entry should be the name of the statistic, and the value should be a table containing the default value (start value) and optionally a function (has stat's value parameter) that returns how it is displayed.

["Money Spent"] = {0, function(value) return value.."$" end}

variable

sea.config.player.variable are the custom variables of the player, anything that would not make sense to into other categories should be inserted here. For instance, inventory, rank, XP and such. The key of the entry should be the variable name and the value should be a table containing the default value (start value) and optionally a boolean value which if it is true, it will be treated as a data to be saved every minute and when the player leaves the server. The player variables will be included in the player objects, so you can get them using player.rank for example.

rank = {1, true}

preference

sea.config.player.preference contains the preferences that the player can change as they wish using the main menu. The key of the entry should be the name of the preference, and the value should be a table containing the default value and the options in a table that are available to the player. The option table has to contain the default value, meaning the default value has to be one of the options in the option table.

["Passive Mode"] = {"On", {"On", "Off"}}

control

sea.config.player.control contains the controls which trigger events when the player presses and releases the specified key binding. Controls can be configured in order their default key bindings not to be changed later on by players using the main menu. The key of the entry should be the name of the control (later to be used like "onPressControlName" as an event), and the value should be a table containing the default key binding and optionally a boolean value which if it is true, the player can change the key binding as they wish in-game.

["Fire"] = {"mouse1", true}