Feed The Beast Wiki

Follow the Feed The Beast Wiki on Discord or Mastodon!

READ MORE

Feed The Beast Wiki
Register
Advertisement
* @PrincessTwilightSparkle hands PaladinOne a 100 page manual with everything written in invisible ink
retep998 , FTB Wiki IRC

This is that manual.

Introduction[]

You may have noticed around the wiki we have Cg, Infobox, and Navbox templates that show icons of blocks and items from mods. These images need to come from somewhere. The number of items covered would make individual image files incredibly impractical. And as such, the Tilesheet Extension was developed. The Extension has two components that are commonly interacted with: the sheet list and the item list. A Tilesheet is a single image file built out of images of all of the blocks and items that exist in a mod; the sheet list is a list of all tilesheets that have been created. The Item List is a list of every single block and item that exists on all tilesheets on the wiki, what mod's tilesheet the item comes from, and where exactly on the tilesheet that item is. Whenever {{Gc}} or {{NI}} references a mod name and item name, those values are fed into the tilesheet extension, and it returns the relevant item icon.

Preparation[]

retep998 has written a program that does most of the actual work for us. However, there are still certain prerequisites to updating a tilesheet.

  1. The program is written in Rust. As such, the first thing necessary to use it is an installation of Rust stable. On Linux you must use the command lines from the download page for the installation. It is recommended that you install Rust using Rustup.
  2. The program itself. Put the folder of it in some obvious place.
  3. Because every single change to an entry in the item list causes a change to appear in Special:RecentChanges, to reduce spam all full tilesheet updates must be done on a bot account with editor user rights. To acquire an editor bot account, contact a wiki administrator.

Preparing the Tilesheet Program[]

Go to the folder where you placed the program you downloaded (ftb-rs), and open a command prompt in it. Enter this line into it:

cargo build

This command will cause Rust to download all dependencies for the tilesheet builder program and compile it to run. If anything goes wrong, hope it doesn't, then contact retep998 on IRC or Discord.

After you have done this, create a new folder in ftb-rs named tilesheets. In that folder, put a folder with your renders and name it the abbreviation.

A "ftb.json" file is also required in the ftb-rs folder, containing the bot's credentials. When the program is first ran and there is no such file, a sample will be autogenerated that must be tweaked in order for the program to function. The ftb.json file has the following parameters:

  • useragent: The actual username of the bot, such as "PonyButt" and "ESAEBSAD." This defaults to "ftb-rs."
  • username: The login username of the bot, which is generated by Special:BotPasswords. This username is the one that is structured as the regular username, plus the "@" character, plus a suffix of some sort, such as "Xbony2@MyRobot." This defaults to "insert username here."
  • password: The login password of the bot, which is generated by Special:BotPasswords. This password is the one that is 32 characters long and are made up of a random combination of lowercase letters and numbers. This defaults to "insert password here."
  • baseapi: A link to the base API web address. This defaults to "https://ftb.fandom.com/api.php," and it should not be changed.

Alternative method: Nix package manager[]

If you have the Nix package manager installed, a Nix User Repository for the Feed The Beast Wiki contains packages for ftb-rs, among other things.

Assuming you have Nix installed, you can simply run nix shell 'github:FTB-Gamepedia/nur-ftbwiki#ftb-rs' and ftb-rs will be added to your environment temporarily. After you have executed this command, create a new directory in any location, then create a subdirectory called tilesheets. After that, return to the previous section and skip the first paragraph.

Preparing to Update or Create a Tilesheet[]

Note for both, NEI and Block Renderer: If you use Optifine and extract icons out of the game, deactivate "Fast Render" in the graphic settings! If it is activated, the extracted icons have a black background (instead of transparent), and in NEI some textures may be missing.
LuminousLizard Editor

The first portion of this is done in Minecraft itself, and unfortunately at present can only be done easily on Minecraft 1.7.10 or higher.

IconExporter (Minecraft 1.15, 1.16, 1.18, 1.19)[]

IconExporter is another option which supports some versions that BlockRenderer doesn't yet.

With IconExporter you can only export ALL icons included in the used Minecraft instance in one operation. There is NO option to select a specific mod. Therefore it's better to create an instance only with the desired mod to export the icons (minecraft vanilla icons included). The good side is, that no icons can be overlooked in the process, which are e.g. included in site-packages with different Mod-IDs.

The disadvantage of this tool is, that it doesn't use the correct names of the items for the image files. The names of the png-files must be checked with the ingame names !

  1. Create an instance with Forge and the desired mod
  2. Start a world
  3. Execute following command "/iconexporter export 64"
  4. The png-files can be found in the instance directory in the folder "icon-exports-x64". The filenames consists of "ModID__ItemName"
  5. Sorting out unwanted icons (e.g. minecraft vanilla items or from other mods)
  6. Check the filenames with the ingame names and use the "renames.txt" (see below)

BlockRenderer (Minecraft 1.8+)[]

You will need a Minecraft instance containing the mod you want to build a tilesheet of, and BlockRenderer. Open a world, and open the Bulk Render GUI by using the render key (defaults to `) and the CTRL key. Enter the mod id for the mod you want to render, and set the render size to 64x64.

The mod id can be found in the game menu under "mods" or "mod options" and in the tab of the respective mod. For example for Blood Magic stands Mod ID: 'BloodMagic' in the third row, and you have to write in lowercase in the Bulk Render GUI bloodmagic.

Press render, wait for it to finish creating all the images, and get all of the icons from the "renders/Current Date/Mod ID" (where Current Date is the current date, and Mod ID is the mod ID for the mod you are creating a tilesheet for).

NEI (Minecraft 1.7)[]

You will need a Minecraft instance containing the mod you want to build a tilesheet of, and NEI. Open a world, and in NEI, search for @Mod.Mod Name (where Mod Name is the name of the mod you want a tilesheet for). This will make NEI display only the items from that mod. Next, open the NEI Options menu (bottom left corner of the inventory screen). Go to Tools -> Data Dumps, then in Item Panel toggle the type (initially CSV) to PNG, increase the size to 64x64, and press Dump. This will create a new "dumps" subfolder in the folder where the current Minecraft instance is stored. That dumps folder will contain the folder itempanel_icons, which will contain a 64x64 .png image file of every single block and item in the mod.

Older than 1.7[]

If you're using a older version of Minecraft, then this process is a lot more difficult. All renders need to be gathered manually. For items, you can scrap from a mod's resource folder, but for blocks, it's not as easy. One potential strategy is to take a screenshot of the rendered block in-game from the inventory, and edit such a screenshot to get just the block using a program like Gimp or Photoshop. This video gives a good example using Gimp.

Renames[]

The hard part (hard because judgement-intensive) is searching through this folder to find images with duplicate names, or names that contain underscores (_). There are two reasons a file name can contain an underscore:

  1. Duplicate item names. (Fixing duplicate item names requires judgement on the part of you.)
  • The resulting duplicate item names will be called Itemname.png, Itemname_2.png, Itemname_3.png, etc. Each of them must be renamed to reflect what the image actually represents. This does not mean renaming them to Itemname (1).png, Itemname (2).png, Itemname (3).png, etc. This means actually figuring out what they represent and naming them appropriately. If, and only if, the items with the same names are exactly the same image, then the duplicate images can be deleted. Otherwise, do not delete images.
  1. Inappropriate characters (:, /, etc.) in the actual item name that can't be used in a filename.
  • Fixing inappropriate characters is somewhat easier. To account for them, create a text file called "renames.txt". In that text file, enter all incorrect file names and their correct names, using the format Incorrect_ Name=Incorrect: Name.

For example, since 1/16th Cable has a fraction in it, this cannot be saved to a file and is replaced with an underscore (_). The filename in the image dump would be 1_16th Cable, and can be renamed when uploading by adding a line in "renames.txt" with the text 1_16th Cable=1/16th Cable. Type one item per line and nothing else in the file. Save the file into the folder with all the icons using the encoding UTF-8 Without BOM. If you want to skip uploading a tile to the tilesheet, use the format Deleted_Item= and leave the rename field blank.

Open the ftb-rs/tilesheets folder, copy the itempanel_icons folder into the tilesheets folder, and rename it with the mod's abbreviation. A list of mod names and abbreviations can be found here. If the mod's abbreviation does not exist, consult with other editors and administrators on IRC.

Creating or updating a tilesheet[]

Once the dependencies are lined up, you can get around to actually running the tilesheet builder. This is done through this command:

cargo run --release

It will ask you for the abbreviation of the mod that you will be creating a tilesheet for, and will do all the work of importing the existing tilesheet from the wiki if it already exists. If the tilesheet does not exist it will ask you for the dimensions you want; almost always this will be "16,32".

After a few seconds, it will create additions.txt and missing.txt, the former with any tiles that you are adding that were not on the tilesheet before, and the latter with tiles that were on the tilesheet before that you did not provide an updated version of. If a tile was intentionally removed or renamed in an update to the mod you may choose to copy over those entries from missing.txt to todelete.txt so the program may automatically delete those tiles.

Once you are done reviewing the changes in additions.txt and missing.txt, you may enter "continue" at which time the program will finally update the tilesheet and use the API to add any new tiles to the wiki, as well as removing any tiles that you requested to be deleted. From there, everything else will be automatically uploaded to the wiki.

Errors and Solutions[]

Compile error on Windows[]

running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-o
" "D:\\Daten\\Rust\\ftb-rs-master\\target\\debug\\build\\miniz-sys-6a96c81df5f92
18f\\out\\miniz.o" "-c" "miniz.c"
ExitStatus(ExitStatus(1))

command did not execute successfully, got: exit code: 1

--- stderr
gcc.exe: error: CreateProcess: No such file or directory
thread '<main>' panicked at 'explicit panic', C:\Users\LuminousLizard\.cargo\reg
istry\src\github.com-88ac128001ac3a9a\gcc-0.3.19\src\lib.rs:771

Solution: For Win 64bit install "MinGw-w64" from this page and set in the system variables the path to the "bin" folder in the installation (standard for 64bit: C:/Program Files/mingw-w64/x86_64-5.2.0-win32-seh-rt_v4-rev1/mingw64/bin)

Error when creating a tilesheet (1)[]

Update command accepted but program returns following error message and nothing is created:

$ sudo cargo run --release -- update MSC
     Running `/home/luminouslizard/Rust/ftb-rs-master/target/release/ftb update MSC`

Loading tilesheet
No tilesheet found. Creating new tilesheet.
Updating tilesheet

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', ../src/libcore/result.rs:688
Process didn't exit successfully: `/home/luminouslizard/Rust/ftb-rs-master/target/release/ftb update MSC` (exit code: 101)

Solution: The command prompt is opened in the wrong folder. Open the command prompt in the folder where you placed the program you downloaded (standard: ftb-rs or ftb-rs-master where the "target" and "src" folder is located).


Advertisement