Forum Replies Created
-
AuthorPosts
-
November 7, 2011 at 3:56 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39758
ludmeister
ParticipantAh… MiDKnighT–
I figured out I could move my code for my gradual stair-stepping damage function to a different location! So, don't worry about moving around your stuff with 8 tactics.
Since you all were wondering (maybe), here is the code for implementing a more DoaE2-like damage function, and then I'll discuss what it changes:
@ 0x397f2… to 0x3982d (0x3b bytes)
Old:
B9D0 6085 03B9 D160 8504 B9D2 6085 0520
88D6 A000 B904 01D0 07C8 C008 D0F6 F01B
84F2 A907 38E5 F285 F2A8 A900 8515 A5F2
1865 1585 1588 D0F6 205B C1
New:
B9D0 6085 04B9 D160 8503 A8C0 00F0 1F30
08C0 0830 12C0 2030 07A2 27A0 0A4C 1498
A20F A008 4C14 98A2 07A0 074C 1498 A201
A005 8600 4CE0 BFEA 205B C1
@ 0x3bff0… to 0x3c003 (0x14 bytes)
Old:
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
New:
4603 6604 88C0 00D0 F7A5 0418 6500 8515 4C17 9800
To illustrate what the calculation does, here's a before and after.
Before:
*************************************
Army size (soldiers) Strength multiplier (x = army size)
1 to 9 –> 1
10 to 99 –> 4
100 to 999 –> 9
1000 to 9999 –> 16
10000+ –> 25
Meteorstrike's discussion of the damage function helped me in this as he provided clues as to what to look for, so I would know that damage was being calculated.
Quite literally, the game calculated the number of digits in your current soldier total (like it might calculate the length of a string), and then squared that result. That number was multiplied by your strength, your weapon damage rating (not what you see in the status screen), and finally a number from the random table.
After
*************************************
With my edits to the damage algorithm, your current soldiers modify the damage in this way:
Army size (soldiers) Strength multiplier (x = army size)
1 to 255 –> (x / 32) + 1
256 to 2047 –> (x / 128) + 7
2048 to 8191 –> (x / 256) + 15
8192+ –> (x / 1024) + 37
Hence, until you reach 256, you gain +1 to your strength multiplier every 32 soldiers. Then, from 384 to 2048, you gain +1 every 128 soldiers. At 2304 and every 256 soliders until 8192, you gain +1. Once you hit 8192 soldiers, you need another 1024 soldiers to gain a +1. Let's compare damage ratings with real figures.
Soldiers – Previous – Modified
10 soldiers – 4x – 1x
75 soldiers – 4x – 3x
550 soliders – 9x – 11x
1896 soldiers – 16x – 21x
5000 soldiers – 16x – 34x
40000 soldiers – 25x – 76x
Don't mess with overwhelming forces… or get overwhelmed! Mwa-hahaha
When all else fails... manipulate the source code.
November 7, 2011 at 3:06 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39757ludmeister
ParticipantEureka! Found the color coding:
In PPU memory, between :23c0 and :23ff, we find the information that tells the NES drawing engine to use certain "color quatrains" (for lack of a better description) at various places on the string.
Well, @ 0x385e3, we find the string to format our status screen:
0x385e3: 23 cd13 aaaa aa0f 0f00 0000 aaaa aa00 0000 0000 0a0a 0aff
To format it correctly when we shift the Stats info and Tactic box up, change the above to the following:
0x385e3: 23 c513 a0a0 a000 0000 0000 aaaa aa0f 0f00 0000 aaaa aaff
And then we have this screen:

Again, not exactly optimal… but functional, and at least passingly aesthetic.
When all else fails... manipulate the source code.
November 7, 2011 at 1:32 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39755ludmeister
ParticipantQuote:I think the meat of the "8 tactics" enhancement is done. Now it's mostly about having a decent looking status page. :)I'm poring through PPU tables looking for color information as my little one grants me license. Hoping there's a clue in there for what I'm looking for.
When all else fails... manipulate the source code.
November 6, 2011 at 9:30 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39745ludmeister
ParticipantProgress:

Changes:
0x3ea45: "f8" -> "f9" Y-Position of Attribute list, moved up 2 spaces
0x3ea75: "00" -> "ff" Y-Position of Tactic Box, moved up 2 spaces
Problems: Need to move the "red filter" for the bar graph up 2 spaces. Co-ordinates of this, if I count correctly, should be Y= FA (-6), X= 2.
When all else fails... manipulate the source code.
November 6, 2011 at 3:36 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39741ludmeister
ParticipantQuote:Was it something good? What did you put there?Yeah, I put in the tail end of my damage algorithm. I didn't like how DoaE gives its damage bonuses for Soldier totals, wanted to implement a more DoaE2 like approach.
The silver lining in this is that there is be another string for displaying Officer Names… it displays them on one line. That's accessed by a menu that comes up when you select Command -> General. I'm looking for that right now.
That string that you moved was the display for the officer's name…. EDIT: No, I don't think it was either. I'm obviously a little confused at the moment.
When all else fails... manipulate the source code.
November 6, 2011 at 3:20 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39739ludmeister
ParticipantI'm running into trouble because I already have used that space in 3ffe0-3fff4… It borks the ROM to put the Name string into the other 12 bytes at the end of the block. Bleargh.
When all else fails... manipulate the source code.
November 6, 2011 at 3:04 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39736ludmeister
ParticipantQuote:Also can you help with the tactic box formatting thing? I'm pretty stumped on that.I'm gonna look into that pretty soon. Also, did you check to see if the enemy AI could use tactics #7/8? I was going to see about that as well.
When all else fails... manipulate the source code.
November 6, 2011 at 2:41 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39733ludmeister
ParticipantQuote:Let me know if I got any of the credits wrong.It all looks good! I'm gonna play around with this and see what kind of 8-tactic list I can come up with that doesn't make one strategist style totally dominate.
When all else fails... manipulate the source code.
November 6, 2011 at 3:06 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39728ludmeister
ParticipantQuote:Most people now use AnSha + savestateWhatever you or I or anyone else thinks about that… nothing a modder can do can change that… except maybe switching An Sha for a Life tactic? ;-)
Regardless… congratulations on getting Multi-Zeal to work. Did it work just by modifying the tactic data, or did you have to dig a little deeper into code?
When all else fails... manipulate the source code.
November 6, 2011 at 2:04 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39726ludmeister
ParticipantMiDKnighT-
You are making serious progress, man! Rock on.
My thought for the tactics box (not sure how hard it would be) would go something like this:
The original six tactic list were actually six lines, double spaced. That takes 11 lines. So, we could have 11 lines, eight tactics, like this:
1. Fire tactic
2. —
3. Water tactic
4. —
5. Heal tactic
6. —
7. Misc 1
8. Misc 2
9. Misc 3
10. Misc 4
11. Misc 5
If this would work, you could have the tactic box in the same place as stock DoaE.
Sonic.penguin–
Thanks for your answer to Jungle; you said pretty much exactly what I would have said about Shui Xing. I'm intrigued though… I wasn't sure that multi-Zeal would work. If you found that it does, that's friggin awesome! I would think that the TP cost on that tactic would have to be pretty high for it to be balanced, but it depends on what "balance" you want your mod to have. In fans of stock DoaE, you have some who swear by An Sha/Ji Mian, and some who swear by Bei Ji/Jin Xian/Ce Mian. I actually like the balance presented by this: An Sha/Ji Mian is a more risky mode of attack, all or nothing. If it doesn't work, you're out a lot of tactic points, and you can't conserve tactic points in cutting your losses with Jin Xian. The other tactic set is much less dependent on outside forces, and less risky; plus it can take down bonafide enemy tacticians with aplomb.
When all else fails... manipulate the source code.
November 5, 2011 at 6:15 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39716ludmeister
ParticipantMan, this place got blowed up real good this morning/early afternoon!
Jungle, I'll have to answer your question a bit later. I'm heading out soon, but will be back later tonight.
When all else fails... manipulate the source code.
November 5, 2011 at 12:43 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39714ludmeister
ParticipantQuote:OK this space thing for the 8 tactics has been a tougher nut to crack than anticipated. I'll crack it sometime this weekend.True, that. What's nasty from the execution side of things is that the AI will need to know where to get its tactics from (and pull from 8 possible), and I'm not quite sure how that will be done as of yet. Now, one clue I've found is that there are 5 places in the ROM where the following code pattern executes (0x3b72a, 0x3b799, 0x3d470, 0x3df35, and 0x3e0d1):
0A- ASL
85 F3- STA $00F3
0A- ASL
65 F3- ADC $00F3
This effectively multiplies the Accumulator by 6… and I'm not able to think of anything else that comes in multiples of six other than tactics.
When all else fails... manipulate the source code.
November 4, 2011 at 8:50 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39710ludmeister
ParticipantSo, I have:
0x3b799: "0a85f3 0a65f3" -> "0a0a0a eaeaea"
0x3b7a3: "06" -> "08"
And that seems to add two slots for allied officer tactics. The problem is that enemy officers have their tactics stored right after these… and they will often overwrite allied tactics. I need to find a way to move these tactics so that they start not at $65ca, but at $65d8.
EDIT: That pointer is @ 0x3e0dd: "ca65" -> "d865"
Unfortunately, moving the values this way breaks the game currently, as it doesn't know how to find a tactician's tactics… to be displayed in the status screen or to be used in battle.
Continuing to hack away…
When all else fails... manipulate the source code.
November 4, 2011 at 7:19 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39704ludmeister
ParticipantQuote:– Each general has 6 tactics stored in memory starting at $65A0. Would have to expand that to 8.Let me attempt to ferret this out. At least, I have a couple of first steps to try.
When all else fails... manipulate the source code.
November 4, 2011 at 6:57 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39702ludmeister
ParticipantQuote:So to get it to have 8 options in the tactic menu you would put:0x3EBB8: F80EB7F80EB7
Think you can figure out why the text isn't displaying right?
Yes! Add an "FA" before the "F80EB7F80EB7", and close it off with a "FF".
The tactics were written in with FCE Ultra's Hex Editor:

All that's needed is 8 extra bytes in the string! I can't believe that… that's incredible.
When all else fails... manipulate the source code.
-
AuthorPosts