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 MiDKnighT » Wed Apr 15, 2015 4:37 pm

FYI - I'm going out of town this weekend and have a brutal work schedule next week so very doubtful I'll be able to get much done for the week after Friday. That said, my plan is to work on bug fixes until then, release a new DoaEditor + IPS 1.3 on Friday, then be mostly gone for the next week.

FYI the billeting / equip bug is next on my list.

MiDKnighT wrote:Just had a light bulb moment. Expanding the officers would be VERY hard. However, an easier, and more doable option would be to have clones of each officer for different chapters. The clones would share the same portrait, sprite, and attributes as the original but you could define the following for each chapter:

Soldiers
AP
AC
Highest tactic learned

Everything else would be identical to the original officer. I'm thinking up to one officer + 7 clones. So for example you put Cao Cao in chapter 1 then you could have a chapter 2 clone, chapter 3 clone, chapter 4 clone, etc... The only difference would be the 4 attributes I mentioned above. From a coding perspective this seems a lot more reasonable than another brand new officer list which would be an insane effort with the current framework. I would also have to change the officer removal code to only remove the officer from the current chapter, not the entire game. Something to ponder... So the original game says it has 180 officers. With this enhancement it would be 180 unique officer names/portraits with up to 1260 clones for a total of 1440 officers. Is that enough? :P

EDIT: Would have to do the expanded chapters too so we're talking a max of 2880 officers.


Was thinking about this some more. If I were to do this I wouldn't start on it for at least a couple weeks and only if all known buggies in DoaEditor and IPS 1.3 are addressed.

One problem I was thinking about is if you have an officer set up for multiple chapters... You wouldn't want to encounter him in chapter 1 if you're already on chapter 5. Ie...you fight chapter 5 Lu Bu who is a badazz and then you gullwing to chapter 1 to get something and encounter wimpy Lu Bu. What I'm thinking I'd have to do is after every battle, mark the highest chapter you have won a battle. Then any multi chapter generals would not be encounterable on any chapter less than that. So let's say you have chapter 5 Lu Bu and chapter 1 Lu Bu. As soon as you win a battle in chapter 2 you cannot see chapter 1 Lu Bu anymore in random encounters. However when you get to chapter 5 you can...until you win a battle in chapter 6. And so on... Also any multi chapter generals would have to be non recruitable, at least until their last chapter. And by that I only mean non recruitable in random encounters.

Another idea (again with the chapter 1 and chapter 5 Lu Bu example) is that instead of making chapter 1 Lu Bu vanish in random encounters, you could encounter him in his current form... For example lets say you're on chapter 5 and gullwing back to chapter 1 to get something... Then you encounter badazz chapter 5 Lu Bu in chapter 1! Ie...he follows you around the map! So would have to figure out if I'd want the chapter 1 Lu Bu to disappear once you win battles on a later chapter or have him still enounterable but you get the current nasty version. That said, it would be silly seeing chapter 5 Lu Bu paired up with chapter 1 rebel force and weak chapter 1 generals...
User avatar
MiDKnighT
Master
 
Posts: 244
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby sonic.penguin » Wed Apr 15, 2015 4:56 pm

FYI - I'm going out of town this weekend and have a brutal work schedule next week so very doubtful I'll be able to get much done for the week after Friday. That said, my plan is to work on bug fixes until then, release a new DoaEditor + IPS 1.3 on Friday, then be mostly gone for the next week.

Okay got it. No problem.

In terms of the Chapter-based leveling of generals, the 'forced-officer-leave' event would have to erase all instances. 2nd, you are saying that once you got to chapter 4, chapters 1-3 instances would be disabled and you would encounter chapter 4 only? What if this was the case for the entire map? You know how everything is zoned right? Would this erase the zones? Not that I'd want Zhuge Liang running around northern Wei, that would be stupid, but I can see how this would be complex.
User avatar
sonic.penguin
Langzhong
 
Posts: 518
Joined: Fri Sep 30, 2011 8:20 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby sonic.penguin » Wed Apr 15, 2015 5:00 pm

EDIT: I hacked my way around it. When it goes to check the sword maker stuff in Liu Bei's speech I'm forcing $6724 back to "06" so that he repeats the "Cao Cao are you alright" line until the Xiahou bros are gone. I'll probably put this in the IPS patch too in case others move events around:

Changes:

0x36F40: 022080BF
0x37F90: 20A9D4A9068D246760

Phew, great. I knew there was something wrong with it. What I tried doing was having EVENT-1D2F on the next line, but all that did was make him give the speech even AFTER the Xiahou Bros left which was kind of.... well stupid. Either way, thanks for not thinking I was crazy!

Will check the True Musou fix. Since it's Guan Yu vs. the world, the True Musou can possibly wipe out the party, especially after he's overpowered himself after a duel victory....
User avatar
sonic.penguin
Langzhong
 
Posts: 518
Joined: Fri Sep 30, 2011 8:20 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Wed Apr 15, 2015 5:08 pm

sonic.penguin wrote:
FYI - I'm going out of town this weekend and have a brutal work schedule next week so very doubtful I'll be able to get much done for the week after Friday. That said, my plan is to work on bug fixes until then, release a new DoaEditor + IPS 1.3 on Friday, then be mostly gone for the next week.

Okay got it. No problem.

In terms of the Chapter-based leveling of generals, the 'forced-officer-leave' event would have to erase all instances. 2nd, you are saying that once you got to chapter 4, chapters 1-3 instances would be disabled and you would encounter chapter 4 only? What if this was the case for the entire map? You know how everything is zoned right? Would this erase the zones? Not that I'd want Zhuge Liang running around northern Wei, that would be stupid, but I can see how this would be complex.


Well we have 2 options. Again let's use the example of Lu Bu who you have as a multi chapter officer for chapter 1 and chapter 5.

Option 1:

- Once you win a battle in chapter 2, Lu Bu disappears from chapter 1. But of course once you get to chapter 5 you will encounter the chapter 5 Lu Bu. Then after you win a battle in chapter 6, chapter 5 Lu Bu vanishes.

Option 2:

- Once you win a battle in chapter 2, Lu Bu is still encounterable in chapter 1 until you win a battle in chapter 5. Then you get chapter 5 Lu Bu in chapter 1 *and* chapter 5. But since he doesn't exist in chapter 2 or 3, etc... you never see him there.

Either way I'd have to make some new officer removal events. The current one removes the officer from the entire game. I'd have to have another one to just remove the officer from a specific chapter.

On an unrelated subject, I started watching the Three Kingdoms series on youtube this week. I just finished Episode 5 last night which had the three brothers vs Lu Bu. Thought you would enjoy it if you haven't seen it yet:

http://youtu.be/QrFaOhZmJrg
User avatar
MiDKnighT
Master
 
Posts: 244
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby sonic.penguin » Wed Apr 15, 2015 7:05 pm

Hmm, is this new? All I remember is the old version, and for some reason, I loved the music and acting as old is it may be:
https://www.youtube.com/watch?v=qySOq5Bwfpw


Re: DOAEditor and Romhacking for Destiny of an Emperor

Postby MiDKnighT » Wed Apr 15, 2015 12:08 pm

sonic.penguin wrote:

FYI - I'm going out of town this weekend and have a brutal work schedule next week so very doubtful I'll be able to get much done for the week after Friday. That said, my plan is to work on bug fixes until then, release a new DoaEditor + IPS 1.3 on Friday, then be mostly gone for the next week.


Okay got it. No problem.

In terms of the Chapter-based leveling of generals, the 'forced-officer-leave' event would have to erase all instances. 2nd, you are saying that once you got to chapter 4, chapters 1-3 instances would be disabled and you would encounter chapter 4 only? What if this was the case for the entire map? You know how everything is zoned right? Would this erase the zones? Not that I'd want Zhuge Liang running around northern Wei, that would be stupid, but I can see how this would be complex.



Well we have 2 options. Again let's use the example of Lu Bu who you have as a multi chapter officer for chapter 1 and chapter 5.

Option 1:

- Once you win a battle in chapter 2, Lu Bu disappears from chapter 1. But of course once you get to chapter 5 you will encounter the chapter 5 Lu Bu. Then after you win a battle in chapter 6, chapter 5 Lu Bu vanishes.

Option 2:

- Once you win a battle in chapter 2, Lu Bu is still encounterable in chapter 1 until you win a battle in chapter 5. Then you get chapter 5 Lu Bu in chapter 1 *and* chapter 5. But since he doesn't exist in chapter 2 or 3, etc... you never see him there.

This seems super complicated to try and complete... so you're saying this would be easier than just taking the officer data page and duplicating it? I would thinking adding all of the extra data for 16 chapter profiles would be insanely easy to mess up data for. I think having MORE officers would be more useful as it would add a lot more diversity, leaving more room for the "lesser known" officers to be used in battles rather than just all of the big named people.
User avatar
sonic.penguin
Langzhong
 
Posts: 518
Joined: Fri Sep 30, 2011 8:20 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Wed Apr 15, 2015 7:17 pm

sonic.penguin wrote:Hmm, is this new? All I remember is the old version, and for some reason, I loved the music and acting as old is it may be:
https://www.youtube.com/watch?v=qySOq5Bwfpw


The one i showed was from 2010.

sonic.penguin wrote:This seems super complicated to try and complete... so you're saying this would be easier than just taking the officer data page and duplicating it? I would thinking adding all of the extra data for 16 chapter profiles would be insanely easy to mess up data for. I think having MORE officers would be more useful as it would add a lot more diversity, leaving more room for the "lesser known" officers to be used in battles rather than just all of the big named people.


As complicated as this is, it's still way easier than adding more officers. The biggest reason is that all the officer slots from 00-FF are taken by officers and villagers and are referenced *everywhere*. Copying the officer page to another page is easy, updating all the references to look in more than one place for officers is a nightmare. With tactics there were plenty of empty pointers. Ie...tactic IDs were from 01 to 1D so anything from 1E to FF could be a new tactic. That's not the case with officer IDs.

For example, officer A9 is Guan Yu. If we had another page of officers there would be a 2nd A9. Every time the game tries to look up officer A9, there's no way for it to know which officer, on the original page or the new page.

That said, of the options above I'm leaning towards option 1 since chapter 5 Lu Bu would look weird paired with chapter 1 guys.
User avatar
MiDKnighT
Master
 
Posts: 244
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Wed Apr 15, 2015 8:14 pm

sonic.penguin wrote:Edit: When pulling guys out of billeting, they are not de-equipping the weapon of the previous officer (sometimes)


Got this one. I re-did some of the check equip code so that now when you add from billeting it is borrowing the fix I did for the recruit code.

0xF93F0 (billeting add/item check code):
0000A90E2082C4A9C09D00632010BC4C
EBBC2009BC980A0A0AA8A200B90061C9
8010034C34948C2F78E980A8B900B085
00B970B08501A002B100A000D92378D0
034C4094C8C00BD0F3AC2F78B90061E9
80990061C8E8E009D0C2EAEAEAEAEAEA
2009BC980A0A0AA8A200B90061C9C090
07C9DFB0034C7094E8C8E009D0EC2009
BCA90099C060EAEAEAEAEAEAEAEAEAEA
2050BC8C117820409C2060BC4CE29300

0xF9C30 (item check/de-equip code):
000000000000000000A93A2082C42040
9C4C299C000000000000000000000000
AD11780A0A0A8510A9618511A000B110
992078C8C009D0F6A200BD2078100338
E980A8B900B08500B970B08501A002B1
009D3078E8E009D0E1A000B92078C9C0
9023C9DFB01F38E9809110B93078A200
DD0B78D00AB92078EAEAEA9110B93078
E8E006D0EBC8C009D0D120C09C600000
00000000000000000000000000000000
A200864A20D09CE8E007D0F660000000
A64AA900EAEAEA9DC0608A0A0A0AA8B9
00611029297FC95FB013C940901FB900
61101A297F38E93F9DC060D01038E95F
AABD40E718A64AEAEAEAEAEAEAC89829
07D0CC60000000000000000000000000

0xFBC10 (functions to save memory status):
000000000000000000AE4078AC417860
8E40788C417860000000A90E2082C420
10BC68C9E9F00300000048BD0061A8B9
00B08500B970B08501A002B100A8A93A
2082C42009BC4C1ABC00000000000000
A200B5009D007AE8E0FFD0F62009BC60
A200BD007A9500E8E0FFD0F6EAEAEAEA
A200A9009D007AE8E0FFD0F62009BC60

For my reference:
- The function on the 0xFBC60 line backs up the zero page to $7A##
- The function on the 0xFBC70 line restores the zero page from $7A## and then clears $7A##


EDIT: Err now it's de-equipping everybody. I'll look at this more in the morning.
User avatar
MiDKnighT
Master
 
Posts: 244
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby sonic.penguin » Wed Apr 15, 2015 9:56 pm

Yeah, that'd be even worse... too bad theres not an 'optimum' like in FF

EDIT: I hacked my way around it. When it goes to check the sword maker stuff in Liu Bei's speech I'm forcing $6724 back to "06" so that he repeats the "Cao Cao are you alright" line until the Xiahou bros are gone. I'll probably put this in the IPS patch too in case others move events around:

Changes:

0x36F40: 022080BF
0x37F90: 20A9D4A9068D246760

Tested it. Works great.

Err that makes no sense. It worked perfectly in the save state. Also note that the original game kills off Guan Yu and Zhang Fei so if they are removed from your party via the officer removal code. they should be ok to sit in their new chairs.

Sorry but I have to ask, are you sure you copied the changes correctly? You should also not need to mess with 0xF6FAC or 0xF6FB1 after copying the code since these are already the Xiahou bros.

You were right about this one. I recopied the code. Must've done something wrong. Hope I didn't screw anything else up, heh... :huohu:

elease a new DoaEditor + IPS 1.3 on Friday, then be mostly gone for the next week.

Awesome going away preasent :) Check 2 things for me:
1. For some reason, the opening officer battle portrait is not changing to anything except the officer @ the top of the formation.
2. The soldier count multiplier is not functioning accurately. Is that fixable?
3. Oh wait I said 2 didn't I? How about a Cheeseburger maker function on DOAEditor? :P
User avatar
sonic.penguin
Langzhong
 
Posts: 518
Joined: Fri Sep 30, 2011 8:20 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Wed Apr 15, 2015 10:24 pm

sonic.penguin wrote:1. For some reason, the opening officer battle portrait is not changing to anything except the officer @ the top of the formation.


In the ROM? Elaborate?

sonic.penguin wrote:2. The soldier count multiplier is not functioning accurately. Is that fixable?


Can you elaborate? Is the formula off or something?

sonic.penguin wrote:3. Oh wait I said 2 didn't I? How about a Cheeseburger maker function on DOAEditor? :P


Displaying a cheseburger portrait is the best I can do but you're better at portraits so...
User avatar
MiDKnighT
Master
 
Posts: 244
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby sonic.penguin » Thu Apr 16, 2015 12:24 am

sonic.penguin wrote:
1. For some reason, the opening officer battle portrait is not changing to anything except the officer @ the top of the formation.



In the ROM? Elaborate?

The opening battle portrait is defaulting to the enemy officer in slot #1. Even if I change it to another officer, it keeps showing the enemy officer in slot #1.

sonic.penguin wrote:
2. The soldier count multiplier is not functioning accurately. Is that fixable?



Can you elaborate? Is the formula off or something?

Yeah, I think so. In game values aren't matching the calculator values.

sonic.penguin wrote:
3. Oh wait I said 2 didn't I? How about a Cheeseburger maker function on DOAEditor? :P



Displaying a cheseburger portrait is the best I can do but you're better at portraits so...

Darn, well it was worth a try!

On another note, even though his box of "Can't be billeted" is checked, I can still billet Cao Cao :!:
User avatar
sonic.penguin
Langzhong
 
Posts: 518
Joined: Fri Sep 30, 2011 8:20 pm

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