Game Configuration Pack References

From Moondust Wiki
Revision as of 16:44, 21 October 2014 by Wohlstand (talk | contribs) (Wohlstand moved page Game Configuration packs to Game Configuration package: Fix)
Jump to navigation Jump to search

Game Configuration packs are the main foundation for all games which will work with PGE. A Configuration pack includes item definitions, gameplay settings, game content, and other miscellaneous information.


Structure

All configuration packs must use this tree structure:

Note: italic folders can be customized by main.ini config


/<Name of config pack>

  • /data - content data container
    • /graphics - graphics resources
      • /characters - playable characters sprites
      • /common - common engine graphics (for example, logos, titles, design elements, etc.)
      • /level - graphics which uses in levels
      • /worldmap - graphics which uses in world maps
    • /music - music container
    • /sound - music container
  • /tilesets
  • /group_tilesets
  • main.ini - main configuration pack description and settings
  • music.ini - configuration and list of musics
  • sounds.ini - configuration and list of sounds
  • lvl_bgo.ini - definition of background objects for levels
  • lvl_bkgrd.ini - definition of backgrounds for levels
  • lvl_blocks.ini - definition of blocks for levels
  • lvl_effects.ini - definition of effects for levels
  • lvl_npc.ini - definition of non-playable characters for levels
  • wld_tiles.ini - definition of tiles for world map
  • wld_scenery.ini - definition of sceneries for levels
  • wld_paths.ini - definition of paths for levels
  • wld_levels.ini - definition of level points for levels


Configuration files

main.ini

The main settings of configuration pack

[main] Is a basic settings of this configuration pack

Parameter Variants Example value Description
config_name string config_name="Raocow Talkhaus" The full name of configuration pack
worlds string worlds="Raocow Games" Game worlds folder where engine will look for episodes
music string music = "music"

music = "../../SMBX/music"

Path to folder with music files (relative to the data subdirectory)
sound string sound = "sound"

sound = "My Media/sounds"

Sound folder
application-dir [0,1] application-dir=0 If this flag was set to 1, data will be locked relative to application dir instead "data" subdirectory.
graphics-level string graphics-level="graphics/level" Path to folder of level graphics folder
graphics-worldmap string graphics-worldmap="graphics/worldmap" Path to folder of worldmap graphics folder
graphics-characters string graphics-characters="graphics/characters" Path to folder of playable character graphics folder
graphics-common string graphics-common="graphics/common" Path to folder of common engine graphics
custom-data string custom-data="data-custom" Path to custom data folder [reserved]
smbx-compatible [0,1] smbx-compatible=1 [reserved value] This option will disable the use of non-SMBX features for games created with this config.

This will allow saved level files, etc. to be compatible with SMBX 1.3 If you set this option to 0, you can read SMBX files, but you will lose data if you try to save in SMBX format, and you will get rendering bugs if you try to open the file in SMBX


[graphics] Some settings of the editing process and graphics setup

Parameter Variants Example value Description
default-grid [>=0] default-grid=32 You can define any grid size for your game


[characters] List of available playable characters in game

Parameter Variants Example value Description
characters [>=0] characters=5 Total number of available playable characters
character*-name string character4-name = "Raocow" Name of character selected number (instead of * write the character ID [1...total characters])


[gui] Global editor GUI settings

Parameter Variants Example value Description
editor-splash string editor-splash="graphics/common/editor_splash.png" Default splash of this configuration package
default-theme string default-theme="Raocow Style" Folder name of theme which will be used as default




engine.ini

The main settings of game engine

[common]

Parameter Variants Example value Description
screen-width [>=1] screen-width=800 Default width of screen
screen-height [>=1] screen-height=600 Default height of screen
screen-type [static,scalable],[dynamic,resizable] screen-type=scalable static (or 'scalable' which a synonym of 'static') screen will always have defined resolution.

dynamic (or 'resizable') screen will be resized when you resize window.


[world-map]

Parameter Variants Example value Description
background string background="world_back.png" Background image of world map screen
viewport-x [>=0] viewport-x=66 Position of world map view window over background
viewport-y [>=0] viewport-y=130 Position of world map view window over background
viewport-width [>=0] viewport-width=668 Width of world map view window over background
viewport-height [>=0] viewport-height=403 Height of world map view window over background
level-title-x [>=0] level-title-x=0 Position of level title text
level-title-y [>=0] level-title-y=30 Position of level title text
level-title-w [>=1] level-title-w=700 Maximal width of level title
level-title-align left,right,center level-title-align=center Aligning of text in the defined zone
points-counter [0,1] points-counter=0 Enable displaying of points counter
points-counter-x [>=0] points-counter-x=12 Position of points counter label with value
points-counter-y [>=0] points-counter-y=12 Position of points counter label with value
health-counter [0,1] health-counter=1 Enable displaying of lives/health counter
health-counter-x [>=0] health-counter-x=12 Position of lives/health counter
health-counter-y [>=0] health-counter-y=24 Position of lives/health counter
star-counter [0,1] star-counter=1 Enable displaying of counter of collected stars/leeks/keys
star-counter-x [>=0] star-counter-x=12 Position of counter of collected stars/leeks/keys
star-counter-y [>=0] star-counter-y=36 Position of counter of collected stars/leeks/keys
coin-counter [0,1] coin-counter=1 Enable displaying of collected coins counter
coin-counter-x [>=0] coin-counter-x=12 Position of collected coins counter
coin-counter-y [>=0] coin-counter-y=12 Position of collected coins counter
portrait [0,1] portrait=1 Enable displaying of current playable character's portrait
portrait-x [>=0] portrait-x=2 Position of current playable character's portrait
portrait-y [>=0] portrait-y=2 Position of current playable character's portrait


[loading-scene]

Parameter Variants Example value Description
bg-color-r [0-255] bg-color-r=0 Level of red of background color
bg-color-g [0-255] bg-color-g=0 Level of green of background color
bg-color-b [0-255] bg-color-b=0 Level of blue of background color
background string background="big_splash.png" File name of background / centered splash image
updating-time [>=1] updating-time=128 Delay between updating of screen
additional-images [>=0] additional-images=2 Number of additional images which will be displayed on screen


[loading-image-*] (where * - value from 1 to "additional-images" value)

Parameter Variants Example value Description
image string image="coin.png" File name of image
animated [0,1] animated=1 Enable vertical sprite animation
frames [>=1] frames=4 Number of frames
pos-x [>=0] pos-x=768 Horizontal position on screen
pos-y [>=0] pos-y=564 Horizontal position on screen




music.ini

Defining list of available music

[music-main]

Parameter Variants Example value Description
total-world [>=1] total-world=16 Total number of world map music
total-level [>=1] total-level=56 Total number of level music
total-special [>=1] total-special=3 Total of special musics which using for special events and is not available to playback by standard methods
level-custom-music-id [>=0] level-custom-music-id=24 ID which will used as "custom music".


[world-music-*]

Parameter Variants Example value Description
name string name="Jazz for everything" Title of music
file string file="jazz-for-everything.ogg" Music file which connected to this ID slot


[level-music-*]

Parameter Variants Example value Description
name string name="Rock'n'roll!" Title of music
file string file="rock-n-roll.ogg" Music file which connected to this ID slot


[special-music-*]

Parameter Variants Example value Description
name string name="tick-tack, go-go!" Title of music
file string file="tick-tack.ogg" Music file which connected to this ID slot




sounds.ini

Definition of available sound effects


[sound-main]

Parameter Variants Example value Description
total [>=1] total=91 Total number of available sound effects


[sound-*]

Parameter Variants Example value Description
name string name="Jump" Title of sound effect
file string file="player-jump.ogg" File name of sound file
hidden [0,1] hidden=0 Hide this sound in the available sounds list in the events




lvl_bgo.ini

Definition of background objects for levels

[background-main]

Parameter Variants Example value Description
total [>=1] total=190 Total number of background objects


[background-*]

Parameter Variants Example value Description
name string name="Some bush" Title of background object
group string group="Plants" Group where included this background object
category string category="Bushes" Category where included this background object
grid [>=1], default 32 grid=32 Size of grid snapping
view [background2, background, foreground, foreground2] view=background Default Z-Order layer of background object
image string image="background-45.png" Image filename
climbing [0,1], default 0 climbing=0 Allow playable character climb up on contact with background object
animated [0,1], default 0 animated = 0 Enable vertical sprite animation of background object
frames [>=1] frames = 5 Number of available frames for this background object
frame-speed [>=1] frame-speed=125 Interval in milliseconds between frames
smbx64-sort-priority [+/- integer] smbx64-sort-priority=44 The array sorting order for SMBX64 LVL files.




lvl_bkgrd.ini

Definition of background for levels

[background2-main]

Parameter Variants Example value Description
total [>=1] total=58 Total number of backgrounds


[background2-*]

Parameter Variants Example value Description
name string name="Big field" Title of background
type single-row, double-row, tiled type=double-row Background model type.
repeat-h [>=0] repeat-h=2 Horizontal parallax coefficient. I.e. how slowly will be moved background concerning edge of the camera. If coefficient equal to 0, the background will be static on screen
repeat-v RP, RZ, NR, ZR repeat-v=ZR Vertical parallax type and repeat:

RP - With repeat, vertical parallax equal to horizontal with parallax coefficient equal to 2
RZ - repeat without parallax
NR - Without repeat, parallax is proportional to section height
ZR - Static: without repeat and without parallax

attached [bottom, top], default=bottom attached=bottom Attachment of background image to side of section
tiled-in-editor [0,1] tiled-in-editor=1 Background will be forcedly rendered as Tiled in the editor application
magic [0,1] magic=1 Enable magic parallax of background (cut image into horizontal strips with differenced parallax coefficient)
magic-strips [>=1] magic-strips=3 Number of magic parallax strips
magic-splits Array of integer numbers magic-splits=49,541,850 List of magic strips separators (value in number of pixels from top to separator)
magic-speeds Array of float numbers magic-speeds=1.2,2.1,3 List of horizontal parallax coefficients for each magic strip
animated [0,1] animated=0 Enables sprite animation for background
frames [>=1] frames=4 Number of frames which using by this background
image string image="background2-24.gif" Image filename of background
second-image string second-image="background2-27.gif" Image filename of second row of background (using only by double-row background)
second-repeat-h=2 Horizontal parallax coefficient for second row (using only by double-row background)
second-repeat-v RP,RZ,NR,ZR second-repeat-v=ZR Vertical parallax type and repeat for second row of double-row background:

RP - With repeat, vertical parallax equal to horizontal with parallax coefficient equal to 2
RZ - repeat without parallax
NR - Without repeat, parallax is proportional to section height
ZR - Static: without repeat and without parallax

second-attached overfirst,bottom,top second-attached=overfirst Type of second row of double-row background

overfirst - second row will be drawn higher than normal background row
bottom - second row will be attached to top of section, will be drawn as second layer
top - second row will be attached to bottom of section, will be drawn as second layer



lvl_blocks.ini

Definition of blocks for levels


[blocks-main]

Parameter Variants Example value Description
total [>=1] total=638 Total number of blocks


[block-*]

Parameter Variants Example value Description
image string image="block-1.gif" Image filename of block
name string name="Wood block" Title of block
group string group="Super Mario Bros. 3" Group name where included this block
category string category="Wood" Category name where included this block
default-invisible [0,1] default-invisible=1 Set default invisible flag for this block
default-slippery [0,1] default-slippery=1 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
=0 - empty block

sizable [0,1] sizable=0 Set this block sizable
danger -3...4 danger=0 Hurt 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

collision 0..2 collision=1 Collision type of block:

1 - collision all sides
2 - collision only by top side
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:

0 Rectangle
1 tringle up-left
-1 tringle up-right
2 tringle down-left
-2 tringle down-right
3 capture shape from source image

lava [0,1] lava=0 Kill all all NPC's and playable characters which contacted with this block. Exception is 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 0, block-*, npc-*
where * - is a [>=1]
spawn-on-destroy="0" Object type-ID for spawn after destroy, if 0 - nothing
destroy-effect +numbers 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, he 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
frames [0,1] frames=14 Animation frames
framespeed [>=1] framespeed=128 Delay between frames in milliseconds
display-frame=3 [>=0] display-frame=3 If animation is disables, will be displayed this frame (first frame is 0 value)




lvl_characters.ini


lvl_effects.ini

Definition of graphical effects for levels

Note: This configuration reference has not been completely finished and is subject to be changed at any time

[effects-main]

Parameter Variants Example value Description
total [>=1] total=148 Total number of available effects


[effect-*]

Parameter Variants Example value Description
name string name="Brick fragments" Title of effect
algorithm [>=0] algorithm=1 Algorithm ID
appear-timeout [>=0] appear-timeout=0 Timeout in milliseconds for static effects
type [0,1] type=1 0 Static, appears and play animation once, 1 Dynamic, play animation forever and moving on screen
animate [0,1] animate=0 Is animated sprite
image string image="effect-134.gif" Image file name of effect




lvl_npc.ini

Definition of Non-playable characters for levels




wld_tiles.ini

Definition of tiles for world maps




wld_scenery.ini

Definition of sceneries for world maps




wld_paths.ini

Definition of paths for world maps




wld_levels.ini

Definition of level points for world maps