Tutorial for Modding

13 posts / 0 new
Last post
Joined: 08/03/2014 - 23:12
Tutorial for Modding

This is a tutorial for modifying the Little Inferno game. This tutorial is written for players with basic computer knowledge, so some might find it a little elementary. However, our aim is to make this as complete as possible. You will be using tools to modify a copy of the game, not the original, so you can always play the game as you bought it. This tutorial refers to all elements of the game, so if you haven't played through the whole game, please be warned that there will be spoilers. You can comment to ask questions, and this tutorial will be updated when needed.

liTools v0.3.7. Several tools come with this download, which includes its own README.txt. These tools allow you to decompress the game, view individual files, and recompress modifications. Even if you only plan to modify your game with others' addins, you'll need liTools. So far, liTools is incompatible with the Steam version of Little Inferno. Sorry.

Notepad++, or any other text editor. Many of the files are written in XML, a coding language. To edit them, open them with a text editor.

GIMP 2. Other paint programs are also fine, but this tutorial teaches you with GIMP. Your paint program must have the ability to work with layers, select a transparent Alpha channel, and save in PNG format. (Windows' Paint isn't adecuate.)

Audacity. Other audio programs are also fine, but this tutorial teaches you with Audacity. Your audio program must have the ability to create two channels of audio, and save in OGG format, quality 3.

Getting started
Download and unzip the current version of liTools. Copy-paste your Little Inferno.exe from the Programs folder to the liTools folder. Now you've made a backup, and you can also play the original, no worries. (Note: Your player preferences are stored in another file, and when you open any other copy of the game, you will get the same player preferences. For some addins, you'll want to start a new chimney and play through the game from the beginning.)

The README.TXT included in liTools is quite informative, but you might not be interested in all its capabilities. You can also follow these similar instructions to decompress the game.

1. Drag-and-drop "Little Inferno.exe" to strip.exe. Three files, "embed.pak", "frontend.pak" and "resource.pak" should result. Also, the Little Inferno.exe should be quite smaller, around 3.71 MB. If you're not planning to make your own mods, just to use addins, you don't need to follow step 2.

2. If you plan to make your own mods, drag-and-drop the three files "embed.pak", "frontend.pak" and "resource.pak" (all together or one at a time) to liDecompress.exe. This step will take some time, and two folders, "data" and "vdata" should result. Inside you can see the individual game files that can be edited.

Adding addins

Some players have created addins to modify the game, such as replacing the catalog items with new items, or changing the economics of the game. Keep in mind that these addins are player-created, which means they might not be as spectacular as the original game, and some might not even work. (See Troubleshooting for problems.)

When you've downloaded (and unzipped) an addin, the file will be called addin.pak. There might also be a restore.pak file to uninstall the addin. To use the addin, drag-and-drop the file to modManage.exe. Then open the Little Inferno.exe from inside the liTools folder. Play the game and see the effect of the addin.

If you want to undo the effects of an addin, just drag-and-drop and drop the accompanying restore.pak file that comes with it to modManage.exe. Only some addins come with restore files, although we encourage all modders to make and distribute them with their mods.

Several elements of the game can be modified, and there are always more possibilities. Here we explain how to modify several elements. It's always a good idea to make copies of the file or files you're editing, so if the game crashes, you can always use the working (original) file. Also, start each new mod in a new liTools folder. Especially if you're including the itemmanifest.dat or sndmanifest.dat in your filelist, you won't wan to compress any files from other projects into your new mod. (These two files mentioned compress all the item XML and sound ids at once.)

For any mod, first create a pak file and a filelist file. You can make copies of "embed.pak" and "embed.pak.filelist.txt" and rename them however you want, such as "mymod.pak" and "mymod.pak.filelist.txt". You can open and erase all the data in the filelist, and here you will be listing all the files you edit.

Editing Items
The game has a total of 140 catalog items, plus 7 special items that are sent to you in letters during the game. These items are found in the data/items folder. The photos for My Pictures are located elsewhere, which will be explained later.

The items vary in complexity, from simple objects (images) to burn, to bodies with joints that move, and chain-reactions. It's best to start with something simple, and from there discover how to do more complex editing.

Open the item's folder in data/items. Here you will see 7 basic files, possibly more. You will be editing these files WITHOUT changing their file names, and you can think of this method as hi-jacking the item. The internal code of the game will always refer to your item as its original name, but what the player sees when playing the addin will be what you create.

For example, we will hi-jack the LittleInfernoBeta item. These are the item's files:
beta.disk.png - An image file of the Little Inferno Beta floppy disk
beta.disk.png.normal - A "shadow" of the disk
BetaMusic.flac.ogg - The sound file played when the disk is burned (see Editing Sounds below)
colorbgicon - A grayscale icon of the item for the catalog
coloritemicon - A color icon of the item for the catalog, and also for solving a combo
greybgicon - A black icon of the item
LittleInfernoBeta.anim.xml - Code for animating the item (uneditable)
LittleInfernoBeta.xml - XML code with several editable variables

Now we'll edit each editable file and leave the others as-is. First you'll want to find an image at least 200x201 pixels. Your image should on a solid background, which we'll make transparent. For example, we can use a Super Mario Bros. cartridge. Open the image with GIMP and set the image size (not canvas size) to width=200 or height=201, whichever causes the opposite dimension to be smaller. You don't want to end up with a width or height greater than these constraints. Now set the canvas size (not the image size) to make the image 200x201 pixels. You'll need to set either the width to 200 or the height to 201, and reposition the object to the center or the bottom, whatever your preference.

Using the Fuzzy Select Tool, click on the background. Then choose Color to Alpha... from the Colors menu. This should make your background transparent (shown as checkered). Proceed to select and delete (Del button) all the background space around your object. Sometimes an outline still surrounds the object, even after deleting the background, so you'll want to carefully select and delete all the background pixels around the object to clean it up.

When satisfied with your image, export your image as "beta.disk.png" to the LittleInfernoBeta folder. You will overwrite the existing file. For some other items, you will edit several PNG files with your own images.

Open the coloritemicon file with GIMP. Also open the image file you found, or just open beta.disk.png. You'll see in the coloritemicon that the disk is slightly rotated. (Icons for other items are often cropped, showing just part of the item.) Make the image size of your object 139x139, then copy-paste it over the Beta disk in the coloritemicon. Clean up your icon so that only your object shows. The corners of the colored background square should be rounded and transparent (checkered), so make sure this hasn't been lost.

Alternatively, you don't have to make your icon look similar to the other icons. However, your icon must be 153x153 and have a transparent Alpha channel.

When finished, export or overwrite your image as "coloritemicon". If GIMP requires a file extension, name it "coloritemicon.png". Then in the LittleInfernoBeta folder, delete the original coloritemicon file and rename your file without the extension, to replace the original.

If you're thorough, you can use your coloritemicon to create and replace the colorbgicon and greybgicon files, changing the colors to grayscale. If not, just leave them as-is.

To edit the LittleInfernoBeta.xml file, open it with Notepad or any other text editor. Here we'll explain what some of the variables mean and how to change them. These variables should be general of most items.

costCoins - Set the price in the catalog, greater than 0
enableHFlip - Set at 1 (true) if you want your item to be flippable horizontally (can face left or right)
shipTimeSec - Set the delay in seconds to open your item package, greater than 0
valueCoins - Set the value of coins you get from burning the item
<string lang="en" data="LittleInfernoBeta"/>

data - Do NOT change this data field.
<name strid="76935956">
<string lang="en" data="Beta Version"/>

data - Set the name as it appears in the catalog or letters (in any or all languages)
<description strid="2752671764">
<string lang="en" data="In development since 1986. Relive the magic!"/>

data - Set the description as it appears in the catalog (in any or all languages)

In this example, now you need to update your filelist. Open mymod.pak.filelist.txt and write only the following lines:

If you also edited the colorbgicon and greybgicon files, add them too. You don't need to include the XML file, because it's included in the itemmanifest.dat file (which you don't have to edit).

Now drag-and-drop your mymod.pak to liCompress.exe. If you get any errors, check all the files you edited and refer to Troubleshooting. If everything compressed, you can drag-and-drop mymod.pak to modManage.exe and play the game with your addin. It's always good to make sure the addin works before sharing it with the community.

Creating a Restore Mod
It's always a good idea to create a mod to restore, or undo, whatever modifications you're making. Even if the mod works fine, you and the community will eventually want to play the game without your mod installed. When sharing mods, it's always good courtesy to distribute a restore mod as well.

After creating your mod, make copies of both your mymod.pak and mymod.pak.filelist.txt files. As in the example above for modifying the LittleInfernoBeta, rename the two copied files to "libeta_restore.pak" and "libeta_restore.pak.filelist.txt". (The file names should reflect whatever will be restored.)

Now you'll need to compress this pak file in a SEPARATE liTools folder that hasn't been modified in any way. This is another reason why it's good to make a backup of all folders. When you drag-and-drop your libeta_restore.pak to liCompress.exe in the clean liTools folder, all the original files will be compressed. Now you have a mod to restore the LittleInfernoBeta.

Alternative Restoration

As suggested by movildima, modders can also distribute the "*.filelist.txt" with their mod. The filelist should reference all the overwritten files. For example, "undo_whoopie.pak.filelist.txt" can be run through liCompress.exe, then modManage.exe. This essentially undoes the Whoopie Cushion mod with which the undo filelist was distributed.

Editing Sounds
The LittleInfernoBeta folder also contains one sound, "BetaMusic.flac.ogg", which plays when the disk is burned. You can also modify sounds in the game.

Open or import your sound file with Audacity. Edit the sound clip however you want, trying to make it about the same duration as the original sound. If it has only one channel, copy-paste the audio to a second channel. Then export the audio to the LittleInfernoBeta. (Saving will save your file as a project, which isn't what you want.) Overwrite the file "BetaMusic.flac.ogg" and choose Options-->Quality=3 in the save dialog box. Whatever audio format you started with, Audacity should export it in the correct format for the game.

Now you need to run the recalcSoundManifest.exe program. This automatically updates the sndmanifest.dat file.

Finally, add to your mymod.pak.filelist.txt the following lines:

And now it's always good to compress your restore mod in the clean copy of liTools, so that the original sound can also be restored.

Editing Letters
Open the file vdata/letterdb.dat.xml to edit the letters sent to you by Miss Nancy, Sugar Plumps and the Weather Man. Each letter is coded "Letter Variables
*borderAnimExportId – This variable refers to the sender's stationary. "1247044769" is Miss Nancy, "3374510817" is Sugar Plumps, and "649798455" is the Weather Man.
*delayTimeSec – This variable refers to the delay in seconds for the arrival of your letter.
*depCatalogId – This variable refers to the current catalog when the letter can arrive. "0" is before any catalog, "1707432420" is Chimney Stuffer, "1707432036" is Totally Recalled Toys, "1707432164" is Snooty Foodie, "1707432804" is First Person Shopper, "1707432932" is Ms. Nancy's Guide to Stylish Living, "1707432548" is Shop and Awe, and "1707432676" is Existence, Now.
*depCatalogItemCount – This variable refers to how many items have been bought when the letter can arrive. "0" is before any items have been bought.
*id – This variable is the letter's ID, obviously necessary, and should be unique.
sendTimeSec – This variable refers to how long the letter sits in your mailbox before it's ready to open
type="attachCatalog" attachedCatalogId="1707432420" - These two are used just once in the game, when Miss Nancy sends you Catalog 1. You could make another letter with these variables, change the catalogid, and send another Catalog, if you want.
type="attachItem" attachedItemId="3173815125" - These two are probably the most useful in terms of modding. If you use the variables, and specify the attachedItemId, you can send items during the game just like Sugar Plumps does. Item IDs can be found in the vdata/itemmanifest.dat file.
dependsLetterId - This value refers to any other letter's ID, requiring the other letter to be dealt with first before this letter appears in your maixbox. For example, first Sugar Plumps sends you something, then she sends you a follow-up letter.
type="requestFollowUp" - This variable is used to request again from the sender the item he or she wants sent. See the original letter code to see how it's used with other variables.
reqParentLetterId - Similar to the dependsLetterId, this one is for sending an error letter when you send the wrong item back to Sugar Plumps.
type="request" - This variable makes the letter request an item at the end, like the Jar of Fireflies. In the same letter you must specify a requested field with the name of the item. The name must be referenced as in the items list (i.e. no spaces).
reqChildWrongLetterId - This variable refers to the ID of the letter that tells you you've sent the wrong item.
depAllItemsUsed="1" - This variable triggers a letter to be sent when every item has been bought, and is very useful to include in a letter to send a special item. (More on that later.)
burnableAfterRead="0" - This variable, if set at 0 (false), means the letter stays in your mailbox and can't be burned. Sugar Plumps' last letter telling you to burn 4 items together with hints uses this variable, making the letter quite important. If you want to make an important letter, use this variable, but remember, it'll clog up the mailbox.
deliverable="0" - This refers to the letter that doesn't come to your mailbox, but is rather given to you personally by the Mail Man in the street.
depAllCombo="1" - If true, the letter won't arrive until you've solved all the combos. (I wish there were a variable that specified how many combos must be solved, but unfortunately, there is only this AllCombo variable.)
deliverAfterWin="1" - If true, the letter won't arrive until after you've visited Tomorrow Corporation and the Weather Man's balloon.
depAllStars="1" - If true, the letter won't arrive until after you've bought each item three items; all the catalogs have stars.
RemoveAfterRead="1" – If true, the letter will disappear after you read it.

Page Variables
A single letter can have one or more pages. Each page is contained within a <page markup and has variables which can be edited.
musicSoundResId - This variable refers to the music played when the page is opened. These can be found in the "date/music" folder. As explained above to edit sounds, this music can also be edited and overwritten with your own.
senderPicExportId - This variable shows a pic of who sends the letter, which can be found and edited in the "data/animations/letterSender" folder. You can overwrite any of these images with your own, always maintaining the dimensions (315x235) and Alpha channel transparency.

  • "2951043556" is Ms. Nancy.
  • "1990334873" is Ms. Nancy congratulating you.
  • "1458686522" is Sugar Plumps.
  • "1206996402" is Sugar Plumps right before she burns her house down.
  • "606807920" is Sugar Plumps when she burns her house down.
  • "2989791848" is Sugar Plumps after she burns her house down.
  • "151322133" is Sugar Plumps reminding you about the sunglasses.
  • "2989791848" is Sugar Plumps instructing you to burn your house down.
  • "1006781480" is Sugar Plumps reminiscing about her days playing Little Inferno.
  • "4138187844" is Sugar Plumps telling you she didn't burn up.
  • "1196654938" is Sugar Plumps from the beach.
  • "649798455" is the Weather Man.

wordsSoundResId - This variable refers to the sound effect of the words being typed on the page.

  • "2094482604" is Ms. Nancy.
  • "484346969" is Sugar Plumps.
  • "2274798221" is Sugar Plumps telling you to burn your house down.
  • "1749472574" is the Weather Man.

pagePicTexResId - This variable includes an image from the "data/textures/MailImages" folder. These images can be edited and overwritten with your own.
pagePicScale - This variable determines the size of the image. 1=100%.

Creating new senders
In the original game, three people send you letters: Ms. Nancy, Sugar Plumps, and the Weather Man. Each sender has their own identity, and the game references these identities through IDs. Each sender is unique in his or her letter stationary (borderAnimExportId), sender pic (senderPicExportId), music (musicsoundresid), and typing sound effect (wordssoundresid). You can create new senders by hi-jacking any of these characters. In effect, the original character won't exist anymore, but in its place, you'll be creating a new character. Use the variables explained above to reference the hi-jacked character's files in your letters and pages. I recommend hi-jacking the Weather Man, because he doesn't play a vital role in the game play.

The stationary images are found in the "data/animations/letterBackdrop" folder. You can edit and overwrite the images to create your character's stationary.

Sender pic
The sender pics are found in the "data/animations/letterSender" folder. You can edit and overwrite the images to create your character's pic.

The music files are found in the "data/music" folder. You can edit and overwrite the music files to create your character's signature music.

Typing sound effect
These sound effects are somewhere in the "data" folder. You don't have to edit them.

Editing Combos
Coming soon.

If you broke your game, or just can't get an addin to work, refer to these tips. If you get stuck, here we will also explain modding in more detail than is necessary in the tutorial. Reply to ask questions.

1. liTools and these mods are incompatible with the Steam version of Little Inferno. Get a working version here.

Joined: 08/03/2014 - 23:12

I started writing this tutorial and am still working on some of the sections. I also plan to include screenshots to show some of the steps.

I don't intend for this tutorial to be a solo project. Any helpful comments made to this topic will be included in an edit above, giving credit to the author.

Also, please comment with suggestions if I've made any errors.

Joined: 09/16/2014 - 21:46

Edit:it seems to not be this at all its not from this i will get back to you if i am still having this problem the steam ini failed is from something else not from mods and all

I can't seem to get this to run right with the addins on the steam version i am gussing these mods are not compatible with the steam version its very confusing how to make the mods from the addins link to work but i think i figured it out put the files in the mod merge and then it pops out 2 pak files and a mods results etc but unfortunately i put the exe in the tools folder where the 2 pak files and mod results file is then i click it needs the steam app ini thingy copied that to there and then keeps saying steam ini failed so obviously idk what am i doing wrong i been waiting for mods for little inferno but this is jsut really confusing i think it isnt compatible with steam version sorry if i am very confusing and my grammer and all is horrid so hope i am understable.thanks for reading and hope to hear some help for this

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

I just checked, and yep, it seems that mods don't work with the Steam version of Little Inferno. Sorry to disappoint.

Joined: 09/16/2014 - 21:46

yah they don't effect the game at all sadly like they don't change anything wait i just realized i got my version from humble bundle. I do got a drm free version and android version i totolly forgot lol so not a total lose so any plans to make this work with the steam version Beta Ninja

Joined: 08/03/2014 - 23:12

Sorry, I don't know anything about the difference between the Steam version and the Humble version, just that they're different. And I didn't create liTools. All I know is that it only works on Little Inferno v1.2.

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

Yeah, the Humble Bundle version should work fine. It's the version I used to make liTools, anyway. Let me know if you run into any trouble with that.

@Beta Ninja: The Steam version is the same in every way, it's just Steam-based, which means that when the game launches, it checks and sees if it's the base Steam game. So copying the executable to the mod folder and stripping it works fine... until you launch it, at which point it just launches the original unmodded Steam copy.

Joined: 08/03/2014 - 23:12

@Daxar, what if someone with the Steam version ran liTools directly in the Programs folder of the original game? Would it work then? And can you add anything to this tutorial?

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

It might work, but then you're running into the issue that you're altering your original installation, which is never a good thing. If someone does that, definitely tell them to back it up first!

I'd recommend Notepad++ over Notepad as a text editor. Notepad REALLY sucks for editing XML.

I'm also not sure about restore.pak stuff. While it's a good concept, it prevents people from just distributing the .pak files individually as mods, distributes the game's original assets, and that sorta thing. I suppose it's just personal preference, to be honest. Especially since there's no way to undo a modManage run.

Joined: 08/03/2014 - 23:12

I don't like Notepad either, so I'll check Notepad++.

You're right, it's a matter of personal preference. It didn't occur to me with the first mods I made, but I actually prefer to make my own restore.pak's to undo my mods. It's kind of a mute point now since I don't see anyone else modding at this point. Any idea what happened to other modders when you first released liTools? Your program really opens up the game to a lot of possibilities, but I haven't seen much that's been shared.

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

I think a good way to solve this is having a list of files (pretty much an *.filelist.txt) that has every overriden file. If you want to undo everything, just run this file through LiCompress and then ModManage. This is what I was trying to achieve when making my GUI Mod Manager (aka FlameTool). Saddly, I eventually stopped working on that.
Maybe I should try to continue that project, since there is still some interest into modding LI, especially since Beta Ninja joined.

Joined: 08/03/2014 - 23:12

Movildima, I think I understand what you mean. It took me a while to remember how the mod tools work. Good suggestion! I'll edit the tutorial soon.

When I tried the LI Mod Manager, I just got a dll error. It would be cool to have your FlameTool if it worked for me.

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

Well, it's not working right now, I have yet to finish it! There's some problems with Qt SDK that don't let me distribute it without dll's.