Jump to content
Sign in to follow this  
Rai

WIP FE4 script dumper and script inserter.

Recommended Posts

Hey guys, Rai here. For the past couple of days I've been working on a script dumper and a script inserter for FE4. It's command-line based and was programmed in C++. Currently it can only dump menu scripts that use a 16-bit pointer table. But in later versions; I plan to add the option to dump scripts that use 32-bit pointers and scripts that don't use pointer tables.

Here's some more information from the readme file:

Table of contents:
1. Introduction
2. Script Dumper Usage
3. Script Inserter Usage
4. Text Types
5. Included Files
6. Notes
7. Links


1. Introduction
-----------------------------
This archive includes a script dumper and a script inserter for Fire Emblem 4. Both programs are command-line based and were programmed in

C++. Currently, the script dumper and script inserter will only work on menu texts that use a 16-bit pointer.

2. Script Dumper Usage
-----------------------------
Usage: [TableStart] [TableEnd] [Romname] [Outputfile] [Tblfile] [Type]

* [TableStart] is the starting position of the pointer table.
* [TableEnd] is the ending position of the pointer table.
* [Romname] is the name of your Fire Emblem 4 rom.
* [Outputfile] is the file that your text will be dumped to.
* [Tblfile] is the table file.
* [Type] is the type of text you want to dump.

Usage_example:
039C59 039EBA fe4.smc fe4_character_names.txt fe4menu.tbl -n

3. Script Inserter Usage
------------------------------
Usage: [insertAddress] [TableStart] [Romname] [Outputfile] [Tblfile] [Type]

* [insertAddress] is the address where you will insert the text file.
* [TableStart] is the starting position of the pointer table.
* [Romname] is the name of your Fire Emblem 4 rom.
* [TextFile] is the file containing the text that you want to insert.
* [Tblfile] is the table file.
* [Type] is the type of text you want to dump.

Usage_example:
03F9FC 039C59 fe4.smc fe4_character_names.txt fe4menu.tbl -n

4. Text_types
--------------------------------
Text_types:
* -c will dump the class names.
* -n will dump the character names.
* -t will dump the terrain names.
* -w will dump the weapon names.

5. Included_files
---------------------------------
Files_included:
addresses.txt - A list of text addresses.
fe4menu.tbl - A table file for the menu text.
pointers.txt - A list of pointer tables.
readme.txt= The readme that you are currently reading.
scriptdumper.exe - The Fire Emblem 4 script dumper program.
scriptinserter.exe - The Fire Emblem 4 script inserter program.

6. Notes
----------------------------------
Notes:
* This program is for use on the Reparation 0.87 patch. You can find the link in the "Links" section.
* For your pointer table address, you must use a hex address.
* For hex bytes 00-0A you must include the first 0. "39C59" for instance, will be interpreted as "9C59".
* You must use a headered rom in order for this program to work.

7. Links
----------------------------------
* You can find the Reperation 0.87 patch at http://darktwilkitri.thegreatbeyond.net/dtntd_fireemblem4.php.

You download the programs here.

Share this post


Link to post
Share on other sites

Hey guys, Rai here. For the past couple of days I've been working on a script dumper and a script inserter for FE4. It's command-line based and was programmed in C++.

Is this compatible for Thracia 776?

This is pretty cool, I'm looking forward to seeing the development of this.

Share this post


Link to post
Share on other sites

pretty handy tool! but I think it could use some user-friendly stuff (needing to type in the addresses and everything each time is irksome) maybe just making the addresses fixed (or as an extra option to use custom addresses) since I really doubt anyone's going to be doing any repointing of the menu text pointers

big step towards easier FE4 stuff though

I might try to get used to using it with my hack since all that manual repointing gets old

also, I can't seem to get the class dump to work for my hack, it just stops and the textfile output only shows the first two classes

I tried the class dump on the old j2e patch and it also stops after GreatArch, ignoring the DkPrince right after

could the class name length have anything to do with the error? my hack made room for up to 11 letters for classes on the statscreen

Edited by Lamia

Share this post


Link to post
Share on other sites

now we just need a better/easier mapping tool

FE4MAP's actually relatively straight forward to use. The only possible issue I see is someone not compressing the map before trying to insert it. Otherwise it works much like Mappy.

Share this post


Link to post
Share on other sites

pretty handy tool! but I think it could use some user-friendly stuff (needing to type in the addresses and everything each time is irksome) maybe just making the addresses fixed (or as an extra option to use custom addresses) since I really doubt anyone's going to be doing any repointing of the menu text pointers

big step towards easier FE4 stuff though

I might try to get used to using it with my hack since all that manual repointing gets old

also, I can't seem to get the class dump to work for my hack, it just stops and the textfile output only shows the first two classes

I tried the class dump on the old j2e patch and it also stops after GreatArch, ignoring the DkPrince right after

could the class name length have anything to do with the error? my hack made room for up to 11 letters for classes on the statscreen

Well the thing with Fire Emblem 4... Is that for each pointer table pointers are calculated differently. So for each pointer table has a different way of getting the pointer. That's why the [Type] option is there. However; if you haven't moved the pointer tables it should work. But I will investigate the problem.

I'm also working on a hack that allows you to use 1 byte characters for menu text:

seisenhackonebyte000_zps5023f169.png

Edited by Rai

Share this post


Link to post
Share on other sites

Well the thing with Fire Emblem 4... Is that for each pointer table pointers are calculated differently. So for each pointer table has a different way of getting the pointer. That's why the [Type] option is there. However; if you haven't moved the pointer tables it should work. But I will investigate the problem.

I was just thinking having the -c, -n, etc codes seems redundant if you have to provide the addresses anyway

just inputting the code at the end would be much more convenient

that one-byte menu text symbol thing should be really great on saving space (HALF!) making more room for dialogue and custom graphics and such, however small the difference, it helps

Edited by Lamia

Share this post


Link to post
Share on other sites

FE4MAP's actually relatively straight forward to use. The only possible issue I see is someone not compressing the map before trying to insert it. Otherwise it works much like Mappy.

Yeah, it was super easy to use for me, withstanding not knowing Japanese :< It'd be nice to get some more simple event editing, but what can you do.

The FE3 map editor is just as easy to use. I understand there is an editor for FE5 also, but I've never found a download for it... its author is mentioned in the Super Thracia readme.

Share this post


Link to post
Share on other sites

Yeah, it was super easy to use for me, withstanding not knowing Japanese :< It'd be nice to get some more simple event editing, but what can you do.

well I did make a pseudo-translation for it to get around menus better

and I have many notes in addition to twilkitri's on event editing (figured out enough to do simpler things)

Edited by Lamia

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...