• Topic Archived
You're browsing the GameFAQs Message Boards as a guest. Sign Up for free (or Log In if you already have an account) to be able to post messages, change how messages are displayed, and view media in posts.
  1. Boards
  2. Destiny of an Emperor
  3. DoaE Rom Hacking - Meteorstrike?

User Info: MiDKnighTx

MiDKnighTx
8 years ago#1
Hi All,

We have made significant progress on DoaE map editing and tools. For more info see this thread:

http://www.lordyuanshu.com/forums/topic/how-to-move-castles-change-graphics-etc-in-doae1

However, after doing some map editing, castle and battle moving, etc... I ran into a problem...

I realized that when starting in a non-Xu Zhou region area, experience and gold accumulates much faster even if the number of soldiers you are fighting is the same as the Xu Zhou area. So much so that you level up after every fight...arg... So it's not just the number of soldiers that affect experience/gold gained after battle. It also has to do with the chapter you are in (on the map).

What I'm looking to find out is:

- What is the formula for getting experience and gold after battle. How do the world map "chapters" affect this? So for example, is it possible to change chapter 4 to give chapter 1 style experience/gold after battle...

I'm sure Meteorstrike could help with this if he's still around but if not, hopefully someone else can help me find this?

User Info: MiDKnighTx

MiDKnighTx
8 years ago#2
This might help but I took 3 samples after winning battles from the debugger in FCE ultra. Noticed this in each case.

:000F:F0 0A BEQ $001B
:000F:F0 1A BEQ $002B
:000F:F0 7A BEQ $008B

0A, 1A, and 7A translate to the amount of gold earned but I can't tell how it's coming up with that.

User Info: MiDKnighTx

MiDKnighTx
8 years ago#3
OK so I put a breakpoint on 0x10 and started playing around with the trace logger. This looks like the most relevant stuff for 0x10 when getting experience and gold. Experience gained here was 31 and gold gained here was 158 in chapter 4 against 5 enemies:

$99DF:99 10 00 STA $0010,Y @ $0011 = #$60 A:00 X:11 Y:01 P:nvUbdIZC
$99DF:99 10 00 STA $0010,Y @ $0010 = #$D0 A:8C X:10 Y:00 P:NvUbdIzC
$FA18:65 10 ADC $0010 = #$08 A:00 X:24 Y:00 P:nvUbdIZc
$99DF:99 10 00 STA $0010,Y @ $0011 = #$00 A:00 X:0D Y:01 P:nvUbdIZc
$99DF:99 10 00 STA $0010,Y @ $0010 = #$08 A:64 X:0C Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$05 A:08 X:24 Y:00 P:nvUbdIzc
$99DF:99 10 00 STA $0010,Y @ $0011 = #$00 A:00 X:09 Y:01 P:nvUbdIZc
$99DF:99 10 00 STA $0010,Y @ $0010 = #$05 A:8C X:08 Y:00 P:NvUbdIzc
$FA18:65 10 ADC $0010 = #$08 A:0D X:24 Y:00 P:nvUbdIzc
$99DF:99 10 00 STA $0010,Y @ $0011 = #$00 A:00 X:05 Y:01 P:nvUbdIZc
$99DF:99 10 00 STA $0010,Y @ $0010 = #$08 A:64 X:04 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$05 A:15 X:24 Y:00 P:nvUbdIzc
$99DF:99 10 00 STA $0010,Y @ $0011 = #$00 A:00 X:01 Y:01 P:nvUbdIZc
$99DF:99 10 00 STA $0010,Y @ $0010 = #$05 A:64 X:00 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$05 A:1A X:24 Y:00 P:nvUbdIzc
$99F4:85 10 STA $0010 = #$05 A:1F X:FD Y:FF P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$1F A:00 X:24 Y:00 P:nvUbdIZc
$D678:B1 00 LDA ($00),Y @ $0010 = #$1F A:9A X:98 Y:00 P:nvUbdIZc
$9A93:85 10 STA $0010 = #$1F A:20 X:00 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$20 A:00 X:21 Y:00 P:nvUbdIZc
$9A93:85 10 STA $0010 = #$20 A:23 X:01 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$23 A:20 X:21 Y:00 P:nvUbdIzc
$9A93:85 10 STA $0010 = #$23 A:20 X:02 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$20 A:43 X:21 Y:00 P:nvUbdIzc
$9A93:85 10 STA $0010 = #$20 A:23 X:03 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$23 A:63 X:21 Y:00 P:nvUbdIzc
$9A93:85 10 STA $0010 = #$23 A:20 X:04 Y:00 P:nvUbdIzc
$FA18:65 10 ADC $0010 = #$20 A:86 X:21 Y:00 P:NvUbdIzc
$9AA1:85 10 STA $0010 = #$20 A:A6 X:05 Y:00 P:NvUbdIzC
$FA18:65 10 ADC $0010 = #$9E A:00 X:24 Y:00 P:nvUbdIZc
$D678:B1 00 LDA ($00),Y @ $0010 = #$9E A:9A X:91 Y:00 P:nvUbdIZc

Total was 31 experience (1F) and 158 gold (9E)
The "D678" lines are showing the final numbers.

Each unit had experience of 8 5 8 5 5
Math isn't adding up for gold.

User Info: MiDKnighTx

MiDKnighTx
8 years ago#4
OK trying a different approach. Found that the chapter number you are in is put into $6026. This is added when you enter a battle. The value assigned depends on where you are in the map. In the Xu Zhou area this is "01", in the Yuan Shao area it is "04", etc... When you enter a battle it is assigned via this instruction:

00:B301:AD 26 60 LDA $6026 = #$04

Where #$04 is the chapter number. Chapter numbers are:

01=Yellow Turbans
02=Dong Zhuo
03=Yuan Shu
04=Yuan Shao
05=Jingzhou
06=Shu
07=Wu
08=Wei

So if we could switch the order around on this table we are golden. But still looking into how to do that...

User Info: MiDKnighTx

MiDKnighTx
8 years ago#5
VICTORY!

It was very tough but I finally got it. After using FCE Ultra and trace logging everything when a battle is started, finally pieced together how it was getting the 'chapter' information. I'll save you the gory details but the main point is this... It looks like it starts at around 0x37e00:

0000 0000 0000 0000 4444 1111 0000 0000
0000 4444 4441 1111 0000 0000 0444 4444
4411 1111 0000 0000 4433 3222 2211 1111
0000 0000 4433 3222 2221 1111 0000 0000
0443 3332 2222 1111 0000 0000 0443 3338
8888 8888 8800 0006 6655 3333 8888 8888
8800 0066 6655 5333 8888 8888 8800 0066
6655 5555 5888 8888 8800 0066 6555 5555
5778 8888 8800 0066 6555 5555 5778 7788
8800 0006 6666 5555 5777 7788 8800 0066
6666 6555 5777 7788 8800 0066 6666 7777
7777 7700 0000 0066 6666 7777 7777 7700
0000 0066 6666 7777 7777 7700 0000 0000
0000 7777 7777 7700 0000 0000 0000 7777
7777 7700 0000 0000 0000 0000 0000 0000

Each number represents a chapter number (0-8). The chapter numbers are like I posted before:

0=No Random Encounters
1=Yellow Turbans
2=Dong Zhuo
3=Yuan Shu
4=Yuan Shao
5=Jingzhou
6=Shu
7=Wu
8=Wei

Each number corresponds to a 'zone' on the map. As far as I can tell they are sorted by VERT-HORIZ. Want to change the Chapter 1 Xu Zhou area to be Chapter 8 (Wei)? Simply change all 1's to 8's in the above section. Knowledge of how the zones are layed out (or when we can sort zones by VERT-HORIZ or HORIZ-VERT in the tool) will allow us to *customize* enemy areas. Maybe the snow area will no longer be just chapter 4. Maybe it will be chapter 2 on the west side and chapter 3 on the east side. Or maybe you can break Wei up into separate chapters... Now the possibilities for a customized map with customized enemy areas should be wide open.

User Info: scarecrow41

scarecrow41
8 years ago#6
Impressive work.
"Whenever you find yourself on the side of the majority, it is time to pause and reflect" Mark Twain

User Info: kawaiifan

kawaiifan
8 years ago#7
Nice work MiDKnighTx ^.^ Thank you!

May I rearrange the numbers that you posted, to make the pattern easier to see at a glance? ^.~
It's the same sequence; only the line breaks are different.

0000
0000 0000 0000 4444 1111 0000
0000 0000 4444 4441 1111 0000
0000 0444 4444 4411 1111 0000
0000 4433 3222 2211 1111 0000
0000 4433 3222 2221 1111 0000
0000 0443 3332 2222 1111 0000
0000 0443 3338 8888 8888 8800
0006 6655 3333 8888 8888 8800
0066 6655 5333 8888 8888 8800
0066 6655 5555 5888 8888 8800
0066 6555 5555 5778 8888 8800
0066 6555 5555 5778 7788 8800
0006 6666 5555 5777 7788 8800
0066 6666 6555 5777 7788 8800
0066 6666 7777 7777 7700 0000
0066 6666 7777 7777 7700 0000
0066 6666 7777 7777 7700 0000
0000 0000 7777 7777 7700 0000
0000 0000 7777 7777 7700 0000
0000 0000 0000 0000 0000
kawaiifan misses her gfaqs9 ;.;

User Info: MiDKnighTx

MiDKnighTx
8 years ago#8
Yes that arrangement helps you visualize the map.

User Info: kawaiifan

kawaiifan
8 years ago#9
*smiles happily* ^.^
and thank you for finding these!
kawaiifan misses her gfaqs9 ;.;

User Info: nine_dragons

nine_dragons
8 years ago#10

Howdy DOAErs! Just found these forums on Gamespot. Thanks for making the tool--I'm starting to use it now and am quite impressed. Not sure if this is the right place to post ideas, but any thoughts on adding items to the tool? Mainly just to be able to change item names, cost, and perhaps stats for weapons/armor. It might be a lot more work, and you guys have already come a long way with this! I just thought some items really need to change. The GEMSWORD, for instance. Maybe we could turn it into DIAO CHAN...who has been locked up in Wang Yun's basement...for days... :)

  1. Boards
  2. Destiny of an Emperor
  3. DoaE Rom Hacking - Meteorstrike?
  • Topic Archived