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
-
February 3, 2014 at 8:10 am #53439
Niahak
ModeratorNice work!
Yeah, the load time seems a little rough. I’m not sure what can be done about it, though. As long as it isn’t causing pain / additional work for users, it seems like the right way to go.
Don’t worry about the explanations. It was an interesting problem to solve over the weekend. I did get a bit frustrated, but hopefully that didn’t come through too much here.
Next question is – where are towns stored, and are we loading in town/cave graphics properly? If it’s in a similar enough format to the world map it should be really easy to get going.
February 3, 2014 at 8:53 am #53441MiDKnighT
ModeratorNext question is – where are towns stored, and are we loading in town/cave graphics properly? If it’s in a similar enough format to the world map it should be really easy to get going.
The palettes should be correct for towns and caves right now as well. The location of their regions is defined in the “Find the map region” section –> http://doaerhguide.wikidot.com/#toc15
As for the loading time… Should we only load graphics when the user clicks on the appropriate region? Not sure how much we’d have to re-organize to do that.
Also, are you going to be editing at all today? I just fixed an unrelated bug in my local copy. If you’re going to edit today I’ll get out of your way. You have more C# experience and your code looks a lot smarter than mine :thumleft:
February 3, 2014 at 11:51 am #53444sonic.penguin
ModeratorI’ts looking sharp! Are there any additional “land” pieces that weren’t categorized before? Also, have you guys discovered the “damage” tiles that are found in caves and whether or not those are specific only to caves?
February 3, 2014 at 11:57 am #53446Niahak
ModeratorI won’t be doing any editing today, so feel free to continue working on things. I might have time Tuesday, but that’ll probably be it until the weekend.
February 3, 2014 at 12:00 pm #53447MiDKnighT
ModeratorI’ts looking sharp! Are there any additional “land” pieces that weren’t categorized before? Also, have you guys discovered the “damage” tiles that are found in caves and whether or not those are specific only to caves?
Those would be in the cave tiles so ya it would only work in caves unless we did more hacking.
BTW Niahak, there are officially 2048 regions in the game.
-
This reply was modified 12 years, 2 months ago by
MiDKnighT.
February 3, 2014 at 6:44 pm #53449MiDKnighT
ModeratorIt does not seem to be loading the non-world map tiles right. Dunno why yet. I broke DoaEditor pretty bad in my local copy. I may end up scrapping it and re-downloading from the server.
In any case, this code should be helpful to find the region:
for (int y = 0; y < 0x3f; y++)
{
for (int x=0; x<0x1f; x++)
{
int lookupindex = 0x26710 + (y*0x40) + (x<<1);
int regionploc = entireRom[lookupindex];
int pagenumber = entireRom[lookupindex + 1];
int f3=(regionploc*8);
int regionloc = f3 * 8 + f3 + (0x4000 * pagenumber) + 0x10;
mapRelativeLocs.Add(new Point(x, y));
byte[] currentMap = new byte[72];
byte[] controlcodes = new byte[8];
Array.Copy(entireRom, regionloc, currentMap, 0, currentMap.Length);
Array.Copy(entireRom, regionloc+72, controlcodes, 0, controlcodes.Length);
maps.Add(new MapRegion(currentMap, i, mapRelativeLocs, controlcodes));
LoadMapInfo(i, x, y);
i = i + 1;
}
}-
This reply was modified 12 years, 2 months ago by
MiDKnighT.
February 4, 2014 at 6:58 am #53450Niahak
ModeratorYeah, I was concerned about that since I didn’t look over many of the tiles.
I didn’t use control codes in the input (assuming starting out that at least some cave/town tiles didn’t have control codes).
February 4, 2014 at 7:21 am #53451MiDKnighT
ModeratorI didn’t use control codes in the input (assuming starting out that at least some cave/town tiles didn’t have control codes).
Oh! OK that’s problem #1. Problem #2 is that I forgot about this:
0 = World Map
1 = Inn/House, Caves, & Inside Castles
2 = Fortress, Town, & Burnt Luo YangWhich is needed in a couple places.
I think the entire map is about 00-1F (X) and 00-3F (Y) or so. If I reload them like that it totally breaks warps, battle locs, and chapters. Not sure what kind of voodoo magic you had used to set those.
February 4, 2014 at 7:39 am #53452MiDKnighT
ModeratorI should note that the regions for other areas actually look very similar to the world map ones. This is the region in Xu Zhou just after the entrance where the inn and all that is:
0x1FDF0:
042498F46B6B1E6B041410E7E7E7E7E7
09F946462B28E7130413522B1310E7E7
049AC4461310E72D0413132B1310E7E7
04731413131313E71C33333333333330
2060014C0C6C3E00EDIT: Yes it does have control codes.
-
This reply was modified 12 years, 2 months ago by
MiDKnighT.
February 4, 2014 at 9:15 am #53454MiDKnighT
ModeratorI’ve been messing with it and I seem to be doing nothing but making a mess of things. I’ll probably need you to get over the next hump before I can contribute again Niahak. All I’ve done is trash the existing map so far. I haven’t figured out your map voodoo magic yet. :scratch:
EDIT: OK maprelativelocs was throwing me off. I at least have it loading the right region now. But the graphics are still screwed up.
OK graphics definitely aren’t loading right for categories 1-6. That’s on me to figure out. Working on it…
-
This reply was modified 12 years, 2 months ago by
MiDKnighT.
February 4, 2014 at 1:20 pm #53457MiDKnighT
ModeratorGot the graphics loading (mostly) right!
Still need to fix warps, battles, chapters, tile selector, and give the ability to save. The loading time is also pretty insane right now, gotta do something about that.
February 4, 2014 at 3:51 pm #53459MiDKnighT
ModeratorI’m gonna leave soon so I committed my changes. Make a backup of your DoaEditor folder before updating. Still a lot of map stuff that needs fixin but it is loading all the graphics well (at least the ones it knows about via warps).
February 5, 2014 at 12:55 pm #53464MiDKnighT
ModeratorJust committed changes, this is now semi functional! Things still broken:
1. Chapters
2. RegionSelector (it works but it’s all garbled up because the map size changed)
3. Clean up the interface a little
4. Still need to mark the region types and perhaps categorize map tiles for the non-world map areas.I also changed it so the maps are all loaded when you click on the “Map” tab. That speeds up loading the ROM considerably and when you click on the map tab you get a progress bar. Takes about 30-60 seconds to load all the maps. Here’s a current pic:
Cross the bridge…if you dare! Muhahaha
February 5, 2014 at 8:49 pm #53465Niahak
ModeratorHoly cow, I didn’t think to check in yesterday and I drop by today and you’ve got all the new stuff figured out. Very nice work!
February 6, 2014 at 7:10 am #53466MiDKnighT
ModeratorThanks Niahak!
I’ve got the Chapters fixed up. So now just need to work on:
1. RegionSelector (it works but it’s all garbled up because the map size changed)
2. Clean up the interface a little
3. Still need to mark the region types and perhaps categorize map tiles for the non-world map areas.I can work on 2 (and 3 a little). Can I leave the RegionSelector for you this weekend? You’ve got some more voodoo magic going on there that would take me a while to figure out.
-
This reply was modified 12 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.







