トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

解説/FEBuilderGBA/The config data structure of FEBuilderGBA_EN

Last-modified: 2017-12-11 (月) 22:07:35 (9h)

Rule of configuration file.

/config/config.xml

The settings of this tool are stored.


/config/translate/

This is a translation resource used by this tool.

It is KEY:\\r\\nVALUE format, based on the idea like GNU GetText?.

:Original string
Translation string


https://i.imgur.com/iPFRtmE.jpg

/config/data/

There is setting data in the game which this tool uses.
Data that seems to be more extensible is included if it is extracted as an external resource.


Search rules.

The files are searched in the following order.
lang contains the selected language. en=English, zh=Chinese.
file_VERSION.lang.txt
file_VERSION.txt
file_ALL.lang.txt
file_ALL.txt

Also in the file, there are things that switch on {J} {U}.
For example, since the pointer value is different in FE8J FE8U, it is used for this switching.

All file format are tab delimited TSV format.
Character codes are unified in UTF-8.

Example.

search"foo"
gameFE8
langen
typeFE8U
if ( Exists("config/data/foo_FE8.en.txt") )
{
   return found;
}
if ( Exists("config/data/foo_FE8.txt") )
{
   return found;
}
if ( Exists("config/data/foo_ALL.en.txt") )
{
   return found;
}
if ( Exists("config/data/foo_ALL.txt") )
{
   return found;
}
return NOT_FOUND;


Suppose foo_ALL.txt is found.

Assume that the contents of foo_ALL.txt were written as follows.

TEST1=A
TEST2=B	{U}
TEST3=C	{J}

Since type==FE8U was specified in the search instruction, the following contents are acquired.

TEST1=A
TEST2=B

If the search command is type == FE8J, the following contents are acquired.

TEST1=A
TEST3=C

List

ai1Define the list of unit Placer AI1.
ai2Define the list of unit Placer AI2.
aiscriptDefine the aiscript command
asmmapFunction map. Displays hints during function map disassembly.
base_rom_infoDefine the capacity and CRC of unmodified ROM.
battleanime_85commandDefine C85 command list of battle animation.
battleanime_auto_recolorIt is used to decide enemy color scheme with battle animation.
battleanime_modeDefine the type of battle animation.
eventDefine the event instruction.
eventcondDefine the type of event condition.
func_langDefine the languages available in FEBuilderGBA.
item_anime_effectDefine a list of weapon animation effects.
item_staff_use_effectDefine the effect of using items.
item_weapon_effectDefine the additional effect of the weapon.
magic_commandDefine the command of magic extension.
magic_csa_spell_tableDefine the condition to search for CSATABLE which defines magic animation of magic extension.
magic_extendsDefine how to judge whether magic expansion is appropriate or not.
mappointerDefine the map pointer name.
mapstyleDefine map style list.
other_textDefines an address list in which character string direct value of C language is embedded.
skill_extendsDefine how to judge whether skill extension is appropriate or not.
skill_extends_*For each skill extends, define the skill ID.
song_instrumentMake the instrument information MD5 and assign the instrument name to the instrument address.
song_instrumentsetDefine how to judge whether NIMAP is right or wrong.
soundDefine the name of the sound effect.
sound_foot_stepsDefine footsteps. FE8 only.
tbl_condDefine whether to use tbl or not.
translate_textidFor translation, correspondence table of string IDs in ROMs of US and Japan.
updater.bat.txtIt is not a configuration file. It is a batch file of automatic update.



/config/patch/

Detailed settings are cut out as patches. You can access it from menu tool -> Patch management.

https://i.imgur.com/59gvcy9.jpg

Patch format

The patch file is in KEY=VALUE format.
Numeric data becomes hexadecimal when 0x is attached.
If you do not add anything, it is a decimal number.

  1. 0x08000000 With or without a GBA pointer, there is no problem in either case.

Common items

NAME=Patch name


Define the name of the patch.
If undefined, it becomes the file name of the patch.

TYPE=IMAGE TYPE=ADDR TYPE=STRUCT TYPE=BIN TYPE=EA


Define the type of patch.
There are 5 types.
Details will be explained later.


INFO=Write more information.\\r\\nPlease describe yourself if possible.


Write more information.Please make line breaks\\r\\n


IF:0xEE594=0x4B 0xFA 0x2F 0x59 0x7E 0x19


Defines whether patches are available.
In this example, we are checking whether ROM 0xEE594 is 0x4B 0xFA 0x2F 0x59 0x7E 0x19.
If 0xEE594 is 0x4B 0xFA 0x2F 0x59 0x7E 0x19, you can use this patch.

IF_NOT:0xEE594=0x4B 0xFA 0x2F 0x59 0x7E 0x19

Defines whether patches are available.
On the contrary, in ROM, 0xEE594 will be available unless it is 0x4B 0xFA 0x2F 0x59 0x7E 0x19.

PATCHED_IF:0x080bb182=0x45 0x46 0xE0 0xB4
PATCHED_IF_NOT:0x080bb182=0x45 0x46 0xE0 0xB4

It defines whether the patch has already been adapted.
If we patch twice it will be mainly used with bad BIN patch.


Multilingual.

To write English names, add .en
To write Chinese name, add .zh

NAME=Japanese name
NAME.en=English
NAME.zh=Chinese

From ver20171211, it is now possible to specify languages such as AAAA.en for all parameters.


Patch type ADDR patch.

NAME=きずぐすりの回復量
NAME.en=Recovery amount of Vulnerary
NAME.zh=责骂的回收量

TYPE=ADDR

ADDRESS=0x2fe16

AUTHOR=出典:aeraさんの資料より\r\nhttp://ngmansion.xyz/wiki/hackfe/index.php?%E3%83%91%E3%83%83%E3%83%81#jf501d8a
AUTHOR.zh=来源:从aera的数据\r\nhttp://ngmansion.xyz/wiki/hackfe/index.php?%E3%83%91%E3%83%83%E3%83%81#jf501d8a
AUTHOR.en=Source: From aera's data\r\http://ngmansion.xyz/wiki/hackfe/index.php?%E3%83%91%E3%83%83%E3%83%81#jf501d8a


Recovery amount of Vulnerary of FE8J is stored in 0x2fe16.
This is a patch that changes it.

https://i.imgur.com/YLOE1U7.jpg

Multibyte

Although ADDR is basically only 1 byte change, if you want to change 2 bytes or more, please use combo box format as below.

NAME=フリーマップから入らないとフリーズする制約を消す
NAME.en=Eliminate the constraint of freezing unless it enters from the world map.
NAME.zh=消除冻结的限制,除非从免费地图进入

//Implement as an address patch.
TYPE=ADDR

ADDRESS=0xc1e7c
COMBO=default|0x47 0x2D|fix|0xB8 0xE0


https://i.imgur.com/vRuzDeu.jpg

Simultaneous specification of ADDRESS

Multiple addresses can be written to the ADRESS with a space delimiter.
The same value is set for each.
It is used when you need to change various places at the same time.


NAME=幸運上限
NAME.en=Upper limit of lucky
NAME.zh=运气最大

//アドレスパッチとして実装します
TYPE=ADDR

ADDRESS=0x80CA0 0x29f0e 0x29f12 0x180d8 0x180dc 0x95694 0x95694 0x9585C

For example, because the lucky limit is hard-coded with scattered settings in various places, It will change the value at once by describing it as above.

HEX

Use HEX=FALSE if you want to display the number displayed on the UI as a decimal number.

NAME=最大レベル
NAME.en=Max Level
NAME.zh=最高级别

//Implement as an address patch.
TYPE=ADDR

ADDRESS=0x25132
HEX=false //Since it is level, it displays it in decimal number

https://i.imgur.com/cRQavFM.jpg

ADDRESS_TYPE

Please use ADDRESS_TYPE if there is something you want to associate with the value.

ADDRESS_TYPE=UNIT //It is treated as a unit ID.(Character ID)
ADDRESS_TYPE=ITEM //It is treated as a Item ID.
ADDRESS_TYPE=CLASS //It is treated as a Class ID
ADDRESS_TYPE=SONG //It is treated as a Music ID(Song ID)

For example.

NAME=進撃準備
NAME.en=MUSIC_Preparation
NAME.zh=MUSIC_提前准备
//Implement as an address patch.
TYPE=ADDR

ADDRESS=0x080495cc 0x080af17e 0x08031654 0x08090048 0x080960b4 0x0809b880 0x0809c7f6
ADDRESS_TYPE=SONG //the preparation BGM is changed, it is treated as music ID.

https://i.imgur.com/gen0Pz4.jpg

Patch type IMAGE patch.


TYPE=IMAGE


Define the patch to change the image.
This patch needs to be written with a pointer, not an image address.
This is because the image is variable length, so the image address may be changed.


The following is a patch to change FIN of FE8J.

NAME=SYSTEM_FIN

TYPE=IMAGE

WIDTH=256
HEIGHT=160
//Number of pallets used.
PALETTE=1

//Compressed image.
ZIMAGE_POINTER=0xBBF48
//TSA with uncompressed header.
HEADERTSA_POINTER=0xBBF54
//Uncompressed palette.
PALETTE_POINTER=0xBBF44


https://i.imgur.com/oEtDONy.jpg
Uncompressed image.
IMAGE_POINTER

Compressed image.
ZIMAGE_POINTER

Use compressed TSA.
ZTSA_POINTER

Use TSA with compression header.
ZHEADERTSA_POINTER

Use TSA with uncompressed header.
HEADERTSA_POINTER

Use uncompressed pallet.
PALETTE_POINTER

It is used when displaying and importing images.
In the example below, it is a condition that it holds one kind of 16 color palette with 256x160 size image.

WIDTH=256
HEIGHT=160
//Number of pallets used.
PALETTE=1


It is hard to write image patches by hand, so you can generate them automatically.

In the menu -> tool -> graphic tool, find the image, find out the TSA etc, then click the Patch Maker button in the bottom right, all.
Automatically make patches.
There is no need to calculate the pointer by hand each time.

https://i.imgur.com/WHG6zIQ.jpg

https://i.imgur.com/LTklo5l.jpg

https://i.imgur.com/Qj0vh2c.jpg


Patch type STRUCT patch.

TYPE=STRUCT

Structure patch

Use it when you want to change data like a structure.
However, sophisticated things like doing with the tool body can not be done.
If you want to make difficult things, if it can be generalized, you should make it on the tool body side.


//Implement it as a STRUCT patch.
TYPE=STRUCT

//Pointer to data.
POINTER=$GREP4END 0x00 0xB5 0xC0 0x46 0x06 0x48 0xC0 0x46 0x06 0x49 0x89 0x7B 0x89 0x00 0x40 0x58 0x01 0x21 0x00 0xF0 0x02 0xF8 0x17 0x20 0x00 0xBD 0xC0 0x46 0x02 0x4B 0x9F 0x46

//Unit Class 0x00 0x00 [Animation setting pointer] = 8 bytes
//Data size (decimal number).
DATASIZE=8

//Number of data (decimal number).
DATACOUNT=12

//Define the data.
B0:UNIT=ユニット
B1:CLASS=クラス
B2=00
B3=00
P4:BATTLEANIMENAME=アニメ設定


https://i.imgur.com/NOQORUH.jpg
FE 8 Patch to set individual animation of Yugdra patch.
There is no additional structure in Kaitou patch, so I will explain about Yugdra as an example.

B0:UNIT=ユニット
B1:CLASS=クラス
B2=00
B3=00
P4:BATTLEANIMENAME=アニメ設定

↓↓↓↓↓

struct 
{
	byte	unit;			// +0
	byte	class;			// +1
	byte	zero1;			// +2
	byte	zero2;			// +3
	void*	battleanime;	// +4
};



b	sbyte( char )	-128 ~ 127
B	byte			0 ~ 255
W	word			0 ~ 65535
D	dword			0 ~ 4294836225
P	dword			0 ~ 4294836225


About the difference between D and P
In the case of P, it is always recorded as a pointer.
When the user enters 0x123, 0x123 is recorded in D, but if it is P, it is recorded as 0x08000123.


Patch type BIN patch.

type=BIN
Binary data and source code

NAME=SOUND_NIMAP(Native Instrument Map)

TYPE=BIN

PATCHED_IFNOT:$GREP4 0x00 0x3C 0x00 0x00 0x68 0x27 0x50 0x08 0xFF 0xFA 0x00 0xCC 0x00 0x3C 0x00 0x00 0x18 0x7D 0x29 0x08 0xFF 0xFA 0x00 0xCC 0x00 0x3C 0x00 0x00 0x3C 0x8E 0x28 0x08 0xFF 0xF9 0x00 0xA5 0x01 0x3C 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x0F 0x00=0x00 0x3C 0x00 0x00
BIN:$FREEAREA=JAPFE8_NI_Map.bin
INFO=Midi Instrument Map



https://i.imgur.com/oB9KLti.jpg
In this example, paste JAPFE8_NI_Map.bin into the appropriate $ FREEAREA.
Since there is a problem when pasting twice, $GREP4 is investigating whether it is adapted.


Macro.
$FREEAREA	Free area.(Assign free space in ROM.)
$GREP4		Search byte string, but in 4-byte units (high speed).
$GREP1		Search byte string, however 1 byte unit (low speed).
$GREP4_NOT	It is conditional that it can not be found by searching a byte string.
$GREP1_NOT	It is conditional that it can not be found by searching a byte string.




NAME=10分割CG表示

//Implement as a BIN patch.
TYPE=BIN

//Patch adaptation condition.
PATCHED_IF:0x080bb182=0x45 0x46 0xE0 0xB4

BIN:$FREEAREA=show_10split_image.bin

//Jump to the place where 10 division image display routine is inserted.
JUMP:0x080bb182:$r4=show_10split_image.asm

INFO=10分割CGを表示できるようにします
INFO.en=It makes it possible to display 10 divided CG.

https://i.imgur.com/41kVbuk.jpg
Paste show_10split_image.bin in the free area.
Generate a Jump code for pasted data.
The r4 register is used for the jump code.

For code to jump, the following code will be generated.

When the address is divisible by 4 bytes.
(addr%4 == 0)
ldr r4,[JUMP ADDR]		//+0
mov pc,r4;				//+2
JUMP ADDR				//+4  -->Total 8 bytes.

However, if it is divisible by 2 bytes, NOP is inserted.

NOP					//+0
ldr r4,[JUMP ADDR]		//+2
mov pc,r4;				//+4
JUMP ADDR				//+6  -->Total 10 bytes.

Add offset.

JUMP:0x080bb182:$r4:+2=show_10split_image.bin


In this way, you can jump to the location of show_10split_image.bin installation location + 2.


Direct value. $NONE

JUMP:0x080bb182:$NONE=show_10split_image.bin


Instead of generating a jump code, write the address where show_10split_image.bin is installed as it is.
Since it is an address, it consumes 4 bytes.
The address to be written is in little endian format.

As a practical way of use, I think that I use it where I skip from setting to code.


//In the menu effect, enter the address of the GNP program.
//Because it puts a direct value, there is no register relation so $ NONE.
//In case of a direct value, it is necessary to set it to the address + 1, so +1.
JUMP:0x5C53A8:$NONE:+1=main指南本体.bin


B jump generation.

JUMP:0x988c6:$B=0x9893a


Generate the ASM op code of b 0x9893a at the address of 0x988c6.
b Because it is a jump, I can not fly too far.
b It consumes 2 bytes as it is a jump.


BL jump generation.

JUMP:0x340cc:$BL=0x988c8


Generate the ASM op code of bl 0x988c8 at the address of 0x340cc.
Because it is a jump jump, it can not fly too far.
It consumes 4 bytes as it is a bl jump.



Text Table extension instructions.

EXTENDS:0xe30=TEXT      //Extend the text table to 0xe30.
TEXT:0x0e01=0x0e01.txt  //Write the contents of 0x0e01.txt to the Text ID 0xe01 ..
TEXT:0x0e02=0x0e02.txt
TEXT:0x0e00=0x0e00.txt


Supports text table expansion and writing.
However, as of now, we can not extend other tables.


Patch type EA patch.

TYPE=EA
EA=ea.event


https://i.imgur.com/WaVR6Ro.jpg
Add data using Event Assembler.
Add the contents of Event Assembler script specified in EA to the current ROM.

MOD

You may want to use the unused area of ??the structure as a parameter of the patch.
In FEBuilderGBA, it is available by creating MOD_*.txt in the patch directory.


IF:0x89268=0x00 0x4B 0x9F 0x46
FORM=UnitForm   //UnitForm(FE8用)で動作します
J_38=スキル1
J_39=スキル2
J_49=個人スキル
J_38:NAME=J_38_SKILLASSIGNMENT_SCROLL1_B39
J_39:NAME=J_39_SKILLASSIGNMENT_SCROLL2_B38
J_49:NAME=J_49_SKILLASSIGNMENT_MASTERY


However, since the parameter to be set to MOD is the label name used in C # of FEBuilderGBA, it is necessary to understand the source code.
Moreover, in the remodeling in Europe and America, I think that it is not often the unused area, but often creates its own structure.
If you think so, MOD may be a feature that is often used in Japan remodeling.