Apr 6, 2020 at 5:09 PM
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 27
Pronouns: he/him
BLink's ULTIMATE guide to modifying the Cave Story Engine 2 source code of Cave Story.
===================
---===GENERAL===---
===================
Setup:
CSE2EX is going to be the main branch of what we're editing. (if you don't know what a branch is, that's perfectly fine! I'll go over everything in a minute)
Because we're compiling the game from the source code, we need to setup a development environment that can compile code using Cmake.
Now that you have your environment; (assuming you're using MSYS2 or a Linux terminal) just run git clone https://github.com/EwanGreen4/CSE2EX then cd CSE2EX
finally you want to run git checkout enhanced so you're compiling CSE2EX instead of just CSE2
building is done with
Once built, the executable can be found in the game_english/game_japanese folder, depending on the selected language.
Alright; now that we have the ability to build the code, it's time to get down and learn how to mod!
Tools:
Booster's Lab [link]
Currently this is the only CS editor that supports modding of CSE2; to modify it just load up mrmap.bin in the data folder and then it's identical to vanilla CS (you can't apply hex patch mods because of fairly obvious reasons though :v )
Currently 5.1.0.0+ of Booster's lab is the only editor that supports CSE2e, so be sure you're using a relatively recent version of BL.
SeaTone [link]
This let's you edit Sound effects for the game, Including ORG drums. This program naively runs on windows exclusively, but WINE does emulate it properly if you want to edit the sound effects windows free.
WaveGen100 [link]
Allows you to edit the sounds of every ORG instrument (not including drums).
Currently there's only a windows build; but the source code is freely available.
Cave Story Modding Community Discord. [link]
This is the Discord for the Modding community. There are a lot of misc resources you can find here as well as many helpful people that know much about the game to help you get started on your modding journey.
Cave Story Engine 2 Discord [link]
This server is a hellish landscape ever since the official DCMA of CSE2, it has devolved into a dead and shitposting server, beware, all who enter.
Also please, please, please watch this video on level design in CS. It fairly long but very important if you don't want to get slammed in your mod thread for making death trap spikes everywhere.
===============================
----====OTHER RESOURCES====----
===============================
In BL there is an option under `help > oh god what do i do` this will help you get a bit of a grip on things possibly.
Rundown on Quote's default physics:
TSC 101
The Cave Story Modding Wiki (tons of info, but very scatted and a mixed bag)
===================
----====FAQ====----
===================
Q: I can't get the program to build....
A: stop by the CSE2 discord and ask us if you need a hand.
Q: How do I use this scripting thing??
A: Check this out to get started!
Q: What is <ANP and how do I use it?
A: There's full documentation on how to use all of the vanilla TSC commands packaged in with BL under help > oh god what do i do.
There isn't currently any formal write-up for the commands that are exclusively in CSE2e at the moment, but asking in the discord(s) should prove fruitful in the meantime.
Q: Alright, I've finished my mod! Where do I upload it to?
A: pixeltellsthetruth.solutions (yes, that's the URL of the site!)
This isn't a question but idk where else to put it.
IF YOU USE CONTENT FROM OTHER MODS CREDIT THE ORIGINAL SOURCE!!
This includes code, orgs, graphics and maps. We all stand on the shoulders of giants.
Please show respect to those who made your work possible
Also DO NOT include content from any release of cave story that has been exclusively in any version of CS+ distributed by NiCALiS. (ie wind fortress)
With that, good luck and happy modding!
CSE2 is a decompilation of the original freeware Cave Story; If you want to learn more of how this was done; check out the gitdab's readme
Now, onto the WHY?
CSE2e is a modified version of the source code from Freeware Cave Story. It should be fairly obvious how directly editing the source code is much more applicable to making better mods than having to tinker with assembly.
However this isn't just regular cave story, there are a lot more features that have been added since the source code has been updated to modern standards:
.png/alpha support
Based in SDL2 for portability to other platforms (Mac, Linux, Wii, Switch)
external .org and .pxt files
more screen sizes
V-sync
pixel unlock
editing the original code
and more!
Now, onto the WHY?
CSE2e is a modified version of the source code from Freeware Cave Story. It should be fairly obvious how directly editing the source code is much more applicable to making better mods than having to tinker with assembly.
However this isn't just regular cave story, there are a lot more features that have been added since the source code has been updated to modern standards:
.png/alpha support
Based in SDL2 for portability to other platforms (Mac, Linux, Wii, Switch)
external .org and .pxt files
more screen sizes
V-sync
pixel unlock
editing the original code
and more!
===================
---===GENERAL===---
===================
Setup:
CSE2EX is going to be the main branch of what we're editing. (if you don't know what a branch is, that's perfectly fine! I'll go over everything in a minute)
Because we're compiling the game from the source code, we need to setup a development environment that can compile code using Cmake.
You can use multiple ways to compile Cmake files, including using Visual Studio, or CodeBlocks; but the officially supported version of compilation is using MSYS2 (and now Visual studio as well)
On a clean MSYS2/MinGW64 install you'll want these packages:
Required:
git
mingw-w64-x86_64-cmake
make
mingw-w64-x86_64-gcc
Optional packages for non-local build :
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-freetype
Optional packages for non-local GLFW3 build :
mingw-w64-x86_64-glfw
Installing packages in MSYS2 is done with Arch-based package installer, pacman if you don't know how to use pacman read the wiki page for it on the Arch Wiki (you're probably looking for the section about installing packages btw).
On a clean MSYS2/MinGW64 install you'll want these packages:
Required:
git
mingw-w64-x86_64-cmake
make
mingw-w64-x86_64-gcc
Optional packages for non-local build :
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-freetype
Optional packages for non-local GLFW3 build :
mingw-w64-x86_64-glfw
Installing packages in MSYS2 is done with Arch-based package installer, pacman if you don't know how to use pacman read the wiki page for it on the Arch Wiki (you're probably looking for the section about installing packages btw).
I've never touched a mac and never will; when somebody tries to setup stuff on a mac tell me so I can add this.
Setup on linux is incredibly easy; And if you're running linux you *probably* already know how to use a terminal/compile code/clone a repository.
Here's a Dependency list for a lot of different versions of Linux.
Here's a Dependency list for a lot of different versions of Linux.
Clownacy/CSE2
Decompilation of Cave Story (v1.0.0.6). Contribute to Clownacy/CSE2 development by creating an account on GitHub.
github.com
Now that you have your environment; (assuming you're using MSYS2 or a Linux terminal) just run git clone https://github.com/EwanGreen4/CSE2EX then cd CSE2EX
finally you want to run git checkout enhanced so you're compiling CSE2EX instead of just CSE2
building is done with
Code:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
Alright; now that we have the ability to build the code, it's time to get down and learn how to mod!
Tools:
Booster's Lab [link]
Currently this is the only CS editor that supports modding of CSE2; to modify it just load up mrmap.bin in the data folder and then it's identical to vanilla CS (you can't apply hex patch mods because of fairly obvious reasons though :v )
Currently 5.1.0.0+ of Booster's lab is the only editor that supports CSE2e, so be sure you're using a relatively recent version of BL.
SeaTone [link]
This let's you edit Sound effects for the game, Including ORG drums. This program naively runs on windows exclusively, but WINE does emulate it properly if you want to edit the sound effects windows free.
WaveGen100 [link]
Allows you to edit the sounds of every ORG instrument (not including drums).
Currently there's only a windows build; but the source code is freely available.
Cave Story Modding Community Discord. [link]
This is the Discord for the Modding community. There are a lot of misc resources you can find here as well as many helpful people that know much about the game to help you get started on your modding journey.
Cave Story Engine 2 Discord [link]
This server is a hellish landscape ever since the official DCMA of CSE2, it has devolved into a dead and shitposting server, beware, all who enter.
Also please, please, please watch this video on level design in CS. It fairly long but very important if you don't want to get slammed in your mod thread for making death trap spikes everywhere.
===============================
----====OTHER RESOURCES====----
===============================
In BL there is an option under `help > oh god what do i do` this will help you get a bit of a grip on things possibly.
Rundown on Quote's default physics:
TSC 101
The Cave Story Modding Wiki (tons of info, but very scatted and a mixed bag)
Getting Started
This is the index directory for getting started on your Cave Story modding adventure. This index contains video tutorials, essentials, written documents, and external links. As of now, this index is far from being complete. The mission is to make this index as user friendly as possible with...
cave-story-modding.fandom.com
===================
----====FAQ====----
===================
Q: I can't get the program to build....
A: stop by the CSE2 discord and ask us if you need a hand.
Q: How do I use this scripting thing??
A: Check this out to get started!
Q: What is <ANP and how do I use it?
A: There's full documentation on how to use all of the vanilla TSC commands packaged in with BL under help > oh god what do i do.
There isn't currently any formal write-up for the commands that are exclusively in CSE2e at the moment, but asking in the discord(s) should prove fruitful in the meantime.
Q: Alright, I've finished my mod! Where do I upload it to?
A: pixeltellsthetruth.solutions (yes, that's the URL of the site!)
This isn't a question but idk where else to put it.
IF YOU USE CONTENT FROM OTHER MODS CREDIT THE ORIGINAL SOURCE!!
This includes code, orgs, graphics and maps. We all stand on the shoulders of giants.
Please show respect to those who made your work possible
Also DO NOT include content from any release of cave story that has been exclusively in any version of CS+ distributed by NiCALiS. (ie wind fortress)
With that, good luck and happy modding!
Last edited: