DOAEditor and Romhacking for Destiny of an Emperor

Use this forum to discuss hex-editing or otherwise altering any Three Kingdoms game, and to promote modded titles and patches.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby rcwardle » Wed Sep 05, 2018 5:12 am

Novice here trying to create a simple MOD (not too many map edits on my trial run) around Ghengis Khan's invasion a century later. If ya'll wouldn't mind giving me a second (or two) of your time, how would I go about changing the town names? I'm changing it in Hexacute but can't figure out how to get that information back into my game.
rcwardle
Tyro
 
Posts: 12
Joined: Thu Feb 07, 2013 1:35 am

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Wed Sep 05, 2018 12:12 pm

rcwardle wrote:Novice here trying to create a simple MOD (not too many map edits on my trial run) around Ghengis Khan's invasion a century later. If ya'll wouldn't mind giving me a second (or two) of your time, how would I go about changing the town names? I'm changing it in Hexacute but can't figure out how to get that information back into my game.


This is documented in the DOAE ROM Hacking Guide. This guide along with the DoaEditor program is a must for any DOAE modder:

Town Names:
http://doaerhguide.wikidot.com/destiny- ... age-2#toc7

Full ROM Hacking Guide:
Part 1: http://doaerhguide.wikidot.com/
Part 2: http://doaerhguide.wikidot.com/destiny- ... ide-page-2
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Thu Sep 06, 2018 12:26 pm

a bug that occasionally you'd get kicked out of battle and returned to the world map with no sprites visible


Fix:

0x783C0:
AD0A0A18A678E0099004A209867868C9
2BD002484868E6AEE6AFE6AD4CDFA600
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Sat Sep 08, 2018 8:24 pm

Zhou Letter Not Getting Consumed Fix:

0xF9C30:
00000000000068854AA93A2082C4A54A
4820409C4C269C000000000000000000
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Sun Sep 09, 2018 8:30 pm

A new feature! Unlimited officer leave / alive events:

http://doaerhguide.wikidot.com/destiny- ... ge-2#toc23
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Fri Sep 14, 2018 3:42 pm

*oops double post*
Last edited by MiDKnighT on Fri Sep 14, 2018 3:43 pm, edited 1 time in total.
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Fri Sep 14, 2018 3:43 pm

MiDKnighT wrote:
Boneduke wrote:Hi Midknight...just sent you a PM with a ROM attached - discovered an issue with broken chests this morning that I was hoping you might have a look at. Its not a big priority, but at the same time I was worried I might have corrupted something in the rom and I'd be better off reverting back to an old backup. Thanks!

Hmmm - spent some more time just now looking at this and maybe something else is going on. I loaded up past versions of my ROM from a week ago, two weeks, a month - and seeing the same problem. Even though I know for sure I wasnt having that issue back then. Maybe its a behavior in the save state/emulator or something. Will do another complete playthrough from the beginning and see if I still have the problem...


I see the issue and it appears that moving treasure chests around is a little more complicated than I thought.

Each treasure chest has a treasure chest ID. The one in the save state is 2A. So it is using that id to look up the address of the treasure chest and it is not matching so it is not finding anything.

In the ROM you have this treasure chest location defined at 0x30924 but it is looking for it at 0x30933 because of the index/lookup value of 23 at 0x3083A. If I copy "0223020905" to 0x30933 then it can find the contents of the chest. But note that the chest in the save state is already marked as opened in $662A in memory. Changing it from "80" to "00" puts the loot back in the chest.

In short, moving treasure chests can be tricky. You have to know your treasure chest ID to set the values correctly. So looks like a future enhancement for DoaEditor would be to be aware of which treasure chest ID we are dealing with when moving things around.

This could be tedious to fix manually depending on how many treasure chests are affected.


I was wrong about one aspect of this...

First there's no such thing as a treasure chest ID. I was wrong about that. It's actually a LOCATION ID. So your save state is location id "2A" which is labeled as "Guan Ping's cave" in DoaEditor. So how does that change things? There is more than one chest that falls under "2A". Ie...more than one chest in that cave. It uses the location ID to look up a max of 8 chests per location ID. Here's the main reason why the chest in your save state is not working:

Image

The first 2 sections above are lookup pointers for the LOCATION ID (2A). The first red box is the location of your chest in the save state. The larger red box is the search range for location ID 2A.

It looks like you used a chest from a different location and put it in "Guan Ping's cave" --> Location 2A. The problem is the game is looking up an address ($8923) and searching up to 8 chests starting with that address in location ID 2A. Your chest is not in that range.

What that means...

For now we cannot move chests outside of their location ID. Or at least it has to be within the range of the 8 chest search for that area. The chest from your save state will only work in locations 00-29. Ie....it would work in the Yellow Scarve cave. Oh and in case you don't know what location ID you're standing in, it is stored in $47 in game memory when you are walking around.
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Sun Sep 16, 2018 5:08 pm

An old bug is finally resolved. One where enemies randomly attack themselves.

Problem was that they would choose to use a heal tactic then due to a bad value in memory was ignoring the tactic and attacking. Unfortunately for them the target was still set for the heal so they end up hitting their own guys. Fix:

0x59A0:
A678BDAA60AAA91E2082C420E099A91E
2082C420B099A91E2082C40000000000
A678A5F3C900D00420E099608A0A0A0A
65F4EAEAAABDB065A6789D006220E099
60000000000000000000000000000000
A6789D0062C900F005A9019DD061203B
DFA20660000000000000000000000000
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Mon Sep 17, 2018 5:16 pm

What is this? After 3+ years there's a new DoaEditor? Why yes there is!

New DoaEditor (r59) uploaded --> http://www.niahak.org/doaed/DoaEditor.zip

- Text Banks 10/11 expanded by 4K

- Display all chapters in DoaEditor including unused

- Display all shops in DoaEditor including unused

- IPS 1.3 Bug Fixes Documented on pages 33-40 --> viewtopic.php?f=38&t=23421&start=320

- IPS 1.3 Unlimited Officer Join/Leave Enhancement --> http://doaerhguide.wikidot.com/destiny- ... ge-2#toc23

- IPS 1.3 and DoaEditor Expanded treasure chests feature (and movable to other locations). --> http://doaerhguide.wikidot.com/start#toc13


EDIT: 1 bug did sneak into the latest IPS 1.3 code. Please see this post for the fix:
viewtopic.php?f=38&t=23421&p=616502#p616502
Last edited by MiDKnighT on Sat Sep 22, 2018 1:27 pm, edited 1 time in total.
User avatar
MiDKnighT
Sage
 
Posts: 302
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby Boneduke » Mon Sep 17, 2018 6:53 pm

MiDKnighT wrote:What is this? After 3+ years there's a new DoaEditor? Why yes there is!

New DoaEditor (r59) uploaded --> http://www.niahak.org/doaed/DoaEditor.zip

- Text Banks 10/11 expanded by 4K

- Display all chapters in DoaEditor including unused

- Display all shops in DoaEditor including unused

- IPS 1.3 Bug Fixes Documented on pages 33-40 --> viewtopic.php?f=38&t=23421&start=320

- IPS 1.3 Unlimited Officer Join/Leave Enhancement --> http://doaerhguide.wikidot.com/destiny- ... ge-2#toc23

- IPS 1.3 and DoaEditor Expanded treasure chests feature (and movable to other locations). --> http://doaerhguide.wikidot.com/start#toc13


So awesome!! The unlimited officer join/leave and expanded treasure chests have proven immediately so useful. The only downside is they are delaying the completion of my ROM as they've opened the doors for doing some new and cool stuff :D :D :D
Boneduke
Initiate
 
Posts: 67
Joined: Sun Aug 13, 2017 5:09 pm

PreviousNext

Return to Three Kingdoms Game Editing & Mods

Who is online

Users browsing this forum: No registered users and 1 guest

Copyright © 2002–2008 Kongming’s Archives. All Rights Reserved