Home › Forums › Destiny of an Emperor › Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com )
Tagged: Battles, Destiny of an Editor, Destiny of an Emperor, Destiny of an Emperor hacking, Destiny of an Emperor Mods, Destiny of an Emperor Rom, DoaE rom, DoaE Rom hacking, FCEUX, Feidian, Graphics, hacking DoaE, Map, NES ROM hacking, nes8 template, Portraits, ROM Hacking, ROM hacking information
- This topic has 985 replies, 17 voices, and was last updated 2 years, 11 months ago by
MiDKnighT.
-
AuthorPosts
-
November 4, 2011 at 5:51 pm #39700
ludmeister
ParticipantMiDKnighT–
For the battle menu to display, we'd need at least 7 more bytes… From my intuitive look at what's going on there:
0x3eb85:
—- —- –02 fc18 6d0c 0c0c 0c23 1f0a
1b14 1523 0a0a 0a0a 0c0c 0c0c 0c0c 0c6e
faf8 9996 f80e b7f8 0eb7 faf8 0eb7 f80e
b7fa f80e b7f8 0eb7 ff
Breakdown:
0x3eb85: 02fc18- Window position?
0x3eb88: 6d0c… to 0c6e (0x18 bytes)– Window title/top bar
0x3eba0: fa- New line
0x3eba1: f89996- Not sure, but only present once. TP output??
0x3eba4: f80eb7- Output Tactic #1
0x3eba7: f80eb7- Output Tactic #2
0x3ebaa: fa- New line
0x3ebab: f80eb7- Output Tactic #3
0x3ebae: f80eb7- Output Tactic #4
0x3ebb1: fa- New line
0x3ebb2: f80eb7- Output Tactic #5
0x3ebb5: f80eb7- Output Tactic #6
0x3ebb8: ff- Finished
Does that make sense? Clear as mud to me at this point :-)
Ack. No space in the 0x3c010 block… or the 0x38010 block… and you know what? I think I just said what you said. Well, crap-o.
When all else fails... manipulate the source code.
November 4, 2011 at 6:10 pm #39701MiDKnighT
ModeratorQuote:Ack. No space in the 0x3c010 block… or the 0x38010 block… and you know what? I think I just said what you said. Well, crap-o.Ya there is absolutely no wiggle room. I've got an idea of how to deal with that though. When the battle starts, flip to a new ROM page, load the memory at $7000 with the stuff we need, then flip the page back. Then we'll just have to look at $7000 instead of $EB75. I'm not too worried about that part.
Think you can figure out why the text isn't displaying right? I can look at the ROM page/nospace stuff. I've dealt with that before.
November 4, 2011 at 6:57 pm #39702ludmeister
ParticipantQuote:So to get it to have 8 options in the tactic menu you would put:0x3EBB8: F80EB7F80EB7
Think you can figure out why the text isn't displaying right?
Yes! Add an "FA" before the "F80EB7F80EB7", and close it off with a "FF".
The tactics were written in with FCE Ultra's Hex Editor:

All that's needed is 8 extra bytes in the string! I can't believe that… that's incredible.
When all else fails... manipulate the source code.
November 4, 2011 at 7:01 pm #39703MiDKnighT
ModeratorSweet, I'll look for a place to put it… :) That's one down… Now…
– Need to rearrange code to fit 8 tactics in battle menu. I'm thinking we might need to load it into memory from a new ROM page when a battle starts. – MiDKnighT working on this…
– Tactic names aren't displayed properly in the tactic menu with the change above.DONE BY LUD– Each general has 6 tactics stored in memory starting at $65A0. Would have to expand that to 8.
– Have to rearrange status page to fit 8 tactics. I have some ideas on this.
November 4, 2011 at 7:19 pm #39704ludmeister
ParticipantQuote:– Each general has 6 tactics stored in memory starting at $65A0. Would have to expand that to 8.Let me attempt to ferret this out. At least, I have a couple of first steps to try.
When all else fails... manipulate the source code.
November 4, 2011 at 8:02 pm #39705DragonAtma
ModeratorIt's good to see that we're getting so many improvements! Here are some ideas to consider. Sure, it may take some space, but since the game's being expanded we have LOTS of room at the end!
[1] If we're making more tactic spots, we may as well make all of them usable. First menu gives the list of tactic categories (fire/water/healing/defense/misc1/misc2), and the second lists the (up to) five tactics form that group.
[2] It'd also be great if we could change the levels we get tactics. It's a bit silly to get a tactic every level until 31 and then suddenly stop getting any more tactics ever again!
[3] Hmm, adding another fire, water, and healing tactic or two may also be useful (and if the players don't want them learned, just set them to level 255! XD). It'll also let modders delay An Sha if they wish…
[4] Finally, slight stat increases would also be nice — after all, our heroes DO gradually improve over time, right? We don't need huge jumps, but minor gains would be nice especially for officers that you use a long time. Best would probably be int(level*gain/50), as (1) that way the modders know exactly how much they'll be gaining over time and (2) it'll give you more leeway over how much your officers improve.
November 4, 2011 at 8:07 pm #39706MiDKnighT
Moderator1 is a tall order. If you wanted ALL tactics available the idea that each tactitian keeps his own tactics would be easier. Ie…if Zhuge Liang was your tactitian and Jiang Wei was in battle, Jiang Wei would use his own tactics instead of Zhuge's.
2 is already possible. See the tactic stuff in the guide.
3 – adding brand new tactics would be tough. Replacing an existing one is easier.
4 – I thought about that too. We'd have to be careful not to hit 255 and wrap around. It seems that agility already does this?
November 4, 2011 at 8:17 pm #39707DragonAtma
ModeratorBy [1] I meant everyone having all tactics they would normally learn. Presumably it's just checking their level and int, but I could be wrong.
Aha! I missed the announcement of tactic level changes. Or, rather, I saw that they could rearrange tactics for levels 2-31, but I didn't realize that you guys figured out how to (say) move An Sha to level 50.
I didn't realize adding brand new tactics would be so tough; after all, it'd use the same formulas as the current ones, only with different damage output, TP costs, and levels.
I've said it before and I've said it again; I'm not a programmer. Even so, I'm pretty sure there are both commands for having 254+3 max out at 255 and having 254+3 wrap around to to 01. Obviously, we'd be using the first one! :wink:
[5] …hmm, did we ever find the formula for tactic damage? Obviously using Lian Huo on Sima Yi is silly, but having a way of scaling up damage somewhat may be useful!
November 4, 2011 at 8:25 pm #39708MiDKnighT
ModeratorQuote:I didn't realize adding brand new tactics would be so tough; after all, it'd use the same formulas as the current ones, only with different damage output, TP costs, and levels.The problem here is that there are tons of lookups in the ROM that have the tactics in order then move on to something else. You'll see what I mean if you look at the tactic stuff in the guide. To add a new tactic we'd have to change assembly and move pointers all over the place. However, swapping a tactic out is fairly painless assuming we knew what we were coding for the new tactic.
Quote:[5] …hmm, did we ever find the formula for tactic damage? Obviously using Lian Huo on Sima Yi is silly, but having a way of scaling up damage somewhat may be useful!We can control tactic damage (see the guide) but are you saying something like Lian Huo getting more powerful each level up? Would have to add some kind of formula to the damage to do something like that.
November 4, 2011 at 8:36 pm #39709DragonAtma
ModeratorThat's the intent…. if it's reasonable.
And the idea for having them slowly power up would be so people don't immediately ignore a damage/healing tactic when the next one arrives, just as sometimes Je Mian is more useful than Ce Mian (and vice versa); the other changes are more useful, but since we have multiple skilleed DoaE editors here…
November 4, 2011 at 8:50 pm #39710ludmeister
ParticipantSo, I have:
0x3b799: "0a85f3 0a65f3" -> "0a0a0a eaeaea"
0x3b7a3: "06" -> "08"
And that seems to add two slots for allied officer tactics. The problem is that enemy officers have their tactics stored right after these… and they will often overwrite allied tactics. I need to find a way to move these tactics so that they start not at $65ca, but at $65d8.
EDIT: That pointer is @ 0x3e0dd: "ca65" -> "d865"
Unfortunately, moving the values this way breaks the game currently, as it doesn't know how to find a tactician's tactics… to be displayed in the status screen or to be used in battle.
Continuing to hack away…
When all else fails... manipulate the source code.
November 4, 2011 at 8:54 pm #39711MiDKnighT
ModeratorCool lud, I'm still looking for ways to get our extra space. Looks like I'll have to resort to switching ROM pages when we do this lookup. Oh well…
November 4, 2011 at 11:45 pm #39712sonic.penguin
ModeratorQuote:To keep Liu Bei from leaving your party, change:0x3630A: A2808E9E6000
0x36314: FF
Inputted A2808E9E6000 at 3630A, changed to FF at 36314 and gave it a try… for some reason liu bei still left hehe. Did i miss something?
November 5, 2011 at 12:19 am #39713MiDKnighT
ModeratorOK this space thing for the 8 tactics has been a tougher nut to crack than anticipated. I'll crack it sometime this weekend.
Quote:Inputted A2808E9E6000 at 3630A, changed to FF at 36314 and gave it a try… for some reason liu bei still left hehe. Did i miss something?Hmm, it worked for me when I originally tested it. I hope I didn't forget to document a step…arg…that would suck.
November 5, 2011 at 12:43 am #39714ludmeister
ParticipantQuote:OK this space thing for the 8 tactics has been a tougher nut to crack than anticipated. I'll crack it sometime this weekend.True, that. What's nasty from the execution side of things is that the AI will need to know where to get its tactics from (and pull from 8 possible), and I'm not quite sure how that will be done as of yet. Now, one clue I've found is that there are 5 places in the ROM where the following code pattern executes (0x3b72a, 0x3b799, 0x3d470, 0x3df35, and 0x3e0d1):
0A- ASL
85 F3- STA $00F3
0A- ASL
65 F3- ADC $00F3
This effectively multiplies the Accumulator by 6… and I'm not able to think of anything else that comes in multiples of six other than tactics.
When all else fails... manipulate the source code.
-
AuthorPosts
- You must be logged in to reply to this topic.

