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: 2337
So, the big question... How long until Kero Blaster modding?
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.
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.
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:
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.
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[-]
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]
Edit 19/05/14: To-do list updated.