Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Lua, mods and other things help

Wither362 edited this page Oct 15, 2022 · 6 revisions

Mods and LUA help


Q: "What (how many) are the lua variables?"

A: look a little bit down here.

Q: "How can i create a Custom Credits?"

A: create a credits.txt and put it in the mods/data/ or mods/My-Mod/data folder, each line should look like this:

name::iconname::description::link::color

for a title, just have the name

EX (please don’t report me, is only an example):

Vs lololol
Shadow Mario::shadowmario::Main Programmer of Vs lololol::https://twitter.com/Shadow_Mario_::0xFFFFDD33
BBPanzu::bb-panzu::Assistant Programmer of Vs lololol::https://twitter.com/bbsub3::0xFFFFDD33

But if you don’t want to use links because the link is GitHub, use this:

Vs lololol
Shadow Mario::shadowmario::Main Programmer of Vs lololol::github::0xFFFFDD33
BBPanzu::bb-panzu::Assistant Programmer of Vs lololol::::0xFFFFDD33

Example of a totally simplified code:

Vs lololol
Shadow Mario::::Main Programmer of Vs lololol::::
BBPanzu::::Assistant Programmer of Vs lololol::::

As you see, with that code, you have these advantages:

  • you don’t need to have an icon if you don’t have any.
  • you don’t need a link if you’re using GitHub link.
  • and also you don’t need color if you wanna use the default one.

Things to take in mind with that code:

  • the default icon is this:

unknown icon

  • the credits link code is this:
var link:String = creditsStuff[curSelected][3].toLowerCase().replace(' ', '');
if(link == 'nolink' || link == 'no' || link == 'n') {
	FlxG.sound.play(Paths.sound('cancelMenu'));
} else if(link == 'github' || link == '') {
	CoolUtil.browserLoad('https://github.com/' + creditsStuff[curSelected][0].replace(' ', ''));
} else if(link.contains('//') || link.contains('www')) {
	CoolUtil.browserLoad(creditsStuff[curSelected][3]);
} else {
	FlxG.sound.play(Paths.sound('cancelMenu'));
}
  • the default color is this:
'FFFFFF'

Q: Can I add multiple songs scripts?

A: Yes, you can, the code that this use is this: go here So you can have different script files with different names!


Engine help

Q: What is the difference between events.json and normal chart events?

A: the events.json it will load in every difficulty when that song is selected. And the normal chart events are only loaded in the specific difficulty:

EX: You’re creating a chart, and you want that all the difficulties of that song have the same events, so you need to click the save events button, it will create a JSON file with the events inside it.

EX: You’re creating a chart, and you want that the different difficulties have different events each one, so you have to click the save JSON button, it will create a JSON file with the notes and the events inside it, rename it to the song with the difficulty you want.


Files

You want a new file but you don’t know how to do it? Well, if you want a json file, you just need to create a new txt file, and then rename it to name.json, try doing that with all the files!


Other

Looks like nothing is here, why don’t you create an issue/discussion(specifically a Q&A one) asking your question?