Forum Replies Created
-
AuthorPosts
-
November 4, 2011 at 5:51 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39700
ludmeister
ParticipantMiDKnighT–
For the battle menu to display, we'd need at least 7 more bytes… From my intuitive look at what's going on there:
0x3eb85:
—- —- –02 fc18 6d0c 0c0c 0c23 1f0a
1b14 1523 0a0a 0a0a 0c0c 0c0c 0c0c 0c6e
faf8 9996 f80e b7f8 0eb7 faf8 0eb7 f80e
b7fa f80e b7f8 0eb7 ff
Breakdown:
0x3eb85: 02fc18- Window position?
0x3eb88: 6d0c… to 0c6e (0x18 bytes)– Window title/top bar
0x3eba0: fa- New line
0x3eba1: f89996- Not sure, but only present once. TP output??
0x3eba4: f80eb7- Output Tactic #1
0x3eba7: f80eb7- Output Tactic #2
0x3ebaa: fa- New line
0x3ebab: f80eb7- Output Tactic #3
0x3ebae: f80eb7- Output Tactic #4
0x3ebb1: fa- New line
0x3ebb2: f80eb7- Output Tactic #5
0x3ebb5: f80eb7- Output Tactic #6
0x3ebb8: ff- Finished
Does that make sense? Clear as mud to me at this point :-)
Ack. No space in the 0x3c010 block… or the 0x38010 block… and you know what? I think I just said what you said. Well, crap-o.
When all else fails... manipulate the source code.
November 4, 2011 at 3:03 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39686ludmeister
ParticipantQuote:Nice! Sounds like you expanded on my "25 soldier progressions" thing.Basically. You don't have to keep the progressions in the 80, 85, 8a, 8f… blocks. You can start in the middle of any of them… 8c would take the third variable of "8a" first, ending with the second variable of 8f. Basically, any grouping of five numbers can be made to be a level progression. That's how I made 26 levelling progressions before your example which showed us how to change code banks.
Quote:If you're interested in helping I can share what I have so far.I'm quite interested… but I've got a ten-month-old to babysit today, and he's up from his nap now, and he's somewhat cranky that I'm typing and not watching him roll his truck along the floor. I'm not sure how much help I can be at the moment. But if you'd like to share what you got, perhaps I can be of some use throughout the day.
When all else fails... manipulate the source code.
November 4, 2011 at 2:30 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39684ludmeister
ParticipantMidKnight–
I've kicked around the first one too… but never got the gumption up to do anything about it. I kind of like DoaE's Strategist structure, and it would cheapen it a bit if Strategist's only pumped Tactic points at your officers. Just my opinion, of course.
The second one though, I believe, is money. Then you could spread out the tactics (for example: 5 Fire, 5 Water, 5 Heal, then reserve 3 tactics each for the other 5 slots). Doable, since Tactic availability is done programatically and not by bit-twidling (turn a zero to a one every level up). Mostly, that would involve hacking the status window to show 8 tactics, and the battle tactic window. As well, you would want to give enemy officers the chance to use tactic #7 and 8 too… I'm sure no any additional code would go into that; probably just changing a "05" to "07" somewhere.
Also… I'm rocking a shiny new ROM with some pictures (just from DoaE 2 for now) and your idea for expanded officer level ups. 50 officers level in my scenario… 45 of them are unique levelling plans (the other 5 are replacements for Zhang Fei, Guan Yu, Liu Bei, Xu Shu, and Mi Zhu IIRC). 6 different starting soldier totals. You inspired me!
Time for me to play… ah *hackcough* erm… test. Work on playtesting my new toy. ;-)
When all else fails... manipulate the source code.
November 3, 2011 at 5:11 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39671ludmeister
ParticipantGood morning ya'll… ('chu betcha it is… it's my birthday!)
I've been looking at my notes for anything else that might be of use, and here is one more visualization thing that I used for my mod… it's useful especially if you change how many soldiers are in armies.
In 0x3adfe-0x3ae13, we find data pertaining to how long the soldier line visualization is in battle, and the soldier count thresholds for when those lengths change (along with the color). I have not figured out where the color info is.
The length/color used is determined by the allied general who has the most soldiers when at maximum.
0x3adf2-0x3ae09: # of soldiers per pixel length
0a28 64c8 2c90 (Byte 1)
0000 0000 0101 (Byte 2)
000a (10), 0028 (40), 0064 (100), 00c8 (200), 012c (300), 0190 (400)
0x3ae0a-0x3ae13: Threshold value.
0107 1327 3a (Byte 2)
f4d1 8911 99 (Byte 1)
01f4 (500), 7d1 (2001), 1389 (5001), 2711 (10001), 3a99 (15001)
Changing these to more well-spaced-out values makes it possible to see the variations in late Wei soldier totals, as stock DoaE green soldier bars top out when an officer is currently leading around 25000 men.
When all else fails... manipulate the source code.
November 2, 2011 at 9:39 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39660ludmeister
ParticipantThat's too cool that Meteorstrike might be showing up here. Ni-ice.
When all else fails... manipulate the source code.
November 2, 2011 at 7:41 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39651ludmeister
ParticipantNo prob :-)
When all else fails... manipulate the source code.
November 2, 2011 at 6:53 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39649ludmeister
ParticipantLooks like changing
00:833C (0x3034c) "E9E0" SBC #$E0
to
"E9E1" (SBC #$E1)
suffices for me. I'm able to see new portraits I injected, and I don't believe I have freezing issues (I did when I attempted to view Mi Zhu's portrait).
When all else fails... manipulate the source code.
November 2, 2011 at 2:07 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39642ludmeister
ParticipantMiDKnighT-
Man, I had the worst time trying to get PHP to even work on my system… until I downloaded your PHP directory. Don't know what kinda PHP-fu you did, but that did the trick.
I found out that you can expand your feidian command when extracting portraits out of Destiny of an Emperor 2 (I couldn't find Cao Cao and Zhang Liao when I extracted graphics out of DoaE2 with your command… *sniff*). Instead of
php feidian.php -cr nes8,6,128,0×10 doae2e.nes d2
Change the "128" to "168" and you should be able to get all of the portraits. Thank you so much for your pioneering work here in this thread, up until yesterday I felt like a total klutz when it came to ROM-based graphics, and didn't touch it unless there was a tool called "FF1 Hackster".
When all else fails... manipulate the source code.
November 2, 2011 at 1:09 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39640ludmeister
ParticipantSonic.penguin, 10-16-18 definitely gets the job done "AGI"… if I reading my FCE Ultra PPU Viewer correctly (and your ROM is like mine), 10-36-38 = "Agi". Just uses lower case characters. "AGI" is more like the way the first game showed it.
MiDKnighT, I'm glad to just be one of the guys. The more I read and saw the magnitude of the stuff you all had contributed, I got inspired to open up my DoaE ROM again, to help out if I could. If I find anymore fresh stuff which I found in modifying my ROM, I'll let you all in on it.
And I'm not particularly an assembly guy either (certainly not of Meteorstrike's caliber), but I can read a debugger well enough if I can determine that "Oh, I know what that just did because the game just changed a variable that I know, and so that code will do this, and ahhhh…. that's how they finagled that. Interesting!" And I can write simple arithmetic routines in assembly if I figure out how to place them correctly into existing code, and that's really the tough part.
I'm very intrigued by your example in the guide about changing banks in assembly, that could make for some fun calculations if someone wanted to get indepth about tactics damage/healing calculations… or maybe Agility-based bonus attacks… :-D
The little thought running in my head goes something like this— Take the defender's Agility, add a random # between 1 and 40, and then add 60. If that's less than the attacker's Agility, the attacker gets a free attack. Add another 80. If that's still less than the attacker's Agility, then award a second free attack.
Generous? Perhaps… if, like Jiang Wei, you're fast enough mmwhahahaha
When all else fails... manipulate the source code.
November 2, 2011 at 4:22 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39632ludmeister
ParticipantLord Yuan Shu,
To change up the order of the Status screen, you could change up the order of the pointers
in 0x385ff-0x38608, edit the text in 0x3ea4a and following, and finally, edit 0x3861e, 0x38623 and 0x38628 to whatever three characters you wanted your last string to be. Hence why I had "Def" as those three characters which sonic.penguin astutely caught me on :-)
When all else fails... manipulate the source code.
November 2, 2011 at 2:42 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39630ludmeister
ParticipantT.P to AGI.
This is the quick and dirty How-to.
0x38603: "fb" -> "b4"
0x385a3: "04" -> "05"
0x3861e: "23" -> "10"
0x38623: "63" -> "36"
0x38628: "1f" -> "38"
0x3937a-0x3939c: "A90020C8E38DA361ACAF60A90120C8E38DAF61A9008DC7608DBB608DFB618DFC618DFD" ->
"A9008DBB608DC76020C8E38DA361ACAF60A90120C8E38DAF61ACAF60A90920C8E38DBB"
If anything is wrong, please let me know, so I can make it right.
When all else fails... manipulate the source code.
November 2, 2011 at 2:38 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39629ludmeister
ParticipantAh, sonic.penguin, you are correct. My apologies. It would be 10, 36, 38. Edited above.
When all else fails... manipulate the source code.
November 2, 2011 at 2:37 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39628ludmeister
ParticipantPart 2: Billeting output
The above edits did not matter when inspecting a billeted officer! Grumble. Well… billeted officers are never equipped, so…
Are we back to the drawing board? No! We forge bravely ahead ;-)
When we look at a billeted general, his stats actually get placed in the 8th general's place (1st enemy!) Before we get here, Y already has the General ID we are looking up. Here's the code:
0e:936a (0x3937a) A9 00 LDA #$00
0e:936c (0x3937c) 20 C8 E3 JSR $E3C8 Get Strength
0e:936f (0x3937f) 8D A3 61 STA $61A3
0e:9372 (0x39382) AC AF 60 LDY $60AF Y = General ID
0e:9375 (0x39385) A9 01 LDA #$01
0e:9377 (0x39387) 20 C8 E3 JSR $E3C8 Get Intellect
0e:937a (0x3938a) 8D AF 61 STA $61AF
0e:937d (0x3938d) A9 00 LDA #$00
0e:937f (0x3938f) 8D C7 60 STA $60C7
0e:9382 (0x39392) 8D BB 60 STA $60BB
0e:9385 (0x39395) 8D FB 61 STA $61FB These are not important to zero out… they contain TP info which we will not show
0e:9388 (0x39398) 8D FC 61 STA $61FC
0e:938b (0x3939b) 8D FD 61 STA $61FD
…
So we can rewrite this little script, like so:
0e:936a (0x3937a) A9 00 LDA #$00
0e:936c (0x3937c) 8D BB 60 STA $60BB Important to zero out
0e:936f (0x3937f) 8D C7 60 STA $60C7 Ditto
0e:9372 (0x39382) 20 C8 E3 JSR $E3C8 Get Strength
0e:9375 (0x39385) 8D A3 61 STA $61A3
0e:9378 (0x39388) AC AF 60 LDY $60AF Y = General ID
0e:937b (0x3938b) A9 01 LDA #$01
0e:937d (0x3938d) 20 C8 E3 JSR $E3C8 Get Intellect
0e:9380 (0x39390) 8D AF 61 STA $61AF
0e:9383 (0x39393) AC AF 60 LDY $60AF Y = General ID again
0e:9386 (0x39396) A9 09 LDA #$09
0e:9388 (0x39398) 20 C8 E3 JSR $E3C8 Get Agility
0e:938b (0x3939b) 8D BB 61 STA $61BB
…
In other words, we change 0x3937a-0x3939c from
"A90020C8E38DA361ACAF60A90120C8E38DAF61A9008DC7608DBB608DFB618DFC618DFD"
to
"A9008DBB608DC76020C8E38DA361ACAF60A90120C8E38DAF61ACAF60A90920C8E38DBB"
And there we have it.
When all else fails... manipulate the source code.
November 2, 2011 at 1:52 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39626ludmeister
ParticipantLet's see if I can explain how to show Agility similar to the way my mod does on the Officer status screen. I'm having a bit of trouble following my notation… bleargh. I wasn't as thorough about taking notes about hex code as I am currently learning to be.
Now, it's important to note that this officer screen is used for ally and enemy alike. Officer stats are stored in memory in groups of twelve… the first 7 are Liu Bei's Army, and the final 5 are your enemy's. The final 5 slots are obviously invalid outside of battle. This will become important later.
@ 0x3ea4a- Status screen stat output strings
222321 0a0a f87785fb (STR__…)
181d23 0a0a f87785fb (INT__…)
10631f 0a0a f87785fb (A.P__…)
106312 0a0a f87785fb (A.C__…)
0d86 f87785fe (T.P__…) <- Trust me. This was friggin' annoying to ferret out.
The "860d" bit is actually a pointer to the function to display stuff. Go figure. So we'll have to dig for the actual "T.P" string.
According to my notes, to change T.P to AGI:
The pointers to the memory locations which display the various values on the status screen are located in the ROM @ 0x385ff-0x38608. They read:
9ca8f9b4fb 6161856061
The first group are the first bytes, the second group reference the second bytes of the pointers. So…
STR pointer= 619c
INT pointer= 61a8
A.P pointer= 85f9
A.C pointer= 60b4
"T.P" pointer= 61fb
Agility is found in memory @0x61b4, so instead edit 0x38603 from "fb" -> "b4", which will swap it for T.P.
T.P is not stored in memory as a part of an officer's data, and is custom calculated for the status screen. This can be gleaned from the following code:
0e:8579 (0x38589) B9 EF 85 LDA $85EF,Y @ $85EF = $9C (1st pointer byte)
0e:857c (0x3858c) 85 18 STA $0018
0e:857e (0x3858e) B9 F4 85 LDA $85F4,Y @ $85F4 = $61 (2nd pointer byte)
0e:8581 (0x38591) 85 19 STA $0019
0e:8583 (0x38593) A4 4A LDY $004A (# of general in list, 00 is 1st, 06 is player's last, 07-0b are enemies)
0e:8585 (0x38595) A5 54 LDA $0054 (Status screen value… 00 = STR, 01 = INT, etc.)
0e:8587 (0x38597) C9 02 CMP #$02 (Is it A.P?)
0e:8589 (0x38599) D0 07 BNE $8592
0e:858b (0x3859b) B9 C0 60 LDA $60C0,Y @ $60C0 … (Get general's Weapon ID)
0e:858e (0x3859e) A8 TAY
0e:858f (0x3859f) 4C 9F 85 JMP $859F
0e:8592 (0x385a2) C9 04 CMP #$04 (Is it T.P?)
0e:8594 (0x385a4) D0 09 BNE $859F (if not, don't bother getting general ID)
0e:8596 (0x385a6) A0 00 LDY #$00
0e:8598 (0x385a8) A5 4A LDA $004A (# of general in list)
0e:859a (0x385aa) C9 07 CMP #$07 (Compare # with 1st foe in list)
0e:859c (0x385ac) 90 01 BCC $859F
0e:859e (0x385ae) C8 INY
0e:859f (0x385af) E6 6E … Determines value based on the gleaned info
Of this code, if we are swapping Agi for T.P, the only change needed is 0x385a3: "04" -> "05". Agility is a general-based stat, and does not need to be custom calculated.
The string "T.P" is actually outputted programmatically:
0e:860d (0x3861d) A9 23 LDA $23 "T"
0e:860f (0x3861f) 9D 18 03 STA $0318,X @ $0348
0e:8612 (0x38622) A9 63 LDA $63 "."
0e:8614 (0x38624) 9D 19 03 STA $0319,X @ $0349
0e:8617 (0x38627) A9 1F LDA $1F "P"
0e:8619 (0x38629) 9D 1A 03 STA $031A,X @ $034A
You could change this, therefore, by changing:
0x3861e: "23" -> "10"
0x38623: "63" -> "36"
0x38628: "1f" -> "38"
This post is getting long, so I'll post part two separately. Because it's a mess to look at all that code, I'll also provide a nitty-gritty post which says "change this to that".
The rest is coming very soon…
When all else fails... manipulate the source code.
November 1, 2011 at 6:54 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39625ludmeister
ParticipantI've used Gui Huan a few times… it's occasionally useful, but nothing a Gullwing can't cover. Besides, Gullwings are 100% efficient, and Gui Huan seems dependent on the user's Int vs. the enemy leader.
In my mod I made Tui Lu (Escape) the first mobility tactic you learn, and Gui Huan (Return) didn't come nearly as late in the game. They were learned only by higher Intelligence generals, and IIRC were replaced in the late game.
In other words, I believe those tactics are definitely replaceable.
When all else fails... manipulate the source code.
-
AuthorPosts