Lvl blocks.ini (Config pack)

From PGE Wiki
Jump to navigation Jump to search

lvl_blocks.ini - Defines blocks for levels.


[ blocks-main ]
Parameter Allowed values Example value Description
total >=1 total = 638 Allocate number of BLOCK-ID's to define blocks
grid >=1 grid = 32 Default alignment grid size for all blocks without defined "grid" field.
config-dir string config-dir = "items/blocks" Enables split config mode (using a set of block-*.ini files in the specified directory instead finding sections in the same INI-file)
extra-settings string extra-settings = "items/blocks" Relative path to folder where are extra settings JSON layouts are stored. If the field didn't define, the value of `config-dir` will be used. When it's also empty too, extra settings will not work.
default-sizable-border-width >=0 or -1 default-sizable-border-width = -1 Default border width of sizable blocks. If value is not equal or less than zero, the 1/3 of texture dimension size will be automatically used as border width.


Note: in the split mode or in the custom level/episode block-*.ini config file, section name is always block.

Settings of each block (Where '*' - should be a BLOCK-ID from 1 to total number of blocks)
You should define settings for all allocated BLOCK-ID range!

[ block-* ]
Parameter Allowed values Example value Description
image string image = "block-1.gif" Image filename of block
name string name = "Wood block" Title of block
group string group = "Common blocks" Group name where included this block
category string category = "Wood" Category name where included this block
description string description = "Knock it!" A short description about this element.
extra-settings string extra-settings = "mylayout.json" Filename of GUI layout for extra settings if they are needed for this element.
grid >=1 grid = 32 Size of aligning grid
default-invisible [0,1] default-invisible = 0 Set default invisible flag for this block
default-slippery [0,1] default-slippery = 0 Set default slippery flag for this block
default-npc-content +/- integer default-npc-content = 12 Set default content of this block
>0 - ID of NPC
<0 - coins number
if is 0 - empty block
sizable [0,1] sizable = 0 Makes this block be re-sizable
sizable-border-width >=0 or -1 sizable-border-width = -1 Common border size of sizable block. Default for all undefined side specific sizes. If not defined or less than zero, global value will be used.
sizable-border-width-left >=0 or -1 sizable-border-width-left = -1 Border size of sizable block at left side. If not defined or less than zero, common value will be used.
sizable-border-width-top >=0 or -1 sizable-border-width-top = -1 Border size of sizable block at top side. If not defined or less than zero, common value will be used.
sizable-border-width-right >=0 or -1 sizable-border-width-right = -1 Border size of sizable block at right side. If not defined or less than zero, common value will be used.
sizable-border-width-bottom >=0 or -1 sizable-border-width-bottom = -1 Border size of sizable block at bottom side. If not defined or less than zero, common value will be used.
z-layer string z-layer = background Default Z-Order layer of block:
background,
foreground
view string view = background Alias to "z-layer" field
danger -3...4 danger = 0 Make block danger to player which contacted with this block by side:

0 - block is safe
1 left
-1 right
2 top
-2 bottom
3 left-right
-3 top-bottom

4 - all sides hurts
collision 0..2 collision = 1 Collision type of block:

1 - collision on all sides
2 - top side collision only

0 - no collision
slope-slide [0,1] slope-slide = 0 Allow slide on slope (for triangle shape blocks)
shape-type -2..3 shape-type = 0 Collision shape of this block: (see picture below)
lava [0,1] lava = 0 Burn of all NPC's and playable characters which contacted with this block. Exception are lava-protected NPC's.
destroyable [0,1] destroyable = 0 Can be destroyed with shell/head bump
destroyable-by-bomb [0,1] destroyable-by-bomb = 0 Block is destroyable by Bomb explosion
destroyable-by-fireball [0,1] destroyable-by-fireball = 0 Destroyable by fireball marked NPC
spawn-on-destroy string/integer spawn-on-destroy = "0" Object type-ID for spawn after destroy
Examples:
0 - nothing
, block-*
, npc-*
where * - is an positive integer
destroy-effect +integers destroy-effect = 1 Play effect ID on destroy, 0 - no effect
bounce [0,1] bounce = 0 Bounce block. if playable character will stand to this block, it will be bounced
hitable [0,1] hitable = 0 Can be hit by player. if 0, hittable only if block is contains some NPC or coins
transform-onhit-into >=0 transform-onhit-into = 2 if enabled hit transform, block will be transformed into block of ID=2,
if value is 0, block will not be transformed, even if contains NPC
algorithm >=0 algorithm = 0 Special block algorithm, for example: on/off switcher, invisible block, player switch block
animated [0,1] animated = 0 Enable animation
animation-revers [0,1] animation-revers = 0 Enable reversed animation sequence
animation-bidirectional [0,1] animation-bidirectional = 0 Animation will turn back on edge frames in sequence
frames [0,1] frames = 14 Number of animation frames on sprite
frame-delay >=1 frame-delay = 128 Delay between animation frames in milliseconds
frame-speed >=1 frame-speed = 128 Alias to frame-delay
framespeed >=1 framespeed = 8 Delay between animation frames in 1/65 seconds
frame-sequence string, sequence of integers frame-sequence = "1,3,2,0" Initial custom animation frames sequence (first frame is 0, last is n-1). Empty string is usage of default sequence.
display-frame >=0 display-frame = 3 If animation is disables, will be displayed this frame (first frame is 0 value)
hit-sound-id >=0 hit-sound-id = 3 Play custom sound when something hits this block (if 0 - play default sound)
destroy-sound-id >=0 destroy-sound-id = 3 Play custom sound when something destroys this block (if 0 - play default sound)
Switch blocks
switch-button [0,1] switch-button = 0 Hit of this block will cause toggle switch by defined ID
switch-block [0,1] switch-block = 0 Switchable block which will be transformed on toggling specific switch ID
switch-id integer switch-id = 2 ID of switch group. All blocks including in this group will be toggled with button which in same group which got hit
switch-transform >=1 switch-transform = 2 Target transform BLOCK-ID. Block will be transformed when switch ID was toggled
Player switch blocks (hit will transform a playable character to another)
player-switch-button [0,1] player-switch-button = 1 Hit of this block will transform playable character to another specified
player-switch-button-id integer player-switch-button-id = 2 ID of playable character to transform.
player-switch-frames-true string, sequence of integers player-switch-frames-true = "1,3,2,0" Animation sequence while current playable character of specified ID is exists on a level
player-switch-frames-false string, sequence of integers player-switch-frames-false = "1,3,2,0" Animation sequence while current playable character of specified ID is NOT exists on a level
Player filter blocks (through this block can pass only playable character of specified ID)
player-filter-block [0,1] player-filter-block = 1 This block will be non-collidable for a playable character of specified ID
player-filter-block-id integer player-filter-block-id = 2 ID of playable character to transform.
player-filter-frames-true string, sequence of integers player-filter-frames-true = "1,3,2,0" Animation sequence while current playable character of specified ID is exists on a level
player-filter-frames-false string, sequence of integers player-filter-frames-false = "1,3,2,0" Animation sequence while current playable character of specified ID is NOT exists on a level


Shapes of the blocks

Lvl blocks shapes.png