Kero Blaster Modding

May 12, 2014 at 3:07 AM
Been here way too long...
Discord Group Admin
Org Discord Moderator
"Life begins and ends with Nu."
Join Date: Oct 18, 2011
Location:
Posts: 2335
So, the big question... How long until Kero Blaster modding?
I'm just gonna compile some information before I even play the game. As I continue, this will probably be more complete.

It looks like the game's resources are laid out in a similar way to CS.
There are separate files for scripts (.pxeve, equivalent to .tsc though not the same language) and maps (.pxpack, likely a combination of .pxe and .pxm though not necessarily the same formats) and it seems there aren't separate files for tiles and entities like there are in CS.

Tilesets have two files, a .png and a .pxattr. I'd guess that the .pxattr files are equivalent to .pxa files from CS, determining what kind of tile each tile is.
There's an odd file in with the script files called 2byte.txt...
[attachment=594:2byte.txt]
I can't make sense of it, but maybe some of you can.

There's also a folder called assist, which seems to contain a list of flags and skipflags (nice and convenient) a list of some entities (called unittype.txt... there is also a unittype.png. I haven't played yet, which could very well be why I don't know, but I would guess it's similar to npcRegu from CS) a list of what appears to be scroll types (scroll.txt) and finally, default.pxeve which contains only one event, which if I am guessing correctly plays some music, fades in, then ends.
The code in question:
Code:
*[IN]<muSt<fadI<exit

Conveniently, unlike CS the music and sounds are outside the .exe. There's a folder called bgm with the music and one called se with sounds. Music is in .ptcop, which means it's editable like .orgs, and sounds are in .ptnoise.

Sprites are in .png, but I'm not sure whether alpha transparency works. Also uncertain is whether there's protection like (C) Pixel from CS. The localize folder seems fairly straightforward, having localized graphics and words that likely would show up in menus and some dialogue. Of note is the file explain.pxeve, which seems to contain all dialogue in the game. It would appear that .pxeve files are able to call for the contents of this file at will. The inclusion of explain.pxeve and the localize folder means that doing a translation of KB should be far easier than one of CS. Not sure if that matters to any of you, but I'm sure it'll matter to someone. Important to note is that .pxeve files are not encrypted like .tsc files are; they can be viewed perfectly well in any text editor.

KB uses a new scripting language with some similarities to TSC, but some very important changes. Here is a section of code from one of the files:
Code:
*[Scene01]<lkFU[1]<call[_roomDefault]<cRsv[expCheer01]<call[_transOn]<call[expTrans01]<dl60<fadO<skpE[-]
The *[Scene01] seems to be the event number. Commands have four characters, not three, and their arguments are enclosed in square brackets. Arguments are separated by semicolons (not shown in the code above) and are not strictly numerical, which enhances the readability of the code greatly. The only commands I think I understand from that are <call, <fadO, and sooooort of <skpe[-]. I type the last one with its argument because it seems that it's only ever used with that argument, though I haven't checked all the files yet. <call I am almost certain calls for the event in explain.pxeve with the same title as the <call's argument. <fadO I'm pretty sure fades out. <skpe[-] I have no fucking clue but it's only ever used at the end of an event so that must mean something. It isn't equivalent to <END because there's another command (<exit) that seems to be that.

So, there are a couple things that will need to be done for modding to be possible. I've got a list here in no particular order that may or may not be complete.
  • Figure out the scripting language. [SLOWLY IN PROGRESS]
  • Figure out the .pxpack file format. [IN PROGRESS]
  • Find out where mapdata is stored. I'm guessing it's in the .pxpack files, but I have no real idea.
  • Figure out the .pxattr file format.
  • Find out if there's some sort of protection on the .pngs like there is on .pbms, and if so, what it is.
  • Find out what half the stuff in the assist folder is/does (unittype.txt/png, scroll.txt, default.pxeve.) [OPTIONAL]
  • Find out whether alpha transparency works. [OPTIONAL]
  • Figure out what 2byte.txt is/does. [OPTIONAL]
  • Make an editor for the game. [IN PROGRESS]
Once all that's done we should be able to mod. ASM is something I'm not even going to bother to help with; that's way beyond my level.
TL;DR modding should be possible, assuming we can get our shit together and figure some stuff out.

Edit 19/05/14: To-do list updated.
 

Attachments

  • 2byte.txt
    1,008 bytes · Views: 23
May 12, 2014 at 3:27 AM
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
the scripting language is way better from what I can tell, I like the improvements over TSC
 
May 17, 2014 at 5:57 PM
Amaya
Discord Group Moderator
"What're YOU lookin' at?"
Join Date: Jan 18, 2013
Location: Somewhere quiet with many birds
Posts: 1118
Age: 25
Since I'm not a programmer by any stretch of the imagination, it's actually more difficult to read compared to TSC, but it does seem to be more robust now. :)

I guess it'll be easier once knowledge of what all the commands do is readily available.
 
May 17, 2014 at 6:43 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
I think if you take a little time to consider it, the script is actually far more human-readable than TSC
since you know, you can use labels for things instead of arbitrary magic numbers
 
May 17, 2014 at 7:02 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
Noxid said:
I think if you take a little time to consider it, the script is actually far more human-readable than TSC
since you know, you can use labels for things instead of arbitrary magic numbers
But scripting just isn't as fun without magic numbers.

Also I like how transport commands now use labels for the position on the map you warp to (presumably set in the map itself) rather than just listing the coordinates right there.
 
May 19, 2014 at 3:44 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
I have a fairly robust level editor made for working with cave story, if your boy is willing to do some of the grunt work and collaborate a bit here I could incorporate what he's done into it and make it compatible with Kero Blaster.

http://www.cavestory.org/forums/threads/3865/

get him to have a go with this, lemme know what he thinks.
 
May 19, 2014 at 4:54 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: May 19, 2014
Location:
Posts: 3
Hey there! I'm the guy making the Kero modding tools!

I'm currently working in flash, so I doubt much of our code would be compatible but I can share all the information (and code if you think it'll help) I find out about it, to help convert your Cave Story editor. Most of what I've found out so far can be found in the thread instasquid posted.

I'm working on loading/viewing/editing Entities /right the dang now/ so once that's done I'll have like 90% of the level data understood.
 
May 19, 2014 at 7:59 PM
Been here way too long...
Discord Group Admin
Org Discord Moderator
"Life begins and ends with Nu."
Join Date: Oct 18, 2011
Location:
Posts: 2335
Niiiice that was very fast work you guys, I was not expecting it to be figured out that fast. I'm gonna try and tackle at least some of the scripting language today. Speaking of, there isn't exactly a name for it yet, huh? Anyone have any ideas besides PxEve? Myself, I'be been calling it KSC.
 
May 19, 2014 at 8:14 PM
Been here way too long...
Discord Group Admin
Org Discord Moderator
"Life begins and ends with Nu."
Join Date: Oct 18, 2011
Location:
Posts: 2335
Yeah, I already have most of that info, aside from a couple commands. It's in the OP of this thread. (Perhaps we should all read both threads in their entirety before going on...) What I meant was I was going to work on a list of commands and arguments.
 
May 19, 2014 at 8:28 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: May 19, 2014
Location:
Posts: 3
haha yeah sorry :X
 
May 19, 2014 at 9:30 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
I've gathered up some information on profile layout. It's located in /rsc_k/profile, and is contained in profile0, profile1 and profile2 (which are created when a new game is started for each file).

p184276-0-8sy33.png

I'm going to do some more in-depth stuff with this but I'm on a semi-tight schedule at the moment.
I might try to make a profile editor as well. That could be fun.

Edit: Huh...that's weird. Every time I try to change something in the profile, it reverts back to its previous state once I load the profile. I'll have to look into that.
 
May 23, 2014 at 6:40 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: May 19, 2014
Location:
Posts: 2
I'm looking through it with OllyDbg now (actually looking at the first version of pink hour). It's taking forever, and I haven't gotten anything useful in terms of modding yet, but if someone decides they want to at the assembly too, tell me and I can post as much as know so far.

I'm just figuring out the basic architecture of the program now.
 
Jan 19, 2015 at 8:16 PM
Forever 12
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: May 24, 2013
Location:
Posts: 539
zxin said:
So... Is someone going to make a Kero Blaster editor? It sounds like it but I can't really tell, it's a good idea to say the least
If you read the above posts, you'll see that an editor is in progress.
 
Jan 19, 2015 at 8:18 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
I really doubt anything is going to get made for it
 
Jan 19, 2015 at 8:34 PM
Amaya
Discord Group Moderator
"What're YOU lookin' at?"
Join Date: Jan 18, 2013
Location: Somewhere quiet with many birds
Posts: 1118
Age: 25
Noxid said:
I really doubt anything is going to get made for it
Because it's somehow too complicated, or because there isn't enough interest? D:
 
Jan 19, 2015 at 8:35 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
Top