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
-
May 30, 2013 at 11:23 pm #40446
Niahak
ModeratorIt looks like the issue is that the pointers (starting at #47, 0-indexed) in the new text bank start pointing to a much lower value than their predecessors.
At 0x3c040 and on (and correspondingly 0x3c240 and on) everything is zeroed out. DoaEditor thinks you have 240 pointers since that's what we defined for the 3rd text bank, but only 48 are actually present.
If you want to get it working no matter what, go into
DoaEd directorytablesAdditionalTextBanks.xml
Change
Code:<NumberOfPointers>240</NumberOfPointers>into
Code:<NumberOfPointers>48</NumberOfPointers>Long-term, I'd suggest fixing the IPS by defining 0x3c040-3c100 and 3c240-3c300 to 8A8A8A8A… and ABABAB… respectively.
I think we had this issue earlier, too.
Also, I'm flying to Japan tomorrow morning. Won't be able to help with further issues, but hopefully there won't be any :)
May 31, 2013 at 12:03 am #40447MiDKnighT
ModeratorThx Niahak, I'll fix that in the IPS patch.
May 31, 2013 at 12:14 am #40448ludmeister
ParticipantI've applied the fix for the Random Spoils routine, so it doesn't reward you for retreating. I don't know exactly what changes you've made to the algorithm beyond the potential AI fix, MiDKnighT, so I'll just let you know what I did so you can apply the fix yourself. Hopefully this will work in the best interest of IPS v1.3.
I inserted this code "A92EC500F00F" in between "A2021E0005387E0005CA10F6" and "A5AD65604A65AF6510297FC9083005A90E". Here's what it does:
Code:1E:A55F:A9 2E LDA #$2E <– #$2E is the message saying, in effect "You retreated successfully"
1E:A561:C5 00 CMP $0000 = #$2E <– Is that the message that was just shown?
1E:A563:F0 0F BEQ $A574 <– If so, do not execute spoils algorithm
…
1E:A574:A9 0E LDA #$0E
1E:A576:4C 40 A5 JMP $A540
1E:A540:20 82 C4 JSR $C482 <– Continue exiting battleThis will work as long as you don't use a tactic to retreat from battle (unless that tactic uses text #$2E as it's reporting of success.)
Note: I just needed to insert those six bytes "A92EC500F00F". Thankfully, I didn't have to do any extra changes to branches.
When all else fails... manipulate the source code.
May 31, 2013 at 11:20 am #40449MiDKnighT
ModeratorOK got it, thanks!
0x7A530:
Code:A200A9009D05629DAF60E8E006D0F560
00000000000000A90E2082C44C50A5EA
2082C400000000000000000000000000
2020A52050A6A2021E0005387E0005CA
10F6A92EC500F00FA5AD65604A65AF65
10297FC56E3005A90E4C40A565AE4A65
61651165AD290F856EAD3670AACA8A29
070A0A0A0A656E856EEAEAEAA5AE6552
651165626563297FC9153010A56EA8B9
D0A5856EA900856F4C37A5EAA56EA8B9
50A6856EA900856F4C37A5EA00000000
31313131313131313132303030282B2C
313131313131323232303030282B2C38
323232323232323330303028282B2C38
323232333333303028282B2B2C2C3838
32333333333330302828282B2C2C3838
33333333333334303028282B2C2C3838
34343434343434303028282B2C2C3838
343434343434302128282B2B2C2C3838
AD9060AABD2064C900D005A908856E60
4A4A4A4A856E60000000000000000000Quote:This will work as long as you don't use a tactic to retreat from battleI see no reason to bring back the retreat tactic but I would like to have retreat based on LDR+AGI of the party leader vs LDR+AGI of the enemy leader.
May 31, 2013 at 11:29 am #40450MiDKnighT
ModeratorRe-cut the IPS patch with the DoaEditor fix + retreat fix. Note that for the DoaEditor fix you'd either need to apply patch 1 and 2. If you don't want to re-apply patch 1 just follow Niahak's instructions above.
Also, LDR of the party leader now impacts the outcome of a duel. So to determine who wins a duel:
Own STR: 50%
Own AGI: 16.5%
Party Leader's LDR: 16.5%
Secret Sauce Random Number: 16.5%
Now all 3 new attributes have 1 job each:
LDR: Party leader's LDR affects outcome of duel.
VIT: Used in base AC enhancement.
POL: Used in item drop enhancement.
May 31, 2013 at 8:40 pm #40451MiDKnighT
ModeratorI've made LDR and AGI important for retreating. Want to get away from most battles? Have someone with high LDR and AGI leading your party. Changes:
0x39FC7:
A5AD65AF291FDD83A69020 –> A91E2082C4EAEAEAEAEAEA
0x79FC0:
1E1C1A1814100CA90E2082C48E3064AE
9060BD00644A8D3264BDB4614A6D3264
A207BD00644A8D3364EA4CE29FA90E20
82C4BDB4614A6D3364AE3064AD3264CD
33649004CA4CFA9FE8E8A5AD65AF291F
DDB09F90034CB79F4CDD9F0000000000
How the regular retreat code works:
0E:9FA5:AD AF 60 LDA $60AF = #$04 <– Enemy leader general ID
0E:9FA8:C9 02 CMP #$02 <– Is it higher than pirate or brigand?
0E:9FAA:90 0B BCC $9FB7
0E:9FAC:E8 INX <– If so increment X making it harder to escape
0E:9FAD:C9 04 CMP #$04 <– Is it higher than bandit force?
0E:9FAF:90 06 BCC $9FB7
0E:9FB1:E8 INX <– If so increment X making it harder to escape
0E:9FB2:C9 08 CMP #$08 <– Is it higher than rebel force?
0E:9FB4:90 01 BCC $9FB7
0E:9FB6:E8 INX <– If so increment X making it harder to escape
0E:9FB7:A5 AD LDA $00AD = #$7B <– Random number check
0E:9FB9:65 AF ADC $00AF = #$6A <– Random number check
0E:9FBB:29 1F AND #$1F <– Random number check
0E:9FBD:DD 83 A6 CMP $A683,X @ $A781 = #$AC <– Check to see if it's less than this number, if so they got away. The numbers it checks against are 1E 1B 18 14. The higher X is, the harder it is to escape
0E:9FC0:90 20 BCC $9FE2 <– Got away
0E:9FC2:20 0D D1 JSR $D10D <– Didn't get away
So here are my changes:
1E:9FBC:8E 30 64 STX $6430 = #$04 <– Store current X value
1E:9FBF:AE 90 60 LDX $6090 = #$02 <– What general is leading our army?
1E:9FC2:BD 00 64 LDA $6400,X @ $6404 = #$73 <– Get LDR for leader
1E:9FC5:4A LSR
1E:9FC6:8D 32 64 STA $6432 = #$4F <– Get AGI for leader
1E:9FC9:BD B4 61 LDA $61B4,X @ $61B8 = #$36
1E:9FCC:4A LSR
1E:9FCD:6D 32 64 ADC $6432 = #$4F <– Combine LDR + AGI
1E:9FD0:A2 07 LDX #$07 <– Get enemy leader
1E:9FD2:BD 00 64 LDA $6400,X @ $6404 = #$73 <– Get enemy leader's LDR
1E:9FD5:4A LSR
1E:9FD6:8D 33 64 STA $6433 = #$29
1E:9FD9:EA NOP
1E:9FDA:4C E2 9F JMP $9FE2 <– Gotta skip ahead to leave space for a jump point
1E:9FDD:A9 0E LDA #$0E
1E:9FDF:20 82 C4 JSR $C482
1E:9FE2:BD B4 61 LDA $61B4,X @ $61B8 = #$36 <– Get enemy leader's AGI
1E:9FE5:4A LSR
1E:9FE6:6D 33 64 ADC $6433 = #$29 <– Combine enemy leader's LDR+AGI
1E:9FE9:AE 30 64 LDX $6430 = #$04 <– Get X back
1E:9FEC:AD 32 64 LDA $6432 = #$4F <– Get allied leader's LDR+AGI
1E:9FEF:CD 33 64 CMP $6433 = #$29 <– Compare it to enemy leader's LDR+AGI
1E:9FF2:90 04 BCC $9FF8
1E:9FF4:CA DEX <– If our LDR+AGI is higher, lower X making it more likely that we escape
1E:9FF5:4C F9 9F JMP $9FF9
1E:9FF8:E8 INX <– Otherwise increase X making it harder to escape.
1E:9FF9:E8 INX <– Increase X again since they are faster than us…
1E:9FFA:A5 AD LDA $00AD = #$BF <– Get random number
1E:9FFC:65 AF ADC $00AF = #$20 <– Get random number
1E:9FFE:29 1F AND #$1F <– Get random number
1E:A000:DD B0 9F CMP $9FB0,X @ $9FB3 = #$18 <– Compare our random number to our escape chance
1E:A003:90 03 BCC $A008
1E:A005:4C B7 9F JMP $9FB7 <– Didn't make it
1E:A008:4C DD 00 JMP $00DD <– Escaped!
It's still random but if your leader's LDR+AGI is higher than the enemies, your chances of getting away are greater.
You can make adjustments to the retreat chances by playing with the numbers at 0x79FC0-0x79FC6:
1E 1C 1A 18 14 10 0C
The ones to the left are the ones where you have the greatest chance of escaping. The numbers on the right you are more likely to get caught. The higher the number, the easier you escape, the lower the number, the harder it is to escape. These number should go from highest to lowest or it breaks the LDR+AGI thing and the type of force adjustments. Example:
Be able to run from almost every battle
1F 1E 1D 1C 1B 1A 19
Nearly impossible to run:
06 05 04 03 02 01 00
May 31, 2013 at 10:53 pm #40452sonic.penguin
ModeratorCool idea. So strong but stupid guys have less chance of retreating? I'm still glad the retreat tactics are gone.
Good idea using more stuff to making duels more random too. Is the IPS the most updated then?
June 1, 2013 at 1:59 am #40453MiDKnighT
ModeratorQuote:So strong but stupid guys have less chance of retreating?Actually strong or stupid have nothing to do with it. It's all about LDR and AGI of the party leader and enemy leader. Enemies with a leader that has high LDR and AGI may be hard to run from. But if your party leader has high LDR and AGI, you'll be able to run more easily from more battles.
Quote:Is the IPS the most updated then?Now it is.
June 1, 2013 at 11:16 am #40454sonic.penguin
ModeratorW/ the latest IPS patch and the latest DOAEditor, still no brass tacks… try it yourself.
Wow, you're right though. The new portrait selector for DOAEditor is a really handy tool, especially with a large amount of portraits!
June 3, 2013 at 3:25 pm #40455MiDKnighT
Moderator"New Attributes" section added to the guide.
June 6, 2013 at 4:36 pm #40456sonic.penguin
ModeratorWith the current IPS patch, the books available are 2 and 3? Now having 2 is fine, but can they be renamed to 1 and 2?
June 6, 2013 at 4:41 pm #40457sonic.penguin
ModeratorUsing the current IPS, upon leveling up, the game froze
June 6, 2013 at 4:56 pm #40458MiDKnighT
ModeratorYes I fixed that but haven't updated the patch yet.
Bug fix for level ups:
0xEB8E0: C44C21B90000A90E2082C4EA
0xEB92F: "D7"–>"D6"
June 6, 2013 at 10:51 pm #40459sonic.penguin
ModeratorIt doesnt seem like the displayed AP of weapons is still read from 38609… What are the new addresses for weapon damage/displayed ap?
June 6, 2013 at 11:02 pm #40460sonic.penguin
ModeratorMaybe I should wait before applying IPS patches. Been testing things out w/ the current version and guys learn tactics but they don't gain TP and there is no announcement about tactics.
-
AuthorPosts
- You must be logged in to reply to this topic.

