Semi-tutorial: Making new combos and items

7 posts / 0 new
Last post
Joined: 08/03/2014 - 23:12
Semi-tutorial: Making new combos and items

First, a proposition: It would be really cool if someone make a GUI combos editor. I'm not a programmer, but I would imagine it with a text field to edit the combo name (starting with #1) and a drop-down selector with all the available items. Actually, for each combo, there would be 2-5 selectors. (I figured out that having 6 or more items in a combo makes it crash.) The program would automatically code and save the combos and the items in the combosdb.dat.xml file. OK, enough dreaming.

After working directly with several of the Little Inferno files, I learned a lot and discovered it wasn't too hard to edit combos, letters, and even items. I'll try to organize my thoughts in this semi-tutorial for anyone interested. Be warned: you'll run into spoilers if you haven't played through the game yet.

First of all, I made an allcombos.pak file that contains the necessary icons to include in new combos the items NOT included in combos in the original game: about a dozen catalog items for purchase, plus the Sugar Plumps Portrait, the Paper Heart, the Thermometer, the Egg (Extinction), the Hug Coupon, the Delete Button, and the Mouse Pad. The download is here:
Modding the game with allcombos.pak allows to use all the items in combos without worrying about creating their icons.

Before editing anything, I suggest you make a backup copy of the file, so you can always go back to something that works. This includes the Little Inferno.exe found in the liTools folder.

To edit combos, you'll need to open vdata/combosdb.dat.xml. As suggested by Daxar, change the id of the first combo to a unique 10-digit number, and number all following combo ids consecutively. That way, the combos won't show up as already solved. (FYI, the three chimney slots have player info saved in a file in a different location, so no matter which executable you run, you'll keep the same player stats... You'll want to start a new chimney when you start modding or play a new mod.)

As you edit each combo in the combos.dat.xml, change it's name and below change the items needed to solve the combo. You'll want to copy-paste the item code from the backup combos.dat.xml (you did back it up, right?). But since some items aren't in the original game's combo list, you can also copy-paste other items from the combos.dat.xml file found in my Pop Cultures release. (To-do: a text file with all the items code for easy copy-pasting.)

As you edit the combos, you'll also remember that the first combos are from Catalog 1, the next several are from Catalog 2 (plus 1), and so on. So you won't want to use the Sun in your first combos. The combos from the unavailable catalogs show up as grayed. I don't know if the game strictly follows this break-down, but here's what I discovered:

Combos 1-6 (Bike Pirate - Movie Night) are all from Catalog 1
Combos 7-16 (Seafarers - LOL Kitty): Catalog 2 (plus 1)
Combos 17-27 (Catfish - Freaked Out Food): Catalog 3 (plus 1 and 2)
Combos 28-40 (Wooden Block - Rosy): Catalog 4
Combos 41-57 (Howl at the Moon - Pill Popper): Catalog 5
Combos 58-77 (Bearskin Run - Diseased): Catalog 6
Combos 78-99 (Chain E-mail - Future's So Bright): Catalog 7

You can require 2-5 items per combo, although only 2 or 3 show up as icons. And like I mentioned, all the items given to you by Sugar Plumps and Miss Nancy can be required to solve combos (with their proper code in the combos.dat.xml). But unless you do some editing of the letters, you can't require the Mouse Pad for a combo because your receiving it depends on solving all the combos. (However, that can be changed, which I'll explain in my next post.)

Follow Daxar's explanation to create a yourcombos.pak.filelist.txt and yourcombos.pak so you can share your combos with the rest of the world.

Joined: 08/03/2014 - 23:12

In this post, I'll explain how to edit letters and add new items.

Some of this has already been explained by Daxar, but just to share what I've learned. You can edit the vdata/lettersdb.xml file with all the letters. It's easy to figure out where to edit the pages of each letter, but there's also some coding that can be changed to suit your needs. You'll probably want to edit some of the letters to give combo hints, and I don't recommend deleting any of the letters. (However, you can keep the letter but delete pages of the letter, no problem.) What I mean is, each letter has a unique id, and I don't know if the game will crash if any letter ids are missing. When I was testing my mod, often I couldn't buy new catalogs because of unresolved letters, although I had bought all the items. Some letters just hadn't come yet, so they seem necessary.

If you're going to add a new letter, copy-paste all the code from the opening to the closing of an existing letter. Then edit each page's content. If you don't know other languages, just edit the English. Here are what some of the letter variables mean (the starred ones seem to be necessary so the game doesn't crash):
*borderAnimExportId = the stationary of who sends the letter: Miss Nancy, Sugar Plumps, or the Weather Man. I haven't tried to create any new characters, but it may be possible.
*delayTimeSec = the delay in seconds of when you first buy the specified catalog and when the letter arrives in your mailbox
*depCatalogId = the specified catalog when the letter can arrive (related to delay time).
0 = no specified catalog
1707432420 = Chimney Stuffer
1707432036 = Totally Recalled Toys
1707432164 = Snooty Foods
1707432804 = First Person Shopper
1707432932 = Miss Nancy's Guide
1707432548 = Show & Awe
1707432676 = Existence, Now
*depCatalogItemCount = Quantity of items from specified catalog needed for letter to appear

I have to go, but later I'll continue this tutorial.

Joined: 08/03/2014 - 23:12

To continue...

*id = the letter's ID, obviously necessary, and should be unique
sendTimeSec = I think this means 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. I'll explain more later how to add new items.
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.
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 = 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 letter, 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" = I think 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 times; all the catalogs have stars.

If there are any other letter variables, we'll add them later.

Now on to adding new items. There are two types of items, all in the data/items folder. The items sold in the catalogs have lots of files that don't seem to be editable, so I can't help with those. However, all the 7 items sent to you by Sugar Plumps and Miss Nancy can be edited. You won't actually create new items, so what we're going to do is hi-jack the existing special items. (I tried to create a new item with its unique folder and ID, but it seems the compiler liCompress.exe doesn't correctly compress the item xml file, for example HugCoupon.xml.) You'll need to find an image with a background about 400 x 400 and edit it with GIMP or another image editing program.

So each special item's folder contains 7 files. For example, HugCoupon, but you want to make a car. First, make a backup copy of the HugCoupon folder, then here's what to do:
Coupon.png = Its dimensions are 414x209, and on the safe side, I'd edit your new car image to the same dimesions. If you don't want to distort your image, just make the canvas 414x209 and leave some background space on the edges. Your car should have a white background, and you'll need to make that background color the Alpha channel (transparent). Then save your car image to overwrite the Coupon.png. You're not actually creating a new item, just overwriting the image of the Coupon, and the game executable will still refer to your car as HugCoupon.
Coupon.png.normal = just leave it (I don't understand this file's purpose, but it's not necessary to edit it.)
colorbgicon = just leave it
coloritemicon = Edit your car image to make an icon 153x153, again with the background color as the Alpha channel. The game's icons have colored squares with rounded corners, so you can make your icon like that if you want. The important thing is that it's 153x153 with a transparent Alpha channel. If you have to save this file with an extension, name it coloritemicon.png. Then delete the existing file, and rename your file without the extention.
greybgicon = just leave it
HugCoupon.anim.xml = just leave it
HugCoupon.xml = You can open it and edit the variables, such as the item's name and description near the bottom. However, the liCompress.exe doesn't seem to overwrite this file, and any changes aren't reflected in the game. (This glitch doesn't make liCompress.exe nor the game crash.) The point is, your item will be displayed in the sending letter from Sugar Plumps or Miss Nancy with the new image you made, but the letter still calls it Hug Coupon in the text. Maybe someone with programming experience could take a look at this glitch and see if there's a work-around. Fixing this glitch would open up the possibility of including more new items, because you'd actually create a new data/items/ToyCar folder, with its 7 unique files, instead of hi-jacking the HugCoupon folder.

But for now, there are 7 potential special items with their IDs that can be hi-jacked: SugarPlumpsPortrait (3173815125), PaperHeart (1176340380), Thermometer (3644401961), HugCoupon (4261522846), Extinction (3540172681), DeleteButton (111574311), and MousePad (2557218357). Just open their folders and overwrite with your edited images, always naming your files THE SAME as the files already in the folders.

Now you just need to edit one more file. Find vdata/comboitempics.png and open it with your image-editing program. (You made a backup copy right?) Also open each coloritemicon you made. Change the dimensions of the coloritemicon to 64x64, then paste it OVER the original icon, such as the Hug Coupon. If you open the comboitempics.png of the original game, you won't see these icons. Rather, open and edit the comboitempics.png included in the allcombos.pak. Make sure this png retains its Alpha channel transparency when you save it to overwrite the file.

Now add all your new items to your newcombos.pak.filelist.txt file. You don't need to list the files you didn't edit. For example,

(Like I stated before, the liCompress.exe doesn't seem to overwrite the xml file.)

Now how do we use these hi-jacked special items? Remember, you'll always need to refer to them by their original names (in combos) and IDs (in letters). You can use the letter variables explained above to send (attach) these items in a letter. This is useful, since they can't be bought in the catalogs. You can even create new letters with these items attached, with variables to make them sent after a win, or after all the items have been bought, or all the catalogs have stars. Or you can create new letters to exchange a catalog item for a special item, like when you send Sugar Plumps a magnet and receive a thermometer in the game. You can also require these special items in combos, but you'll probably want to send the special item again later in the game to give the player another chance in case they already burnt it.

In summary, I hope others dare to get their hands a little dirty with new combos and special items. And I also hope someone programs a combo editor, which I can't help with. If you have any questions, here's the place to ask. Also, if you're having trouble editing the images, I can help in my free time.

Joined: 08/03/2014 - 23:12

One more thing. I was trying to edit the three picture files (the cats, the dog, and the antique photo). They're in at least three different folders, and I don't have time to explain all my attempts, but the only change reflected in the game is the catalog animation. (You can see this if you play my Pop Cultures combos.) However, the original pictures show up in the photo selector and in the mailbox when you want to burn them. If anyone wants to figure out a work-around for this glitch, I'd appreciate it.

Joined: 08/03/2014 - 23:12

After stating above that I didn't think the catalog items were mod-able, I decided to try the same hi-jack technique on one of them, Fragile China. Here are the results:
(No offense to any Michael Bolton fans.)

Once again, I edited the FragileChina.xml to change the name and description, but the changes don't show up in the game. (Still waiting for someone to fix this glitch if possible.) But as you can see, the images show up quite nicely.

Some catalog items seem to be more mod-able than others, so we'll have to keep experimenting. But the idea is the same as above to hi-jack a catalog item. After backing up the item's folder, edit the existing images with your own images, making sure to keep the same dimensions and the transparent Alpha channel. (Maybe the same dimensions aren't important, but I haven't tested that yet.) Then overwrite the existing files, add them to your myitems.pak.filelist.txt, and compress your myitems.pak. Your mod is now ready.

For a limited time only, taking requests on new items.

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

The "glitches" you're referring to may have something to do with the fact that item data is stored in vdata/itemmanifest.dat. Adding that to your .filelist.txt may do the trick. Adding "data/items/HugCoupon/HugCoupon.xml" does nothing in the current version of liTools.

Joined: 08/03/2014 - 23:12

That did the trick! This looks very hopeful for adding as many new items as we want, without hi-jacking the other special items.

I don't think I'll be making another combos list for a while, but I'm willing to help anyone add items to the game.

If anyone wants to see what the CD item looks like in Catalog 3, here's the download:
You'll want to backup the data/items/FragileChina folder before modding with this pak, so you can get the original item back.