Faery Tales - Modding guide
This is a modding guide for my game Faery Tales - https://ldjam.com/events/ludum-dare/44/faery-tales

so @kichex asked about a doc explaining how to mod the game. Just for a little background, the code enabling the moddability is part of a larger project im working on. So the game is only partially moddable at this point.
What you can change:
Player Settings & Player SFX
Tileset GFX & Tile Definitions (does it kill on contact, is it collidable, etc.)
Game Levels
Level Music
Level Backgrounds
What you need:
Notepad++ or another text editor - https://notepad-plus-plus.org/
Tiled Map Editor - https://www.mapeditor.org/
Whatever you want to use for graphics
All the files are contained in the Faery Tales_Data\StreamingAssets.
Levels: Path: Faery Tales_Data\StreamingAssets
faery1.json - level 1
faery2.json - level 2
faery3.json - level 3
menu.json - menu level
the game automatically loads menu.json at the menu screen.
Tilesets: Path:Faery Tales_Data\StreamingAssets\Tileset
A tileset consists of two files. the PNG that contains the graphics, and the json that details what tiles do what. The tileset cannot have any more tiles than ff.png currently has.
Tilesets for a level are specified in the Map Properties in each level.
if the file is called ff, the tile data file is called fftiles.json
Here is sample content of the tile data:
"biome" : "spikes",
"killOnContact" : "true",
"collision":"grid",
"tileIds" : "20"
"biome" : "slopeUp",
"collision" : "sprite",
"atkBonus" : "0",
"defBonus" : "60",
"moveCost" : "2",
"tileIds" : "4",
"vertices": "0|0,16|0,16|16"
so here are two examples. One is a slope, the other is the spike tile. The tile ids go from top left to right, then down a row going left to right again.
Properties that can be set:
collision : sprite, grid, none - sprite allows you set a collision mesh for the tile, if it isnt square. The game uses the vertices property when sprite is selected. grid is collision on a square, and none allows the character to pass through.
killOnContact: kills the player when they collide with the tile
passThrough : above / below - implementation of one way platforms - jumping is a little shaky on these, so this wasnt used.
Ladder : true / false - marks tile as a ladder tile. use w and s to move up and down the ladder. You can also jump off.
tileIds : the list of tiles that apply to this tile type.
vertices: 1|1, - first digit is X value, second digit is Y value. These are the points of the collision mesh if you use sprite for collision.
NOTE: if the map wont load, 9 times out of 10, its because you have used a tile id twice in your tile definitions.
BG-
Path: Faery Tales_Data\StreamingAssets\BG
Backgrounds are specified in the Map Properties in the level map.
Music-
Path: Faery Tales_Data\StreamingAssets\Music
Music is specified in the Map Properties in the level map.
SFX-
Path: Faery Tales_Data\StreamingAssets\SFX
Sound effects are specified in playerConfig.json
Player-
Path: Faery Tales_Data\StreamingAssets\playerConfig.json
MoveSpeed - max speed of player
Sounds- name of file in SFX folder to play for each event.
"gravityAdjust": - an adjustment to the normal platforming controls to make jumping more floaty. Currently set to .45 out of 1.0
"accelTimeAirborne": "0.5", - time to reach full horizontal speed while in air
"accelTimeGround": "0.3", - time to reach full horizontal speed while on ground
"maxJumpHeight": "14", - max height of a jump - this is affected by gravity adjust
"timeToJumpApex": "0.7", - time to jumpApex - speed of jump - affected by gravity adjust.
Levels- Faery Tales_Data\StreamingAssets\
Please use tiled, but you can also use notepad ++ to edit the levels.
The objects have different properties that let you alter their behavior.
prefab: name of unity prefab to spawn.
Here is a full list(some of these are from another project, but they should "work")
FaeryTales Prefabs:
Diver - diving drill
Bot/Downward Bot - flying machine
Dwarf - ...
switchTile - tile that can be toggled on and off by a switch
Turret - shooting turret
nextLevel - level end marker
spawnPoint - player Start
spawnCam - spawns camera only
movingPlatform - platform that moves back and forth.
killzone - large prefab that kills player on contact. put these at the bottom of your level
Medpack - health
teleport - teleports player to another teleport
teleportInvis - used as a target for the teleport, no graphic.
Switch - triggers switchTiles when shot or collided with.
NonFaeryTales Prefabs:
BouncyCannon 1 1- a box that bounces around and shoots.
Crate- rigidbody crate that is destructible
destrucPlatform- destructable crate that stays in place.
FlakPickup - Flak Cannon weapon
RocketPickup - Rocket launcher weapon - does not shoot to the left correctly.
jumppad - launches player in whatever direction its pointing.
Tank - an unfinished tank object that doesnt really work.
switchableSpawner - a spawner that can be toggled by a Switch.
WandererTest - a box with a skull that follows a path.
Theres a lot of properties specific to each object, but since this post is getting crazy long, im going to cut it off here for now. Have fun! Let me know if you guys have any more questions.
Take a look at the existing json levels! You can see all the properties set for each object.
https://ldjam.com/events/ludum-dare/44/faery-tales