Level Design Tutorial 3: Advanced customization with the override file
You can optionally create a special file called an "override file" to customize your level further. Truth be told, the override file is so important that I think all custom levels should have one.
Step 1: create the file
An override file is simply a .txt file with the same name as your level (.txt instead of .FMP), existing in the same folder as your level. So, if your level is customlevels/MyLevel.FMP, create a file at customlevels/MyLevel.txt . Then, you can set a variety of variables in the format "variable=value", with each variable on a new line. Check out the .txt file of an existing level, like Long Jump.txt, for an example.
Variable reference
Here's a list of all the variables you can set, along with a description of each:
Graphics
background - filename of the background (ex: backgrounds/sky.bmp). You can use an existing background or package one in with your level download.
foreground - filename of the foreground (ex: foregrounds/rain.bmp). You can use an existing foreground or package one in with your level download.
background_vel_x, background_vel_y - the speed at which the background scrolls. In the official levels, this is set to 0 for all except the final boss level. Decimal values.
foreground_vel_x, foreground_vel_y - the speed at which the foreground scrolls. Use this with rain and snow in particular, and for any other similar effects you may create on your own. Decimal values.
zone_image - filename of the "zone" image (this is the image used in the top-right corner of the screen when the level starts, usually saying the name of the level and the author). Should be 420x100 pixels for best results.
allow_h_scrolling - whether the level should scroll horizontally (almost always true). Must be either TRUE or FALSE (not case-sensitive).
allow_h_scrolling - whether the level should scroll vertically. Set this to false on levels that are not very tall at all to prevent, like in SMB Tribute. Must be either TRUE or FALSE (not case-sensitive).
Music
music The filename of the music file. You can use existing music or package one in with your level download in ogg, mp3, or wav formats (example: music=music/red_river_cave.ogg).
Game mechanics
time_limit - the time limit of the level (ex: time_limit=300). Integer value.
fiction - the friction of the ground (ex: friction=0.01). Lower numbers make the level seem more slippery. Decimal value.
max_speed_modifier - a multiplier affecting the maximum speed the player can reach. 1 is normal, 2 is twice as fast, etc. (ex: max_speed_modifier=1.5). Decimal value.
acceleration_modifier - a multiplier affecting the player's acceleration rate. 1 is normal, 2 is twice the acceleration, etc. (ex: acceleration=2.5). Decimal value.
next_level - filename of the next level (example: customlevels/Long Jump 2.FMP). If not specified, this is considered the last level in the series (or the only level in the series)
demo_filename - if you record a demo, you can use this to specify its filename. This is very advanced and will be covered in a later tutorial.
Misc.
name - name of the level. Not really used, but feel free to include it as it may be used in a future update of the game.
author - name of the creator of the level. Not really used, but feel free to include it as it may be used in a future update of the game.
Next tutorial:
Tutorial 4: coming soon...









