Lvl characters.ini (Config pack)
lvl_characters.ini - Defines available playable characters and their properties (skills, graphics, physics, etc).
| [main-characters] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| total | >=0 | total = 5 | The total count of various playable character types. |
Playable character entry
Common player definition
Settings of each character (Where '*' - should be a PLAYER-ID from 1 to total number of characters)
You should define settings for all allocated PLAYER-ID range!
| [character-*] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| name | string | name = "Mr. Funny Face" | The name of a playable character. |
| sprite-folder | string | sprite-folder = "funnyface" | The name of the directory at the characters graphics store where are main sprites for this playable character stored. |
| state-type | enumeration | state-type = 0 | The way how playable character states should be used: 0 - power-up, 1 - suits. Unused yet. |
| matrix-width | >0 | matrix-width = 10 | The count of frames at the horizontal line of the playable character sprite. |
| matrix-height | >0 | matrix-height = 10 | The count of frames at the vertical line of the playable character sprite. |
| script-file | string | script-file = "funnyface.lua" | The file name for the script at the player scripts directory that implements the behavior for this playable character. |
| states-number | >0 | states-number = 3 | The count for playable character states. Playable characters must have at least one state definition to work. |
| fail-.... | effect profile | fail-.... = ... | Spawn the effect when playable character was been killed (except for the lava burn and the fall into the pit). |
| floor-slide-.... | effect profile | floor-slide-.... = ... | Spawn the effect at feets of playable character when sliding on the floor. |
The common settings of player physics.
| [character-*-physics-common] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| duck-allow | boolean | duck-allow = true | Allow playable character to sit down (to duck, a verb, don't confuse with a bird that swims in a water and says "quack"). |
| allow-floating | boolean | allow-floating = false | Allow playable character to float in air after jump for given time period. |
| floating-max-time | >=0 ms. | floating-max-time = 1500 | How many milliseconds player can float in air after jump. On timeout, player will fall down. |
| floating-amplitude | double | floating-amplitude = 0.8 | The floating aplitude which player will make while floating in air. |
The generic air environment physics settings for all states of playable characters if no state specific physics defined.
| [character-*-env-common-air] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| ... | string | ... = ... | See Physics setup below. |
The generic water environment physics settings for all states of playable characters if no state specific physics defined.
| [character-*-env-common-water] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| ... | string | ... = ... | See Physics setup below. |
The generic quicksand environment physics settings for all states of playable characters if no state specific physics defined.
| [character-*-env-common-quicksand] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| ... | string | ... = ... | See Physics setup below. |
Character settings for the world map appearence.
| [character-*-world] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| sprite-name | string | sprite-name = "funnyface-world.png" | The image file name for the world map appearence. The sprite should contain 4 sets of frames for 4 direction projections: up, down, left, right. |
| offset-y | integer | offset-y = 0 | The vertical pixel offset of the sprite relative to the default alignment (The align is done by the bottom of a drawn frame). |
| frames-total | >=1 | frames-total = 8 | Total count of frames on the sprite. |
| frame-delay | >=0 | frame-delay = 128 | The delay between frames in the animation, in milliseconds. |
| frame-speed | >=0 | frame-speed = 128 | Alias to "frame-delay". |
| frames-down | int-array | frames-down = "0,1" | A list of frame indeces to build the animation for down projection. |
| frames-right | int-array | frames-right = "1,2" | A list of frame indeces to build the animation for right projection. |
| frames-left | int-array | frames-left = "3,4" | A list of frame indeces to build the animation for left projection. |
| frames-up | int-array | frames-up = "5,6" | A list of frame indeces to build the animation for up projection. |
Playable character state entry
Every playable character may have various set of states which may change behavior, sprite, size, physical abilities, etc.
| [character-*-state-*] | ||||
|---|---|---|---|---|
| Parameter | Allowed values | Example value | Description | |
| name | string | name = "Default state" | The name of a state. | |
| allow-floating | boolean | allow-floating = false | Allow or disallow player to float for this specific state. If undefined, the character generic "allow-floating" value will be used. | |
| floating-max-time | >=0 ms. | floating-max-time = 1500 | How many milliseconds player can float in air after jump. On timeout, player will fall down. If undefined, the character generic "floating-max-time" value will be used. | |
| floating-amplitude | double | floating-amplitude = 0.8 | The floating aplitude which player will make while floating in air. If undefined, the character generic "floating-amplitude" value will be used. | |
| default-duck-height | >=0 | default-duck-height = 30 | The reduced hitbox height of a playable character in a sitting down "duck" state.
| |
| default-height | >=1 | default-height = 54 | The normal hitbox height of a playable character in a regular standing state.
| |
| default-width | >=1 | default-width = 54 | The hitbox width of a playable character.
| |
| events | string | events = events.lua | !!!Unuused!!! The path to the script that contains state specific events. | |
| sprite-settings | string | sprite-settings = funnyface.ini | The calibration for the sprite hitbox (hitbox offsets on the frame, built-in animations, and other parameters). | |
The state specific physics for the air physical environment. Optional.
| [character-*-env-*-air] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| ... | string | ... = ... | See Physics setup below. |
The state specific physics for the water physical environment. Optional.
| [character-*-env-*-water] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| ... | string | ... = ... | See Physics setup below. |
The state specific physics for the quicksand physical environment. Optional.
| [character-*-env-*-quicksand] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| ... | string | ... = ... | See Physics setup below. |
Physics setup
This block describes the generic physics setup for all cases. Each case requires to declare the separated copy of this section.
| [character-*-env-*-*] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| walk_force | double | walk_force = 6.5 | The acceleration value for the walking. |
| run_force | double | run_force = 3.25 | The acceleration value for the running. |
| decelerate_stop | double | decelerate_stop = 4.55 | The deceleration of player getting stop (when no move force). |
| decelerate_run | double | decelerate_run = 10.88 | The deceleration of player getting slowed down (when no move force). |
| decelerate_turn | double | decelerate_turn = 18.2 | The deceleration of player getting move back and stopping to move forward (when no move force). |
| decelerate_air | double | decelerate_air = 0 | The in-air deceleration. |
| ground_c | double | ground_c = 1.0 | On-Ground accelerations coefficient. |
| ground_c_max | double | ground_c_max = 1.0 | On-Ground max speed coefficient. |
| slippery_c | double | slippery_c = 0.3 | Slippery surface accelerations coefficient. |
| gravity_accel | double | gravity_accel = 26 | Gravity acceleration. |
| gravity_scale | double | gravity_scale = 1.0 | Gravity scale coefficient. |
| velocity_jump | double | velocity_jump = 5.3 | The velocity of a player jump up (Player will fly up until timeout). |
| velocity_jump_bounce | double | velocity_jump_bounce = 5.3 | The velocity given to player after getting bounced from the bouncing ceiling. |
| velocity_jump_spring | double | velocity_jump_spring = 9.3 | The velocity of player jump up from the spring board. |
| velocity_jump_c | double | velocity_jump_c = 5.8 | Jump coefficient which provides increzed jump height dependent to speed. |
| jump_time | double | jump_time = 260 | The jump fly up timeout in milliseconds. |
| jump_time_bounce | double | jump_time_bounce = 370 | The jump fly up timeout from a bounced jump in milliseconds. |
| jump_time_spring | double | jump_time_spring = 530 | The jump fly up timeout from a bounced by spring jump in milliseconds. |
| velocity_climb_x | double | velocity_climb_x = 1.5 | The horizontal climbing velocity. |
| velocity_climb_y_up | double | velocity_climb_y_up = 2.0 | The vertical climbing velocity for up direction. |
| velocity_climb_y_down | double | velocity_climb_y_down = 3.0 | The vertical climbing velocity for down direction. |
| MaxSpeed_walk | double | MaxSpeed_walk = 3.0 | The maximal velocity of player walking speed. |
| MaxSpeed_run | double | MaxSpeed_run = 6.0 | The maximal velocity of player running speed. |
| MaxSpeed_up | double | MaxSpeed_up = 74.0 | The maximal velocity of player flying up. |
| MaxSpeed_down | double | MaxSpeed_down = 12.0 | The maximal velocity of player falling down. |
| MaxSpeed_down | double | MaxSpeed_down = 12.0 | The maximal velocity of player falling down. |
| strict_max_speed_on_ground | boolean | strict_max_speed_on_ground = false | Do reduce the speed to max if faster than allowed on ground. Otherwise, the speed will be decelerated softly to maximum allowed. |
| zero_speed_y_on_enter | double | zero_speed_y_on_enter = false | When player enters this physical environment, set the vertical velocity to zero value. |
| slow_up_speed_y_coeff | double | slow_up_speed_y_coeff = 0.325 | Coefficient to slow speed if it going up. |
| slow_speed_x_on_enter | boolean | slow_speed_x_on_enter = false | When player enters this physical environment, slow down the horizontal speed by the coefficient. |
| slow_speed_x_coeff | double | slow_speed_x_coeff = 0.128 | Slow speed when player enters this physical environment. |
