Home › Forums › Destiny of an Emperor › Destiny of an Editor (permanent beta test mode active)
Tagged: Destiny of an Editor, Destiny of an Emperor, Huo Hu, Niahak, ROM Hacking, Xian Zhu Xuande, Zhuge Liang
- This topic has 1,129 replies, 26 voices, and was last updated 10 years, 12 months ago by
MiDKnighT.
-
AuthorPosts
-
June 10, 2013 at 10:52 pm #27566
sonic.penguin
ModeratorQuote:"Z8??Qong", "Zh5ng Fei"I had that issue when applying patch 1.3
June 10, 2013 at 11:36 pm #27567MiDKnighT
ModeratorYuk, the patches aren't even touching the names. Very strange. Looking into it.
June 11, 2013 at 3:47 am #27568MiDKnighT
ModeratorOK what was happening was the "unmodified" file I was using to make patch 1 was truly unmodified. I had only added zeros to make it 1MB. What I found is that when DoaEditor does the expansion it moves text around a little bit. Since Patch 1 and Patch 2 had been expanded with DoaEditor there was a mismatch that caused some problems for the IPS patching. The solution was to use the DoaEditor expansion on my "unmodified" file before making the patches.
Latest version of IPS 1.3 uploaded. No need to copy memory to fix save states but you do need to view the status page of an ally officer and re-save before viewing an enemy status page (the ally status page loads the new memory).
June 12, 2013 at 2:50 pm #27569MiDKnighT
ModeratorQuote:I have SVN set up for DoaEditor and would be glad to make you an account in case you'd like to tinker with it.If lud doesn't have the time to make major DoaEditor updates then I might be interested in this as well. Last time I looked I couldn't make much sense of the code but with the right motivation I could learn it. I think for most potential modders the guide is pretty scary. DoaEditor has always been the way that we have made the ROM more accessible to potential modders. There's so many great things we can do in the guide but can't do in DoaEditor yet. After a couple more tweaks/enhancement I would probably want to focus my attention on DoaEditor so that it can catch up to all the stuff in the guide if that's possible.
June 12, 2013 at 4:28 pm #27570sonic.penguin
ModeratorNew Integral Parts for DOAEditor:, my 2 cents
*Cave Modfications and correcting the exit points to be moved to the same location.
*Shop Menu Modifier + Price Modifier
*Additional Stat Modifier ie: Politics/Vitality
June 12, 2013 at 4:28 pm #27571sonic.penguin
ModeratorNew Integral Parts for DOAEditor:, my 2 cents
*Cave Modfications and correcting the exit points to be moved to the same location.
*Shop Menu Modifier + Price Modifier
*Additional Stat Modifier ie: Politics/Vitality
June 13, 2013 at 11:29 pm #27572Niahak
ModeratorMiDKnighT: Added an account for you. Sent you an email with the details. Any questions about the code, feel free to ask here. That way anyone who joins the project later will have the info.
June 14, 2013 at 8:18 pm #27573MiDKnighT
ModeratorThank you sir. Let me get my last major DoaE enhancements done then I'll start looking.
June 19, 2013 at 4:18 am #27575MiDKnighT
ModeratorI've got Visual C# 2010 Express going and I exported the code. Looking around in it it reminds of using Visual Basic in my college days… I'll have to spend a while toying around with it before I actually try to do something in the real version.
June 19, 2013 at 2:08 pm #27576MiDKnighT
ModeratorSo Niahak how do you test this thing? Do you have to compile it every time you test something?
EDIT: Nm, I see it – start debugging.
June 19, 2013 at 8:30 pm #27577MiDKnighT
ModeratorThe form part is easy…

The backend code, not so much.
June 19, 2013 at 10:12 pm #27578Niahak
ModeratorYeah, you'll probably want to explore a bit with how officers are imported/exported.
One easy trick to see how things are related: look for the variable of an existing value (e.g. strText is the textbox input for strength) and see where it is modified by right-clicking then choosing Find All References.
You'll have to add LDR, VIT, POL to the officer object and figure out how to assign them and export them (ParseOfficer method and the ToBytes method on the Officer class respectively).
Unfortunately that early code is from when I didn't even use the visual editor, so the stuff you added will be different from the code that's already there.
Let me know if you have any specific questions.
June 19, 2013 at 11:21 pm #27579MiDKnighT
ModeratorI looked at Officer.cs and I thought that was for the glob of info about each officer on page 0C (name, STR, INT, etc…) but the info I'm trying to pull is in 0x7aa## where ## = officer ID. Would I still need to put that in Officer.cs or put it all in MainForm.cs ? I was thinking I'd need a new function to pull that data.
June 20, 2013 at 3:09 pm #27580MiDKnighT
ModeratorWoohoo! I got the LDR, VIT, POL boxes to populate (now I just got to get them to save):

I was able to do it by adding this in list_SelectedIndexChanged():
int ldrlocation = 0x7aa00 + (byte.Parse(o.HexPointerValue, System.Globalization.NumberStyles.HexNumber));
this.ldrText.Text = (Convert.ToByte((entireRom[ldrlocation])).ToString());
int vitlocation = 0x7ab00 + (byte.Parse(o.HexPointerValue, System.Globalization.NumberStyles.HexNumber));
this.vitText.Text = (Convert.ToByte((entireRom[vitlocation])).ToString());
int pollocation = 0x7ac00 + (byte.Parse(o.HexPointerValue, System.Globalization.NumberStyles.HexNumber));
this.polText.Text = (Convert.ToByte((entireRom[pollocation])).ToString());
Now to work on getting it to save…
June 20, 2013 at 3:20 pm #27581MiDKnighT
ModeratorSave is working now. Added this to savebtn_Click():
int ldrlocation = 0x7aa00 + (byte.Parse(o.HexPointerValue, System.Globalization.NumberStyles.HexNumber));
entireRom[ldrlocation] = Convert.ToByte(int.Parse(this.ldrText.Text));
int vitlocation = 0x7ab00 + (byte.Parse(o.HexPointerValue, System.Globalization.NumberStyles.HexNumber));
entireRom[vitlocation] = Convert.ToByte(int.Parse(this.vitText.Text));
int pollocation = 0x7ac00 + (byte.Parse(o.HexPointerValue, System.Globalization.NumberStyles.HexNumber));
entireRom[pollocation] = Convert.ToByte(int.Parse(this.polText.Text));
-
AuthorPosts
- You must be logged in to reply to this topic.

