Users browsing this thread: 1 Guest(s)
Messing with maps...

#1
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Okay, all what i know about map issues is that there's a bug that happens when you try to do some real change to WoR submaps(dunno if world map too) and then you need of reallocate somehow(don't remember the way, it should be in another thread the solution) those maps to make work things out.

Despite that, i also know that there are still heavy restrictions on how much you can edit maps and, except some unused map, you can't add new ones.
I have some question:

1) I believe new maps won't be my problem, yet it might be useful understanding how it works all that stuff, i mean... the limit is because all space allocated for maps in rom is almost completely filled, so the limit is bypassed after you add few tiles, right?

2) i thought that a block of bytes was reserved to each map and also "empty" tiles were counted to that limit, but back to some task i made months ago i remember that replacing void tile with another one was enough to exceed the limit.
Say a map is big 32x32 tiles for each layer, then i thought the limit was the sum of all possible tiles, including the ones left void (max = 32x32 x layers) but it looks like the max allowed is based on tiles which have a shape... is this the answer?

3) It might depend on previous answer, anyway...
how map limit actually works? say for example that all existing maps take 3 banks of space... around 3 x FFFF bytes, each worldmap takes 2000(hex) bytes, big submaps 1000(hex) and so on...
When the limit is actually bypassed?
- When the sum of all maps space is greater than the space used to allocate all maps;
- When one map bypass his own limit of max space(adding too much tiles to that map) ;
- both the previous 2;
- totally different reason? Finger

4) what i'm actually aiming at is knowing if it's possible to erase some map, i mean... clearing all tiles of that map and redraw completely that map from zero, in the case, according to the rules i have to follow, i wonder if i'm allowed to do that, until i respect the previous limit of tiles...?

5) what if i clear all the tiles of that map and i use them as extra tile space for another map?

6) i don't have took a sharp look on FF6LE editor, so i dunno if there's a way to do that... in any case, is it possible to increase/decrease the size of a map?

7) Assuming you clear a bunch of tiles and shrink some map, may that allow you to add a new map to the list? probably it would require to increase of 1 the number of total maps(i guess it works in that way) and so adding a pointer too
and finally create that new map, without allocate more space than the previous one...?

PS. don't remember if i had some other question, i post those ones for now...


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#2
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Didn't the work Madsiur did with expanding/relocating map data fix most of those questions? I don't remember off hand how/why, but I seem to think that solution solved at least one of these questions directly.

Second, I don't know how far you've dived into it, but keep in mind while your deleting to make room, some maps are full of "junk" tiles that are called by several different other maps. I seem to recall several shops doing this, calling trash looking tiles from the "Blackjack, backroom" map (which is one little room and a full map of random tiles).

Just a heads up if you haven't noticed it yet. Removing random tiles may leave unforseen holes elsewhere.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#3
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
That would explain why they put that trash in the map.
Ugh, just more troubles... anyone remember which event command calls those pieces of trash? Using that info i might track down all the events in event dump file and so figure out what/where/how remove and what i should keep there...
So, only what's clearly trash in the map is called from events, right?
Will i risk something if i delete only good-looking map tiles?


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#4
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
There's no "trash tiles" in the maps as Catone said.

(07-12-2015, 09:57 AM)Catone Wrote: Removing random tiles may leave unforseen holes elsewhere.

This should be read as "Removing random tiles will leave unforseen holes elsewhere".
  Find
Quote  

#5
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
At this point i guess that "trash" is actually what it would look good inside another map which shares the map type, but different tileset, like the map which contains Vector castle(inside) and then you mean that if i remove those tiles, then the map which would have those map tiles looking good(because it's the room you enter in) would disappear because i removed it... right?

Say that i'll never enter in that map because i might potentially cut it, since it's a WoR map which don't appear in WoB too... (South Figaro basement for example appears in both the worlds) any risk that it might create any hole in WoB maps?


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#6
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Those random messy tiles gots to be there for a reason. I removed some once and yeah they affected another map of the same tileset =X


We are born, live, die and then do the same thing over again.
Quote  

#7
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Heh, I say "may" because the only testing I did was some eraser wagging and a quick look around.

That being said, as many places they have tiles like that, and the way they always look like junk, AND how they seem to repeat (many of the same tile) if you really wanted to, and knew how it worked, it might be possible to reuse one or 10 of the same filler tile and remove the rest?

Be next to impossble to find all the code that calls those tiles probably, and over all not worth it. Personally I'd stick with deleting tiles I knew exactly what they were for. Last I played with the map editor, and Madsiur's map patch, seemed like there were several maps/rooms that could be optimized (moved loser together and still not in sight range). Then even more that rooms that could be tweaked (adjusted dimensions) to cram in tighter. Then you could relocate rooms from one map to several others and free up a new map without loosing rooms. Still have to mind the tilesets and such. As well as the NPC limit per map (ran into this many maps...)

I'll shut up now, I'm just confusing myself at this point.

How these tiles are called though... would be interesting to look into, in theory couldn't it be used to mix and match tilesets?

Another option altogether (something I'd like to look at eventually) is using code to change/morph the map based on event bits. (As in opera house stage, I think, and how the floating island is removed from the world map after it rises). With a big enough block of code, I still say you could create an extra (morphed) world map. Some creative use of monsters and events... I still think it would work.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#8
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Actually it's exactly how i was planning to have 4 world maps in my project #3
Looks like i forgot to mention that... oh well. (PS. CotG is project #2, but i'm afraid #3 will stay an uthopia)

Despite that, splitting the game in 2 roms makes become a piece 'o cake having 4 world maps.

It's not like i wanna know all codes in event dump that calls pieces of tilesets(i might do that on my own...) i was just asking which was the event opcode to call that function...


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#9
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
Now, I could be mistaken, it has been awhile... but I remeber seeing the check to remove the floating island in Bank EE.

EE/9AF1 is labeled as where it starts but I couldn't begin to say how it works.

The auction house does it (to display a closed chest and an open chest using event command 73-75.
Or, search for the line
"Replace current map's layer" in the event log.

Best I can help, hope it helps at all.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#10
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
I can probably shed some clarity onto this. Maps are made up of a few different things that are all controlled by 33 bytes of map info that's been pretty well documented. You can find that information here (http://www.rpglegion.com/ff6/hack/ff3info.txt) in the "Location Properties" section.

Every map has 4 tile sets (plus an animated tile set), and 3 layers of map data although most don't have any layer 3 map data, and all that is decided by the location properties. So the maps you see with gobbledygook in them are just maps that multiple sets of location properties point to with different tile sets. You can edit those, but erasing one will erase a several locations, so careful with those. Best to wipe town maps since those are generally single use.

As for the space the maps take up that's pretty tricky. The map data is compressed using a type of LZS compression. In practical terms what that means is that maps are stored in horizontal wrapping rows (world maps are vertical) starting in the northeast corner and repeating patterns are reused. So if you have a row of 8 of the same tile, it only takes 3 bytes (I think) to store, but if you slap a different tile in the middle, then you've got to use 8 bytes (well, 7 I guess). Both FF3LE and my old map editor have compression routines to recompress map data when you save it, but there's an awfully good chance your map is going to be larger than the previous map if you're not careful about using repeating horizontal patterns.

The good new is that the pointer point to the map data (which you can track down through the location properties) are absolute long pointers so with a bit of work you can relocate your map data anywhere in the ROM or expand the ROM and open up a ton of space for maps.

I think it'd be possible for someone with more ASM skills than me to expand the number of maps, but it wouldn't be super easy. I don't know the code that loads the maps, but I know the data and there's definitely room for another bit so expanding out to 767 maps should be doable. Probably best just to relocated and wipe unused maps though.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite