CS+KAGE reference
Last updated
Last updated
doukutsu-rs has partial support for data files and some of the features included with 2017 Switch-exclusive release of Cave Story+. Due to multiple technical and gameplay changes this page exists to gather all knowledge about it in one place.
At time of writing this the reworked release of CS+ has been only released on Nintendo Switch, so if you want to use it with d-rs you need a hacked console to dump the data
directory from romfs and transfer it to PC.
We call it "CS+KAGE" version since there's a possibility of future ports appearing and it's likely that they will share the same codebase and data file layout as the currently available Switch version (as seen by Binding of Isaac and other games using the same framework).
All support for Switch CS+ is based on clean room reverse engineering and black-box reverse engineering (modifying data files and looking what happens), based on references created by various people listed below.
None of doukutsu-rs contributors/developers has seen any code implementing those features in form of sources or disassembly.
There's some stuff that CS+ Switch adds as well (eg. lighting effects, co-op), but those are implemented using completely original ways (and code), for different purposes and used the Switch release as inspiration at most.
This is what I was able to gather about the TSC commands used in CS+ Switch that aren't in freeware. I think you already know most of this but I also wanted to double-check that your clean-room observations aren't totally contradictory to what I have, in case I screwed up/misinterpreted something:
later errata:
Apparently I had written down at one point that
<2MV
resets the air of the player that movesNot sure if you had found that out already from testing(if not, maybe it's worth double-checking just to be sure)
8 - variant of Outside - doesn't seem to be used anywhere in stage.tbl or any mod but we suspect it's a special type for menu background. Peri mentioned the only difference is some lighting setup code but lighting is disabled on every outside background type so we dunno.
9 - variant of type 2 (tiled background with background scrolling with tilemap, without parallax) - the only difference is that bkCircle2
texture is drawn behind the water.
Judging by behavior, the technique used to implement water seems to be something similar to technique described there: https://prime31.github.io/water2d-part1/
CS+ renders the water on entire area spanned by tiles with water attribute set, there's no clipping to shape of actual water tilemap.
Reworked CS+ added a new "water attribute" file as one of tileset metadata files.
Every tileset, except the Last Cave one (it has lava / blood water pools) seems to use the same values.
The format seems to be something like this, can be specified multiple times on separate lines:
First and second fields specify the range of tiles the color should be applied to.
3rd field is the color of top water edge.
4th field is the middle color of water gradient
5th field is the color of bottom water edge.
Putting above example data in .pxw file results in something like:
Additionally, there are 3 2 other commands that exist but aren't used anywhere (I think). I could tell you about them but given that they're not used, there's probably no need for you to implement them