Class configs
From King Arthur's Gold Wiki
Revision as of 15:47, 8 January 2013 by Splittingred (Talk | contribs)
Class config files are CFG files that load specific settings for each class type in KAG. They are usually named "knight.cfg" or the name of the class and .cfg.
Example Configuration
An example knight.cfg might look like this:
name = Knight emblem = GUI/knight_icon.png actor_name = runner actor_config = actor_sprite_size = 32 actor_sprite_male = Sprites/knightMale.png actor_sprite_female = Sprites/knightFemale.png actor_heads_size = 16 actor_heads_male = Sprites/MaleHeads.png actor_heads_female = Sprites/FemaleHeads.png default_health = 1.5 default_armor = 0.0 stone_default = 0 wood_default = 0 gold_default = 0 arrows_default = 0 bombs_default = 0 stone_warmup = 0 wood_warmup = 0 gold_warmup = 0 arrows_warmup = 0 bombs_warmup = 0
Config Variables
There are special configuration variables available to class config files. They are:
Name | Type | Default Value | Description |
---|---|---|---|
name | string | "Default class" | Name of class to be displayed in class menus. |
emblem | string | Reference to location of image to be shown in class menus. (.png) | |
actor_name | string | Defines the type of entity for game engine purposes. Shouldn't be modified. Currently only "runner" is available. | |
actor_config | string | Reference to location of class configuration file. (.cfg) Does not seem to be any longer used in latest KAG build. | |
actor_sprite_size | u16 | 32 | Defines the frame width of the sprite for animation purposes. |
actor_sprite_male | string | Reference to location of the body sprite-sheet to be used during animation when player selects male. (.png) | |
actor_sprite_female | string | Reference to location of the body sprite-sheet to be used during animation when player selects female. (.png) Does not seem to be used at this given time. | |
actor_heads_size | u32 | 16 | Defines the frame width of the head sprite for animation purposes. |
actor_heads_male | string | Reference to location of the head sprite-sheet to be used during animation when player selects male. (.png) | |
actor_heads_female | string | Reference to location of the head sprite-sheet to be used during animation when player selects male. (.png) Does not seem to be used at this given time. | |
default_health | float | 1.0 | Amount of hearts for the class. Value is multiplied by 2. Setting this to 2.0 would give 4 hearts. |
default_armor | float | 0 | Not used currently. |
stone_default | u8 | 0 | Amount of stone given to class when player spawns after warm-up. Overridden by new_sacks_in_tent gamemode variable. |
wood_default | u8 | 0 | Amount of wood given to class when player spawns after warm-up. Overridden by new_sacks_in_tent gamemode variable. |
gold_default | u8 | 0 | Amount of gold given to class when player spawns after warm-up. Overridden by new_sacks_in_tent gamemode variable. |
arrows_default | u8 | 0 | Amount of arrows given to class when player spawns after warm-up. Overridden by new_sacks_in_tent gamemode variable. |
bombs_default | u8 | 0 | Amount of bombs given to class when player spawns after warm-up. Overridden by new_sacks_in_tent gamemode variable. |
stone_warmup | u8 | 0 | Amount of stone given by tent during warm-up. Overridden by new_sacks_in_tent gamemode variable. |
wood_warmup | u8 | 0 | Amount of wood given by tent during warm-up. Overridden by new_sacks_in_tent gamemode variable. |
gold_warmup | u8 | 0 | Amount of gold given by tent during warm-up. Overridden by new_sacks_in_tent gamemode variable. |
arrows_warmup | u8 | 0 | Amount of arrows given by tent during warm-up. Overridden by new_sacks_in_tent gamemode variable. |
bombs_warmup | u8 | 0 | Amount of bombs given by tent during warm-up. Overridden by new_sacks_in_tent gamemode variable. |
max_zoom_out | u8 | 0 | Up to which zoom_lvl can be used. Maximum value is 3. |
zoom_level_1 | f32 | -1.0 | Overrides zoom_level_1 in gamemode configuration. |
zoom_level_2 | f32 | -1.0 | Overrides zoom_level_2 in gamemode configuration. |
zoom_level_3 | f32 | -1.0 | Overrides zoom_level_3 in gamemode configuration. |
allowed_at_tent | bool | true | Toggles the ability to swap to this class at tents and outposts and upon respawn. Setting to false will prevent this class from being used. |
knockback_scale | float | 1.0 | Affects distance traveled when this class has been successfully attacked. Setting higher will make a larger knockback. |
Customizing
You can create any sort of class configuration for your mod by adjusting the variables above.
1-Heart Mode
To start the class with only one heart, you can set default_health:
default_health = 0.5