Update to v0.36:
- Added a Background Editor Tool. It allows to convert images into Steam background format files and then import them. More on that below.
- Added a CIL Macro to make the engine accept the converted backgrounds (in particular, for changing the resolution).
- Added support for the backgrounds that contain titles (Ice Cavern entrance, Qu's Marsh entrance, etc...).
- Fixed the CIL Macro "Unlock Ability Learning": it made the few stage battles at the start of the game bug.
- Improved the Script Editor (replaced the default variable names, added a few safety checks when parsing functions, added support for single-lines comments, ...).
So, the big new thing is the background editor. Thanks to it, upscaling and modifying backgrounds is possible. There are still a few flaws with the quality (people noticed seam lines or black pixels in-game). With a bit of work on the images, it can be perfected though.
A big hurray to Fraggoso who started to upscale and fix the images.
If you want to import custom backgrounds, you should first go to "CIL Code -> Macros", apply the "Custom Backgrounds" macro and save the Steam mod: it will make the engine compatible with the custom backgrounds (in particular if you change the resolution). If you don't do it first, do it last :p
So, the background editor gets available once you got to the "Environment -> Fields" panel. It has 3 panels itself :
- Converter -> From a few images (1 image per layer), create a Steam formatted file (.tex) of the background that can replace the default files in the game's assets.
- Mass Converter -> Same as converter, but it can do several fields consequently. Hopefully, the program doesn't run out of memory too soon (backgrounds are very RAM consuming).
- Mass Importer -> Take the .tex files and import them in the game's assets (in the StreamingAssets folder, p0data11.bin to p0data19.bin).
The converter lets you verify that the images are loaded correctly and that they match with the tilesets. There are several parameters:
1) Background Image: Select one of the layers of the background. All the layers must be in the same directory and be named
SomeName0.bmp
SomeName1.bmp
SomeName2.bmp
etc...
For multi-background fields (such as the Prima Vista's Cargo Room, that has 2 cameras and thus 2 images), it must be
SomeName0_0.bmp
SomeName0_1.bmp
...
SomeName1_0.bmp
...
Each of the bmp (or tga or tiff) must contain a layer which correspond to one of the field's tile block.
The Gimp add-on
save-layers-tiff-24 is perfect for generating each layers with the right name from the .tiff images exported by HW.
2) Destination Folder: Where to save the Steam formatted file. The name of the .tex file is generated to match the background and should not be modified.
3) Use Game Tiling/Custom Tiling: Unavailable for now. In the future, this will allow to import entirely custom backgrounds, but for now, they need to match the normal ones (same number of layers, each of them placed at the same place in the whole image...).
4) Field: Choose the field corresponding to your background image.
5) Sort Layers by depth: The layers can be sorted either by their ID (the ID is used in the scripts, for instance) or by depth. Hades Workshop export the layers of the backgrounds by depth so you can usually let it checked.
6) Revert Layer Order: When checked, the foreground-most image is numbered "0" while it's the background-most image when unchecked. With the Gimp add-on, the order is reverted.
7) List of Tile Blocks: Select a few of them to verify that the layer match with the tile block. A greyed area is drawned where the layer is expected to be.
8) Resolution: By default, resolution is 32, meaning 32 pixels per tile. If you use upscaled images, modify this (resolution can go up to 123 for now, which is a bit less than 4x the Steam resolution and is already huge files ; a resolution of 64 seems honest for me).
9) Compression Quality: Select the compression algorithm to use. High quality is slower while low quality is faster. In any case, it doesn't change the file size of the output, only the time required to convert it.
Finally, there's also the case of backgrounds containing a title. Since those titles are present for every languages in the Steam version, you need to have layers for them in every languages as well (usually, it's 2 layers per language). The English (US) title layers should be at their usual places, and the other title layers must come after all the others in this order :
English (UK), Japanese, German, French, Italian, Spanish.
Again, the layers as they are exported by HW are in the correct order.
In the Mass Converter panel, you find the same parameters but the image file names are also indexed by the field ID (or are inside a folder indexed by the field ID). With the default settings, "Field0\Background1_2.tif" corresponds to the 3rd layer of the 2nd background of the 1st field (Prima Vista/Cargo Room). You may also use the indexing of the real IDs of the fields (used in the scripts among other places) instead of their order. With that option, Prima Vista/Cargo Room has an ID of 50 and thus should be placed in the folder "Field50" instead.
A window displays how many backgrounds were spotted and converted and whether there was a problem.
In the Mass Importer, you select a FF9_Launcher.exe. You can choose the one that is currently opened in HW, but the program may crash then after leaving the background editor (that's quite harmless if you weren't making a mod besides the backgrounds though).
One last thing, I've been told that this version crashes on start (when opening a game). But it works just fine for me, so can anyone confirm that it crashes or that it works correctly? Thank you.
I'll soon write a post about the current status of FF9 modding. What has been done and what can be done next.