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
-
January 1, 2012 at 10:44 pm #40015
sonic.penguin
ModeratorCongratulations! Bwahahaha? I wonder why that first hex value is so finicky. Anyways, something that I was wondering about while rolling in the new year was
A. Adjusting the values that determine whether or not a officer asks for cash, steeds, joins for free, or says the traitor/master line.
B. Adjusting how much cash an officer asks for, like doubling/tripling amount asked in stock DOAE.
C. I was given some info from Midknight and Meteorstrike on altering music, but wasnt sure if it could be found to alter specific battles aka pointers for each battle for music or whether or not the Super boss music was only for Sun Quan/Sima Yi.
January 2, 2012 at 5:47 am #40016MeteorStrike
ParticipantFor Destiny of an Emperor 2, the first value's highest bit determines if everyone should be grouped into the same tile or not. If set, you will have all the Generals occupying the same tile on entrance, and if cleared, they will be forming a line. The next 2 highest bits determines the direction they will face. 0 = North, 1 = South, 2 = West, 3 = East. The next highest bit determines if the Palettes and Patterns need to be reloaded or not. This is done for those caves when a Warp Point simply takes you to a new screen within the same cave, which makes it seem as a smooth transition. (EDIT: I believe this is also used for Castle Palaces that have a back room) The 4 lowest bits are then the Y-Low coordinates of the destination point.
For DOAE 1, I believe all this info is the same. In fact, for DOAE 2, there are no warp points at all that use the smooth transition bit, which tells me the code for Warp Points was clearly copy-pasted into DOAE 2, otherwise they wouldn't have bothered coding in something that they didn't even use in DOAE 2 in the first place.
January 15, 2012 at 3:47 pm #40017Niahak
ModeratorHey guys,
I have a few questions about warps. I think I've got the basic stuff down (…once I figured out that a warp HAS to be on a cave/gate/castle entrance), but on the first page there's some stuff that's touched on a little too lightly for me to code up.
1) Does anyone recall how many gull wing addresses there are? It looks like the pattern of data significantly changes at 0x38e33, which means there are most likely 12 (48 bytes of gullwing data). I'd appreciate confirmation on that from DoaE vets.
I'm thinking of showing the gullwing destinations as a different color, but making their movement separate from their brother warps.
2) Xuzhou's actual address appears not only in the "warp" section, but in the section I'll call "secondary warps" – where Luosang's second address appears.
Luosang's is at 0x36001, but Xuzhou's is at 0x36011. Looking at it now, there's clearly something else significant about this data – take a look.
Code:7F05000201061C0907071309170C1700
7E03000B0308010B0707120D070C0100(Spacing intentional – note that 7F is Luosang's code, and 7E is Xuzhou's code, while their addresses follow shortly afterward).
The question is, what kind of other data would be stored in here? I skimmed through the posts at the beginning of this topic, and didn't find any info about anything else we'd found here.
We might be able to glean something from the fact that there's only a subset of locations in this section:
Luosang, Xuzhou, Changan, Nanyang, Jizhou, Guiyang, Chengdu, Jianye, Luoyang
The only thing I can think of is (other than Luosang) these are all pretty significant story landmarks. Maybe these are all the important places to Invite Liu Bei?
There's also another pattern that's interesting: Each one after Xuzhou has a pattern of 000712081E starting two bytes after the city code.
Any thoughts?
/edit: One other thought – where is the secondary location for the Bar and for other "House" entrances (e.g. Zhuge Liang's, Ma Liang's)? I wonder if they're 'baked in' some other way than being stored directly in this section.
/edit2: I tried moving Luosang without doing anything to the "Secondary Warp". It worked fine, aside from the fact that when you leave Luosang for the first time (i.e. your 'origin' wasn't on the world map) you come out at the location specified above! So there is no "secondary warp" storage, per se – these must be initial drop-off locations for your party when you resume/start the game in certain chapters.
January 15, 2012 at 4:04 pm #40018DragonAtma
ModeratorClose, but not quite; that seems to be the list of where you can revive if you get wiped out.
After all, Luosang is the starting village; you can't invite Liu Bei there, but it's where you revive if you manage to get defeated by the turbans.
January 15, 2012 at 5:26 pm #40019Niahak
ModeratorAh, so the info probably refers to a map, then a specific location and a bit of dialogue. Thanks!
January 15, 2012 at 8:19 pm #40020MeteorStrike
ParticipantThis discussion almost makes me want to make my video of the Generator now, instead of waiting for the day I complete the DOAE 1 generator. I probably won't get to the DOAE 1 gen for a while… I just turned on the laptop and it had been off for days now.
The dating site and strip club has taken up all my time… Sometimes I wonder how much time of my life I could save if I didn't have those male hormones bothering me so often… and sometimes I wonder how much time of my life I could save if I could just grow up past my video game / hacking addiction. Hah hah!
Anyways, you guys actually are looking at the data wrong ( I think ) so here's the actual format for it: ( NOTE: This is for DOAE 2. I am pretty sure it's the same format as DOAE 1 though, but just letting you guys know… )
Code:List of Entrance Points: Source YLO = ( data[0] & 0x0F ) Source YHI = ( data[1] ) Source XLO = ( data[2] ) Source XHI = ( data[3] ) Dest YLO = ( data[4] ) Dest YHI = ( data[5] ) Dest XLO = ( data[6] ) Dest XHI = ( data[7] ) Dest Map ID = ( data[8] ) Dest Dir = ( data[0] >> 6 ) Extra Info Flag = ( ( data[0] >> 5 ) & 1 ) If ( Extra Info Flag == 0 ) Struct Size = 9 If ( Extra Info Flag == 1 ) Struct Size = 11 Extra Info Pointer = ( data[9] | ( data[10] << 8 ) )The Extra Info Pointer is a pointer for a piece of code that will execute when the player enters this location. This extra info pointer is only present if Extra Info Flag is on, so not all Entrance Points have it. The code handles things like placing you at a different destination entrance if you came from the north instead of the south, etc.
Code:List of Warp Points: Source YLO = ( data[0] ) Source YHI = ( data[1] ) Source XLO = ( data[2] ) Source XHI = ( data[3] ) Dest YLO = ( data[4] & 0x0F ) Dest YHI = ( data[5] ) Dest XLO = ( data[6] ) Dest XHI = ( data[7] ) Dest Map ID = ( data[8] ) Dest Dir = ( ( data[4] >> 5 ) & 3 ) Do not Reload Ass = ( data[4] & 0x10 ) Everyone Grouped = ( data[4] & 0x80 )BTW "Ass" is short for "Assets" i.e. the Palettes and Pattern tables. It has little to do with the "Ass" that Liu Bei is tapping in the Palace while you're working your ass off killing rebels for -his- credit.
Anyway, Warps do not have any Extra Info Pointer so their size is always 9 bytes.
Also, this is for the actual list of Entrance Points and Warp Points. As you could imagine, I had very little need for figuring out the list of Gullwings or Liu Bei invites or anything like that. I did hack the initial start-off location for a new game because I wanted the generator to start off at the beginning of the game though. Basically, there is a portion of code that loads some data stored in the ROM to construct the return stack. If you want to change the location of a Castle or other place where you start the game when you load, you will need to look for that chunk of data and change the return stack values from there too.
February 11, 2012 at 1:17 am #40021sonic.penguin
Moderatorbumping this for ease of use *shoves it off a cliff, whoops!*
April 13, 2012 at 2:30 pm #40022sonic.penguin
Moderatorbumping to make my life easier…
April 13, 2012 at 7:31 pm #40023sonic.penguin
ModeratorWell this stinks. Upon applying the IPS patch to the Rise of Lu Bu mod, it causes irreperable damage to a small portion of the game. It essentially writes over a small section at the end of one of the last text banks. Now if I change the text back to the original, it erases part of the code and thus freezes upon someone attacking.
So…… the big revamping I planned on doing to this mod is now stalled :crybaby:
April 13, 2012 at 11:38 pm #40024sonic.penguin
ModeratorFound the problem! It's Ludmeister's code for Agility based attacks that interferes with the game. I entered in all the new code by hand and found out that it is what is breaking the text banks. I THINK since Rise of Lu Bu was one of the first games utilizing the new ROM expansion code that something wasn't done correctly upon doing so which is why the code isn't fitting correctly.
Ah well! Guess I'll just have to make a brand new mod…
April 17, 2012 at 10:28 pm #40025sonic.penguin
ModeratorThis helped a lot w/ officer tactics
Quote:To set a fixed lower limit that Strategists must reach in order to be eligible to be tactician, here's what you gotta do:0x3b7c5: "dd9c61b003" -> "c996b004ea" (Open an eligible officer to gain their tactic list)
0x38348: "dd9c619043" -> "c9969044ea" (Allow an eligible officer to become tactician)
In both cases, you are replacing
DD 9C61- CMP $619C,X@$619C+ (Compare Int with Str)
with
C9 96- CMP #$96 (Compare Int with 150)
You could change the $96 to whatever, to set the bar as high or as low as needed. To remove all restrictions (except the restrictions set on the tactics themselves), set the code snippets to "EAEAEAEAEA"… NOP them out.
April 18, 2012 at 8:05 pm #40026sonic.penguin
ModeratorAh, i forgot to mention that the IPS patch needs to have that Gold/level bug fixed in order to keep it from being broken.
April 20, 2012 at 5:46 pm #40027sonic.penguin
ModeratorFinally cracked it :)
Changing Music
To change the music of the game, simply replace the address with the hex values below. For example, the World Map music is located at address 3BF8F and has a value of 27. Change 3BF8F to 20 and the World Map music will play the Menu Theme.
3BF8F= World Map 1
3BF90= Shop
3BF91= Cave
3BF92= Castle
3BF93= Fort
3BF94= Village
3BF8A= World Map 2
3BF6C= New World (Played everywhere after defeating final boss)
20= Menu Theme
21= New World Theme
22= Intro Theme
23= Battle Theme
24= Boss Theme
25= Insanely Hard Boss Theme
26= Hard Boss Theme
27= World Map 1 Theme
28= World Map 2 Theme
29= Village Theme
2A= Fort Theme
2B= Shop Theme
2C= Castle Theme
2D= Ending Theme
2E= Cave
2F= Victory
30= Defeat
31= Inn Jingle
32= Level Up
April 20, 2012 at 6:02 pm #40028MiDKnighT
ModeratorSweet, I'll add that to the guide with credit of course. You're becoming quite the hacker.
I also need to go through the last few pages of this thread to see what needs to be added to the guide.
April 20, 2012 at 7:40 pm #40029sonic.penguin
ModeratorWhoops, I mistyped it all, instead of 38F8F it should be 3BF8F
Changing Music
To change the music of the game, simply replace the address with the hex values below. For example, the World Map music is located at address 38F8F and has a value of 27. Change 3BF8F to 20 and the World Map music will play the Menu Theme.
3BF8F= World Map 1
3BF90= Shop
3BF91= Cave
3BF92= Castle
3BF93= Fort
3BF94= Village
3BF8A= World Map 2
3BF6C= New World (Played everywhere after defeating final boss)
20= Menu Theme
21= New World Theme
22= Intro Theme
23= Battle Theme
24= Boss Theme
25= Insanely Hard Boss Theme
26= Hard Boss Theme
27= World Map 1 Theme
28= World Map 2 Theme
29= Village Theme
2A= Fort Theme
2B= Shop Theme
2C= Castle Theme
2D= Ending Theme
2E= Cave
2F= Victory
30= Defeat
31= Inn Jingle
32= Level Up
-
AuthorPosts
- You must be logged in to reply to this topic.

