Skip to content

Commit

Permalink
Re-add the single line preventing scripts from loading?!??!!?
Browse files Browse the repository at this point in the history
Fix errors only showing after the first
Adjust readme.md

dumb
  • Loading branch information
superpowers04 committed Jul 3, 2024
1 parent f8d763f commit 01f1001
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 203 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# DO NOT USE RELEASES TO DOWNLOAD, I USE GITHUB ACTIONS FOR UPDATES, THE RELEASE IS FROM 2022 AND IS NO LONGER SUPPORTED
## To download:
Click on [Actions](https://github.com/superpowers04/Super-Engine/actions), select a commit and go to the artifacts to download, you need a github account to download artifacts

# Super Engine (Unstable) [![Build](https://github.com/superpowers04/FunkinBattleRoyale-Mod/actions/workflows/main.yml/badge.svg)](https://github.com/superpowers04/FunkinBattleRoyale-Mod/actions/workflows/main.yml)
An overhaul of [Funkin Battle Royale](https://github.com/XieneDev/FunkinBattleRoyale/) and [Kade Engine](https://github.com/KadeDev/Kade-Engine) to add a whole bunch of features.
A custom engine based on [Funkin Battle Royale](https://github.com/XieneDev/FunkinBattleRoyale/) and very loosely based on [Kade Engine](https://github.com/KadeDev/Kade-Engine) to add a whole bunch of features such as
- No base game bloat
- Easy to setup custom characters
- One single install for all of your mods
- Error handling that rarely ever needs you to restart the game
- A bunch of customization to make the engine tailored to how you want to play
- Dragging charts into the game's window/mod folder to play them without much setup
- Scripting capabilities that allow you to add mechanics, features, new input systems or out-right overhauls
- Easy importing of existing mods so you can play charts with a (hopefully) better input system and user experience
- No hardcoding(Except for BF, GF and the default stage to provide fallbacks)
- Scriptable songs, states, stages and characters using HScript that allows you extensive control over the game allowing for new mechanics, custom features, overhauls and more(Eventually I'll add lua support. it's technically implemented but extremely broken)
- Customizability for most of the features in the engine to make the engine how you want it
- Basic support for Psych Engine, VSlice, and base game mod folders(In some cases you can just symlink or drag and drop a folder for a mod into your `mods/packs` folder and all of the charts will just appear)
- Error handling that'll never have you restart the game because a chart was missing(why is this an issue in other engines :sob:)
- Drag and drop charts into the game's window to play them
- Multikey support

All without recompiling the game at all or editing source code. Infact, editing source code is discouraged unless you're going to directly contribute to the engine or make a fork of the engine.
All without recompiling the game at all or editing source code.
<br>Infact, editing source code is discouraged unless you're going to directly contribute to the engine or make a fork of the engine.

This is powered by a modded version of [Kade Engine](https://github.com/KadeDev/Kade-Engine) with a hint of [FPSPlus](https://github.com/ThatRozebudDude/FPS-Plus-Public/) added in and with some inspiration from [Psych Engine](https://github.com/ShadowMario/FNF-PsychEngine)/[FNF Multi](https://shadowmario.itch.io/funkinmulti) <br>
I do not own Friday Night Funkin, Kade Engine or Funkin Battle Royale, I'd highly recommend checking them out.

Click on a commit and go to the artifacts to download, you need a github account to download artifacts

<br>You can find downloads, custom content, get help and more at the [Super Engine Discord server](https://discord.gg/28GPGTRuuR)
<br><br>Note that due to the setup on my end, I push commits all at once, so pull requests and other things might be out of date and need to be merged manually
# Modding information
Expand All @@ -38,12 +42,9 @@ Links: **[itch.io page](https://ninja-muffin24.itch.io/funkin) ⋅ [Newgrounds](
**Kade Engine** is a mod for Friday Night Funkin', including a full engine rework, replays, and more.

Links: **[GameBanana mod page](https://gamebanana.com/gamefiles/16761)[play in browser](https://funkin.puyo.xyz)[latest stable release](https://github.com/KadeDev/Kade-Engine/releases/latest)

## Friday Night Funkin' Modding Plus
Friday Night Funkin' Modding Plus is a mod of Friday Night Funkin' that aims to make modding easier.
Links: **[GameBanana mod page](https://gamebanana.com/gamefiles/14264)[latest stable release](https://github.com/FunkinModdingPlus/ModdingPlus/releases/)


# Credits for everything
<small>I think I got everyone, lemmie know if I missed anyone</small>
## Friday Night Funkin'
Expand Down
65 changes: 47 additions & 18 deletions source/AnimationDebug.hx
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ class AnimationDebug extends MusicBeatState
if (SELoader.exists(chara.loadedFrom)) {backed=true;SELoader.copy(chara.loadedFrom,chara.loadedFrom + "-bak.json");}
SELoader.triggerSave(chara.loadedFrom,Json.stringify(charJson, "fancy"));
showTempmessage('Saved to ${if (chara.loadedFrom.length > 20) '...' + chara.loadedFrom.substring(-20) else chara.loadedFrom} successfully.' + (if(backed) "Old json was backed up to -bak.json." else ""));
FlxG.sound.play(Paths.sound("scrollMenu"), 0.4);
// FlxG.sound.play(Paths.sound("scrollMenu"), 0.4);
SELoader.playSound('assets/sounds/scrollMenu.ogg',0.4);
spawnChar(true);


Expand Down Expand Up @@ -840,7 +841,12 @@ class AnimationDebug extends MusicBeatState
if(uiMap['animFPS'] == null){
chara.addAnimation("ANIMATIONDEBUG_tempAnim",name,24);
}else{
chara.addAnimation("ANIMATIONDEBUG_tempAnim",name,Std.int(uiMap['animFPS'].value),uiMap['loop'].checked,uiMap['flipanim'].checked);
var indices = [];
if((uiMap['animFinish'].value == 0))
indices == null;
else
for(i in uiMap['animStart'].value...uiMap['animFinish'].value) indices.push(i);
chara.addAnimation("ANIMATIONDEBUG_tempAnim",name,indices,Std.int(uiMap['animFPS'].value),uiMap['loop'].checked,uiMap['flipanim'].checked);

}
chara.playAnim("ANIMATIONDEBUG_tempAnim");
Expand Down Expand Up @@ -923,13 +929,15 @@ class AnimationDebug extends MusicBeatState
{
// trace('Drop3: ${Std.parseInt(anim)}');
animUICurName = charAnims[Std.parseInt(anim)];
if(animUICurName == "**Unbind"){
if(animUICurName.toLowerCase() == "**unbind"){
if(charAnims[1] != null) animUICurName = charAnims[1];
chara.alpha = 0.5;
}else{
chara.alpha = 1;
}
if(animUICurName != "**Unbind") playTempAnim(animUICurName);
uiMap["animStart"].value = 0;
uiMap["animFinish"].value = 0;
// uiMap["animSel"].text = charAnims[Std.parseInt(anim)];
});
animDropDown3.selectedLabel = '';animDropDown3.cameras = [camHUD];
Expand Down Expand Up @@ -971,22 +979,29 @@ class AnimationDebug extends MusicBeatState
uiMap["animFPS"] = new FlxUINumericStepper(140, 110, 1, 24);
uiMap["looptxt"] = new FlxText(10, 130,0,"Loop start frame");
uiMap["loopStart"] = new FlxUINumericStepper(140, 130, 1, 0,0);
uiMap["AnimationLengthText"] = new FlxText(10, 130,0,"Animation Start > Finish");
uiMap["animStart"] = new FlxUINumericStepper(140, 130, 1, 0,0);
uiMap["animFinish"] = new FlxUINumericStepper(140, 130, 1, 0,0);
uiMap["animStart"].callback = uiMap["animFinish"].callback = function(_,_) {updateTempAnim();};

uiMap["animFPS"].callback = function(value,_){ updateTempAnim();};

uiMap["commitButton"] = new FlxUIButton(20,160,"Add animation",function(){
try{

var Anim = uiMap["animSel"].text;
editAnimation(Anim, (animUICurName == "**Unbind") ? null : {
var indices = [];
if(uiMap['animFinish'].value != 0) for(i in uiMap['animStart'].value...uiMap['animFinish'].value) indices.push(i);
trace(indices);
editAnimation(Anim, (animUICurName.toLowerCase() == "**unbind") ? null : {
anim: Anim,
name: animUICurName,
loop: uiMap["loop"].checked,
flipx:uiMap["flipanim"].checked,
noreplaywhencalled:!uiMap["restplay"].checked,
fps: Std.int(uiMap["animFPS"].value),
loopStart:Std.int(uiMap["loopStart"].value),
indices: [],
indices: indices,
priority:Std.int(uiMap["priorityText"].value)
});

Expand Down Expand Up @@ -1016,25 +1031,39 @@ class AnimationDebug extends MusicBeatState
// if(checkAnim.contains('left')) checkAnim.replace('left','right');
// else if(checkAnim.contains('right')) checkAnim.replace('right','left');
// }
for(n in ['left','down','up','right']){
if(checkAnim.contains(n)){
if(_animName == "") _animName = "sing";
if(flipped){
_animName += (n=="left" ? "right" :(n=="right" ? "left" : n));
}else{
_animName += '${n}';
}
break;
}
// for(n in ['left','down','up','right']){
// if(!checkAnim.contains(n)) continue;
// if(_animName == "") _animName = "sing";
// if(flipped){
// _animName += (n=="left" ? "right" :(n=="right" ? "left" : n));
// }else{
// _animName += '${n}';
// }
// break;

// }
// I promise, this is faster
if(checkAnim.contains('left')){
if(_animName == "") _animName = "sing";
_animName += flipped ? "right" : 'left';
}else if(checkAnim.contains('right')){
if(_animName == "") _animName = "sing";
_animName += flipped ? 'left' : "right";
}else if(checkAnim.contains('up')){
if(_animName == "") _animName = "sing";
_animName += 'up';
}else if(checkAnim.contains('down')){
if(_animName == "") _animName = "sing";
_animName += 'down';
}
trace('$_animName $checkAnim $animation');

if(checkAnim.contains('miss'))_animName += 'miss';
if(checkAnim.contains('alt'))_animName += '-alt';



if(_animName == "") continue;
trace('$_animName $checkAnim $animation');
if(Character.animCaseInsensitive[_animName] != null) _animName = Character.animCaseInsensitive[_animName];

editAnimation(_animName,{
Expand Down Expand Up @@ -1067,9 +1096,9 @@ class AnimationDebug extends MusicBeatState
[uiMap["priorityText"],uiMap["prioritytxt"]],
[uiMap["animFPS"],uiMap["animtxt"]],
[uiMap["loopStart"],uiMap["looptxt"]],
[uiMap["animStart"],uiMap["animFinish"],uiMap["AnimationLengthText"]],
null,
[autoDetAnims],
[uiMap["commitButton"]],
[uiMap["commitButton"],null,null,null,null,null,autoDetAnims],

]});

Expand Down
6 changes: 3 additions & 3 deletions source/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ class CharAnimController extends FlxAnimationController{
}

override function update(elapsed:Float) {
try{
// try{

if(amPreview || debugMode || animation.curAnim == null) return super.update(elapsed);

Expand Down Expand Up @@ -1028,7 +1028,7 @@ class CharAnimController extends FlxAnimationController{
callInterp("update",[elapsed]);

super.update(elapsed);
}catch(e:Dynamic){handleError('Caught character "update" crash: ${e}');}
// }catch(e:Dynamic){handleError('Caught character "update" crash: ${e}');}
}


Expand Down Expand Up @@ -1226,7 +1226,7 @@ class CharAnimController extends FlxAnimationController{
animationList.push({
anim : anim,
name : prefix,
indices : (if (indices != null && indices.length > 0)indices else []),
indices : ((indices != null && indices.length > 0) ? indices : []),
fps : fps,
loop : loop
});
Expand Down
5 changes: 3 additions & 2 deletions source/ErrorSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ class ErrorSubState extends MusicBeatSubstate {
PlayState.instance.generatedMusic = PlayState.instance.handleTimes = PlayState.instance.acceptInput = false;
PlayState.instance.camHUD.alpha = PlayState.instance.camTOP.alpha = 1;
}
FlxG.state.persistentUpdate = false;
super();



FlxG.state.persistentUpdate = false;
cam = new FlxCamera();
FlxG.cameras.add(cam);
// FlxG.cameras.setDefaultDrawTarget(cam,true);
cameras = [FlxG.cameras.list[FlxG.cameras.list.length - 1]];
cameras = [cam];
var bg:FlxSprite = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
bg.alpha = 0;
bg.scrollFactor.set();
Expand Down Expand Up @@ -111,6 +111,7 @@ class ErrorSubState extends MusicBeatSubstate {
add(errText);
add(contText);
add(reportText);
SELoader.playSound('assets/sounds/cancelMenu.ogg',true);
FlxG.camera.zoom = 1;


Expand Down
Loading

0 comments on commit 01f1001

Please sign in to comment.