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, 9 months ago by
MiDKnighT.
-
AuthorPosts
-
December 21, 2011 at 7:30 pm #40000
Lord Yuan Shu
KeymasterQuote:how do you fit Chituma into a box?lol yep, I considered this that's why I'm putting him in a location inside the cave but not in a treasure chest.
Quote:how about finishing up some DOAE2 sprites for DOAE importing? I havent had the time to do some but with your artistic expertise…nudge nudge…That would be damn awesome. That and figuring out where to find villagers in the other towns.
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 22, 2011 at 8:10 am #40001DragonAtma
ModeratorIf I get a chance, I'll work on them; I'm kinda busy with putting finishing touches on my gemfire mod, though.
December 24, 2011 at 8:12 am #40002Lord Yuan Shu
KeymasterQuote:Place – World Map – Entrance – Location CodeLuoSang – 09070613 – 0C180618 – 7F
XuZhou – 0B070712 – 0E080F01 – 7E
QingZhou – 05060712 – 0E0B0002 – 7D
DaXing – 0A070211 – 0E0E0801 – 7C
TieMenXia – 0C090412 – 0E020C0A – 7B
HuLaoGuan – 080A0410 – 0E010D18 – 75
LuoYang1 – 0D09050E – 0E1A0707 – 21
LuoYang2 – C31A0707 – 0D0E001D – 71
YangZhou – 10A010D – 0907001D – 70
ChangAn – 09080A0A – 0E0B0F1D – 6F
Yuan – 030B060C – 0C13 081B – 6E
HuaiNan – 090C010B – 0E07071B – 6D
ChenCang – 030B010B – 0E1A041E – 6C
Notice something weird about Yang Zhou's address. Only 7 bits. Is that a misprint? Because I went to change it so I looked for it on the map. I searched 01 0A 01 0D, because that's what it is in the Hex. But it ended up being C1 0A 01 0D for some reason. All's well that ends well I suppose, but this might be something to keep in mind when looking for other castles / gates in hex.
Also, was talking to Meteorstrike on youtube about finding the villager values (dialogue, general id, etc) for the other villages (like he showed with Lou Sang).
Quote:My notes are at home, but I took a quick look. This is mostly from memory, so it might not be 100% correct. :pDebug breakpoint at $E817
From here, the game calculates where to look for the info about the villagers.
X = Map ID ( This is the value at $47 )
( $9000,X ) | ( $9080,X << 8 ) = Start address of the villagers data for this map ID.
$9000 == ROM Address 0x031010
$9080 == ROM Address 0x031090
$8000 == ROM Address 0x030010
Example:
Village ID = 7F ( This is that first village )
Then the address of that village is at:
$907F + $90FF == ( 0x03108F ) | ( 0x03110F << 8 )
This value will look something like: $9123 ( Completely made up value because I have my notes at home. :p )
So this would be located in the ROM at:
( 9123 & 0x7FFF ) + 0x031010 = 0x032133
This would be the start address of where all the villagers' info are located for this particular Map ID.
From there, the format should be the same as the format for that other first town… whatever it was called… You can explore in more detail if you try the breakpoint, but if you do this kind of math, you won't even have to bother looking at the code. :p
Note that I didn't go too deep into exploration here, but this should be correct… for the most part… try it out and see what happens…
I can find the village id in the debug but can't find the ~9000 value for each village. Anyone else make sense of this?
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 24, 2011 at 11:01 am #40003Zhuge Liang
ParticipantI've just tried debug out a few times recently so I won't be much help, so you should wait for MidKnight to come back, he might figure things out quickly I guess.
DoaE gave birth to Huo Hu.
December 25, 2011 at 2:50 am #40004sonic.penguin
ModeratorQuote:C1 0A 01 0DThat's so far what I call "cave notation". The C1 value determines where ^ or v on the screen it is located.
December 25, 2011 at 10:40 pm #40005Lord Yuan Shu
KeymasterQuote:I've just tried debug out a few times recently so I won't be much help, so you should wait for MidKnight to come back, he might figure things out quickly I guess.yea, not experienced with debug either so not sure how to get it to yield the data I need (like do I set the debug break point to what he said and then go to a town to get the data? Just not sure..). But yea, MiDKnighT seems adept at finding this sort of thing out so maybe he'll know when he's back.
Quote:C1 0A 01 0DThat's so far what I call "cave notation". The C1 value determines where ^ or v on the screen it is located.
Thing is though, that's Yang Zhou castle. Not a cave. I know what you're talking about though. When I tried to search for the Gold Key cave by the address hex editor gave out, it found nothing. I had to search it with the first byte omitted to find it (first two characters). Still haven't figured out how to get the guys to stand where they want, I tried different values in that hex spot but nothing changed anything (one value made the location further north).
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 28, 2011 at 3:22 am #40006Lord Yuan Shu
KeymasterActually, you're kind of right. I've kept the C1 but the characters aren't facing the right way. I think the game requires certain code when you go into a castle that has you enter "horizontally" (think Yang Zhou, Guang Zhong, etc). So when I enter the new, moved Yang Zhou, the guys are spaced out in one spot each to the south (through the wall).
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 28, 2011 at 3:12 pm #40007MiDKnighT
ModeratorThere is something in one of the bits of the warp/address that determines which way the character is facing. It also determines if the character will walk around or stand still. You'll have to play with it to get them facing the way you want them to. I haven't documented all that yet. Example, if I change 0x31AD3 from "19" to "89" then the first villager will just stand there facing backwards. Ie…it's the 3rd value in the address.
Also "C1" should be the first value of the Yang Zhou address.
December 28, 2011 at 5:32 pm #40008Lord Yuan Shu
KeymasterQuote:You'll have to play with it to get them facing the way you want them toAny range of values to consider for these hex spots? It'd be good to know what has worked for other people to straighten out characters in specific castles, though maybe the value varies based on where you moved the castle.
Quote:Example, if I change 0x31AD3 from "19" to "89" then the first villager will just stand there facing backwards. Ie…it's the 3rd value in the address.Quote:0x31AD1 = Villager 1 Starting Y1 Position0x31AD2 = Villager 1 Starting Y2 Position
0x31AD3 = Villager 1 Starting X1 Position
0x31AD4 = Villager 1 Starting X2 Position
0x31AD5 = Villager 1 Dialog Line
0x31AD6
0x31AD7 = Villager 1 General ID
Yea I understand that part that Meteorstrike explained. First two values in the address are starting location for the villager…then 3rd and 4th determine how they move around (if they do at all, ie setting the value higher than the length of the village).
I wonder what the 6th value is that is left blank. It is 00 for all the villagers in the first village and then for the DoaE shopkeepers.
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 28, 2011 at 5:39 pm #40009MiDKnighT
ModeratorActually the 3rd and 4th are still addresses but the first bit of the 3rd address determines the character's walking pattern or which way they face.
The 6th value is which text bank they are using I believe. The guys in the first village are using text bank 00.
December 28, 2011 at 5:58 pm #40010Lord Yuan Shu
KeymasterQuote:The 6th value is which text bank they are using I believe. The guys in the first village are using text bank 00.Damn, this explains why I couldn't find any other villager sets. I kept looking for patterns of 00 happening every 7th value (which it is in the first section of villagers).
You get a chance to read what Meteorstrike sent me on Youtube? Could be a clue as to finding other villager sets…
—
Quote:Also, was talking to Meteorstrike on youtube about finding the villager values (dialogue, general id, etc) for the other villages (like he showed with Lou Sang).My notes are at home, but I took a quick look. This is mostly from memory, so it might not be 100% correct.
Debug breakpoint at $E817
From here, the game calculates where to look for the info about the villagers.
X = Map ID ( This is the value at $47 )
( $9000,X ) | ( $9080,X << 8 ) = Start address of the villagers data for this map ID.
$9000 == ROM Address 0x031010
$9080 == ROM Address 0x031090
$8000 == ROM Address 0x030010
Example:
Village ID = 7F ( This is that first village )
Then the address of that village is at:
$907F + $90FF == ( 0x03108F ) | ( 0x03110F << 8 )
This value will look something like: $9123 ( Completely made up value because I have my notes at home. )
So this would be located in the ROM at:
( 9123 & 0x7FFF ) + 0x031010 = 0x032133
This would be the start address of where all the villagers' info are located for this particular Map ID.
From there, the format should be the same as the format for that other first town… whatever it was called… You can explore in more detail if you try the breakpoint, but if you do this kind of math, you won't even have to bother looking at the code.
Note that I didn't go too deep into exploration here, but this should be correct… for the most part… try it out and see what happens…
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 29, 2011 at 3:27 pm #40011MiDKnighT
ModeratorYa I understand what he's saying. There are location codes for each place. Luo Sang is location "7F". He's saying it calculates the location of the villager info based on the location ID. Are you looking for a particular place? I can help run the calculation for you.
December 29, 2011 at 4:05 pm #40012Lord Yuan Shu
KeymasterQuote:There are location codes for each place. Luo Sang is location "7F".This much even I can find for each village in the debug (the village location value). What interests me more is how he is able to find where each village is in the hex. I don't quite get where he comes with the $9080, $8000 values, etc.
I think it would add a lot to be able to switch out villager sprites in a random village, mostly to be able to plant characters to recruit in cities. For example I did this in my new mod in Lou Sang Village, turned a different guy in town to a recruitable. I guess Xu Zhou would be a good start, particularly the throne room (I need to fill it with Eunuch's). huohu
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingDecember 29, 2011 at 4:15 pm #40013MiDKnighT
ModeratorQuote:This much even I can find for each village in the debug (the village location value). What interests me more is how he is able to find where each village is in the hex. I don't quite get where he comes with the $9080, $8000 values, etc.Oh OK, I kinda talked about this in the advanced debugging part of the guide. If you go into FCE Ultra and go to the hex editor, you will see the RAM. That is what the game reads when it is running. $0 – $7FFF is RAM memory. It changes constantly and doesn't represent any specific part of the ROM. $8000 – $BFFF is the current ROM page located. There are a bunch of different ROM pages in the ROM:
Page Address
0 10
1 4010
2 8010
3 C010
4 10010
5 14010
6 18010
7 1C010
8 20010
9 24010
A 28010
B 2C010
C 30010
D 34010
E 38010
F 3C010
10 40010
11 44010
12 48010
13 4C010
14 50010
15 54010
16 58010
17 5C010
18 60010
19 64010
1A 68010
1B 6C010
1C 70010
1D 74010
1E 78010
1F 7C010
So what is in $8000 – $BFFF could be any one of these pages. Per Meteorstrike's update, the villagers live on page "0C". Ie… from 0x30010 to 0x3400F.
The last part of the RAM is $C000 – $FFFF which is the main control code part of the ROM. This is always page "0F". Ie… from 0x3C010 to 0x4000F.
So with that said, if we're talking about page "0C" and an address of $9000 we are talking about 0x31010 in the ROM. You have to add 0x10 to the ROM address (over RAM) to account for the ROM header.
Quote:I think it would add a lot to be able to switch out villager sprites in a random village, mostly to be able to plant characters to recruit in cities. For example I did this in my new mod in Lou Sang Village, turned a different guy in town to a recruitable.This should be pretty easy to do.
Quote:I guess Xu Zhou would be a good start, particularly the throne room (I need to fill it with Eunuch's).Remember, Xu Zhou the town and Xu Zhou inside the castle are two different things. When you step into the castle you warp to somewhere else. So the dudes inside the castle may not be where you expect them to be. However I did find these guys before and changed them. Just can't remember where they were now…but I can find them.
January 1, 2012 at 4:12 pm #40014Lord Yuan Shu
KeymasterWow, actually just moved the Yang Zhou cave and got the characters to stand in the right spot as they exit. The address in the hex for the new cave was 09 08 0B 0C but when I changed it to A9 08 0B 0C it worked perfectly. I did this because the address before was 03 0A 0D 0C in the hex editor, but when checking the hex location in WindHex I saw it was A3 0A 0D 0C.
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hacking -
AuthorPosts
- You must be logged in to reply to this topic.

