Adding Custom Stages - kadedevteam/Kade-Engine-Offical GitHub Wiki
Adding Custom Stages
To add custom stages you will need to have the ability to compile the game from the source code! Info for compiling the game can be found here!
(PLEASE READ THE CHARACTER AND WEEK GUIDES FIRST TO UNDERSTAND)
First open your week folder, and go to images then create a folder for your bg (optinial) and drag and drop your backround png in there. next go to Playstate.hx and go to line 388, you should find the code switch(stageCheck)
then scroll down until you find the normal stage case! (line 712). Now copy and paste the stage code! ex:
case 'stage':
{
defaultCamZoom = 0.9;
curStage = 'stage';
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback'));
bg.antialiasing = true;
bg.scrollFactor.set(0.9, 0.9);
bg.active = false;
add(bg);
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));
stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));
stageFront.updateHitbox();
stageFront.antialiasing = true;
stageFront.scrollFactor.set(0.9, 0.9);
stageFront.active = false;
add(stageFront);
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains'));
stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9));
stageCurtains.updateHitbox();
stageCurtains.antialiasing = true;
stageCurtains.scrollFactor.set(1.3, 1.3);
stageCurtains.active = false;
add(stageCurtains);
}
now on the first box change the path to loadGraphic(Paths.image('bg/stage_bg', 'week0'));
the path should be something similar to this! you can delete the 2nd and 3rd boxes if your bg is just 1 thing!
Adding Custom Stage Elements
The 2nd and 3rd Boxes of the stage case are stage elements like overlays and further backrounds or even bg_Characters!
Overlays
adding overlays are simple just change the 'stagefront' graphic or the 2nd box path into the png file you want to overlay! to add multiple just copy and paste the 2nd box!
Underlays
Adding underlays are the same as overlays just change the graphic for 'stagecurtains' or the 3rd box path into the png file you want to underlay! to add multiple just copy and paste the 3rd box!
Background Characters (LIKE SANTA FROM WEEK5)
Adding background characters are a bit tricky first go to your week folder and in the bg folder put in the sprite sheet and xml file of the character that will be in the backround (similar to week5 bg Character) now in Character.hx
copy the Santa code then change the path to where the sprite sheet is located and then change the xml file correctly! then add it the bgChar to bgAssets.txt
as the same you named it in the character code. Now head back to Playstate.hx and change the code to something like this:
(IN THE EMPTYLINE ADD characterBG=('')
AND IN THE ('') PUT THE NAME OF THE CHARACTER ASSET:characterBG=('hostage_1')
Background Characters (LIKE UPPER, LOWER BOP FROM WEEK5
Add the png file in the week folder! then go to Playstate.hx and go to Line 508 and copy the code for upper or lower bump and add a new case under with the name of the png file for the bop: case: crowd_bop
then go back to your stage code and copy and paste the stageCurtains and copy the code to look so,ething like this:
(MAKE SURE TO PUT THE PATH WHERE YOUR BG IS LOCATED)
Now on the line under stagebop.active = false;
put in this stagebop.player1 = Factor.set(2.7, 2.0)
this adjust the bop animation for when they bop! Now Compile the game and load up the bg in the chart editor in the assets tab!
IF I MISSED ANYTHING PLEASE FIX IT IN A PULL REQUEST