How can I add more affinity types (with skill systems patch)

I don’t have any ASM knowledge, but I’m willing to learn. How can I add more affinity types?

I look through related threads and find that after installing the Skill Systems patch, adding affinity icons becomes difficult. This is because the indices from 7 onward correspond to system icons, and beyond that are garbled images that I can’t make sense of. Is there any way to solve this (i.e., add new affinity icons)?

Thanks in advance.

wtf I can’t upload the image…

but I’ve already solved this problem!!! Thanks to the answer from user 7723 that I found. Arrange the Affinity icons vertically:

Width: 16
Height: 128
Count: 8 icons
Each icon: 16×16

That is:

16×16 × 8

And make sure the image matches the 4bpp / 16-color format used by GBA icons.

  1. When inserting the image with EA, do not use LZ77

The problematic version before:

#incext Png2Dmp “new_icons.png” --lz77

Change it to:

ALIGN 4
NewAffinityIcons:
#incext Png2Dmp “new_icons.png”

The key point is to remove --lz77.

The reason is that the location pointed to by IMAGE_POINTER needs to be read as a normal 4bpp image; if LZ77-compressed data is inserted, FEBuilder will mistakenly treat the compressed data as pixel data, so the preview will be garbled.

  1. Record the ROM address after EA insertion

For example, the EA log:

0xB8867C@664 Write: Event added by assembler

The image start location is:

0xB8867C

As a GBA pointer, you can write:

0x08B8867C

  1. Modify the AffinityIcons patch

Change the image-related parameters to:

IMAGE_POINTER=0x08B8867C
HEIGHT=128

Keep the palette address as the original:

PALETTE_ADDRESS=0x599714

Or fill it in according to the field names originally used by the patch. Do not change the field names yourself.