Page 1 of 38

DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 7:56 pm
by sonic.penguin
:huohu: For Destiny of an Emperor Rom Hacking Questions, refer to the DOAE Romhacking Guide found here: :huohu:

:huohu: Page 1: http://doaerhguide.wikidot.com/start

:huohu: Page 2: http://doaerhguide.wikidot.com/destiny- ... ide-page-2

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 8:42 pm
by MiDKnighT
Posted in the other forum:

I’ve got cave moving working in my local copy. When you move a cave you have to edit 2 warps instead of 1 and keep the “special bits” set. That said, the current fix isn’t doing anything with the special bits which determines which graphics are loaded and which direction you are facing. So for best results, if you enter a cave from the south in the original game, continue to enter the cave from the south after it’s moved.

The treasure thing works fine within DoaEditor but I haven’t tested it in the game. Will check that.


As for the background thing, you're right. Right now it would be more trouble than it's worth unless we fix a bunch of portraits.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 8:45 pm
by sonic.penguin
Got it. Yeah, the treasure thing I discovered after I moved a bunch of treasures and tried to open the chests. Does it require that you have the 'chest' icon? Although I had them on top of 'chest' boxes ,the moving in DOAEditor didn't seem to move it correctly. Try placing a treasure box tile and moving a treasure on top of it and see if it works.

I think that that Zhou Cang in the Xu Zhe cave text moving thing might be related to the officer hex ID not registering properly?

So for best results, if you enter a cave from the south in the original game, continue to enter the cave from the south after it’s moved.

This can be changed manually once the addresses are mapped out. I did this in Rise of Ieyasu and Flames of Wu when I swapped up caves.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 8:54 pm
by MiDKnighT
Try placing a treasure box tile and moving a treasure on top of it and see if it works.


Yep it worked. Save state issue? I just moved the gold key to a new treasure box in the Yellow Scarves cave and it worked. FYI I do think all items must be placed on top of a treasure chest if it's in a cave.

I think that that Zhou Cang in the Xu Zhe cave text moving thing might be related to the officer hex ID not registering properly?


Oh didn't know this was still a problem. Just checked it...hmm. Will check on it.

EDIT: I think it's because talking to him is tied to an event. Can't edit the text in the villager stuff right now but you can edit it in the main text bank thingy.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 9:23 pm
by sonic.penguin
The problem is is that the text line it keeps reverting to is: [OFFICER] doesn't have anything which is a key text that I can't change. Can you point me to the address for Zhou Cang's sprite information. I can edit it manually then.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 9:51 pm
by MiDKnighT
Here's the villager info for Xu Zhe's cave at 0x3129D:

Attributes are:

Villager 1 Starting Y1 Position (+ text bank)
Villager 1 Starting Y2 Position (+ event)
Villager 1 Starting X1 Position (+ direction they are facing, etc...)
Villager 1 Starting X2 Position
Villager 1 Dialog Line
Villager 1 Dialog Line 2
Villager 1 General ID

Xu Zhe: 12 20 93 01 75 75 D6
Zhou Cang: 34 20 9B 22 09 09 99 05 A9

There's a couple extra bytes for Zhou Cang so he's certainly "special". Per the first byte it says to read text bank 3 but looking at DoaEditor it should be text bank 4. Would have to trace it to see how the game is reading text bank 4.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Tue Feb 18, 2014 10:04 pm
by sonic.penguin
It's not the same format as the usual sprite format.. It definitely is different, but I was able to reset him so now he's working again at least with dialogue.

Zhou Cang Address: 0x312A4

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Wed Feb 19, 2014 2:09 am
by sonic.penguin
Okay, so I think I've got an inkling as to why the sprites are messing up. The sprite colors are supposed to be read at 0x7C610, however, in the ROM the values are at 0x7C614. Also, there was no effect in the color changes until I made modifications around the 0xFC610 address. I had to manually edit the sprite colors as DOAEditor was no longer changing the sprite colors in the rom. It displayed "lime green" but appeared as dark green in game. I think I fixed it but...

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Wed Feb 19, 2014 1:22 pm
by MiDKnighT
sonic.penguin wrote:Okay, so I think I've got an inkling as to why the sprites are messing up. The sprite colors are supposed to be read at 0x7C610, however, in the ROM the values are at 0x7C614. Also, there was no effect in the color changes until I made modifications around the 0xFC610 address. I had to manually edit the sprite colors as DOAEditor was no longer changing the sprite colors in the rom. It displayed "lime green" but appeared as dark green in game. I think I fixed it but...


DoaEditor reads the sprite color from 0x7C### but when it saves it writes to both 0x7C### and 0xFC### when saving. I suspect that both this and the Zhou Cang thing are left over issues from the bugs a few versions ago when the sprite palette and villager editing features just came out.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postPosted: Wed Feb 19, 2014 9:59 pm
by MiDKnighT
DoaEditor Revision 52 uploaded: http://www.niahak.org/doaed/DoaEditor.zip

Changes:
- Battle page graphics updates
- Can follow warps on the map (right click)
- Text bank bug fix for villagers
- Ability to delete portraits from ROM
- Portrait library interface cleaned up a bit
- Can move caves

EDIT: Note that portrait backgrounds on the battles page aren't right. That will be fixed in the next cut.