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 5:06 pm #40431
MiDKnighT
ModeratorSomething has broken the duel text code and I don't know what yet :cry:
May 30, 2013 at 5:06 pm #40432MiDKnighT
ModeratorSomething has broken the duel text code and I don't know what yet :cry:
May 30, 2013 at 5:10 pm #40433MiDKnighT
ModeratorAlso, I just got my first item drop but it was when I was retreating! Maybe add a check to see if the battle was really won?
May 30, 2013 at 5:28 pm #40434ludmeister
ParticipantQuote:Also, I just got my first item drop but it was when I was retreating! Maybe add a check to see if the battle was really won?Ha! That's funny. I'll look into it. :D
Also noticed a problem in the Duel code… I had Zhang Fei duel Dong Zhuo, and Dong Zhuo has death protection. Zhang Fei always seemed to kill him before. I haven't tracked down the issue yet.
EDIT: This is the instruction at which I'm hanging:
Code:1F:C95E:02 UNDEFINEDIt's a case of just going to the wrong place in the code… as it reads right in this manner:
Code:1F:C94D:9D 00 02 STA $0200,X @ $0201 = #$00
1F:C950:A5 19 LDA $0019 = #$E4
1F:C952:9D 01 02 STA $0201,X @ $0202 = #$00
1F:C955:A5 1A LDA $001A = #$42
1F:C957:9D 02 02 STA $0202,X @ $0203 = #$00
1F:C95A:A5 1B LDA $001B = #$B0
1F:C95C:9D 03 02 STA $0203,X @ $0204 = #$10 (This is the "02" that we hang on)
1F:C95F:E6 19 INC $0019 = #$E4When all else fails... manipulate the source code.
May 30, 2013 at 5:54 pm #40435ludmeister
ParticipantMiDKnighT:
This is the portion of the Duel code the executes right before I'm hanging:
Code:01:8E05:20 40 8D JSR $8D40
01:8E08:E0 3D CPX #$3D
01:8E0A:D0 03 BNE $8E0F
01:8E0C:4C A5 8D JMP $8DA5
01:8E0F:A5 79 LDA $0079 = #$05
01:8E11:85 B1 STA $00B1 = #$05
01:8E13:A5 4B LDA $004B = #$07
01:8E15:85 B2 STA $00B2 = #$00
01:8E17:20 B0 90 JSR $90B0The "JSR $90B0" instruction calls the subroutine where execution halts. I hope I'm helping.
EDIT: Eureka! It is checking the loser's officer ID with the Duel Death protections, and the check is succeeding. This, in $01:90c0, sends execution to $01:90cf… which is not the way the code is supposed to be divided. Here's the offending code.
Code:01:90B8:B9 A8 60 LDA $60A8,Y @ $60D8 = #$BA
01:90BB:A0 3F LDY #$3F
01:90BD:D9 80 84 CMP $8480,Y @ $84B0 = #$BB
01:90C0:F0 0D BEQ $90CF
01:90C2:88 DEY
01:90C3:10 F8 BPL $90BD
01:90C5:A6 B1 LDX $00B1 = #$04
01:90C7:20 00 88 JSR $8800
01:90CA:C9 DC CMP #$DC
01:90CC:90 03 BCC $90D1
01:90CE:4C 48 91 JMP $9148
01:90D1:A6 B1 LDX $00B1 = #$04
01:90D3:20 20 88 JSR $8820I assume that BEQ statement wants to go to $01:90ce… am I right?
2nd EDIT:
I changed 0x50d0 from "f00d" to "f00c" and my freezing problem is fixed!
When all else fails... manipulate the source code.
May 30, 2013 at 6:09 pm #40436MiDKnighT
ModeratorOK thanks Lud – don't know why it took this long for that bug to show up. Also I can barely remember the code you quoted. I took notes when writing duel but apparently not enough.
The other bug I'm looking at is a major duel break. It must have been introduced by a recent enhancement.
EDIT: I fixed it. I hadn't updated a text pointer in my IPS ROM. Oops… :ninja:
May 30, 2013 at 6:23 pm #40437ludmeister
ParticipantQuote:The other bug I'm looking at is a major duel break. It must have been introduced by a recent enhancement.Doh!
If I come up with anything more to help, I'll let you know. I'm testing my mod now and am using Duel a fair bit.Ah, and just as I posted this I saw the good news. :thumleft:
When all else fails... manipulate the source code.
May 30, 2013 at 6:27 pm #40438MiDKnighT
ModeratorLud, what do you think about VIT as an attribute? Atma questioned it in the other thread but seemed to like LDR and POL. Should we switch VIT to something else? We can still do that since nothing is using VIT yet. I just can't think of what other type of attribute we could use. Since you hack other RPGs maybe you would have a good idea of what the best attribute is…VIT or something else.
May 30, 2013 at 6:49 pm #40439ludmeister
ParticipantVitality isn't a bad idea… it has applications in Base AC, but here are a few other potential uses, off the top of my head:
* Resisting damage tiles and the detrimental effects of lack of food
* Absorbing damage from enemy tactics
* Resisting the effects of all-or-nothing tactics (Yi Xin/Li Jian/An Sha), along with INT of course.
Perhaps, if it gets used for all of these, a better moniker for the stat would be Resistance (RES).
However, VIT might be used to determine effectiveness of healing tactics used on an officer's army, and the effectiveness of Life/Raise. That's a distinctly "Vitality" characteristic… that's something that Dungeon and Dragons used to do with Constitution.
Hmm. Maybe Constitution (CON) is the best all-around name for the attribute. What do you think?
Are there plans, at some later point, to bring Poison-based tactics into the mix? Vitality/Resistance/Constitution would be a primary defense (over-against INT) against Poison.
On a side note: Perhaps Leadership could affect the officer's Accuracy rating, and the Leader's Leadership could affect the power/effectiveness of all tactics?
When all else fails... manipulate the source code.
May 30, 2013 at 6:59 pm #40440MiDKnighT
ModeratorHmm, good ideas. When I see "VIT" I know what it is but if I saw RES or CON I wouldn't know what it was until someone told me. I've never really played D&D so I didn't know about "Constitution".
Another interesting usage idea for VIT/RES/CON. If it resists damage so much, maybe have an offense tactic called virus or plague or something that essentially drops the targets VIT/RES/CON and causes them to take more damage. I was also setting a breakpoint to check something else and stumbled across your base AC code (at least I think it is) here:
1E:987F:B9 9C 61 LDA $619C,Y @ $619E = #$B4
1E:9882:4A LSR
1E:9883:65 03 ADC $0003 = #$00
1E:9885:85 03 STA $0003 = #$00
1E:9887:B9 A8 61 LDA $61A8,Y @ $61AA = #$E1
1E:988A:4A LSR
1E:988B:4A LSR
1E:988C:65 03 ADC $0003 = #$00
1E:988E:85 03 STA $0003 = #$00
1E:9890:B9 B4 61 LDA $61B4,Y @ $61B6 = #$31
1E:9893:4A LSR
1E:9894:4A LSR
This formula is almost exactly what I used for deriving a default value for VIT/RES/CON. But I do allow the modder to override the derived default. So how about this? In the above code:
– Replace 619C with 6410 (Replace STR with VIT/RES/CON)
– Replace 61A8 with 619C (Replace INT with STR)
– Leave AGI as it is.
May 30, 2013 at 7:05 pm #40441ludmeister
ParticipantQuote:So how about this? In the above code:– Replace 619C with 6210 (Replace STR with VIT/RES/CON)
– Replace 61A8 with 619C (Replace INT with STR)
– Leave AGI as it is.
Perfect. I think that makes a lot of sense. Yup, that's the Base AC code :nod:
When all else fails... manipulate the source code.
May 30, 2013 at 7:21 pm #40442MiDKnighT
ModeratorOK done – and it's 6410 FYI – 6210 was a typo.
May 30, 2013 at 7:32 pm #40443MiDKnighT
ModeratorIPS patch 1.3 updated ( https://www.box.com/s/ig6z4heyk10k9inqzcbt ). It contains:
– Everything in IPS Patch 1.2 and…
– Base AC Enhancement
– Expanded number of items, weapons, armor, helmets
– Default icons for items, weapons, armor, helmets, and tactics
– Item, weapon, armor, helmet, and tactic names expanded to 9 characters (including icon) each
– Tactic name list expanded to 255 names (for future expansion)
– New Attributes (LDR, VIT, POL) added
– VIT is used for Base AC enhancement and POL is used for item drops so far. More to come…
– Spoils of war enhancement (item drops)
– Guo Si bug fix and maybe a bug fix for the infamous and rare A.I. bug.
– The palette changes are in patch 1 so you'd either need to apply patch 1 and 2 or just apply patch 2 and manually copy in the palette changes.
– Save states will probably be broken when trying to see the status screen (but new games should work fine). To fix simply copy 0x80070-0x800FF (ROM) to 0x7500 (RAM) and re-save.
May 30, 2013 at 7:55 pm #40444MiDKnighT
ModeratorQuote:Are there plans, at some later point, to bring Poison-based tactics into the mix? Vitality/Resistance/Constitution would be a primary defense (over-against INT) against Poison.We could once the expanded tactics thing is done. Poison…Virus…Plague…biological warfare…catapulting rotten corpses over the walls… You name it :)
Quote:On a side note: Perhaps Leadership could affect the officer's Accuracy rating, and the Leader's Leadership could affect the power/effectiveness of all tactics?Yep. Or anything else we can dream up. Like I said, feel free to use these attributes for any enhancement of yours where it makes sense. I made the new attributes (and will expand the number of tactics) to give us a sand box to add all kinds of new fun stuff.
May 30, 2013 at 11:03 pm #40445sonic.penguin
ModeratorMajor issues w/ DOAEditor once patch 1.3 is applied….
-
AuthorPosts
- You must be logged in to reply to this topic.

