Now that the game is out everywhere (More or less)

336 posts / 0 new
Last post
Jiro25's picture
Offline
Joined: 01/04/2013 - 22:53

I applaud you guys' dedication and hard work, and I eagerly await the day the first content mod is published for Little Inferno. Thanks to all working on this.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

@puggsoy
I tried your Matchbox 0.2 today. I think compressing & decompressing pak files are frequently used features and they should be displayed as buttons. You can make the exe files in util directory display in meanu because they are not frequently used.

puggsoy's picture
Offline
Joined: 11/20/2012 - 04:25

Well since I'm designing it for mod installation (and probably creation as well), I'm gonna keep those options in the menu. For now they are what you'll use most, but later on the majority of the program will contain a mod queue and such, similar to GooTool. When it comes to that people will only use decompression and compression for specific purposes, and only advanced users who know what they're doing, so I'm keeping them there so that people who just want to install mods don't have to worry about what they are. I might even put them in a disable-able "Advanced" menu.
As for the stripping, when you select which .exe to strip it's also a selection of your custom Little Inferno directory. It defines where mods will be installed, and probably other stuff as well later on. Because it's necessary to define this before you can install mods, I'm going to keep it as something you can't really miss, and can change if you want. Although now that we're talking about it, I might also add a stripping option in the menu, so that people can strip other .exes for experimentation and whatnot.

Either way, I'll probably morph and change the design over time, especially once I have the queue ready (I'll most likely have tabs like GooTool because I'm uncreative : P). Still, thanks for the input.

Haapavuo's picture
Offline
Joined: 01/03/2013 - 08:19

I don't want to sound depressing but I think you're aiming pretty high. IMHO the modding scene will be dead before any of that happens. Of course it would be nice to see a modding tool such as GooTool but this game really isn't so big sensation (nor big as a game) as World of Goo.

What I'm saying is the scene here is very small and there would be only a few users for the tool. I think this game is never going to be near as popular as World of Goo. However, there is still hope if the creators will release expansion packs and additional DLC.

I wish you don't stop developing the tool because of my comment - I just want you to realise some facts. : )

puggsoy's picture
Offline
Joined: 11/20/2012 - 04:25

I see your point. The thing is, simply being able to mod items is a massive chunk of the modding scene. You've seen it yourself: there is a massive range of attributes to edit. If we can manage to document all of these, and even make an item editor, I have no doubt that this community will produce mods just as well as GooFans did will WoG levels. Obviously this depends on the stability of the community, but that's beyond my control.

Besides, I don't see what's wrong with making it like GooTool. If I can, I will. I bet you that GooFans is as popular as it is because of GooTool, not vice-versa. Had it been a small tool that simply allows you to install goomods one-by-one, I bet you there wouldn't be half the amount of mods that there are today. With the addition of WooGLE and WooBLE, even more people decided to participate. Just yesterday someone submitted their first level.
From what I can see, the tools help the community. The reverse is also true to an extent, but if I don't make Matchbox as good and helpful as it can be, I fear that less people will feel like making and installing mods.

I'm not expecting to reach GooTool's level of greatness in one jump, but I don't see the downside of trying to get there eventually. Even if Little Inferno doesn't become as popular to mod as World of Goo, having a tool to assist those that do mod it isn't a bad thing.

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

here's some more quick item data format stuff. from the previous posts, the binary blob for each item started with a section called skels. each record in the skels section looks like this:

struct
{
i32 firstJointIdx;
i32 numJoints;
i32 firstBoneIdx;
i32 numBones;
u32 burnExport;
f32 selectWeight;
i32 hasAnimThresh;
f32 animThresh;
i32 animExportStrId;
vec2 animBoundsMin;
vec2 animBoundsMax;
};

these define the different skeletons for an item (a lot of which only have 1 but if you buy 1 thing and then get multiple different things that you can pull into the fireplace (like the mom and dad bots for example) those are different skeletons of the same item.) the next section in the item data is joints and each record there looks like this:

struct
{
i32 boneIdx[2];
i32 boneBurnGridCellIdx[2];
i32 burnable;
i32 allowExtDamage;
vec2 modelSpacePos;
BinTuneDataFloat strength;
BinTuneDataFloat angleLimit;
BinTuneDataFloat speed;
BinTuneDataFloat spin;
BinTuneDataFloat wobble;
};

these define the physics joints that connect the physics bodies/bones that make up each skeleton. the last few values are special types for float data that we could tune the value of in real time using our tuner tool. each one looks like this:

struct BinTuneDataFloat
{
f32 value;
u32 tuneId;
};

the value field is all that really matters here, the tuneId was just used to hook up the value in memory to our tuning tool during development.

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Sweet, thanks Allan!

Current itemmanifest.dat.xml: https://dl.dropbox.com/u/31816885/itemmanifest.dat.xml.txt

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Great. Looking forward to the new version. : D

@Daxar
    <sound id="data/music/SugarPlumps_1.flac">
        <take filename="data/music/SugarPlumps_1.5_SomethingToTellYou.flac.ogg" channels="2" samplespersec="44100" samplecountperchannel="3556224" vorbisworkingsetsizebytes="106848" vorbismarkerssizebytes="3072" vorbispacketssizebytes="1083074"/>
    </sound>
    <sound id="data/music/SugarPlumps_1_BestFriends.flac">
        <take filename="data/music/SugarPlumps_1_BestFriends.flac.ogg" channels="2" samplespersec="44100" samplecountperchannel="1247400" vorbisworkingsetsizebytes="106848" vorbismarkerssizebytes="1008" vorbispacketssizebytes="354025"/>
    </sound>

By the way, is it a bug or something?

EDIT: Extracted something successfully...
letterdb.dat: http://pastebin.mozilla.org/2070677
dialogmanifest.dat: http://pastebin.mozilla.org/2070680

EDIT: I made a program that allows you to edit the string table. Just drag .dat files or .xml files it generated to the program and it will do the conversion work. See the links below.
Download: https://dl.dropbox.com/u/94637484/LittleInfernoStringTableManager.exe
And source: https://dl.dropbox.com/u/94637484/LittleInfernoStringTableManager.cs

EDIT:
vdata/myPicturesImage.dat format:
struct
{
BinHdrPtr pictureMetadata;
BinHdrPtr pictureBytes;
};

struct
{
i32 width;
i32 height;
i32 offset;
} metadata;

pictureBytes should use the same uncompressed format.

EDIT:
vdata/smokeImage.dat format:
struct
{
BinHdrPtr pictureMetadata;
BinHdrPtr pictureBytes;
};

struct
{
u32 id; // 3885905115 for skull.png, not sure what it is
i32 width;
i32 height;
i32 offset;
} metadata;

EDIT:
vdata/fluidPalettes.dat format:
struct
{
BinHdrPtr pictureMetadata;
BinHdrPtr pictureBytes;
};

struct
{
u32 id; // unknown either
i32 offset;
i32 width; // height always equals to 1
} metadata;

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Cool, Mygod! I'll be sure to try and decompress those.
Brings up an interesting question, though: Why do we have data/textures/fluidPalettes/*.png as well as a fluidPalettes.dat file? I'll have to compare the files after decompressing, but I have the sneaking suspicion they're identical.

EDIT: Seems the IDs in the metadata are the resource IDs for the files in data/textures/fluidPalettes, at least.
EDIT2: Ditto for the smokeImage.dat file. I'll decompress anyway, but looks to be identical.

Also thanks to Mygod, here's a bugfix release:
Version 0.3.5a:
- Fixed error in sndmanifest.dat.xml with the sound resource data/music/SugarPlumps_1.5_SomethingToTellYou.flac.ogg
- Fixed error when compressing/decompressing resource.pak file "data/items/_common/string.png" (cause of the error message "ERROR: Invalid filename for recompression: data/items/_common/wstring.png. Only files in the original residmap.dat can be compressed." when compressing)
- A few partially-made alpha features that you should ignore for the time being

Download: https://dl.dropbox.com/u/31816885/liTools0.3.5a.zip
Source: https://github.com/meh2481/liTools/tree/32fed94323cbc22ae15ff676267b06e2...

If you're still getting the second error when compressing, you may need to decompress again with the new version to reset the filename of the image and the filename in the resource.pak.filelist.txt (Alternatively, you could change the filename by hand).

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

It seems the non-original files can be packed correctly now. : D
liCompress resource.pak is too slow so I use liCompress temp.pak & modManage temp.pak instead now. @puggsoy you should make this feature this for debugging purposes.

@allan
I'm able to edit the texts in vdata/letterdb.dat now. (with the string table tool I published above) But when I tried to add a new language (cn) to vdata/letterdb.dat but it doesn't work (still displays en). I have configured settings.txt. Are the language codes hardcoded or listed somewhere?

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Mygod: Yep, you can now compress/decompress new files thanks to a tiny hidden residmap.dat in each mod, just ModManage ignores them for now.

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

yeah i think the game filters the language you request and doesn't let you set a language that it thinks we don't have (which is the list of languages we shipped with.) if you want to make a new translation independently you'd have to replace one of the existing translations for now. we could add a way to expand the list of supported languages later but it would require an update.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

@Daxar
I have an idea for the modManage here.
struct
{
u32 id;
u32 flags;
i32 offset;
i32 size;
};

As you have seen, in original packages the flags are only used to express the file is compressed or not and 31 bits are wasted. So you can use two of them to represent where they should be put. For example, 0 for automatically detection, 1 for resource.pak, 2 for frontend.pak and 3 for embed.pak.
If the non-original file is marked 0, I recommend you to put this into embed.pak because it's fastest and loaded as soon as the game starts. (see #94)
And I recommend this format for file lists.
resource.pak|data/fonts/TwCen.page01.png
What do you think?

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Good idea for using the flags to decide what pakfile to place new resources into. As for your idea for the filelist file, I'm a bit sleepy right now, but I'll definitely consider it. I'm not completely sure what would be the best format for modders to use, and I really want to keep it as user-friendly as possible. Maybe some kind of XML format? Dunno.

puggsoy's picture
Offline
Joined: 11/20/2012 - 04:25

I think XML would be a good idea, most people who would make mods (at this stage at least) should be able to use it easily. Also, if Matchbox ever needs to actually read the filelist file (not sure if it ever will, but hey), XML is the easiest format for me to parse and work with.

By the way, does anybody actually want anything added to Matchbox? For the moment I can't think of much to add, and I don't think a queue and such is necessary until we have a mod format.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

@puggsoy See #161.

puggsoy's picture
Offline
Joined: 11/20/2012 - 04:25

Oh yeah, forgot about that post. Unfortunately I'm a bit confused what it means. Could you explain it a bit more and also its use? Is it to add new files to a .pak or what?

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

I meant if you just want to add/edit some files in the game resource, you can select the file you want to add/edit and the program will call liCompress temp.pak & modManage temp.pak instead of liCompress resource.pak.

puggsoy's picture
Offline
Joined: 11/20/2012 - 04:25

Ah, I think I get it. The only problem is that how do you make sure that new files get merged into resource.pak? If you edit them it automatically detects them, but I don't know how to specify which .pak new files (that didn't originally exist) get added to.

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

You don't for now. ModManage doesn't support new files in any of the pakfiles yet. I'm still thinking of the best way to do so.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Um... Yes, we'd better think of the best way first.
@allan
Will you tell me the format of TwCen.font.xml so I can make a new translation... please?

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

here's the quick overview of the fonts. there is a font manifest (vdata\fontmanifest.dat) similar to the sounds manifest which has the dependency information for all fonts. the manifest starts out with a header

struct
{
i32 numFonts;
};

followed by a record for each font that looks like this

struct
{
u32 fontResId;
i32 firstTexDependsIdx;
i32 numTexDepends;
};

followed by the list of textures which all look like this

struct
{
u32 texResId;
};

then, each individual font resource (like data\fonts\TwCen.font.xml) starts off with a header

struct
{
BinHdrPtr chars;
BinHdrPtr kerns;
i32 pointSize;
f32 extLeading;
f32 maxAscent;
f32 maxDescent;
};

followed by a section with one record for each character in the font that looks like this

struct
{
i32 codepoint;
i32 texPageIdx;
i16 texX, texY;
i16 texW, texH;
f32 offsetX;
f32 offsetY;
f32 advance;
};

which gives the info about which unicode codepoint it is, where to find it in the font's texture(s), where to draw it relative to the current offset and then how much to advance the offset by after you draw it. finally there is a section for all of the kerning information for the font. each kerning record looks like this

struct
{
i16 codepoints[2];
f32 kernAmount;
};

which says how much to adjust the offset in between the 2 characters whenever you encounter them together in that order in a string.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

@allan
Thanks! It will be useful to me.
By the way, I just found there are some issues in vdata\residmap.dat. For example...
<mapping id="967411" filename="data/items/SpiderEggSpider/colorbgicon"/>
The hash of data/items/SpiderEggSpider/colorbgicon is 119670211 and the hash of data\items\SpiderEggSpider\colorbgicon is 967411. I think we'd better use \ instead of /.

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

@Mygod: I'm using / instead of \ consistently for cross-platform support for whenever I have to port liTools to Mac/Linux. My code converts back to \ behind the scenes whenever I hash any file path, so it always comes out correctly, and just uses / in file paths for file operations. I always make filenames in any converted XML file come out with forward slashes, and don't convert back to backslashes when I create residmap.dat. It doesn't matter all that much, since residmap.dat isn't used by the game, but I'll probably convert it so the residmap.dat comes out right for the next version. Thanks for spotting that.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

That's also a good idea. Keep up the good work.

@allan
The game crashed after I made a new font. I have checked anywhere and I can't figure out why. So I have some more questions...
[Solved] 1. Can numTexDepends be more than 2? (such as 10)
2. Why data/fonts/TwCen.page00.png is loaded in embed.pak while data/fonts/TwCen.page01.png is loaded in resource.pak?
3. Are there any size limits of the font textures?

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

@Mygod: Are you running liCompress on embed.pak? Because for some reason my sndmanifest code got completely botched someplace and it's totally messing it up. Time for another patchfix sometime soon...

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Um... Yes... But the game crashes after I click a building now. Anyway the new font seems to be parsed partially correctly.
http://i.imgur.com/npwM7lz.png
。(0x3002) can't be displayed though it is included in TwCen.font.xml and TwCen.page19.png.
Are string tables encoded in UTF-8?

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Ok, new patchfix. You'll need to replace your embed.pak with an original version if you used the last patch, because 0.3.5a completely botched the file (Hence crashing when you were clicking on a building, Mygod. Sorry about that...).

Version 0.3.5b changelog:
-Fix for fix from 0.3.5a that would completely botch several sound resource names
-vdata/fontmanifest.dat is now parsed to/from XML
-.font.xml files are now parsed to/from XML

Source: https://github.com/meh2481/liTools/tree/18a784b88a83b53d5a3d73f5a9f85633...
Download: https://dl.dropbox.com/u/31816885/liTools0.3.5b.zip

Hopefully this should help out in your font modding efforts, Mygod.
Let me know if there are any parsing issues with the XML. I think I'm properly converting to/from UTF-8 in the .font.xml files, so you should be able to enter the Chinese characters into TwCen.font.xml and have them show up ingame without a hitch, but if something is fishy or doesn't work right, let me know.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Oh thanks! I will try that.
By the way, what does --level=-1 means?

EDIT:
Some suggestions and one bug:
1. texx texy texw texh is not readable enough, I recommend to use x, y, width & height.
2. liCompress seems to make a temp file for images and then compress them. I think keeping them in the memory will be faster.
3. BUG! Custom /fontmanifest/font/texture/@filename disappeared after compressing and decompressing. Please fix that. And the new font seemed to make the game crash as soon as the game starts.

Here's the font I made: https://dl.dropbox.com/u/94637484/My%20new%20font.rar
data/fonts/TwCen.page02.png
data/fonts/TwCen.page03.png
data/fonts/TwCen.page04.png
data/fonts/TwCen.page05.png
data/fonts/TwCen.page06.png
data/fonts/TwCen.page07.png
data/fonts/TwCen.page08.png
data/fonts/TwCen.page09.png
data/fonts/TwCen.page10.png
data/fonts/TwCen.page11.png
data/fonts/TwCen.page12.png
data/fonts/TwCen.page13.png
data/fonts/TwCen.page14.png
data/fonts/TwCen.page15.png
data/fonts/TwCen.page16.png
data/fonts/TwCen.page17.png
data/fonts/TwCen.page18.png
data/fonts/TwCen.page19.png

These files should be added to embed.pak. If everything is done correctly, you will see the warning texts are replaced.
My program used to work properly but the game crashed after I clicked a building though I did nothing to resource.pak.

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

how are you hooking a new font up to an animation to use it? there is an animation manifest just like the sound and font manifests that has all of the dependency information including which fonts an animation uses. if you haven't updated the manifest to include the dependency on the new font for the animations that you've switched over then that might cause a crash. (just guessing)

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Nope. I just extended the old TwCen font. (add some new chars)

EDIT: @allan what encoding should I use for string tables and fonts? I use UTF-16 Little Endian (1200) for font.xml and UTF-8 (65001) for string tables. Is that right?

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

the codepoint in the font data is just the direct integer representation of the unicode codepoint (or utf-32 if you prefer) although for the kerning data it looks like i only used 16 bits so the game will only support kerning on codepoints that fit.

all text in the game should be utf-8 encoded.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Ok thanks. But why 。 (0x3002) can't be displayed correctly?

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

oh i forgot to mention, the characters in the font data must be sorted in ascending order by codepoint since the game does a binary search when looking them up. could that be the problem?

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Chat Records wrote:

<Mygod>: maybe the chars should be in ascending order?
<MOM4Evr>: Theoretically it shouldn't matter, but I don't know how Little Inferno parses the font files, so maybe
<Mygod>: I guess it might be the encoding problem or the order
<Mygod>: If things are in ascending order, you can use the binary search which is faster than the linear search... (of course hashing is even faster...)

Yes that is what I was thinking. That must be the problem... Thanks @allan!
By the way, the original char list doesn't seem to be in ascending order either.
http://i.imgur.com/fJlx5vN.png
P.S. I think hashing is faster and easier to implement. Why don't you use that?
P.P.S. And are there any size limits for font images?

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

the bytes in the image are little endian 32 bit words so they're really 0xF001, 0xF002, 0xFB01 and 0xFB02 in order. the performance of the character lookup never showed up in profiles so there wasn't any pressure to use anything more complicated than a simple search (even a linear search would likely have been fine for english.) as for textures sizes, 2048x2048 or less is what i would recommend. anything larger than that and the game will have to reject the highest mip level on some older hardware.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

@allan
Thanks!

@Daxar
https://dl.dropbox.com/u/94637484/My%20new%20font.rar
I regenerated the font (sorted). You can try this one out and see if there is still blinking X.
P.S. I used 1976x1976 as the texture size, maybe the game will crash.

A suggestion for your liTools: sort the char list before encoding into the binary format.
Hope your new version will come out soon. : D

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

@Mygod: Your new font only has entries in the TwCen.font.xml up through page 7, but your mod still has up to page 19. Is this correct? It's crashing on game start now.

EDIT: I'm sorting the characters now as I parse in the XML, and the old version works like a charm (displays the '。' character instead of a blinking X), so it may be a good idea to stick with the old version. ; )

EDIT2: @Mygod: I was trying to make modManage support new files, so you could distribute your new font characters as a .pak file like normal, but it's looking like that's more involved than I have time for right now. So here's my latest revision to the program that properly supports new textures inside the fontmanifest, and also sorts characters by Unicode value properly, so you can play around with it on your own. EDIT: Link removed

As far as I can tell, this works perfectly fine with the original version of your mod, and not at all with the new version (I dunno if it's a problem on your end or mine). Anyway, have fun with it.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Okay thanks for testing. Now I will wait for your new version. ; )

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Ok, so apparently there was an issue in sndmanifest.h that was causing the sound ID's to get garbled all the way through. I have no idea how it worked in the first place with malformed sound IDs, but apparently it did. In any case, this latest bugfix should fix the crash problems from the latest release:

Version 0.3.5c changelog:
-Bugfix that caused improper sound IDs to be generated for "data/music/SugarPlumps_1.5_SomethingToTellYou.flac"
-Font characters are sorted on compression of .font.xml files, so the game can use them properly

You may have to replace your embed.pak with an original version again for this one, depending on how mangled the sound resource got. I dunno. Yay for bugs that destroy game data irreparably!
Also thanks to Mygod for finding.

Download: https://dl.dropbox.com/u/31816885/liTools0.3.5c.zip
Source: My github as usual. I'll stop linking to it constantly because I'm lazy.

This should work out-of-the-box with the first version of Mygod's font mod. Now to add custom resource support in modManage so he can distribute the mod in .pak form...

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

The new version works GREAT for me! Thanks Daxar so much!

EDIT:
Now I have translated all texts in the game except the ones in itemmanifest.dat and the pictures.
@Daxar
The type sound of Shadow sounds a bit strange...

@allan
I found the text in the dialog doesn't wrap because there is no spaces in Chinese. So I make the program add the spaces automatically but sometimes the wrap doesn't work normally when there are many choices. Is there a better solution? Or how to limit the width of the text in the dialog?

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

adding spaces to the text is the only way to make text wrap currently. how exactly is it not working normally when there are many choices?

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

There are some spaces in it. P.S. I set ten characters per line as default.

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

not sure i know what you mean. could you post a screen shot?

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

http://i.imgur.com/Gq5ktbH.jpg
Here it is. There are some unexpected spaces between them. (this issue only occurs here)

EDIT: I wonder if I can use | or &#xA; to wrap.

EDIT: Now items are translated. Allan thank you for your useful information!

EDIT: &#xA; (\n) works PERFECT! HAHA!

EDIT: I'm done now. Thanks all of you there! Now time to go back on itemmanifest.dat. Sorry for disturbing. : D
P.S. I'm going to publish it after Daxar improves modManage.
P.S. @allan Can you offer me the .psd files so that I can translate the pictures? Thanks!

EDIT:
By the way, I just figured out the format for vdata/loctexmanifest.bin. Here it is:
struct
{
BinHdrPtr files;
BinHdrPtr records;
};
struct
{
u32 resId; // common file id
i32 index; // record pointer
i32 count;
} file;
struct
{
u32 languageId;
u32 localizedResId;
} record;

EDIT: Error occurred while trying to decompress debug.pak in iPad version. : P
Unpacking resource blob file debug.pak
Extracting files...
Decompressing file 1 out of 4: data/fonts/DebugFont.font.xml
Decompressing file 2 out of 4: data/fonts/DebugFont.page00.png
Decompressing file 3 out of 4: data/fonts/DebugFont.page01.png
Decompressing file 4 out of 4: vdata/residmap.dat
zlib inflate error: -3
Error decompressing file vdata/residmap.dat

Crashed on embed.pak too.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

frontend.pak:
Error decompressing file data/animations/Cursor/grab.png
resource.pak:
Extracting files...
No residmap entry for id 4007185407
Decompressing file 1 out of 3815:
Unable to open output file
Decompressing file 2 out of 3815: data/effects/cutscene_credits_chim1.png
Decompressing file 3 out of 3815: data/effects/cutscene_credits_chim2.png
Error decompressing file data/effects/cutscene_credits_chim2.png
No residmap entry for id 740607036
Decompressing file 4 out of 3815:
Error decompressing file

EDIT:
I just found there is one more serious bug. When I added new files to two original .pak files, modManage will abort: Error: resource 3085189639 is in more than one output .pak file. Abort.

EDIT:
There are some bugs about wordPackDict.dat.
1. It doesn't support multi-language. I wish it would be like this one:
<word en="en content" fr="fr content" probability="probability" />
2. It doesn't support non-ASCII chars either. I have tried UTF-8 & UTF-16 but neither of them worked.

EDIT:
@allan
How to generate a .png.normal file?

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

kk, to address these:

iPad version pakfiles: Since I don't have them myself, I have no way of testing/fixing this, and there's no way for me to know if any format has changed. My guess is that something with the pakfile format has changed, which would cause all kinds of problems. But there's not much I can do about it.

As I've said, modManage doesn't support new files. It also doesn't support files in more than one pakfile, since it would be useless to have a resource in more than one pakfile anyway. It's just how it's set up, and the program is likely to change drastically as I finalize the mod format. Remember, new files aren't officially supported by ANY of the tools yet.

wordPackDict.dat: I'm really not at all sure if multiple languages are even supported by the game here. All the original strings are in English, anyway; I don't think any of them got translated for the current version of the game. I'm not exactly certain how multiple languages for strings are set up yet, so it's difficult for me to know how to add multi-language support at this time. I'll put it on my TODO list for later, just in case it is possible. Because of this, I don't really care about broken UTF-8 support here. If UTF-8 support here is important to your translation efforts, let me know.

Mygod's picture
Offline
Joined: 11/17/2012 - 08:00

Adding multilingual support for wordPackDict.dat will be easy because the last section is a common string table. String table is a common data structure in Little Inferno. It can be found in a lot of files, such as anim.xml, itemmanifest.dat, letterdb.dat, dialogmanifest.dat, residmap.dat and so on. So making UTF-8 support will be really useful. And it‘s important to my translation efforts, too. The language id is the language string. For example, "ne\0\0" means English (en), "rf\0\0" means French (fr). I made a string table encoder/decoder above, it supports those language.

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

localized strings could be added to the string table for the word pack words but it would require an update to the game to actually use them since it currently doesn't treat that as localized text. there are no translations for any of our other languages and i think for non english languages the item itself is called something like the "english word pack" instead.

allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

continuing with the binary item data, the next section is the bones. this is what defines the underlying physics shapes used for collision detection as well as a bunch of game specific properties for each part of an item. the record for each bone looks like this:

struct
{
u32 id;
i32 animBlockIdx;
mtx23 animBlockTransform;
vec2 itemSpacePosition;
i32 firstBoneMainShapeIdx;
i32 numBoneMainShapes;
vec2 burnBoundsMin;
vec2 burnBoundsMax;
f32 burnGridSize;
i32 burnGridWidth;
i32 burnGridHeight;
i32 firstBurnUsedIdx;
i32 firstPartsIdx;
i32 numParts;
i32 firstPartTreeValIdx;
i32 numPartTreeVals;
i32 connectedGroupIdx;
i32 firstRgnCellIdx;
i32 numRgnCells;
u32 igniteTimeEnumValId;
u32 burnTimeEnumValId;
u32 attackSpeedEnumValId;
u32 attackAmountEnumValId;
u32 decaySpeedEnumValId;
u32 burnAmountEnumValId;
u32 boneDensityEnumValId;
u32 collideSoundEnumValId;
u32 igniteSoundEnumValId;
u32 decayParticlesEnumValId;
u32 igniteParticlesEnumValId;
u32 frictionEnumValId;
u32 restitutionEnumValId;
u32 linearDampEnumValId;
u32 angularDampEnumValId;
i32 behavior;
u32 shatterExpRadiusEnumValId;
u32 shatterExpFireAmountEnumValId;
u32 shatterExpFireSpeedEnumValId;
u32 shatterExpForceEnumValId;
u32 shatterExpSoundEnumValId;
u32 shatterExpEffectEnumValId;
u32 shatterExpTimeRampDownEnumValId;
u32 shatterExpTimeHoldDownEnumValId;
u32 shatterExpTimeRampUpEnumValId;
u32 shatterExpTimeFactorEnumValId;
u32 shatterExpDoCamShakeEnumValId;
u32 ashBreakMinAccelEnumValId;
u32 ashBreakMaxAccelEnumValId;
u32 splitSFXSmallEnumValId;
u32 splitSFXMediumEnumValId;
u32 splitSFXLargeEnumValId;
u32 splitBrittleEnumValId;
u32 splitThresholdEnumValId;
u32 splitEffectEnumValId;
u32 ashSplitTimeBaseEnumValId;
u32 ashSplitTimeVarEnumValId;
u32 splitDespawnEffectEnumValId;
u32 stampBlackWhitePctEnumValId;
u32 smearAmountEnumValId;
u32 collideParticlesEnumValId;
u32 explodeIgnoreBurnTriggerEnumValId;
u32 postExplodeSplitTimeBaseEnumValId;
u32 postExplodeSplitTimeVarEnumValId;
u32 explodeIgnitePiecesEnumValId;
u32 postExplodeAshBreakMinAccelEnumValId;
u32 autoRotateUprightEnumValId;
u32 mouseGrabSoundEnumValId;
u32 instAshOnCollideEnumValId;
u32 applyGravityEnumValId;
u32 splatParticlesEnumValId;
};

i won't go into the function of every single field right now but that should give you a general idea of the kinds of things that live in the bone data. the section after bones is boneShapes and that's where the actual vertices that make up the polygons for the bones are stored (firstBoneMainShapeIdx and numBoneMainShapes link a bone record to its bone shapes):

struct
{
u32 flags;
i32 numVerts;
vec2 verts[ 8 ];
};

valid flags are 0x02 for a circle shape and 0x04 for a polygon shape. if a shape is a circle then it has 2 vertices where the first one gives the center of the circle and the x component of the second one gives the radius of the circle. if a shape is a polygon then the list of verts defines the polygon directly.

Daxar's picture
Offline
Joined: 11/18/2012 - 14:09

Sweet, thanks, Allan!

For the "mtx23 animBlockTransform;" line, what exactly is the mtx23 type?

Pages