Forum Replies Created
-
AuthorPosts
-
November 16, 2011 at 5:52 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39879
ludmeister
ParticipantI just figured out something really good… something I've wanted to figure out for a long, long time…
Officer's status bytes in memory
First of all, all officers have their status byte stored in memory in $6300-$63ff. They're stored in General ID order (to figure out a specific General's ID #, check him out in Destiny of an Editor).
If you check there, you'll see a number of repeating values… mostly 80, 90, 98, and C0.
80- You can never meet this officer in random battles.
90- You can meet this officer in random battles, and you can recruit him after the battle.
98- You can meet this officer in random battles, but you cannot recruit him after the battle.
C0- I don't know what this value means. Possibly linked to special cases… see below.
How officers are (normally) set to be recruitable
Furthermore, most castle battles will seek out a table of bits in the DoaE ROM, stored @ 0x3b153-0x3b172, and based on whether the a participant General's bit in this table is 1 or 0, will set the officer's status byte to "90" or not. In other words, if you meet Yang Huai in a castle battle, after the battle, it will check bit #0x4b in this table… bit #4 of 0x3b15c… and seeing that that bit is set (is = 1) will set Yang Huai as recruitable.
This is how the table @ 0x3b153-0x3b172 looks:
00 00 7f cf f8 3e f1 81 18 ff b8 1f ff ff 00 4d
a1 39 f9 00 00 10 20 03 72 f7 e0 80 00 00 00 00
Let's look @ 0x3b155 specifically now:
7f = 0111 1111
0 – 1 – 1 – 1 – 1 – 1 – 1 – 1 (bit-by-bit representation of 0x7f)
10- 11- 12- 13- 14- 15- 16- 17 (General ID)
So, if we met any of the officers with IDs between 11 and 17 in a (normal) castle battle, after the battle we could recruit them. If we met General ID 10 in battle, he'd stay resolute against our allies' cause and would not be recruitable… in fact their status would not change. If 80 (cannot be met), that would not change. If 98 (can meet him), that also would not change.
Officer's initial statuses
Initial statuses for generals are based upon a separate bit table, found at 0x35722-0x35741:
00 00 ff ef fc ff f7 83 f8 ff b8 ff ff ff 3f ff
ff 79 ff 00 00 00 00 23 76 f7 e0 80 00 00 00 00
If the bit is set, the initial status is 0x98 (you can encounter him in random battle but cannot recruit him). If not set, the initial status is 0x80 (you cannot meet him in random battle).
Special cases
I have not ferreted out special cases, but it is clear that there are exceptions to these rules… like when you beat the Zhang brothers in the cave behind Qing Zhou, and therefore don't engage Zheng Mao and Chengyuan Zhi, but they are still recruitable after that battle.
To make all officers recruitable… always
A change so powerful it might almost be considered cheating… to make any officer recruitable from a random battle… always, try this:
0x3a45d: "98" -> "99"
What this does is it changes this statement:
0e:a44c:C9 98 cmp #$98
to a statement that is never true, since no officer has a status of 0x99. Therefore, any and all officers you could engage in a random battle would be recruitable.
When all else fails... manipulate the source code.
ludmeister
ParticipantOoops… yeessss, we definitely would. Good catch. Too much hex is addlin' me brain :drunk:
When all else fails... manipulate the source code.
ludmeister
ParticipantI think I understand… if I'm not mistaken, at 00:B525, we have the soldier progression ID in Register Y (since we're comparing Y with various values). The accumulator still has the ROM page we just switched to, so that is obsolete data. We could do this, then:
00:B525:98 TYA (Transfer value in Register Y to Accumulator)
00:B526:85 10 STA $0010 = #$00
00:B528:4C 13 B5 JMP $B513
And be done, since the Soldier Progression ID determines how many Soldiers the officer begins with.
When all else fails... manipulate the source code.
November 16, 2011 at 3:34 am in reply to: Destiny of an Editor (permanent beta test mode active) #27115ludmeister
ParticipantMiDKnighT-
Yeah, it's sorta what I'm asking about the tactic list. Except the soldier list (and DP list) seems different. If Destiny of an Editor finds a Solider entry "x" in an officer's Soldier bytes (Allied soldiers or Enemy soldiers), then it adds that entry to the list. When I changed the fixed soldier totals for the new version of my mod (00-7f) I had to make sure I hex-edited every one of those values somewhere in an officer's Soldier totals. Then, I used Destiny of an Editor to apply those appropriately.
So, I believe that Destiny of an Editor is loading all the rows from soldtable.tbl… just not adding some of those entries at the bottom since they are found to not have been applied to any officer's Soldier byte, and therefore are considered irrelevant.
The tactic list simply loads from the first 32 entries in tactable.tbl.
When all else fails... manipulate the source code.
ludmeister
ParticipantQuote:One idea that I think would probably be easy to do is to swtich Cheng Nei / Castle / Barrier to "Protect" or something which acts like "Guard" but cuts attacks by 25% instead of 50%. What do you think of that?Great idea!
Off the top of my head, it might also be neat (space is obviously a bit of an issue) is to combine Wuo Jian and Shui Jian into one tactic.
When all else fails... manipulate the source code.
November 14, 2011 at 5:41 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39873ludmeister
ParticipantAlso, I wanted to figure out if gold is awarded based off of a multiplier like experience is. The method of calculating the amount of gold awarded is fairly complicated, and given the amount of time I wanted to spend working with this, I didn't delve too deeply into the code. From what I could tell, the game tests the officer's ID, and then runs through their Str, Int, and Agi, and assigns a value from that… then seems to multiply by a chapter value (aha!)… I modified these values and found that the larger the value, the more gold awarded for the same opponents. Here are that value, as that seems to be the easiest method of changing the amount of gold awarded:
0x39ad7-0x39ae6: Gold awarded per chapter multipliers
0014 0028 003d 007a 00cc 0199 02cc 0400
For some reason, these are not stored like other values are, and are meant to be read as I divided them. So those multipliers are:
20 (Yellow Scarves campaign)
40 (Dong Zhou)
61 (Yuan Shu)
122 (Yuan Shao)
204 (Jing Zhou)
409 (Shu)
716 (Wu)
1024 (Wei)
When all else fails... manipulate the source code.
November 14, 2011 at 4:38 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39872ludmeister
ParticipantFor anyone interested (Atma?) I've tested setting tactics to advanced levels, making some levels so that you don't learn tactics on them (in my mod, those levels are 7, 17, 19, 29, and 34). My two fears have been put to rest:
1. It continues to award tactics even if it hits a byte in the range 0x3b881-0x3b89e that is 00 (no tactic learned).
2. It will continue to award tactics up to your current level… not 31 (as I thought it might have).
MiDKnighT- Could you amend the hacking guide to reflect what has been learned?
0x3b880-0x3b8b2- Tactic ID learned at level up (1st ID for level 1… last is level 50!)
00 01 11 06 0b 15 18 02 12 07 19 1c 0c 03 08 0d
10 1b 16 17 09 04 0f 14 1d 1e 1a 0e 0a 05 13 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
Setting a tactic to level one is untested… it probably will award eligible officers the tactic just fine, but you won't receive the TP bonus for learning it.
When all else fails... manipulate the source code.
November 13, 2011 at 5:43 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39867ludmeister
ParticipantQuote:I also tested the agility hits for the first time. It is uber cool! Great stuff!Thanks! I had a lot of fun with that one, actually. I definitely wanted a random element to the number of attacks, to add to the trepidation factor when fighting officers who look a bit out of your league 8O
One thing I could have done better was to have created another little table for items that add one attack, and checked your items with the table items via a loop; it would have made for a bit easier editing. Grr. It could probably be done with the twelve extra NOP bytes provided, however…
As for the soldier bars, here's what I have in my mod at 0x3adfe-0x3ae13 (Starts at 0x3adfe, not 0x3adf2… my mistake in the guide):
"0a1e 50c8 fae8
0000 0000 0103
0105 0f27 61
f4dd a111 a9"
Thresholds: 500, 1501, 4001, 10001, 25001
Soldiers/pixel: 10, 30, 80, 200, 500, 1000
When all else fails... manipulate the source code.
November 13, 2011 at 4:49 am in reply to: Destiny of an Editor (permanent beta test mode active) #27109ludmeister
ParticipantNiahak–
Sorry to bug you, I know you're real busy…
When I changed the tactable.tbl, it worked just fine… for only the first 31 levels. In my new mod I'd like to change the tactic list up a bit so the final tactic is learned at level 36… would you be willing to open this possibility up in the editor? Thanks a ton.
When all else fails... manipulate the source code.
November 11, 2011 at 6:08 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39858ludmeister
ParticipantMiDKnighT– You rock. Thanks! (So do you, Niahak… great software engineering, man :thumleft: )
When all else fails... manipulate the source code.
November 11, 2011 at 5:31 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39855ludmeister
ParticipantAtma–
In my current playthrough, I'm planning to test what happens when you skip a level and tell the game to award the last tactic at level 32 (not 31). If that works, it should work in any order. I don't foresee any difficulties with doing this… however,
Two caveats with this:
1. You'd (potentially) gain TP on level 32… not 31 (not a biggie), and
2. The Destiny of an Editor would not work for enemy officers set to level 31… since they would not be awarded tactics for any level higher than 31. So either you'd have to set the level of enemy officers (especially Wei officers) manually, or maybe Niahak could allow us to set the level of officers up to 50 (please, Niahak? :nod: )
When all else fails... manipulate the source code.
November 11, 2011 at 3:42 pm in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39852ludmeister
ParticipantMiDKnighT–
Before you make the IPS patch with the 8 Tactics thing, I've found a few more changes that I've needed to make it complete. Here they are:
First, here are the changes code for the tactic shifting (in case you learn a tactic in slot 8, but don't have a tactic already learned in any of the slots from 1-7). I believe this is executed for both allied and enemy officers:
0x3b823: "07" -> "09"
0x3b827: "06" -> "08"
This makes it so enemy officers after don't have their tactics summarily wiped after they are awarded them (it is supposed to clear the next enemy officer's tactics before they are awarded):
0x3e0d1: "0a85f3 0a65f3" -> "0a0a0a eaeaea"
0x3e0d9: "06" -> "08"
And finally, I was finding that enemy officers were being given Escape and Return. This was the culprit:
0x3b803: E0 09: CPX #$09– Comparing officer # with 09 (that would be the third enemy officer)
After this, it tested the tactic to be awarded with #$1d, and that is Escape's ID (Return's is #$1e). If #$1d or greater, the tactic is not to be awarded. So… normal operation with Escape/Return would require:
0x3b804: "07"
While with your Resurrect/Revive change, this would be better:
0x3b804: "0b"… or maybe "0c" to be safe??
The 8 Tactics change has the potential to be super-cool… I'm liking it :P I have even realigned the attack tactics to 4 Fire, 4 Water, and 2 miscellaneous tactics which are not affected by Douse/Levee, and don't require proximity to bodies of water! Yay!
When all else fails... manipulate the source code.
November 11, 2011 at 3:39 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39847ludmeister
ParticipantQuote:Of course, I was going to wait till I was finished to share the gory details but the 2 tactics are so similar and so tied together that it doesn't really make sense to have one and not the other.If you're interested in helping me find a way to make bad guys target dead guys (just for these 2 tactics) I can share what I have so far. Lemme know…
Sorry man, I'm afraid I'm gonna have to bow out of this one. I'm going to need my sleep as I'm battling a nasty recurring sinus/upper respiratory bug… it seems to hit me once every two weeks (no exaggeration… I wish it was!) because I drive myself too hard, I have an 11 month old son, and I'm not as young as I used to be :(
But I am interested to hear about your findings, when you're ready, of course. The reason I requested to remove one, but not the other (if it's possible) is that I think that a limited Revive spell swapped for the Escape tactic would be awesome… but I kinda like the Return tactic and believe that a "Revive with full army" would be horrifically powerful… and I don't like the idea of Si Ma Yi using that bad boy…
But, it's your edit, and it's awesome no matter how you pull it off. If you haven't noticed, I'm all about customization and alternative tactics :geek:
When all else fails... manipulate the source code.
November 11, 2011 at 3:11 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39845ludmeister
ParticipantLife and Raise sound interesting! Would you be willing to write up your findings in such a way that we could implement either one or the other? That would be very helpful!
Quote:The downside of this is that the allies would be too overpowered with every tactic at their disposal. With Ce Mian + Ji Mian you could totally shut down the enemy.I'm not sold on the usefulness of this edit yet either… but I'm itching to do a playthrough without Strategist-standard tactics for one reason… it would definitely introduce some freshness and some different rules for tactics that would have to be reckoned with. For instance… no more gargantuan heal tactics by Zhang Fei and Lu Bu. Tactical effectiveness is not set by Int, but by Int or Str (whichever is greater), so I would often have Zhang Fei heal my group with Remedy while the rest pelt the enemy with Blaze or somesuch.
Essentially the tactician would likely be the least effective fighting general who you can afford to stow their tactics in favor of TP… not sure if that made sense at all.
Depending on how you change up the order/priorities/slots of tactics, especially when you add the extra two slots, you could easily end up with one strategist who packs Ji Mian/Ce Mian. That would be fairly cheap… but Negate can cut through Thwart! So even those two tactics together aren't foolproof.
When all else fails... manipulate the source code.
November 11, 2011 at 12:38 am in reply to: Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com ) #39843ludmeister
ParticipantSuccess!
The function to choose tactic list is found in 0f:df0c (0x3df1c). There, it checks to see whether this is a friend or foe. A foe chooses his own tactics. Otherwise, it goes to a little loop to see which general in your lineup has a "C0" in their "present" byte (80 means the general is present in your army, the added '40' bit means they are the strategist). Then it calculates where in memory to find the tactic list from this info.
To make each officer use their own tactic list, do this:
0x3df26: "a44a4c24df"
0x3df26: A4 4A: LDY $004A (Memory location $004a is where the current attacking officer is stored)
0x3df28: 4C 24 DF: JMP $DF24 (Calculates position in memory to find this tactic list)
That's all there is to it! If the officer has no tactic list, they are given the generic rebuttal "The tactician has not yet prepared any strategies." (This only used to be given for level one armies).
The strategist is still the one powering the group's TP store. So they still have a purpose :-)
When all else fails... manipulate the source code.
-
AuthorPosts