Site Tools


tutorial:sdt-adding-a-new-icon

Adding a New Icon (SDT)

Authors: Vawser

Tools

Tutorial

In this tutorial, we will be adding a new icon, specifically icon ID 1099.

The same instructions apply for any icon ID, so substitute 1099 for your actual icon ID when reading the instructions below.

Shoebox Layout

General

To start with, the new icon needs to be added to the shoebox layout files that are used to define the icon atlases.

To do this, copy the 01_common.sblytbnd.dcx file into your mod structure. It should be placed like so: <mod name>\menu\hi.

Unpack the 01_common.sblytbnd.dcx file with WitchyBND. This will result in a folder called 01_common-sblytbnd-dcx, containing all the layout files.

You can edit the layout files with a text editor (Notepad++ is used during this tutorial).

Within the layout file, the following terms are:

  • SubTexture: this is a definition for a subtexture within the overall image file.
  • name: this is the internal name of the subtexture, and contains the icon ID.
  • x: this is the x coordinate the subtexture starts from (assuming 0 is left edge of image).
  • y: this is the y coordinate the subtexture starts from (assuming 0 is top edge of image).
  • width: this is the width of the subtexture (e.g. x + width is the right edge of the icon)
  • height: this is the height of the subtexture (e.g. y + height is the bottom edge of the icon).

Once the the layout files have been edited, you can repack the file by using WitchyBND with the 01_common-sblytbnd-dcx folder, which will place the edited layout files into a new 01_common.sblytbnd.dcx.

Specifics

These are the specific actions you should take for this tutorial:

  1. Unpack the 01_common.sblytbnd.dcx file.
  2. Open the SB_Icon.layout file.
  3. Duplicate the SubTexture line with MENU_ItemIcon_01100.png as its name, placing the new line above it.
  4. Change the name attribute to MENU_ItemIcon_01099.png.
  5. Change the x attribute to 0.
  6. Change the y attribute to 2048
  7. Repack the 01_common.sblytbnd.dcx file.

Image

General

Edit the icon file found within the 01_common.tpf.dcx file.

Specifics

  1. Unpack the 01_common.tpf.dcx file.
  2. Open the SB_Icon.dds file (with Photoshop or other image editoring software).
  3. The icon has been placed a placed at x-coordinate 0 and y-coordinate 2048, covering the x-coordinate space to 256, and the y-coordinate space to 2304. Create your new icon within that square.
  4. Save the SB_Icon.dds file.
  5. Repack the 01_common.tpf.dcx file.

Interface

General

The new icon as defined in the shoebox layout needs to be explicitly added to all relevant GFX files.

You need to edit the following GFX files:

  1. 01_000_FE.gfx
  2. 01_000_FE_Stadia.gfx (can be skipped)
  3. 01_012_itemquantityselect.gfx
  4. 01_990_Trial_FE.gfx (can be skipped)
  5. 02_200_mainmenu.gfx
  6. 02_202_equipweaponselect.gfx
  7. 02_205_bossselect.gfx
  8. 02_206_costumeselect.gfx
  9. 02_207_bossselect_multi.gfx
  10. 02_280_getitem.gfx
  11. 02_281_getitem_middle.gfx
  12. 02_282_getitem_high.gfx
  13. 02_284_getitem_event.gfx
  14. 02_991_Trial_MainMenu.gfx (can be skipped)
  15. 03_001_shop.gfx
  16. 03_202_bonfire.gfx
  17. 03_204_upgrade.gfx
  18. 03_206_skill.gfx

You should use the batch scripts as found in FFDEC Tips and Tricks, they will let you quickly decompile the GFX files into XML, and vice versa.

To add a new icon, you to define and the display it within the GFX file.

To define a new icon, you need to define a new DefineExternalImage2 (see below).

To display a new icon, you need to add three new selements to a DefineSpriteTag section:

  1. RemoveObject2Tag: this removes the definition previously defined.
  2. PlaceObject3Tag: this is the external image you want to place as a tag.
  3. ShowFrameTag: this displays the tag you defined previously.

The reason it is done like this is because the DefineSpriteTag section uses the icon ID of the external image as an index to indicate which frameTag to show. Therefore each group of RemoveObject2Tag, PlaceObject3Tag and ShowFrameTag can be thought of as representing a group, indexed by their position in the list.

Note, the DefineSpriteTag sections are split into blocks of 1000, which tend to be groups of individual types of icons, such as weapons, equipment, etc.

Specifics

These are the specific actions you should take for this tutorial.

Note this only covers the HUD, e.g. 01_000_FE, you'll need to do the same process for all of the GFX files as listed in the general section.

Defining the Texture
  1. With the 01_000_FE.xml file open in your text editor, search for MENU_ItemIcon_01100
  2. You will find the DefineExternalImage2 line for it. Duplicate this line, placing it above.
  3. In the new DefineExternalImage2 line, change the characterID attribute to a unique ID (e.g. it must not match any existing ID). As it doesn't have to be sequential, you can simply change this to a high number, such as 5000.
  4. In the new DefineExternalImage2 line, change the exportName attribute to MENU_ItemIcon_01099.
  5. In the new DefineExternalImage2 line, change the fileName attribute to MENU_ItemIcon_01099.tga.
  6. In the new DefineExternalImage2 line, change the imageID attribute to match the ID you chose for characterID.
Displaying the Texture
  1. With the 01_000_FE.xml file open in your text editor, search for the characterID=“532”.
  2. You will find a PlaceObject3Tag section.
  3. Duplicate both the RemoveObject2Tag and the PlaceObject3Tag section, placing them above the ShowFrameTag that precedes the found PlaceObject3Tag section.
  4. Change the characterId in the duplicated PlaceObject3Tag to your new characterID.
Save
  1. Convert the 01_000_FE.xml back to 01_000_FE.gfx.

Source

tutorial/sdt-adding-a-new-icon.txt · Last modified: by admin