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

336 posts / 0 new
Last post
allanblomquist's picture
Offline
Joined: 11/21/2012 - 21:04

woops, didn't realize that hadn't come up before. mtx23 is basically just 6 floats that represents a matrix with 2 rows and 3 columns - here's a compatible definition:

struct
{
f32 _11, _12, _13;
f32 _21, _22, _23;
};

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

Sorry if I'm cutting in here, since we're not done with items yet, but I'm just wondering if the profiles.bin file is easy to use? That is, can be done using a simple encoding/decoding library or would it require some custom coding like with the rest of the game?

if it's too complicated you can wait until we've done the rest but I thought if it's simple then I can maybe fiddle around with it a bit.

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

I have looked into the profiles.bin. It's absolutely a fixed-sized binary file and it can't be modified easily because there seems to be some checksums in it.

EDIT: P.S. @Daxar
When will your liTools update? I can't wait for it. : )

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

I have quite a good amount of homework and projects due in the next few days, so not soon I'm afraid.

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

@allan
Could you please send me the images without text in it so that I can translate them?

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

about the untranslated images, the kyles are looking into that currently and figuring out what the easiest way to proceed is

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

@Daxar
Serious bug! liCompress doesn't seem to compress data/fonts/TwCen.page05.png normally...
Details:
Decompressing file 1 out of 60: data/fonts/TwCen.font.xml
Decompressing file 2 out of 60: data/fonts/TwCen.page02.png
Decompressing file 3 out of 60: data/fonts/TwCen.page03.png
Decompressing file 4 out of 60: data/??ZtQ
Decompressing file 5 out of 60: data/fonts/TwCen.page04.png

The residmap.dat is bizarre, too.
Here is the picture: https://dl.dropbox.com/u/94637484/TwCen.page05.png

EDIT: And even more bizarrely, after I renamed the .filelist.txt, the bug fixed. (the previous name is Chinese.pak)

EDIT: I just found a good stuff to generate normal mappings: http://sourceforge.net/projects/ssbumpgenerator/?source=navbar

EDIT: @allan
Is it possible to use sndmanifest.dat + loctexmanifest.bin to localize a sound? e.g. data/items/CellPhone/TelephoneErrorMessage.flac
I hope there is a release that supports using loctexmanifest.bin to replace everything!

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

Mygod: Unless ssbumpgenerator can create normal maps as well, that isn't what you're looking for. Bump maps and normal maps are two entirely different things.

As for loctexmanifest.bin, I have it working, but not in the latest release. I've been sick and quite busy with school, so the next release will likely be quite some time from now. I'm also kind of tired of releasing constant bug-laden updates, so from now on I'll be releasing versions of liTools farther apart with more changes in each. If you need cutting-edge builds, you'll need to clone my git repo and compile the source yourself. If you do that now, you'll find that loctexmanifest.bin is already compressed/decompressed properly. I'll help your modding efforts as much as I can, but we're in such an early stage of modding right now that there's just not support yet for a lot of the things you need, nor is it likely that there will be for some time. A workaround solution is probably your best option for now.

(As per your question on IRC, yes you may.)

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

no, the game doesn't support localized sounds since we never used any in the shipping code. it wouldn't be hard to add but would require an update.

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

@Daxar
Yes the ssbumpgenerator can generate normal map as well. I will try to compile your source later because I haven't installed MinGW.

@allan
I hope in the next update we can use loctexmanifest.dat to replace any file such as wordPackDict.dat. Thanks! : P

EDIT: There is nothing like %dm %ds in catalogBuyBox. I can't translate them. Could you fix this too?

EDIT: What does imagecache.bin do?

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

imagecache.bin is where the image data for the custom picture item goes when the item is in your item tray. if you grab an image from facebook or your local drive and then close the game before you've burned the picture, that file will have the image data so that when the game starts up again, it will still have access to it.

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

Ok thanks allan!

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

Cool, finally got around to reading in the bones and such out to XML.

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

It's getting quite huge. So much so that I've decided it'd probably be best to split it out into smaller .xml files, one for each item. That'll be coming next version.

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

Suggestion: To decrease the size, you can try to set some default value.

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

Yes, I do have default values for a lot of the XML attributes. I meant besides that.

EDIT: I added a few default values for some of the bone attributes, but there weren't nearly as many good defaults as there were for the item data, so it doesn't help as much. Each item now has its own XML file, which looks something like this: http://pastebin.com/22Ds3xYg
(this one is data/items/Beetle/Beetle.xml)

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

Wow, that's still a fairly big XML file for a single item (even without the wordwrap). We'll definitely need to make a program for this once people start making mods, editing it by hand would be excruciating.

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

Wow! So there are still 6 big scary sections to deal with. stringTableBytes is known already, it is just a common string table. But I can't guess what the other 5 sections are.

To decrease the file size and make it easier to remember and type (though we will probably have a item editor soon but sometimes we will need to type it), here are my suggestions:
1. We can make animresid, recentlymodifiedrank, coloritemicon, colorbgicon, greybgicon into attributes.
The root element can be item now because you have extracted them from the manifest into multiple files.
2. Circle shapes can be simplified like this: <circle center="-0.336614,27.9113" radius="23.5312" />
Polygon shapes can be simplified like this: <polygon vertices="-2.00536,2.31757;23.6821,26.8801" />
3. animBlockTransform_xx is too big. I know what animBlockTransform is. It must be the affine transformation with the last row [0 0 1] removed.
Here's how the 3x3 matrix should look: http://i.imgur.com/eMSITp8.png
If a matrix matches this format: http://i.imgur.com/6X7upJq.png
It is a rotation and a translation.
So the matrix shown above can be written in this format:
<animBlockTransform angle="-70.51592" move="-0.97554,1.08372" />
If the matrix does not match, then use this format:
<animBlockTransform matrix="0.333545 -0.171384 -0.97554;0.171384 0.333545 1.08372" /> (Matlab format)
4. The itemdata element seemed to be redundant.
5. The XML should be readable too. So we should use rare abbreviations as less as possible.

EDIT: Now another BUG! Custom OGG does not work, the game crashed. (I ran recalcSoundManifest, this file is a part of my Chinese localization project)
https://dl.dropbox.com/u/94637484/TelephoneErrorMessage.flac.ogg

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

@Mygod:

1. I was thinking about trying that. I'll see how it looks.
2. Unfortunately, there's no good way to add commas inside of XML attributes. I could write my own parser, but that's a bit tedious and not high on my priority list.
3. Um, I'm not into writing a bunch of matrix transformation code (or pulling in some huge math library) just to make some XML "more usable," whatever that means. Keep in mind that I also have to parse this XML back into its original form. Can you transform those values back into the original matrix? Also, there's no easy way to add spaces, semicolons, and commas to the XML.
4. itemdata is not redundant; See http://infernofans.com/comment/491#comment-491 I'm keeping the XML as close to the original format as possible for ease of parsing, be it seemingly intuitive or no.
5. I'm not sure what "Rare abbreviations" you're referring to. Please explain.

And about the "bug": How many times do I need to say this? NEW RESOURCES ARE NOT SUPPORTED YET. Especially not new sounds. If you'll look in my TODO.txt file, you'll see that I'm planning on adding small sndmanifest.dat files in the beginning of each mod pakfile in order to have support for new sounds. Before then, new sounds will not work.

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

2. I think adding any symbol to XML should be really easy. I guess you should find another good XML parser. There should be a lot of libraries to use. I think there is no need to write a new one.
3. Transforming those value back is easy, just convert that format back (by using this formula) and multiply the matrix (if set). Personally I recommend this to make the xml more easier to modify.
4. Okay I meant to merge the itemdata element to its parent. I didn't mean its attributes and its children are redundant. : P
5. Such as texw and texh. (they are in the font.xml) : P

So there's no way to add a new sound, even if it is not in a mod?

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

2. That's not entirely what I meant (Basically, what I mean is that comma-separated values are not in the XML standard, and you'd have to add onto any parser in order to use them), but in any case, I'll think about it and see if it looks any more readable, since it does take up less space and it does make logical sense.
3. What I meant was have you actually tried out your methods of transforming to/from your format for the sample data that I gave (all the bones in Beetle.xml), and does it always work? If it does, and if you give a step-by-step method of converting to and from your given format and explain the usefulness of using it over the matrix format, then I may take the time to implement it.
4. Ah, ok. That makes more sense then. I may end up leaving the itemrecord information in the itemmanifest.dat.xml and splitting out the itemdata section into the separate XML files, since that's how it was originally set up. I'm not totally sure what the best format is at this point. But I'll be thinking about it.
5. One glance at the struct fields "texw" and "texh" made me immediately think "Oh, this is the texture width and height for each font glyph." I'm not sure how much more readable that can get. It's certainly far less terse than "behavior" for the bones, anyway. But if you have any suggestions for renaming any of the fields in the XML, I'm willing to listen. I will say, however, that I prefer succinct over verbose names. I'm an avid supporter of conciseness while programming in general.

And no, there is no way to add any new resource at all even outside mods. You can try, but chances are it won't work, and if it doesn't I won't care because it's "Not supported yet."

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

3. It doesn't seem to work for all matrices because there are also scaling and flipping in there. Now this is going to be more complex. Let's leave the matrix there and let the design tools do all the magic. : P

EDIT: Hello?
@allan
What's the format for pictures in iPad version?

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

Yes, hello.
I've been busy with course work, so not really any time to refactor or add support for new files. If Allan explains more stuff I can always add support for that, but I'm a little too busy to make any drastic changes to my program right now, sorry.

Frown's picture
Offline
Joined: 04/20/2013 - 05:10

I'm trying to keep up with the discussion but... it's difficult with the lack of my skills.

Have people managed to extract the sound files? I'd love to be able to use them!

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

You can extract .paks from the .exe using liTools, and then extract all the files in the .paks using liTools again. Then you can decompress any sound files using LISndExtract.exe, which you can download on the second page on this thread.

I might try and update Matchbox to include this and kind of make this process easier though, if you're not too comfortable with the command line. That is, I'll ignore my goal of getting it to be like GooTool and for the time being just make it a GUI for liTools.

Frown's picture
Offline
Joined: 04/20/2013 - 05:10

Whelp, Mac user here. >_<

Is it possible for anyone to zip the sound effects in LI and give it a public Dropbox link? I'd really appreciate it!

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

Just checked and realised that liTools decompresses the sounds itself; I'd forgotten since I extracted some files for someone before and back then I had to use LISndExtract.exe.

Anyway, here are all the sounds in .ogg format, organised in the way they're found in the game. I didn't include the music since you can download the soundtrack anyway, but if you want that as well (for looping purposes or whatnot) then just say.

Frown's picture
Offline
Joined: 04/20/2013 - 05:10

Puggsoy, you're a hero. Kudos!

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

No updates for liTools for ten weeks.
Please update soon.

P.S. I guess I'll need MinGW to compile your source, right?

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

Yes, you'll need MinGW and make iirc.

I may work on it again sometime; the problem is I'm working on my own projects and stuff right now. Maybe I'll make a Linux port sometime soon...

Problem is there doesn't seem to be a ton of interest in Little Inferno modding (or Infernofans in general), like there was with World of Goo. May just be the spammers; I dunno.

Offline
Joined: 06/08/2013 - 21:44

I know that I am very interested in modding this game and that I have little experience with creating mods. So having tools to help me do so would be very beneficial.

23boy's picture
Offline
Joined: 11/23/2012 - 18:22

well i think it's because the spam so everybody run away from Infernofans...
but David has fix it all!

Offline
Joined: 06/20/2013 - 00:25

I cant wait until the modding starts! I have a ton of ideas of what items to make.

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

Just tried to use liTools to decompress Little Inferno v1.2 but failed. : (

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

hey mygod i got your message about continuing the modding efforts for little inferno. i was gone for a while because of a cross country move for me and my family but i'm slowly getting set up to work again here in my new home. i'd be happy to continue providing info on the binary formats the game uses if there is still a good amount of interest in modding the game. i think the combo of a lack of mass appeal and the game not being the most straight forward to mod in the first place has slowed things down but if there is real interest then i'm certainly willing to help where i can.

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

Hi allan. Thanks for coming back. : )
I noticed that there are some new resources in 1.2. Let's start with the new residmap.dat.

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

Hi Allen, MyGod, and all,
I've got a full-time job at the moment and my schedule is pretty tight because of it, so I don't think I'll be able to add some of the stuff I was originally intending to add to liTools. If you keep describing game formats, though, Allen, I can add support for compressing/decompressing them, since that's fairly straightforward. I'm definitely still interested in modding the game, and I know a lot of other people are as well! Maybe MyGod or somebody in the future can pick up the project and make it more fully-featured (It was always my intention to create tools that made modding possible up-front, rather than making some kind of fully-featured modding suite, and as such, liTools became a quick-and-dirty decompressing/compressing package), or make tools of their own to make longer-term goals (Like a mod manager) possible. Or maybe I'll go on a mad coding spree again and do it myself. In any case, please do continue!

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

Okay. I guess I need to pick up my old project then. (since I know almost nothing about C++ )

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

I'd like to say that I'm also still very much interested in modding the game, so further info would really be awesome. I'm not sure if I can help much (since I know neither C++ nor what Mygod uses), but in any case I fully support all efforts to make LI moddable!

As for that GUI I was making, I think it may be wise to wait before continuing with it. I've got a lot of other stuff on my plate at the moment, and if Mygod picks up the project he'll probably have a GUI of his own anyway.

23boy's picture
Offline
Joined: 11/23/2012 - 18:22

hi allan and others..

it's nice to finally see you guys again... especially daxar(mom...)
there is some guys that need help in the forum btw we need some moderator around as well
this forum is dying without you guys....
all i see since the SPAM wave go away all the people never comeback again!

Offline
Joined: 06/20/2013 - 00:25

Don't worry people still come here, its just most of them are guests and bots.
We are trying to do the best to help people, but we cant always find the solution. Ounce we tried to help a member, but we didn't the solution.
Yes, we need Moderators that log in here almost everyday. I log in here nearly all the time, but that doesn't mean i'll be one.
We're still trying to mod the game, although i don't know how to do all the complicated stuff you do, and i don't have the PC version. (For now)
This forum is like becoming less and less active. If only the spam didn't attacked this site, it wont be as it is now. But i still love this forum. I log in here almost all the time, I've been here a month and i have posted ALOT. Anyways, welcome back.

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

For those concerned about spam, please go onto the goofans IRC chat at http://goofans.com/irc.php and nag davidc there to port megaban and appoint more mods. I stopped banning the spammers here because it was simply too much for me to handle. There were upwards of 10 new spambots each day, it was a complex process to get rid of them, and I was the only active forum member. I keep this topic clean, and that's about all I feel like doing.
Nevermind, this seems to be dealt with. Thanks, davidc! I'll do my best to be more active here so that the spam that slips through the cracks is dealt with, as well.

And whenever you want to keep going, Allen, I'm ready. I didn't mean to be negative or anything; I'm still quite interested in modding the game, and I do still have time for programming.

kirdneh's picture
Offline
Joined: 12/22/2012 - 14:01

I'm glad to see that this project is continuing!

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

here's the latest resource id map file:

https://www.dropbox.com/s/e681gvulpx5nry8/residmap.dat

i don't think we added anything particularly interesting in the newer versions, mostly just files related to additional languages i think?

i'll look back through this thread and figure out where i left off with documenting the game's binary formats. i think we got most of the major ones but there would still be a few more left before you could make completely new items.

movildima's picture
Offline
Joined: 11/19/2012 - 01:13

Hi Allan. I finally activated Little Inferno on Steam and started to use in-game translator. One thing is that the game doesn't have Russian fonts. It's normal because Tw Century Extra Bold is not a font that supports Russian.
One friend of mine at GooFans (Vladislav) has drawn Russian letters that are matching this font.
Please explain how the game treats the fonts and I'll help to integrate Russian ones.

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

@movildima
The font is already documented and supported by liTools. You will need to edit an xml file. The only problem is that liTools doesn't support 1.2 yet. : (
@Daxar

movildima's picture
Offline
Joined: 11/19/2012 - 01:13

Oh,ok then.
Searching through this post...

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

ok, looks like the next section of item data is bone parts. a "part" is basically an instance of one of the textures that is used in the animation associated with the bone and some extra data to go along with it in its role as part of an item. the format for a part record looks like this:

struct
{
u32 flags;
u32 texResId;
u32 normalMapResId;
f32 pupilMoveRange;
};

the flags that are valid here are 0x01 to flag an eye pupil and 0x02 to flag an eye white to the eye movement system. besides the texture and normal map ids, the only other field is the pupil move range which is another value for eye movement that controls how far the pupil can move around within the eye white.

the next section is the part tree values which is just a big array of i32s. this data is used to keep track of which part is which when the game goes to apply burn markings to the textures. the specifics of how to build the tree and how to interpret it are pretty hairy so i'll leave that until a future time when it could actually be taken advantage of.

the next section after that is the region to burn grid cell mappings. these are just precomputed locations on the bone's burn grid that will act as the anchor points for animation regions. we check the anchor points as the bone burns away to see if it's time to turn off the region that is anchored there (for things like particle emitters or fire emitters.) the format looks like this:

struct
{
i32 regionUID;
i32 burnGridCellIdx;
};

so this just matches up a region from the bone's animation to a row major offset into the burn grid data for the bone.

after that there is a standard string table which contains things like the item's name and description for the catalog along with some id strings used for debugging.

finally, there is another section after the string table which is just a big array of unsigned bytes. each byte represents a grid cell in a bone's burn grid and simply indicates whether or not that cell is occupied at any time during the bone's animation by any of the bone parts. it's kind of like a union of all frames of animation over the lifetime of a bone.

and that's the end of the item data! now to figure out what to go into next...

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

Maybe combos could be handled next? I think those and letters are probably what people would want to mod most, after items of course.

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

Combos would definitely be awesome to edit next. For items, we're still missing the effects and animations, which I'm presuming are buried in effectmanifest.dat and animmanifest.dat respectively. I'd imagine that those are probably more complex than we need to get into at this point, though, and aren't terribly high on my priority list. Whatever we get to next is totally cool by me.

I'm working on finishing up reading all the item data in now and sticking it in some kind of usable XML format. Once that's done, I'll be reading the XML back in and saving it back in the itemmanifest.dat. This means that soon we'll be able to finally crop that item delivery time down to 0. Yay for speedruns!

Edit: Ok, the item XML now looks like this: http://pastebin.com/NCbA3WAK (Example file is data/items/AlarmClock/AlarmClock.xml). Any thoughts/suggestions? Ideally the burngrid would be something more usable and readable, but I'm not sure what the best way to do that in XML would be. Please also note that this is still version 1.0 of the game; in a couple of weeks I'll have high-speed interwebs back and I'll be able to update to newer versions of the game (as well as working on a Linux version, hopefully!)

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

combo data is in the resource vdata\combodb.dat. the header looks like this:

struct
{
BinHdrPtr combos;
BinHdrPtr items;
BinHdrPtr stringTableBytes;
};

the combos section defines the actual combinations of items that make up the combos. each record looks like this:

struct
{
u32 id;
i32 idStrTblIdx;
BinLocStrKey title;
i32 value;
i32 stampValue;
i32 firstItemIdx;
i32 numItems;
};

where id is an id for the combo itself, idStrTblIdx is a string table offset for the combo id string (used only for debugging), title is the combo title (which must contain a | character to manually designate the line break for the combo popup dialog), value is the coin value of getting the combo, stampValue is the stamp value of getting the combo, and firstItemIdx and numItems refer to the next section which lists out all the items that you need to get to get the combo.

the items section contains the collections of items that you need for each combo. each record looks like this:

struct
{
u32 itemId;
i32 picTexX;
i32 picTexY;
i32 picTexW;
i32 picTexH;
};

itemId is the id of the item and the other 4 locate the icon for the item within the combo items texture atlas (resource vdata\comboitempics.png). those icons are used on the combo list ui where you can see the full list of all the combos with their icons.

after the items section is a string table as usual.

modding the combos should be pretty straight forward except for the slight complication of the texture atlas for item icons which only contains icons for the items that we actually used in combos in the shipping game. one possible way to deal with that would be to first make a new comboitempics.png that has all the icons for all items in the game and then you could easily make new combos without worrying about not having the right icons. you'd probably want some tool support at some point to plug in the right texture x, y, width, height for the icons in the combo data so you wouldn't have to manually look up the right coordinates for each item as you were creating new combos.

Pages