DOAEditor and Romhacking for Destiny of an Emperor

Use this forum to discuss hex-editing or otherwise altering any Three Kingdoms game, and to promote modded titles and patches.

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Thu Jan 04, 2018 12:23 am

I'll take a look at doae editor villager code tomorrow. I know there were some caveats to saving villager info. I'll post them.
User avatar
MiDKnighT
Sage
 
Posts: 280
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Thu Jan 04, 2018 1:37 pm

If you can read C# the DoaEditor source code is visible here:

http://www.dev.niahak.org/DoaEditor/

Most of the villager stuff is in: http://www.dev.niahak.org/DoaEditor/MainForm.Places.cs

It's been a long time since I've looked at this stuff so it's hard for me to read even though I wrote it.

You can make sure villager info is saved if you switch villagers in the same place. Ie...if you were working on villager 1, switch to villager 2 and it should save villager 1's info.

Also in my initial look, I don't see how Y2 could have been saved with a larger value. Most bugs like this it has saved a smaller value by forgetting a bit(s). Adding to the value would be unusual.
User avatar
MiDKnighT
Sage
 
Posts: 280
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby Boneduke » Thu Jan 04, 2018 6:28 pm

Not a developer myself unfortunately, well, aside from basic stuff like javascript - so can read this source, but not do much with it. Nonetheless interesting to look at. Its funny coming at this years later and reading some of the original threads about DOAE ROM hacking - how really basic changes like editing an officers name were breakthroughs and how far its come since, with this editor being so comprehensive. It is really impressive.

Of course I dont expect there is much plans to do further development but if youre interested I've thought up a bit of a wish list as I've been working on the ROM - either features for the editor or the game itself.
Boneduke
Initiate
 
Posts: 52
Joined: Sun Aug 13, 2017 5:09 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Fri Jan 05, 2018 2:54 pm

Boneduke wrote:Of course I dont expect there is much plans to do further development but if youre interested I've thought up a bit of a wish list as I've been working on the ROM - either features for the editor or the game itself.


It doesn't hurt to list them out. Some of them may be low hanging fruit. Some may be nearly impossible. If there are some easy ones I can work on them next time I crack open the DoaEditor code (I don't even have DoaEditor editing set up on my current computer so I'd need to get in that mindset and get it all set up again).

I know sonic has been wanting an expanded number of officers but that would be a huge project and would likely introduce a ton of new bugs. So unless I devote 2 weeks to 6502 assembly he11 I probably won't be doing that one. :P
User avatar
MiDKnighT
Sage
 
Posts: 280
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby Boneduke » Fri Jan 05, 2018 6:55 pm

Ah yes I read some of the discussion about the complexity there. I certainly could have used a few more officers in my ROM but I wouldn’t say it was completely debilitating - maybe 10 or so wouldve been nice. Just had to reuse the same guy twice where I would have preferred to have a more powerful version.

I wondered if the stock villagers (IDs D9 through EF) could be converted into officers? You'd want to have at least some retain their usual sprite, so you could still put them into cities and have them look like townspeople. Might be less problematic approach?

Anyways here is the things that crossed my mind, I am sure will think of more

  • Currently there is a global crit rate for weapons. Would be awesome to have weapons with varying crit rates. So some weapons might crit at 25% or more whereas the regular rate is 12.5%.
  • I’m sure not a new idea by any stretch especially DOAE2 had it, but some items which increased STR, INT, AGI etc would be cool – e.g. gauntlets, boots etc
  • Would be nice to have more weapons/armor. There is plenty for a standard kind of game, but when you take advantage of the Profiles feature, where generals can have a preferred weapon type - the current amount is fairly limiting.
  • There is one instance in the game where you can "find" some text, the Gemsword house in Burnt Luoyang. It says "I found a keyhole". I think its triggered by finding Item FF. It would be awesome to allow 10 or 12 other instances of text strings that would appear when you searched the area. Would allow for more puzzles, secrets, etc.
  • Personally I find it kind of tedious to repeatedly Defend, Defend etc against a small rebel army in order to rebuild TP before a boss fight. Seems kind of disingenuous. Would be nice if there was items to restore TP the same as there was for health. Would feel more “heroic”! Although this is a tough one because wouldnt want them to be overpowered when used in battle. I think the Defend dynamic when its used legitimately, to regain TP midfight. Just kind of lame how it can also be reused to refill one's TP before a boss battle.
  • In the latest build, some tactics are duplicated (e.g. Li Jian, Li Jian 2), which allows to have a more powerful version of the same tactic (e.g. single target, all targets). There's a handful of additional tactics in the game which do not have this kind of duplication. Guard in particular, would be cool to have 2 versions of. Maybe Charge also.
  • There seems to be issues if weapons/armor are given the same name. So for instance, can’t seem to have a Dragon sword, Dragon armor, and Dragon helm. When I tried this, after saving and reloading, I noticed there was only 1 instance of an item with that name, the other 2 had disappeared.
  • I think I read the Tiu Lu tactic was removed due to uselessness? Was actually surprised by that, it seemed useless in the original DOAE since it could fail (why not just Retreat then?) but I had big plans to use it in my ROM as an auto-succeed retreat. I know its part of the DOAE charm but I personally loathe the random encounter rate, drives me insane lol. I wanted to have a guaranteed retreat tactic that was given to one or two generals, ones with high leadership or whatever. Was it impossible to make it auto-succeed? The only downside I saw was, allowing people to auto run away from the 2 part battles (Sun Quan, Sima Yi in the original) – but possible to do that anyway so, didn’t see a big problem.
  • I thought about, it would be nice to have a tactic that "slowed" the enemy - e.g halved their AGI or whatever is the opposite effect of Haste tactic. Or a “Weaken” or “Dumb” tactic that halved the enemies STR or INT. Maybe halved is too extreme, but lowers it by some degree anyway.
  • There doesn’t seem to be away in DOAEditor to mark regions for the 8 extra chapters. You can assign each general to the extra chapters but it seems to do the same to a region have to edit the hex directly.
  • The 12 forced officer death events are pretty great for storyline stuff and so far 12 is sufficient. However it is also useful for more mundane clean-up tasks. Like say I have a Jia Xu in chapter 1 and a Jia Xu in chapter 5. I have to make Chapter 1 Jia Xu unencounterable because its kind of dumb storyline wise to run into him later on and see him very weak when he was just super powerful in some other location. Alternatively, can attach an event to kill that 1st Jia Xu to some battle at the end of Chapter 4, that way I can have him be encounterable in the early stages but later in the game that version of his gracefully disappears :) For this kind of purpose, having another 12 or so such events would be helpful.
  • A way to flag which text entries aren’t assigned to a villager would be useful. Appreciate that would still show a lot of other text like, the text that an event triggers etc. But after doing a lot of text editing, the banks start to get full, and you have to manually go through the whole thing alphabetically and try to identify which ones you aren’t using. That’s kind of painstaking. The task would be a lot easier if could quickly distill the list down to at least those text entries which weren’t explicitly assigned to a villager.
  • It would be great to be able to add sprites via DOAE same as Profile pics. But they seem more complicated so maybe that isn't so easy.
  • Being able to edit Rebel forces etc in the editor would be really nice.
  • A counterattack tactic - something that you cast on one of your generals and then if he is attacked, there is a chance he will immediately counterattack.
  • I thought I read something in the wiki that said this was already implemented but it doesnt seem to the case in the latest patch. It would be nice to have a way to make all or some tactics calculate damage based on your soldier count. For instance, I have some Fire tactics, makes sense they don't depend on soldier counts. But then I have some physical tactics for non-tactician officers like Chop, Lunge, etc. Seems weird when an officer has 2 soldiers remaining and he suddenly hits you with a physical attack for 500 hehe.
  • Along the more complicated tactics line, I also thought it would be cool if you could combine effects - for instance - a damaging attack that has a potential to stun or confuse the enemy. Or a damaging attack that has potential to grant you haste. Etc.

I am sure will think of more things, but thats what I'd made a note of to date.
Boneduke
Initiate
 
Posts: 52
Joined: Sun Aug 13, 2017 5:09 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Fri Jan 05, 2018 7:44 pm

Wow what a list. I've thought about many of these as well. But ya, most of these are not trivial. Since I finished IPS 1.3 I've been more focused on stability than new features. Ie...fixing bugs that cause the game to freeze or cause DoaEditor to crash. Stability is the most important thing. The bigger and crazier features I try to add, the more unstable the game becomes. Ie...more crashes and bugs to fix. If I ever get the itch to do some major DoaE project work, maybe these features could be the start of IPS 1.4 to keep whatever stability we have in 1.3 (there are still a couple of bugs out there that need to be fixed tho).

Let me address some specific items:

Ah yes I read some of the discussion about the complexity there. I certainly could have used a few more officers in my ROM but I wouldn’t say it was completely debilitating - maybe 10 or so wouldve been nice. Just had to reuse the same guy twice where I would have preferred to have a more powerful version.

I wondered if the stock villagers (IDs D9 through EF) could be converted into officers? You'd want to have at least some retain their usual sprite, so you could still put them into cities and have them look like townspeople. Might be less problematic approach?


Sounds like you understand the biggest problem with expanding officers. It's that each officer has an id from 00-FF and all slots are taken. The game references these officer ID's all over the place. To add more officers we'd have to add another value . Ie... 0000-FFFF. But then you'd have to change the reference in every single place with the additional digit that's there's absolutely no room for in the assembly code. I think adding the extra digit is pretty much impossible or next to impossible. That said, one *possible* way is to tie different officer attributes to different chapters. Ie...when you look up an officer attribute it can be different depending on which chapter you are in. This might be most beneficial for portraits, soldier counts, AP, and AC. So you're still limited in the current number of officers but those officers can show up in different chapters with different solider counts, AP, and AC, and maybe different portraits even. For example an officer can "age" later in the game. That'd be kinda cool? Something to think about...

Example: Liu Bei in Chapter 1 might be:

AP: 15
AC: 10
Soldiers: 300
Portrait: Image

But Liu Bei in Chapter 8 might be:

AP: 180
AC: 200
Soldiers: 30,000
Portrait: Image

Regarding villagers I guess in theory they could be used if necessary but then officers would have villager sprites and if you recruited a villager they would disappear from everywhere. Ie...if I recruited villager D9 then probably 100 D9 villagers would disappear from towns and villages all over the place.

I’m sure not a new idea by any stretch especially DOAE2 had it, but some items which increased STR, INT, AGI etc would be cool – e.g. gauntlets, boots etc


I've thought about this as well. For example the Hereditary Seal (maybe in place of the gemsword) would increase POL or "Art of War" book might increase LDR and INT.

Personally I find it kind of tedious to repeatedly Defend, Defend etc against a small rebel army in order to rebuild TP before a boss fight. Seems kind of disingenuous. Would be nice if there was items to restore TP the same as there was for health. Would feel more “heroic”! Although this is a tough one because wouldnt want them to be overpowered when used in battle. I think the Defend dynamic when its used legitimately, to regain TP midfight. Just kind of lame how it can also be reused to refill one's TP before a boss battle.


Good idea... Maybe an item to refill TP that can be used in the world map but not in battle.

I think I read the Tiu Lu tactic was removed due to uselessness?


At first I removed it to make room for better tactics like Duel, etc... But with the expanded tactics feature I brought it back...right?

There doesn’t seem to be away in DOAEditor to mark regions for the 8 extra chapters. You can assign each general to the extra chapters but it seems to do the same to a region have to edit the hex directly.


Hmm, you should be able to do this now. In the DoaEditor folder look in the tables directory and update the regiontable.tbl file. Currently it has:

Code: Select all
00=No Random Encounters
01=Yellow Turbans
02=Dong Zhuo
03=Yuan Shu
04=Yuan Shao
05=Jingzhou
06=Shu
07=Wu
08=Wei


But the IPS version would have:

Code: Select all
01=Yellow Turbans
09=Yellow Turbans (Extra Chapter)
02=Dong Zhuo
0A=Dong Zhuo (Extra Chapter)
03=Yuan Shu
0B=Yuan Shu (Extra Chapter)
04=Yuan Shao
0C=Yuan Shao (Extra Chapter)
05=Jingzhou
0D=Jingzhou (Extra Chapter)
06=Shu
0E=Shu (Extra Chapter)
07=Wu
0F=Wu (Extra Chapter)
08=Wei
00=Wei (Extra Chapter)


Being able to edit Rebel forces etc in the editor would be really nice.


This is probably one of the easier items in your list but would probably require a new DoaEditor page for random enemies.

I thought I read something in the wiki that said this was already implemented but it doesnt seem to the case in the latest patch. It would be nice to have a way to make all or some tactics calculate damage based on your soldier count. For instance, I have some Fire tactics, makes sense they don't depend on soldier counts. But then I have some physical tactics for non-tactician officers like Chop, Lunge, etc. Seems weird when an officer has 2 soldiers remaining and he suddenly hits you with a physical attack for 500 hehe.


Hmm it seems to incorporate soldier count but probably not enough.
User avatar
MiDKnighT
Sage
 
Posts: 280
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby Boneduke » Fri Jan 05, 2018 8:20 pm

MiDKnighT wrote:Regarding villagers I guess in theory they could be used if necessary but then officers would have villager sprites and if you recruited a villager they would disappear from everywhere. Ie...if I recruited villager D9 then probably 100 D9 villagers would disappear from towns and villages all over the place.


Ah yes didnt consider that - although could take care just to not make those guys recruitable, was thinking about them being useful for the random useless kind of guys like Lei Xu, Zhang Ji etc that who really cares what their sprite looks like

I'd read some of the earlier posts about the idea you mention too - definitely would help a lot. For instance in my ROM I have 5 Zhuge Liang's, 3 Liu Bei's, 4 Guan Yus... having just one who had fluctuating stats would free up a lot of slots.

MiDKnighT wrote:At first I removed it to make room for better tactics like Duel, etc... But with the expanded tactics feature I brought it back...right?


Oh I thought what happened was Tui Lu got scrapped altogether and two variants of Gui Huan got created - the regular one (sends you back to current castle) and then a Gullwing kind of variation? I'll double check them in game.

MiDKnighT wrote:Hmm, you should be able to do this now. In the DoaEditor folder look in the tables directory and update the regiontable.tbl file.


Checked that out but I think its something different? This is what I mean:

Image

Can I change this one via DOAEditor, if a table gets updated? or this has to be done via hex?

MiDKnighT wrote:Hmm it seems to incorporate soldier count but probably not enough.


Oh right - now that you mention it I remember testing in the calculator in DOAEditor and seeing it does have an effect but it seems pretty insignificant.

thanks a lot for the response!
Boneduke
Initiate
 
Posts: 52
Joined: Sun Aug 13, 2017 5:09 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby MiDKnighT » Fri Jan 05, 2018 9:13 pm

Boneduke wrote:Checked that out but I think its something different? This is what I mean:

Image

Can I change this one via DOAEditor, if a table gets updated? or this has to be done via hex?


Oh man... Just looked at the DoaEditor code online and this chapter box is overly complicated. Not sure if that was my doing or Niahak's. It reads all the regions from the ROM and builds a list of chapters based on what it finds in the ROM. That said, it doesn't let you add brand new chapter numbers. But... If you add some manually DoaEditor should pick them up. Instructions are here:

http://doaerhguide.wikidot.com/#toc13

Then after you add some new chapters there, DoaEditor should be able to pick up the new chapters and put them on the list.
User avatar
MiDKnighT
Sage
 
Posts: 280
Joined: Mon Oct 16, 2006 4:16 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby Boneduke » Fri Jan 05, 2018 9:47 pm

Ah makes sense - ok just tried it now and I have the extra chapters in the editor now. Perfect! I only plan to use maybe 2 or 3 extra chapters at most, but it will definitely help to avoid some bizarre appearances of generals (what is Lu Meng doing up here in Jizhou?? lol)
Boneduke
Initiate
 
Posts: 52
Joined: Sun Aug 13, 2017 5:09 pm

Re: DOAEditor and Romhacking for Destiny of an Emperor

Unread postby Boneduke » Mon Jan 08, 2018 3:38 pm

General question about how the map graphics are constructed.

Each block in DOAEditor is shown to have an ID when you mouseover, like 1-1, 1-112, 2-10, 2-232 etc.

Such as these two:

Image and Image

In fact they are 1-1 and 2-1 respectively

Image

Image

I've noticed when you look at the hex that constructs the region, these numbers displayed on hover in DOAEditor are 1:1 represented as hex, so e.g. 1 is 01, 10 is 0A, 232 is E8. However only the last part of the ID is represented (not sure how to say that, what I mean is, the 112 in 1-112, the 232 in 2-232 etc). The code doesn't seem to have a means to distinguish between whether the graphic is coming from 2_Cave1 or 2_Cave5

To say it differently, if I make this kind of edit to a region

Image

Where the first two graphics from the top right are 2-1 and the third and fourth are 1-1, you would think somewhere in the hex there must be something to tell the game which of these two graphics to load

However there is nothing to distinguish

Image

It still contains "01 01 01 01" but somehow that represents 2-1, 2-1, 1-1, 1-1.

Any idea how it does that? I want to use this information to change the layout of zones that get overwritten (e.g. Qingzhou castle, Luoyang etc)

In game shot:

Image

I'm stumped as to how "01 01 01 01" can render 2 different graphics!
Boneduke
Initiate
 
Posts: 52
Joined: Sun Aug 13, 2017 5:09 pm

PreviousNext

Return to Three Kingdoms Game Editing & Mods

Who is online

Users browsing this forum: No registered users and 2 guests

Copyright © 2002–2008 Kongming’s Archives. All Rights Reserved