Forum Replies Created
-
AuthorPosts
-
November 8, 2011 at 6:41 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39796
ludmeister
ParticipantAs long as we have a 512K ROM– that is, pages through 1F, we'd only need 5 passes (divide by 32). In the remote chance that we'd expand the ROM size to 1024K, we'd have pages through 3F, and that would require 6 passes (divide by 64).
We might be able to implement a loop in place of the LSRs and STAs, with a counter counting from 4 down past zero, to shift right 5 times… if we can determine that what is in register X or Y is an arbitrary value. What do you think about this?
When all else fails... manipulate the source code.
November 8, 2011 at 6:03 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39793ludmeister
ParticipantQuote:Maybe we need our own page switch subroutine stored in memory somewhere for switching to expanded ROM pages.Yuck! But that theory about needing an extra round of…
00:C4C6:4A LSR
00:C4C7:8D F9 FF STA $FFF9 = #$AC A=01 X=35 Y=00
… seems to make sense to me. If only we could squeeze 4 more bytes in there to test the theory…
When all else fails... manipulate the source code.
November 8, 2011 at 4:26 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39791ludmeister
ParticipantMiDKnighT–
Yeah, I was switching to the right page… I just don't think that the NES memory was holding. I did manage to get page switching to work by using page 1C as a launchpad to get at page 0B… which has a fair amount of free space open. Seemed to be a nasty hack, but it gets the job done. So far I haven't written any new code beyond the page switching, but I've given myself about 240 bytes of space to play around with. :P
Thanks though, you don't have take your time working with the page switching, it's not urgent.
When all else fails... manipulate the source code.
November 8, 2011 at 3:51 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39789ludmeister
ParticipantThe problem is I'm switching to page 1C… I don't think that the variables were defined for more than through pages 0F. I may be wrong, but when it switches to a page greater than 0F… loses the memory. Gains it back when it goes back to normal code. Grrr. I may have to do a double hop for my Agility code :huohu:
When all else fails... manipulate the source code.
November 8, 2011 at 3:31 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39787ludmeister
ParticipantMiDKnighT… question for you, if you get time.
When you page switch in ROM, how do you get the RAM from $2000 to $7fff to stay in memory? My page switching works… but it totally wipes out the memory I'm trying to work with. Any suggestions?
When all else fails... manipulate the source code.
November 8, 2011 at 1:18 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39786ludmeister
ParticipantQuote:Lud is it time for us to declare victory on the "8 tactic" project?IMHO, that status screen rocks. Truly great work. Will work at re-editing my ROM to allow for 8 tactics tonight. I think we may have kicked it, man. FLEXX I would never have attempted to do this on my own.
I may also look into the preliminaries for AGI-based double strikes tonight, if time permits. I have a few officers in my mod which are marginal fighters, but are fast… they may have an additional purpose if I get this working. I'll need to change code blocks for sure.
Quote:why does it attack twice when a player uses that check, but not the enemy?I'm not sure as of yet… however, there's no sense in looking through an AI officer's pack (officer #8 – 12). My guess is that it checks the attacker's #, and if one of the first 7, it starts rummaging through their backpack for an equipped bow. If not, well… their turn's simply over. I'm definitely not through digging into the code here.
EDIT: I was wrong… the game checks the AI officer's backpack! However, there are only zeroes there, so they never attack twice! This definitely makes an agility based double attack more feasible…
When all else fails... manipulate the source code.
November 7, 2011 at 10:03 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39780ludmeister
ParticipantSonic.Penguin,
Thanks for reminding me… I've been wanting to get into this part of the algorithm.
Here's what I've found. Here's the check:
0x3a1e1 – 0E:A1D1:BD 00 61 LDA $6100,X @ $6112 = #$D2 (Load in an item from attacking officer's pack)
0x3a1e4 – 0E:A1D4:C9 C7 CMP #$C7 (Compare it with C7… will explain below)
0x3a1e6 – 0E:A1D6:F0 04 BEQ $A1DC (If equal, then do second attack)
0x3a1e8 – 0E:A1D8:C9 CB CMP #$CB (Compare it with CB)
0x3a1ea – 0E:A1DA:D0 06 BNE $A1E2 (If not equal, then keep looking through pack)
0x3a1ec – 0E:A1DC:20 8D AB JSR $AB8D (Subroutine: Set up second attack?)
0x3a1ef – 0E:A1DF:4C 5A A1 JMP $A15A (Do second attack)
Why does it compare the item with C7 and CB, when the Bow's ID is 47, and the Crossbow's ID is 4B? When an officer equips an item, its ID is "OR"ed with 0x80. There are no items with IDs > 7F, so this is perfectly fine. The 0x80 bit is the "item equipped" bit. So what the algorithm above is asking is… is this item a bow or crossbow that's equipped? Of course, if so, no other weapon is equipped. If it doesn't find one of these two items equipped… then no second attack is performed.
Possibilities, now armed with this knowledge:
1. Now you can edit "C7" and "CB" to "CD" (Equipped Wan Sheng) and "CE" (Equipped Bo Ye). Though, you may want to edit the name of the Bow and Crossbow to something that might not strike twice.
2. With a little intrepidity, you could create a "strike-twice-passive-effect" item… and check for that item (sans being orr'ed by 0x80). That might have ridiculous fun written all over it… place it Wu Cave or one of the two caves between Ru Nan and Chin castle.
3. For more powerful effect, you might place several items that you want to strike twice together in the Item list (hint: rename some weapons), and trap for that certain range (if you wanted to re-write a little 6502 code… you'd need to rethink the comparisons and branch types).
4. Or… maybe I'll figure out a way of making Agility count for potential double-hits… for allies and enemies! I'm starting to get excited about that potentiality.
When all else fails... manipulate the source code.
November 7, 2011 at 9:30 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39778ludmeister
ParticipantTo set a fixed lower limit that Strategists must reach in order to be eligible to be tactician, here's what you gotta do:
0x3b7c5: "dd9c61b003" -> "c996b004ea" (Open an eligible officer to gain their tactic list)
0x38348: "dd9c619043" -> "c9969044ea" (Allow an eligible officer to become tactician)
In both cases, you are replacing
DD 9C61- CMP $619C,X@$619C+ (Compare Int with Str)
with
C9 96- CMP #$96 (Compare Int with 150)
You could change the $96 to whatever, to set the bar as high or as low as needed. To remove all restrictions (except the restrictions set on the tactics themselves), set the code snippets to "EAEAEAEAEA"… NOP them out.
When all else fails... manipulate the source code.
November 7, 2011 at 5:11 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39771ludmeister
ParticipantCool. I'll look forward to seeing your ideas!
Quote:Not a bad idea but not sure it would be worth the trouble if it would take more than an hour of research.Nah… think I logged the very instruction when looking at the way strategists receive their tactics for the 8 tactics project. It'd be a simple testing project, most likely… when I get a spare moment for that kind of thing, I'll do it.
When all else fails... manipulate the source code.
November 7, 2011 at 4:50 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39769ludmeister
ParticipantQuote:Also lud, I tried the changes for your status page (PPU changes) but the portrait is still off color. I think there must be another line you modified that you forgot to post. If you don't have it I can dig around and find it.Yup, you're right. The new change is:
0x385e3: 23 c513 a0a0 a0ff ff00 0000 aaaa aa0f 0f00 0000 aaaa aaff
Good catch, thanks!
When all else fails... manipulate the source code.
November 7, 2011 at 4:13 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39767ludmeister
ParticipantOne change that I've been kicking around… What do you all think about letting any officer with the Int necessary to sport tactics to be a tactician? As it stands, a strategist must have greater Int than Str… but that seems arbitrary to me, as Guan Yu (at 245/180), Zhao Yun (at 245/215), or Zhang Liao (at 232/216) seem like they would be good tacticians…
One balancing thing I can think of on this is that the officer would still need the Int necessary to use tactics… you just don't have to jump through the hoops of finding an officer where Int > Str.
An alternate possibility would be to create an arbitrary Int value, which a potential Strategist must meet, or no tactics for them. Would it be 120? 150? 180? 240 for all you An Sha haters out there??? *nudges Sonic.Penguin* ;-)
Please discuss… I believe this would be a relatively trivial change if we allowed this.
When all else fails... manipulate the source code.
November 7, 2011 at 3:56 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39766ludmeister
ParticipantQuote:Unneccessary. We've all been there and thats why were here to help people make great roms! The code is hard to grasp at first but with practice it gets easier and easier. I started all my modding skills about a month and 1/2 ago and I understand (almost) everything going on here even with 0 experience in assembly.Absolutely. DoaE was my first NES Rom which I actually looked at its "guts" (well… maybe Final Fantasy 1 was, because I played that game for like two years straight when I was in middle school), and it was intimidating at first. Without being able to "pester" Meteorstrike, I doubt I would have kept at it for a real long time. Keep it at, Jungle :huohu:
When all else fails... manipulate the source code.
November 7, 2011 at 1:17 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39763ludmeister
ParticipantQuote:Can you explain this for me? I truly don't understand the phrase "Tactic appears in this "slot" and have no idea which numbers represent for which tacticsYeah. There are numerous things every day on which English fails me. When I said "slot" I could have easily said "category". Stock DoaE has 6 categories for which tactics fall in. The first one (slot 00 from above) are Fire tactics. The second one (slot 01) contains all Water tactics. Then you have Healing tactics, defensive tactics, and two "slots" for miscellaneous tactics. For instance, Cheng Nei never appears in the sixth "slot", and Li Jian never appears in "slot" five. See? I've resorted to the word slot again. If you've played DoaE before, you can probably follow what I'm saying.
The answer to the second question is a bit more complex.
Quote:There are thirty tactics in DoaE, and are represented in the ROM in this order:01 Lian Huo, Ye Huo, Yan Re, Da Re, Huo Shen
06 Shui Tu, Shui Xing, Shui Lei, Hong Shui, Shui Long
0b Chi Xin, Tong Xian, Yin Xian, Jin Xian, Wan Fu
10 Ji Rou, Huo Jian, Shui Jian, Ce Mian, Ji Mian
15 Cheng Nei, Yi Xin, Li Jian, Qi Shou, Jie Ce
1a An Sha, Bei Ji, Fu Bing, Tui Lu, Gui Huan
This information was gleaned from the order of Tactic names in the ROM (readable, sorta, as DoaE text does not follow ASCII specs), as well as knowing their TP costs (since that is one visible piece of tactic information when you are actually playing the game, and also happens to be filled out for all thirty tactics… ie several entries are not 00). So, when we are looking at a piece of information about a tactic (and always tactic information is stored in piecemeal fashion… like TP cost here, and damage information separate from that, etc), we need to find the first entry in the list.
Quote:0x3b8b2-0x3b8cf Tactic appears in this "slot"00 00 00 00 00 01 01 01 01 01 02 02 02 02 02
03 03 03 03 03 04 04 05 05 04 05 05 05 04 04
The first entry is at 0x3b8b2. This value corresponds to the first tactic, Lian Huo. The second value (at 0x3b8b3) corresponds to the second tactic, Ye Huo. The final entry in the list (0x3b8cf) belongs to Gui Huan. It can get a little fun to find a tactic that is more in the middle of the list, but to do that, find the number of the tactic (I listed them in 6 groups of 5) and count in your list to that "element" in the array.
For the programmers here, it seems that the coders of DoaE didn't bother to make their tactics "objects"…
Define type "tactic" …
tactic DoaE_tact[30];
… but rather defined their data structures in a more amateurish, piecemeal style:
byte TP_Cost[30];
byte Dmg_lo[30];
byte Dmg_hi[30];
char* Tactic_Name[30];
… etc.
Objects (like the way Officers were actually stored in the ROM, for instance) are always easier to edit than things defined piecemeal (like tactics here) because (usually) all information pertinent to your object is grouped together.
When all else fails... manipulate the source code.
November 7, 2011 at 4:31 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39760ludmeister
ParticipantOne more tidbit as I was digging around today (and now currently spamming the modding board)… I saw a bit of data that looked real similar to something I saw in DoaE 2… it was this right here:
0x399b0: 99cc cccc 0000 0000 0000 0000 3333 6666 <– Byte 1, Tactic Damage variance
0x399c0: 0000 0000 0101 0101 0101 0101 0101 0101 <– Byte 2, Tactic Damage variance
These values are effectively fractions. Assemble two bytes together (same position horizontally in the line above), divide by 256, then multiply that to the Tactic damage value found in 0x3bb9c-0x3bbd8 (modified by user's Int score), and you have calculated the potential damages.
From the list above, we note that the random damage distribution is:
0099 – 60% – 1 in 16 chance
00cc – 80% – 3 in 16 chance
0100 – 100% – 1 in 2 chance
0133 – 120% – 1 in 8 chance
0166 – 140% – 1 in 8 chance
I've tested this today, and you could have fun with this!
When all else fails... manipulate the source code.
November 7, 2011 at 4:07 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39759ludmeister
ParticipantQuote:I had an idea, after playing DoaE II. Not sure how feasible this is. You know what's cool about DoaE II though? We can use tactics OUT of battle. Mostly just so that we can heal up before a fight.LYS, I had this idea too; I also often let it ride trying to find a Rebel Force battle to heal my poor ailing officers before many a gate battle.
I know this for sure… it would take skills greater than mine, because it would entail adding another menu option to the command menu, which would launch a custom-made menu to select the tactic (only Healing tactic… maybe a custom Life tactic as well) which would require a tactics user (could skimp here and call the tactician the user), a target officer, and then apply effect. It would definitely require the use of a separate code bank, just for starters. You might be able to reuse the menu for selecting officers (such a menu is already made for the General Stat screen menu). But this would be an awful lot of work for someone really talented at hex code development who has a lot of time on their hands.
When all else fails... manipulate the source code.
-
AuthorPosts