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 » Fri Sep 21, 2018 3:30 am

Thank you MiDKnight for all the work you've put into and continue putting into the Editor as well as still helping the Modding community. You making modding the game extremely easy these days.
rcwardle
Tyro
 
Posts: 12
Joined: Thu Feb 07, 2013 1:35 am

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby wk123 » Fri Sep 21, 2018 3:39 am

rcwardle wrote:Thank you MiDKnight for all the work you've put into and continue putting into the Editor as well as still helping the Modding community. You making modding the game extremely easy these days.


anyone got any cool screenshots or videos?
wk123
Apprentice
 
Posts: 31
Joined: Sat May 02, 2015 7:47 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby rcwardle » Fri Sep 21, 2018 4:53 am

FYI, I ran across an issue with the new chest enhancement to the Editor. I noted that if I checked an area that did not contain a chest I would always find a chest for a gold value, unless I opened a chest I did place (with food) and it would then open up a chest for a variation of that food. I was able to continue opening a chest in the same spot over and over except where I had purposely placed a chest (which works normal). Due to not being sure if I had changed something in my game I loaded a clean game file (and expanded to 1.3) and was still coming across this bug.
rcwardle
Tyro
 
Posts: 12
Joined: Thu Feb 07, 2013 1:35 am

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Fri Sep 21, 2018 8:00 pm

rcwardle wrote:FYI, I ran across an issue with the new chest enhancement to the Editor. I noted that if I checked an area that did not contain a chest I would always find a chest for a gold value, unless I opened a chest I did place (with food) and it would then open up a chest for a variation of that food. I was able to continue opening a chest in the same spot over and over except where I had purposely placed a chest (which works normal). Due to not being sure if I had changed something in my game I loaded a clean game file (and expanded to 1.3) and was still coming across this bug.


Yes there seems to be a bug in this enhancement that I need to troubleshoot / fix. I should have a fix in the next few days when I get time.

I think the problem is the treasure chest code is reading too far and ending up in the hidden items locations. You might be able to get around it by using a hidden item further down the list.
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 22, 2018 1:15 pm

rcwardle wrote:FYI, I ran across an issue with the new chest enhancement to the Editor. I noted that if I checked an area that did not contain a chest I would always find a chest for a gold value, unless I opened a chest I did place (with food) and it would then open up a chest for a variation of that food. I was able to continue opening a chest in the same spot over and over except where I had purposely placed a chest (which works normal). Due to not being sure if I had changed something in my game I loaded a clean game file (and expanded to 1.3) and was still coming across this bug.


I think I got it, please test this fix:

0x306D0:
A90185F3A98885F4A447C07AD009E6F4
A9D285F3A23060C076D009E6F4A9CD85
F3A23160C04CD009E6F4A9C385F3A232
60C04DD008E6F4A9C885F3A233600000
A20020C086EAEAEAEAEAA000A98085F1
BD006685F2A000B1F3C8C560D017B1F3
C8C561D011B1F3C8C562D00BB1F3C8C5
63D005F00EC8C8C8C806F246F1C028D0
D6F01806F2B040B1F3856EEAEABD0066
05F19D0066A5F18D000160E8E028D003
4CCE87A5F3C9F79014A90085F3A5F418
6901C98A90016085F4E84C0A87A5F318
692885F34C0A8768A99C486000000000
A20020C086EAEAEAEAEAA000BD006685
F2B1F3C8C51CD017B1F3C8C51DD011B1
F3C8C51ED00BB1F3C8C51FD005F038C8
C8C8C806F2C028D0D8E8E028D00568A9
674860A5F3C9F79014A90085F3A5F418
6901C98A90016085F4E84C9A87A5F318
692885F34C9A8768A9A5486000000000
Last edited by MiDKnighT on Wed Oct 10, 2018 1:44 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 » Sat Sep 22, 2018 1:57 pm

Boneduke was getting fancy with cave warp placement and messed up his stack depth.

The stack depth changes every time you go into a town or a building.

0 = World Map
1 = Inside town
2 = Inside building in a town

Cave warps don't change the stack depth so if you put them inside a town and the other end on the world map your stack depth could get wonky and you could have no random encounters or random encounters inside a town :shock:

So I made these events for Boneduke to reset the stack depth properly:

0x34400:
A9008D11604CA6C4A9018D11604CA6C4

Event F003 - Set stack depth to 0. Best used in world map battle text.
Event F803 - Set stack depth to 1. Best used talking to a villager in a town (not inside a building).

Adding to this:

An event that will reset the stack to 0 for random battles. Here's how it works...

  • The current battle ID is stored in memory in $75.
  • It is the battle ID for named battles or 80 for random battles.
  • This event will see what the battle ID is and if it is a random battle it will reset the stack to 0.

0x343F0:
000000000000000000A57530034CA6C4
A9008D11604CA6C4A9018D11604CA6C4

It is [EVENT-E903]

Best way to use it is to put it in the text at bank 0 line 30:

[T-VALUE]is
approaching.
[EVENT-E903][END]

So enemies approach...if the are random enemies it resets the stack to 0.
Last edited by MiDKnighT on Mon Oct 08, 2018 5:44 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 » Sat Sep 22, 2018 2:14 pm

MiDKnighT wrote: or random encounters inside a town :shock:


Now thats an unintended consequence that could prove very useful...!
Boneduke
Initiate
 
Posts: 66
Joined: Sun Aug 13, 2017 5:09 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Sat Sep 22, 2018 5:11 pm

Boneduke wrote:
MiDKnighT wrote: or random encounters inside a town :shock:


Now thats an unintended consequence that could prove very useful...!


Interesting idea but not sure how that would work with chapters...etc... Just tried it and not getting random encounters in a town.
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 rcwardle » Sat Sep 22, 2018 5:43 pm

The coding you provided for the treasure chest bug fix works great! Thank you!
rcwardle
Tyro
 
Posts: 12
Joined: Thu Feb 07, 2013 1:35 am

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby rcwardle » Mon Sep 24, 2018 9:01 am

Does anyone have in their notes where the coding needs to be changed for the starting location at the top of the game? Always exit at the start of the game and return after saving/quiting to where Lou Sang village is originally coded.
rcwardle
Tyro
 
Posts: 12
Joined: Thu Feb 07, 2013 1:35 am

PreviousNext

Return to Three Kingdoms Game Editing & Mods

Who is online

Users browsing this forum: No registered users and 2 guests

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