Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

ModCore: Expanded Mod Support (Custom Characters and Songs with 0 Code!) #2277

Merged

Conversation

EliteMasterEric
Copy link

This pull request changes the following:

  • Characters (including animations and offsets) can now be loaded from a single JSON file rather than being hard-coded.
    • Currently only GF has been converted, but with this, mods may now freely add their own characters.
    • Note that this also allows mods to replace or merge with these JSONs to fix character skins.
    • At some point we're going to want to move all the characters from the massive ugly case structure in the Characters constructor into the JSON files.
  • Fixes to ensure custom songs in mods can be added to Free Play (by appending to the freeplaySonglist.txt file) without crashing.
  • Song offsets are now stored inside a _meta.json in the song folder rather than in the NAME of a .offset file. This was necessary to allow mods to override it.
  • De-hardcoded the logic which handles a song's name. Relevant code now refers to either the song ID (the name in the file system, such as milf) or the song name (the readable name to display to the user, such as M.I.L.F). The readable name is included in the _meta.json.

As stated in the title, we can now create mods which add new characters and songs. No code needed.

Watch the demo, with included commentary discussing PolyMod.

Attached is the mod I developed to test this functionality. It adds Improbable Outset to the freeplay menu for you to play. Download and build this branch, then unzip and place it in the mods folder like in the demo.
trickyMod.zip

@ghost
Copy link

ghost commented Sep 16, 2021

Ooh this is actually really cool!

Copy link

@somefnfplayerlol somefnfplayerlol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happened with the html5 ci build?

source/Character.hx Outdated Show resolved Hide resolved
@isakube
Copy link

isakube commented Sep 16, 2021

Friday Night Funkin': Actually Moddable (holy shit) (it happened) (and it works too) (woah)

@EliteMasterEric
Copy link
Author

EliteMasterEric commented Sep 16, 2021

what happened with the html5 ci build?

It broke because my fork of Polymod didn't disable itself on HTML5 builds properly, I fixed it but I need to get this PR's code build actions to trigger again, probably by making another commit...

Shouldn't these be

var flipX = anim.flipX == null ? false : anim.flipX;
var flipY = anim.flipY == null ? false : anim.flipY;

...and I found something to fix! Perfect.

@isakube
Copy link

isakube commented Sep 17, 2021

enigma balls
Screen Shot 2021-09-17 at 3 55 45 PM
Screen Shot 2021-09-17 at 3 56 12 PM

@EliteMasterEric
Copy link
Author

enigma balls
Screen Shot 2021-09-17 at 3 55 45 PM
Screen Shot 2021-09-17 at 3 56 12 PM

I see you read the readme.

modcore-1.7 is an old branch on my fork I haven't touched in a while. I was messing with adding 9-key there but it's broken now because of the other changes I made. You can check out... uhhh... rapid typing sounds master branch to test out modding.

@ghost
Copy link

ghost commented Sep 18, 2021

Like you explained your username

@isakube
Copy link

isakube commented Sep 18, 2021

I see you read the readme.

yeah mhm i totally read the readme on the repo and didn't just download the default branch like a dumbass
edit: ok wait the fuck?? download code jut gives me modcore-1.7 and if i try to clone a specific branch it fails whyyyyyyyy

@EliteMasterEric
Copy link
Author

I see you read the readme.

yeah mhm i totally read the readme on the repo and didn't just download the default branch like a dumbass
edit: ok wait the fuck?? download code jut gives me modcore-1.7 and if i try to clone a specific branch it fails whyyyyyyyy

You have to either:

  • Switch to the branch you want in the Github interface and download the ZIP there.
  • Clone the repo using Git and check out the branch you want. For this you can either learn to use git from the command line, or use one of a wide variety of Git GUIs for it (I like GitKraken). The latter is far more convenient for your day-to-day, but learning the command line is important; having a good understanding of how version control works is an essential skill for beginner programmers looking to become more competent.

@isakube
Copy link

isakube commented Sep 19, 2021

  • Switch to the branch you want in the Github interface and download the ZIP there.

yeah i DID and it still gives me modcore-1.7

@EliteMasterEric
Copy link
Author

  • Switch to the branch you want in the Github interface and download the ZIP there.

yeah i DID and it still gives me modcore-1.7

Run the following commands then:

git clone https://github.com/MasterEric/Enigma-Engine
cd ./Enigma-Engine
git checkout master

@isakube
Copy link

isakube commented Sep 19, 2021

  • Switch to the branch you want in the Github interface and download the ZIP there.

yeah i DID and it still gives me modcore-1.7

Run the following commands then:

git clone https://github.com/MasterEric/Enigma-Engine
cd ./Enigma-Engine
git checkout master

coolio

@somefnfplayerlol
Copy link

somefnfplayerlol commented Nov 8, 2021

I'm considering the next version of KE 2.0

@EliteMasterEric EliteMasterEric deleted the feature/expanded-mod-support branch November 25, 2021 09:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants