CSModLauncher (BETA)

Aug 7, 2018 at 1:10 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
(I've been procrastinating making this post forever so it's good I'm finally getting this out here)

This is a little project of mine that is made with goal to manage mods more easy, getting rid of the need to navigate through folders, but also comes with an way to easily update your mods!
Yes, this launcher comes with a feature to update mods, which can save you a lot of time!

The launcher uses .cmf (Cave story Mod File) files, practically renamed .JSON files (renamed to make detection easy). These files contain info about your mod, including names, descriptions and download info! more info about these later.

Currently, the launcher is able to list mods, open mods to play them, open a custom doconfig (unfinished, but includes better font selector!) and update mods, but it's extremely likely more may be added in the future.

I felt like there was a lot to say, so beware of walls of text.
Setting up the launcher is easy, just put the launcher in a folder that contains folders of Cave Story mods. That's it!
When you start up the launcher, it'll search folders with cmf files starting from the folder the launcher is placed in, and lists all mods with one.

If you want your (or someone else's) mod to show up in the list, you'd have to make a cmf file for the mod (Of course unless it already has one).
The launcher comes with a example cmf (incorrectly) named empty.cmf, containing explanations of each element. Copy this file to your mod's folder and edit it with your favourite text/JSON editor.

While I hope the explanations in it is self-explanatory, I want to give extra note to the download/version links.
It is preferred to put a permanent direct download link to a .zip file containing your mod, that contains a folder named after your mod. When someone updates/downloads their mod, it will be downloaded from the given download link.
The version link has to be linked to a cmf file that contains the current version and latest update info.

When you want to release an update for your mod, replace the file the cmf's download link refers to and replace the cmf at the version link. People should now be able to use the launcher to update your mod!

Also of note is that you are not required to give a download/version link! A download link is still the minimum to download though, or else the update function will not be available for your mod.

Q: What is a cmf file?
A: A cmf (Cave story Mod File) file is a file that contains info about a cave story mod, including name, description, download info and more. This is what the launcher will be looking for to detect your mod.

Q: Are you expecting including cmf files to be a new norm?
A: No I do not. Wether this tool will be a success or not, I do not expect everyone to add support for the launcher to their mod, or that a majority of modders will even use this tool in the first place, it's all up to them.

Q: My mod doesn't show up!
A: Your mod will only show up if the mod's folder contains a cmf file that is not called "empty.cmf", and will show up in the list based on it's folder's name. If it still doesn't show up, try putting the launcher directly outside the mod's folder.

Q: The list shows a 'mod' named after the launcher's folder, and selecting it crashes the launcher!
A: This is a bug I still need to fix where the launcher also detects cmf files (that are not named "empty.cmf") in the folder the launcher is located in. This will be fixed in the future.

Q: Pressing the play button opens the folder to my mod! Can't you just directly open the .exe?
A: If the mod's folder opens instead of the mod being launched, it either means the mod is missing it's .exe, or the cmf file is referring to a .exe that doesn't exist. Look for an <file> tag with doukutsu as it's element.

Q: The update button is greyed out! How do I activate them?
A: If the update button is greyed out for a mod, it means it's cmf does not give a download link, or has one that does not link to a zip file (For safety reasons, this is a requirement).

Q: Is updating safe? What if my update failed, do I lose my files?
A: Any replaced files will first be backed up in a backup folder, which will be removed when the update is an success. So at failure, look for a folder called "old_backup".
As for safety, it's as safe as downloading a file online. When updating, you will be shown the download link of the mod. While updating the downloaded zip file will be unpacked and the files will be copied to the mod's folder, nothing (but the zip file) will be opened without your consent.
I will not hold myself responsible for any bad files downloaded through this. If you see a shady download link, please be careful.

Q: Can you add support for Doukutsu Club?
A: I have mentioned making the launcher use Doukutsu Club to the owner before, and interest exists. Plans are yet to be made however, but should this launcher hit well, I will consider adding support.

Download links;
Dropbox | Google Drive

Source;
GitHub

If you want to see an example of a cmf files, you can find one here for Metronari, one of my old mods.

When upating a mod, the new version of the mod will be downloaded from a link given by the creator of the cmf file (likely the creator of the mod).
Obviously, I have no control over what someone will supply as their download link other than that it has to link to a .zip file.
For this reason, I will not hold myself responsible for any bad files downloaded through this. If updating gave you an evil file wrecking your system, please complain at where you got the cmf from.
Updating a mod will download the zip, unpack it and copy the files to the mod folder, without launching everything. So this should be as save as downloading and unzipping any file from the internet, but please use caution if the updater shows you a shady link.

Again, this is still a work in progress, but the basic functionality should be there. Please tell me any what any of you think of this, and if you have any suggestions and/or complaints/problems, please let me know.
 
Last edited:
Aug 7, 2018 at 2:10 PM
me when bro says be holly and jolly for $20
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location:
Posts: 2852
Age: 30
Pronouns: She/Her
This has always been an excellent idea that you've made. It worked well with the MaGCSL Updater, so I have certainty this will kick off well! ^_^
 
Aug 7, 2018 at 3:36 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
here's a suggestion: can we not use xml because it's actually not very good
 
Aug 7, 2018 at 3:45 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
here's a suggestion: can we not use xml because it's actually not very good
If you can think of something better and also explain why? This is honestly the only thing I could come up with that isn't just unformatted text files.
 
Aug 7, 2018 at 3:59 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
JSON has largely superceded XML as a human-readable and machine-parsable data interchange format. It's less bulky than XML, easier to understand, and easier to write. JSON works on the basis of key-value pairs and supports familiar constructs such as arrays and nested objects. Example:
Code:
{
	"modname": "Cave Story 2",
	"author": "Noxid",
	"spritesheets": [
		"Npc/NpcRegu.bmp",
		"Npc/NpcSand.bmp",
	],
	"settings": {
		"imageformat": "bmp",
		"version": 2.0
	}
}
 
Aug 7, 2018 at 4:06 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
That's defenitely interesting, and I'll consider using that instead.
Even though it's a bit early here and changes like these shouldn't be too harsh I might just consider keeping backup support for the xml format though. Who knows.
 
Aug 7, 2018 at 6:27 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
This is pretty interesting, and it'd be neat to see it become a standard for modding and mod distribution. I'm not sure how thorough Doukutsu Club is, but maybe it'd be possible to use cmf files and DT's mod repository for some comprehensive mod access?
 
Aug 8, 2018 at 9:36 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
Allright, early but important update i guess, most notably the switch to JSON format. The empty cmf file will be updated and the op will be updated as well. The launcher now also includes a refrence file explaining each variable in a cmf file.

• CMF files are now in JSON format! if you already made a cmf for your mod in xml I'm very sorry, but there is no more support for it anymore.
• The play button will now grey out when the mod's exe is missing.
• A scrollbar has been added to the description box when the description is way too long. (you were still able to scroll, but wouldn't have any indication that there's more)
• Updates no longer require the zipped file to have a folder that is named the same as what you enter as name in a cmf file. You still have to put everything in a folder though.
• Fixed an issue where the launcher would crash if the .cmf file has an incorrect syntax or just can't be properly read.
• You cannot write in the description box anymore.
• Some other minor UI tweaks.
• Added a secret waffle button. It's a secret!

You can download the new update with the same download link in the OP, but here it is again to save you time.
Edit: if you're missing the mentioned refrence file, redownload. I forgot to include it but that should be fixed now.
 
Last edited:
Aug 8, 2018 at 9:38 PM
me when bro says be holly and jolly for $20
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location:
Posts: 2852
Age: 30
Pronouns: She/Her
Jul 27, 2024 at 12:34 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
Im terrible at managing branches (it took me a day to set up a local repo on my Pi for a discord bot) but here it finally is, the old, terrible code I made in 2018 now open source.
The code is a mess between me making this when i had no idea about proper programming back then and the fact that I added several sloppy TODOs here because of the former, but I thought I may as well upload it because people seemed intrigued.

I've added two small things for funsies though; One is a simple addition of pointing towards DoConfigs so that those could be used instead of the build-in custom doconfig.
The other is the ability to include the ID Doukutsu Club assigns to mods in the mod page url. This turns the upload button into just opening the page on Doukutsu Club to let you download the update rather than using the horrible, arguably unsafe (in my opinion) update feature.



Does this mean I'm going to work on this again?
I don't know.
At the moment my mind is occupied by other projects and while there's some good ideas in this I feel like it's best if this first gets completely overhauled to meet my modern standards between technical stuff (I currently worry for Linux compatibility) and general user experience.
The topic of Doukutsu Club integration has been brought up a couple times; I will likely not do this anytime soon as this would likely require either a specialized browser or changes in Doukutsu Club (ie site overhauls or APIs).
 
Last edited:
Jul 27, 2024 at 5:30 PM
Still at it
"All your forum are belong to us!"
Join Date: Sep 22, 2012
Location: Hell
Posts: 612
Pronouns: She/It
If you could turn some of the core functionalities of the program into a DLL you could integrate it with unity or godot. Godot has some useful UI building tools and does have a few network-related commands that way online stuff could be done through it.
So I don't think you'd need a specialized browser per-se. Just a good frontend

Edit : Also I agree on Noxid's take that JSON needs to be used. Even as someone who personally hates trying to edit both file formats just because I like pretty text editors and I haven't configured Notepad++ enough yet and don't feel like configuring it because that program is a mess.
 
Last edited:
Jul 27, 2024 at 5:44 PM
me when bro says be holly and jolly for $20
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location:
Posts: 2852
Age: 30
Pronouns: She/Her
Yo Mint was the issue fixed where the JSON in the mod's directory would get accidentally replaced with an XML file with the old format after the download?
d412vi.png
 
Jul 27, 2024 at 5:58 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
So I don't think you'd need a specialized browser per-se. Just a good frontend
It's moreso that I currently don't have any good ideas as far as getting anything out of Doukutsu Club goes mostly because of how Knack is.

Edit : Also I agree on Noxid's take that JSON needs to be used.
This is already a thing, for some reason in the past though I made the 'smart' decision to just name it something else.
I could rename it back to JSON (and use the old one for legacy purposes even if nobody used it) and was already something I considered for is i felt like redoing some of the code.

Yo Mint was the issue fixed where the JSON in the mod's directory would get accidentally replaced with an XML file with the old format after the download?
I think this would just be an issue with the metronari download because this program currently isn't able to save the JSON files.
 
Jul 27, 2024 at 6:07 PM
Still at it
"All your forum are belong to us!"
Join Date: Sep 22, 2012
Location: Hell
Posts: 612
Pronouns: She/It
Literally how do you write a program that renames a generated json file to an xml file though can't you just search your codebase for xml related stuff and find the culprit that way
 
Jul 27, 2024 at 6:29 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
Literally how do you write a program that renames a generated json file to an xml file though can't you just search your codebase for xml related stuff and find the culprit that way
You misunderstand.

My point is that this program doesn't save these files outside of copying them when using the downloader/updater, so if that happens then it's because the mod it downloaded still somehow uses the old format, which isn't an issue with specifically the program (unless you count the lack of checks against this as one)
 
Jul 27, 2024 at 6:45 PM
Still at it
"All your forum are belong to us!"
Join Date: Sep 22, 2012
Location: Hell
Posts: 612
Pronouns: She/It
Check the mod folder for an XML and create a special case for loading it as a "legacy file" or just throw up an alert to the user to tell them "Tell the mod maker to update this"
 
Oct 6, 2024 at 9:33 PM
Deliverer of Sweets
Bobomb says: "I need a hug!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 804
Age: 26
Pronouns: 菓子
Does this mean I'm going to work on this again?
I don't know.
Well now I know. I decided to spend half my weekend on this (I have a free week coming up don't worry)
The ideas I've been audibly considering are finally here, just to sum up the important changes;
  • A lot of code has been overhauled in the back, including the way mods are being loaded, meaning the old mod info formats (*.cmf) are no longer used.
  • Mods can now be automatically installed through dragging downloaded mods into the program window.
  • Either by the above drag & drop or manually selecting mod folders, the program is now able to generate mod info files. No more manually writing JSON files!
  • On top of that, they can also be edited! It's now a lot easier to add mods to your list, or generate mod info files for your mod if you so desire.

Now that I've banished a lot of old code to the ends of the void, future updates aren't an impossibility, but it'll remain a "I'll get to it when I get to it".
For the one or two people out there that would want this sort of thing: enjoy.

Downloads can be found currently on the releases page on the repo, I'll update other sources later.
 
Back
Top