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 5, 2011 at 10:17 pm #39940
ludmeister
ParticipantQuote:How to address this? Twist ludmeister's arm to see if he can factor if Qi Shou is on in his formulas?Sure, I can do this. I should be able to do this in the next couple of days. Perhaps I'll even be able to make an Item ID table drive which items grant a bonus attack :D
This is slightly off topic, I've been inspired to improve on Final Fantasy 2j (of Dawn of Souls fame), and am in the course of a playthrough with my modified Weapons/Magic levelling schemes. IMHO it plays much better than the original, with less need to endlessly grind to gain magic levels, and characters don't gain a ridiculous number of attacks with their weapons while doing so. This will be offered as a new release of the Mod of Balance, and it will include some new fixes for the FF1 Mod as well… when it's finished, that is.
When all else fails... manipulate the source code.
December 5, 2011 at 11:14 pm #39941MiDKnighT
ModeratorQuote:Sure, I can do this. I should be able to do this in the next couple of days. Perhaps I'll even be able to make an Item ID table drive which items grant a bonus attack
And I've never actually played FF2. I've played FF1, III, IV, V, VI, and VII.
December 6, 2011 at 1:09 am #39942DragonAtma
ModeratorHmm…. I once did some investigation of the FF2j leveling schemes and recommended some alternate levelling formulas if anyone did a remake. Let's see…
This openoffice file has my suggested formulas; feel free to play around with it if you'd like, although I think I the numbers there are good numbers.
For record, the formulas I have are as follows…
Weapon/magic gain: INT(((20 + Uses)*(EnemyRank+2)*0.5/(WpnSkill+2)))+EnemyRank-WpnSkill
HP gain chance: INT(((HP Lost% * 10 * EnemyRank / sqrt(HP)) – INT(sqrt(HP)))
If your weapon level matches the enemy level, you gain 10+(swings/2) weapon exp; HP is more complex, but gains are quadratic, not linear [and the guaranteed HP gains for 50% damage seems to be 10*(enemy rank^2)].
Hmm, I wonder if there are any unused ff2j variables; I'm sure we can come up with a formula where HP "levels up" like weapons (based exclusively on enemy attacks, of course)…
EDIT: Also, something should be done about the magic penalties; claims that magic and shields don't mix are ridiculous, as the easiest way to solo the game is as a mage who dual-wields shields (!) for evade. Sure, it'll hamper your magic a little, but even at 99 int/soul it's not that bad (especially since you have the top spells by then), and immunity to physical attacks more than makes up for it.
December 6, 2011 at 3:17 am #39943MiDKnighT
ModeratorOK so maybe Cheng Nei does do something. From Meteorstrike:
Quote:Wasn't Cheng Nei the tactic that breaks the Castle defense bonuses when you're in a boss battle?The tactic is supposed to set a bit. This bit is checked in the Damage Formula to determine if the castle bonus should be applied or not. You need to skim the Damage Formula to find its effect.
Check out the posts I made about the Damage Formula in GameGaqs a long time ago. It should mention that in the damage formula.
It's also how I discovered that the castle defense bonus is not applied if you attack from the west in that last castle at the end of chapter… 3?
More info: http://www.gamefaqs.com/boards/563402-destiny-of-an-emperor/44112071
So Cheng Nei is worthless on the field but is somewhat relevant during a boss battle.
December 6, 2011 at 12:01 pm #39944Zhuge Liang
ParticipantQuote:Ji Main costs 7 TP in the original game. What if we made it so that:Lasts 1 turn: 2 TP
Lasts 2 turns: 4 TP
Lasts 3 turns: 6 TP
Lasts 4 turns: 8 TP
Lasts 5 turns: 10 TP
Ce Mian costs 17 TP in the original game. So it could be…
Lasts 1 turn: 4 TP
Lasts 2 turns: 8 TP
Lasts 3 turns: 12 TP
Lasts 4 turns: 16 TP
Lasts 5 turns: 20 TP
That way you don't lose a ton of TP when it only lasts 1 turn.
Nice job MidKnight, please add this to the guide if possible.
I wasn't exactly looking to do anything with this though. Just want to know something I've been wondering about. Sorry if I bothered you.
DoaE gave birth to Huo Hu.
December 6, 2011 at 1:16 pm #39945MiDKnighT
ModeratorQuote:Nice job MidKnight, please add this to the guide if possible.As every enhancement, the hardest part is working out the space issues in the ROM. But I'll look into it.
December 6, 2011 at 6:59 pm #39946DragonAtma
ModeratorNot sure if this is doable in the space, but here's something to consider for Ji mian & Ce mian wear-off formulas:
Ji Mian starts with a power of int(user's int – 176)/16
Ce Mian starts with a power of int(user's int – 216)/8
Each turn, a random number (0-255) is rolled; it's decreased by 16 for every surviving officer (rebel force, etc. don't count) on the affected team (min 0) and then increased by 16 for every surviving officer on the user's team. it's then compared to the enemy stats (Str for Ji Mian, Int for Ce Mian); if at least one officer exceeds the random roll, the tactic's power decreases by 1. When the tactic's power hits 0, it wears off.
…or, if that's too complex, you can just start with those powers and give it a flat 75% chance of decreasing by 1 each turn.
December 6, 2011 at 7:04 pm #39947MiDKnighT
ModeratorI'm fine with the current random formula. I just think it has 2 problems:
1. Ce Mian costs you 17 TP even if it lasts 1 turn or lasts 10 turns.
2. Sometimes Ji Mian or Ce Mian can seem to go on forever. This is great if it happens for you but you may have to restart the battle if the enemy does it. That's why I think there should be a 5 turn cap.
December 6, 2011 at 7:04 pm #39948MiDKnighT
ModeratorI'm fine with the current random formula. I just think it has 2 problems:
1. Ce Mian costs you 17 TP even if it lasts 1 turn or lasts 10 turns.
2. Sometimes Ji Mian or Ce Mian can seem to go on forever. This is great if it happens to you but you may have to restart the battle if the enemy does it. That's why I think there should be a 5 turn cap.
December 7, 2011 at 3:48 am #39949ludmeister
ParticipantI believe I've had success updating the Agility-based multi-strike algorithm. Here's what's changed:
@ 0x2f210-0x2f386 (0x177, or 375 bytes)
0x2f210- bdd0 61d0 2aa9 409d d061 980a 0a0a a8b9
0x2f220- 0061 8412 a000 d9d0 b2f0 10c8 c007 d0f6
0x2f230- a412 c898 2907 d0e7 4c2f b24c 9db2 ea4c
0x2f240- 00b3 eaea eaea a900 8511 bdd0 61a8 c040
0x2f250- f017 8884 12a9 00a0 3cc6 1088 c510 f02d
0x2f260- c000 d0f5 a412 4c3e b2a9 0085 12a5 ad65
0x2f270- ae65 10ea 85ad 290f a8b9 e0b2 8515 205b
0x2f280- c138 4c40 b3ea ea4c 8ab2 eaea ea4c d7b2
0x2f290- a44a fed0 61a9 004c f8b2 a8a9 00c6 1188
0x2f2a0- c511 f0e9 c000 d0f5 4c80 b200 00a5 ad65
0x2f2b0- ae65 1085 ad4c f8b2 0000 0000 0000 0000
0x2f2c0- 0000 0000 0000 0000 0000 0000 0000 0000
0x2f2d0- 0000 0000 0000 0000 0000 0000 0000 0000
0x2f2e0- c7cb ffff ffff ffea eaa9 00a4 4a4c f0b2
0x2f2f0- 1926 3340 4c59 6673 8099 a6b3 c0cc e6ff
0x2f300- a91c 2082 c400 0000 a91c 2082 c400 0000
0x2f310- a44a b9b4 6185 10a5 4bc9 07b0 07a8 ad2d
0x2f320- 624c 1ab3 e907 a8ad 2c62 c000 f005 884a
0x2f330- 4c1a b329 01c9 01f0 034c 36b2 4610 4c36
0x2f340- b200 0000 0000 0000 0000 0000 0000 0000
0x2f350- a44b b9b4 6185 12a5 4ac9 07b0 07a8 ad2d
0x2f360- 624c 5ab3 e907 a8ad 2c62 c000 f005 884a
0x2f370- 4c5a b329 01c9 01f0 034c 6eb3 4612 a512
0x2f380- a000 8412 4c8a b2
Data tables
0x2f2e0-0x2f2e6 *New!* — Item ID table, these items grant a guaranteed bonus strike
0x2f2f0-0x2f2ff— Random % of attacker's AGI
Adding this code in place of the original guts of my Agility-based multi-strikes code will upgrade it so that you have the following functionality:
1. An Item ID table is read from when determining which items will grant one extra attack. The default IDs are "c7 cb ff ff ff ff ff". You do not need to modify the algorithm to add additional items to this. Remember, any item that is 80 to ff is considered equipped.
2. When an officer (enemy or ally) attacks a defender who has Qi Shou active, the attacker's AGI is halved for the purposes of executing multiple strikes.
3. When an officer (enemy or ally) has Qi Shou active and attacks, the defender's AGI is halved for the purposes of negating multiple strikes.
Therefore, if both attacker and defender have Qi Shou active, the attacker will pit half of their AGI against half of the defender's AGI.
Why the algorithm was implemented like this
When determining how to apply Qi Shou bonuses, I had to be mindful of the 8-bit nature of the NES. It would not do to multiply AGI by 2, because that would result in 8-bit overflows. Instead, I needed to use division, and therefore we have the resulting algorithm.
When all else fails... manipulate the source code.
December 7, 2011 at 4:33 am #39950MiDKnighT
Moderator
Awesome lud, will try this out.
Easier for copy/paste:
0x2f210:
bdd0 61d0 2aa9 409d d061 980a 0a0a a8b9
0061 8412 a000 d9d0 b2f0 10c8 c007 d0f6
a412 c898 2907 d0e7 4c2f b24c 9db2 ea4c
00b3 eaea eaea a900 8511 bdd0 61a8 c040
f017 8884 12a9 00a0 3cc6 1088 c510 f02d
c000 d0f5 a412 4c3e b2a9 0085 12a5 ad65
ae65 10ea 85ad 290f a8b9 e0b2 8515 205b
c138 4c40 b3ea ea4c 8ab2 eaea ea4c d7b2
a44a fed0 61a9 004c f8b2 a8a9 00c6 1188
c511 f0e9 c000 d0f5 4c80 b200 00a5 ad65
ae65 1085 ad4c f8b2 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
c7cb ffff ffff ffea eaa9 00a4 4a4c f0b2
1926 3340 4c59 6673 8099 a6b3 c0cc e6ff
a91c 2082 c400 0000 a91c 2082 c400 0000
a44a b9b4 6185 10a5 4bc9 07b0 07a8 ad2d
624c 1ab3 e907 a8ad 2c62 c000 f005 884a
4c1a b329 01c9 01f0 034c 36b2 4610 4c36
b200 0000 0000 0000 0000 0000 0000 0000
a44b b9b4 6185 12a5 4ac9 07b0 07a8 ad2d
624c 5ab3 e907 a8ad 2c62 c000 f005 884a
4c5a b329 01c9 01f0 034c 6eb3 4612 a512
a000 8412 4c8a b2
December 7, 2011 at 4:43 am #39951MiDKnighT
ModeratorLooks like my game is freezing when hitting someone. Looks like a bad jump somewhere. Checking…
EDIT: Looks like it's this one dumping me off into nothing:
00:B2F8:A9 1C LDA #$1C
00:B2FA:20 82 C4 JSR $C482
EDIT2: I know…I had moved the jumps from page 1C to 1E in the IPS patch. Still another freeze I need to chase.
EDIT3: OK there were two jumps to 1C that I switched to 1E. If you have the IPS patch applied the change would be:
0x2f210:
bdd0 61d0 2aa9 409d d061 980a 0a0a a8b9
0061 8412 a000 d9d0 b2f0 10c8 c007 d0f6
a412 c898 2907 d0e7 4c2f b24c 9db2 ea4c
00b3 eaea eaea a900 8511 bdd0 61a8 c040
f017 8884 12a9 00a0 3cc6 1088 c510 f02d
c000 d0f5 a412 4c3e b2a9 0085 12a5 ad65
ae65 10ea 85ad 290f a8b9 e0b2 8515 205b
c138 4c40 b3ea ea4c 8ab2 eaea ea4c d7b2
a44a fed0 61a9 004c f8b2 a8a9 00c6 1188
c511 f0e9 c000 d0f5 4c80 b200 00a5 ad65
ae65 1085 ad4c f8b2 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
c7cb ffff ffff ffea eaa9 00a4 4a4c f0b2
1926 3340 4c59 6673 8099 a6b3 c0cc e6ff
a91e 2082 c400 0000 a91e 2082 c400 0000
a44a b9b4 6185 10a5 4bc9 07b0 07a8 ad2d
624c 1ab3 e907 a8ad 2c62 c000 f005 884a
4c1a b329 01c9 01f0 034c 36b2 4610 4c36
b200 0000 0000 0000 0000 0000 0000 0000
a44b b9b4 6185 12a5 4ac9 07b0 07a8 ad2d
624c 5ab3 e907 a8ad 2c62 c000 f005 884a
4c5a b329 01c9 01f0 034c 6eb3 4612 a512
a000 8412 4c8a b2
December 7, 2011 at 4:59 am #39952ludmeister
ParticipantAck… I had meant to make a note of that. Sorry about the "jumpiness".
When all else fails... manipulate the source code.
December 7, 2011 at 5:04 am #39953MiDKnighT
ModeratorNo prob, I'm putting your new changes in the guide now. And it seems to work as advertised. I was hitting a general one time without Qi Shou, with Qi Shou I'm hitting him 2-3 times.
With this change, Qi Shou is now as awesome as FAST/HASTE in FF. :)
December 7, 2011 at 3:28 pm #39954MiDKnighT
ModeratorI think I'm gonna put the Ji Main/Ce Mian stuff on hold and work on the A.I. project next. (ie…enemy doesn't cast Wuo Jian if Wuo Jian is already active, etc…)
Planning phase…
– I think I can use the area where the guts of the life/raise target selection code is to do the A.I. checks.
– If it doesn't make sense for the enemy to pick a tactic, in general find something else to do by going to $A6EA (where X is who's turn it is)
– Tactics to re-choose if they are already active:
* Ji Rou/Guard
* Wuo Jian
* Shui Jian
* Ce Mian
* Ji Mian
* Cheng Nei
* Yi Xin (for the right target)
* Li Jian (for the right target)
* Qi Shou
* Jie Ce (if nothing is active)
* Bei Ji
* Fu Bing
– If Life or Raise is used and the target is alive (this can happen if no enemies are dead) then choose the tactic in slot 02 (heal tactic).
-
AuthorPosts
- You must be logged in to reply to this topic.

