Home › Forums › Destiny of an Emperor › DoaE Artificial Intelligence Enhancements + New Tactics
Tagged: Destiny of an Emperor, Destiny of an Emperor hack, Destiny of an Emperor hacking, Destiny of an Emperor Rom, DoaE artificial intelligence, NES AI, NES Artificial Intelligence, NES hacking, ROM Hacking, Yuan Shu
- This topic has 645 replies, 10 voices, and was last updated 4 years, 9 months ago by
MiDKnighT.
-
AuthorPosts
-
January 7, 2013 at 1:52 pm #44437
MiDKnighT
ModeratorQuote:Requests:1. Multi-Heal Elixir + find where elixir HP data is stored
2. Inn Cost Changeable w/out bugs
3. Officer recruitment cost w/ out bugs
4. Once Atma tells us how to get more tactics, a Warp (gullwing) tactic!
My work is never done!
The first 3 are doable but I'm running out of the space in the ROM I was using where I overwrote the japanese text graphics. In order to do more major enhancements we'd need to expand the ROM (again) and do as Atma suggested by moving portraits and sprites out of the original ROM pages. This would be a big project.
As for the 4th one, I still don't know how Atma is going to accomplish that. Seems like a big task to expand the # of tactics. I'd love to do it though. We could bring back all the original tactics that we replaced + some new ones. I'm thinking the ultimate goal would be 50+ tactics (one for every level learned).
One (easier) idea that I think could effectively expand the number of tactics is to manipulate these tables:
Quote:0x3bb3f-0x3bb5c- How to target the tactic80 80 00 80 00 80 80 80 00 00 01 01 00 00 01
00 00 00 00 00 00 80 80 01 00 80 01 80 00 00
00 means that no targeting is needed. 80 means an enemy officer is targeted. 01 means that an allied general is targeted.
0x3bb5e-0x3bb7b- Targets all or not
00 00 80 00 80 00 00 00 80 80 00 00 01 01 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 means to use the targeting info gleaned from input (see above). 80 means target all enemy officers, 01 means target all allied officers. Defense tactics, as well as special tactics such as Gui Huan and Tui Lu are special cases, and are simply target-less.
Instead of reading these tables it could use some other criteria to decide if the tactic targets all or not. INT? Current level / AC?
Then you would effectively have a target one / target all version of every tactic!
January 8, 2013 at 8:29 pm #44438MiDKnighT
ModeratorQuote:1. Multi-Heal Elixir + find where elixir HP data is storedWhat did you have in mind for this?
Also, what did you think of my last idea. We could use those tables for INT and level (or AC for enemies) to decide if a tactic targets one or target all. We can use different settings for each tactic.
For example, we could set "Flame" to target all enemies if level > 10 and INT > 200 but set "Mislead" to target all enemies if level > 40 and INT > 245.
January 9, 2013 at 12:09 am #44439sonic.penguin
ModeratorQuote:1. Multi-Heal Elixir + find where elixir HP data is storedWhat did you have in mind for this?
Also, what did you think of my last idea. We could use those tables for INT and level (or AC for enemies) to decide if a tactic targets one or target all. We can use different settings for each tactic.
For example, we could set "Flame" to target all enemies if level > 10 and INT > 200 but set "Mislead" to target all enemies if level > 40 and INT > 245.
Just making buying Elixirs more USEFUL as they are worthless atm with single target healing and the new damage algorithms/tactic effects. So HP and/or multi-targeting ability so we'd have to find the targeting table which I'm sure is like tactics.
The idea you have is a cool one, but you would definitely have to move the table and as I've found once hitting level 52, the tactics start relearning :P
January 9, 2013 at 12:15 am #44440MiDKnighT
ModeratorQuote:So HP and/or multi-targeting abilityOr do you mean TP?
HP was already figured out by Metorstrike way back.
Quote:The Elixir items' healing values are calculated as follows:// $4D = Item ID that was used.
// #$31 = Elixir A
// #$32 = Elixir B
// #$33 = Elixir C
// #$34 = Elixir D
$8980:A5 4D LDA $4D = #$31
$8982:38 SEC
$8983:E9 18 SBC #$18
$8985:20 0C C1 JSR $C10C
The function $C10C will calculate the function pointer of the function that handles the item's effect. In the case of the Elixirs, it takes you to one of the following locations:
// We jumped here if we used Elixir A
$8CAE:A9 00 LDA #$00
$8CB0:85 11 STA $11 = #$A7
$8CB2:A9 64 LDA #$64
$8CB4:85 10 STA $10 = #$10
$8CB6:D0 1C BNE $8CD4
// We jumped here if we used Elixir B
$8CB8:A9 01 LDA #$01
$8CBA:85 11 STA $11 = #$A7
$8CBC:A9 F4 LDA #$F4
$8CBE:85 10 STA $10 = #$10
$8CC0:D0 12 BNE $8CD4
// We jumped here if we used Elixir C
$8CC2:A9 03 LDA #$03
$8CC4:85 11 STA $11 = #$A7
$8CC6:A9 E8 LDA #$E8
$8CC8:85 10 STA $10 = #$10
$8CCA:D0 08 BNE $8CD4
// We jumped here if we used Elixir D
$8CCC:A9 11 LDA #$11
$8CCE:85 11 STA $11 = #$A7
$8CD0:A9 94 LDA #$94
$8CD2:85 10 STA $10 = #$10
// Continue execution
$8CD4:20 69 8D JSR $8D69
So basically, depending on where we jumped, we place the value of 100, 500, 1000 or 4500 into $11 – $12. The value at $11 – $12 will then be used as the healed amount…
As you can see from this new example, not everything in this game (or any other) is data-driven. Here, the healing amounts for these items is hard-coded into the actual executed code… this sucks for you, but it saves memory for the programmers of the game… Yet another example of why you need to learn NES assembly to continue your work in this game hack…
8CAE = 0x38CBE in the ROM file…
The use of Resurrect is a little more complex, because it requires that the General be revived before he gets healed for 400 HP. The place in the code that I traced the value is at:
// Storing the value of 400 into $11 – $12 so that it can be added
// to the General's HP when Resurrect is used:
$8C8F:A9 01 LDA #$01
$8C91:85 11 STA $11 = #$A7
$8C93:A9 90 LDA #$90
$8C95:85 10 STA $10 = #$10
Again, here is yet another value that is hard-coded into the assembly code…
8C8F = 0x38C9F
http://www.gamefaqs.com/boards/563402-destiny-of-an-emperor/47999342?page=1
January 9, 2013 at 1:26 am #44441sonic.penguin
ModeratorI meant HP and the ability to multi-target like Recover.
January 9, 2013 at 1:57 am #44442sonic.penguin
ModeratorMeteorstirke never really explained things in simple terms… okay, I think I've deciphered the HP thing then, if someone can test it out for me.
Elixer A Address (100 HP): (Default= 00 64)
High Value: 38CBF
Low Value: 38CC3
Elixer B Address (500 HP): (Default= 01 F4)
High Value: 38CC9
Low Value: 38CCD
Elixer C (1000 HP) Address: (Default= 03 E8)
High Value: 38CD3
Low Value: 38CD7
Elixer D (4500 HP) Address: (Default= 11 94)
High Value: 38CDD
Low Value: 38CE1
January 9, 2013 at 3:40 am #44443MiDKnighT
ModeratorYa that's an easier way to put it.
January 10, 2013 at 1:29 am #44444sonic.penguin
ModeratorOkay, oddly enough, I'm having guys on my team w/ 240+ STR refusing duels against guys w/ 120 STR and then getting doubted :P
January 10, 2013 at 4:07 am #44445MiDKnighT
ModeratorQuote:Okay, oddly enough, I'm having guys on my team w/ 240+ STR refusing duels against guys w/ 120 STR and then getting doubtedYa that should be really rare. They should only have a 15 our of 255 chance of refusing *IF* they are below that INT threshold. Remember that if they are below that INT threshold they only look at their own STR and not their opponents. But if they are above the INT threshold they know they have a big advantage and should accept.
January 10, 2013 at 1:21 pm #44446sonic.penguin
ModeratorDid you happen to try out if those elixir addresses work?
January 10, 2013 at 1:35 pm #44447MiDKnighT
ModeratorOh I have to test it? I would assume it works if Meteorstrike found it.
January 10, 2013 at 1:39 pm #44448MiDKnighT
ModeratorOK ya it works. Changed Elixer D to "FF FF" and it rully revived my guy.
January 10, 2013 at 1:39 pm #44449MiDKnighT
ModeratorOK ya it works. Changed Elixer D to "FF FF" and it fully revived my guy.
January 10, 2013 at 3:58 pm #44450sonic.penguin
ModeratorWell, I was considering this option not only for usefulness of Elixirs now, but also as a nother CA$H dump in the game where you might actually neeed to buy something other than gullwings and resurrects at the shop.
If only we could use tactics on the main map then this game would finally break that major barrier that keeps it from being like other RPG where you can heal on the main map other than using items.
January 10, 2013 at 4:03 pm #44451MiDKnighT
ModeratorQuote:If only we could use tactics on the main map then this game would finally break that major barrier that keeps it from being like other RPG where you can heal on the main map other than using items.That may be possible. When I did the "no strategist" changes I removed the option from the menu to assign a strategist. I'm sure we could attempt to add an option but then again, it's easier to subtract then add because of space. One of these days I will crack open the ROM again and look into a lot of this stuff but I think another ROM expansion would be the first order of business to give room to play.
-
AuthorPosts
- You must be logged in to reply to this topic.

