øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2248.msg26039e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index92cc-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;sa=attach;u=390e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index92cc-2.html.zx{üg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ ­þOKtext/htmlISO-8859-1gzip@øÕþÿÿÿÿÿÿÿÿTue, 10 Mar 2020 21:02:10 GMT0ó°° ®0®P®€§²ð®züg^ÿÿÿÿÿÿÿÿ%þ FF5e Map Editor

Author Topic: FF5e Map Editor  (Read 5655 times)

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FF5e Map Editor
« Reply #30 on: August 04, 2016, 08:52:44 AM »
noisecross, compare this picture with Tileset on Map: 0B  :laugh:


LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: FF5e Map Editor
« Reply #31 on: August 06, 2016, 07:01:28 PM »
Posting it here since it's very relevant as well: attached my research on events, five years old.  Have not looked at it since 2011, so no guarantees.  Although to be honest, I'm kind of interested in looking into this stuff again.  It'll be a nice little distraction, and with more experience under my belt it should go well.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FF5e Map Editor
« Reply #32 on: August 30, 2016, 10:34:40 AM »
noisecross, I'm trying to reproduce your tutorial. There are some parts that I dont get and there is some missing info.Anyway, please correct me if I got something wrong:

Ok so except World Maps & few custom ones, overall each map is 1024x1024 pixels.
Tiles index is held by byte 8 of map-info -> 3 sets of 256 tiles each (16bpp) + something in 2bpp
Palettes come from byte16  - > we get 8 Palettes (16 colrs each)

Then we have TileBlocks. Blocks are 4 tiles. What info we have here? Is it really a definition of each tile or each block? Is this what you use to make 'Tileset' in your application?

Then we have Tilemaps. What exactly they map  tiles, blocks or ..?

TBH i fail to see the connection of Block, Tiles & Maps :D

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FF5e Map Editor
« Reply #33 on: August 31, 2016, 03:19:40 AM »
I am not sure if I am giving canonical names the concepts but let me clarify them:

Using the map descriptors bytes 09 0A 0B and 16 the game fill the VRAM and the background palettes (tab VRAM in the Map_Editor).
Every tile stored in VRAM is 8x8px.

After filling the VRAM, the game decompress the three TileMaps (given in bytes 0C 0D 0E and 0F) and uses them to draw the three background layers. The question is "what maps the TileMap?" and the answer is "Blocks".

To put it in short, the Blocks table is the one which contains all the data to build a TileSet with the graphics stored in VRAM.
A Block table consists in 4 arrays of "tilemap entries". You can find more info about what is a tilemap entry here.

It is important to notice that the TileSet (and thus Blocks) is used only to draw the background layers 0 and 1.
The layer 2 (which is the one which uses the 2bpp graphics) follow different rules (cannot remember right now).

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FF5e Map Editor
« Reply #34 on: August 31, 2016, 06:49:25 AM »
Quote
I am not sure if I am giving canonical names the concepts
Your naming is excellent, I understand what you are talking about :D

Thank you very much for the explanation, it really filled the gaps  :laugh:

So far I was able to import sprites and palettes (VRAM). Everything is exactly as in your application. Currently I'm trying to remake your 'Tileset' picture. Attached is my progress. Its close to yours but is missing some details. So far I haven't parsed Flips and Priority. As you may see, there is some garbage where animated tiles will be - like the watch on the wall, fireplace. I remember your comments about some tiles animated and thus custom handled. Is that info here in the map or I need extra stuff?

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FF5e Map Editor
« Reply #35 on: August 31, 2016, 07:46:54 AM »
As you may see, there is some garbage where animated tiles will be - like the watch on the wall, fireplace. I remember your comments about some tiles animated and thus custom handled. Is that info here in the map or I need extra stuff?

You are right, after storing all the graphics in the VRAM, some of these graphics are overwritten every few frames to perform some animations just like the fireplace. Before that overwritten takes place, some graphics can be garbage.
(Offtopic: It happens a lot in Secret of Mana where you can actually see the garbage in torches and stuff when you enter in a room.)

You have my source code. Look the method "loadCurrentAnimatedTileset" which it is responsible for overwriting part of the VRAM if required. It is documented so you can find a all the information there.
To fully understand the method, just remember "bg_TileSet" is the array of bitmaps displayed in the tab VRAM.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FF5e Map Editor
« Reply #36 on: September 05, 2016, 08:45:44 AM »
v0.84 is out.
Now, the Map Descriptors can be edited as well as map Treasures, Exits, NPCs and Events.
In addition, the Events viewer displays a textual help based on the LightPhoenix docs.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FF5e Map Editor
« Reply #37 on: September 22, 2016, 10:55:00 AM »
Released the v0.86.

The main goal of this release is to do the tool more practical when editing.
To get it, now multiple tiles can be selected at the same time (dragging with left button) and pasted with a right button click.

Moreover, the best improvement is a feature which reorder the tilemap offsets and the tilemaps itself to allow adding compressed tilemaps even when the compression results in a data array bigger than the original one.
I found, at the end of the tilemaps table 63 blank bytes which can be used to extend a little bit the existing tilemaps.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FF5e Map Editor
« Reply #38 on: September 26, 2016, 01:39:35 AM »
Excellent work noisecross!

Reordering helps you improve the compression ratio or?

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FF5e Map Editor
« Reply #39 on: September 26, 2016, 03:05:29 AM »
Reordering helps you improve the compression ratio or?

No. With "reordering" I mean "reallocate".

The previous version only allowed to save a tilemap when its compressed size was equal or less than its original compressed size to avoid overwriting bytes of the next tilemap.
In this version, if the sizes are different, all the tilemaps after the one which is saved are moved forward or backward and all the pointers to tilemaps are updated.
The limitation now is that the sum of al tilemaps cannot exceed the address CD/FA40 where next data table begins.

Long story short: the compression ratio is the same but now is possible to save the tilemaps even after increasing its compressed size.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FF5e Map Editor
« Reply #40 on: September 26, 2016, 03:39:19 PM »
Oh, that is a good feature. There is more flexibility now.

One problem that remains is that you cannot change tiles on one layer at a time. If I want to change the leaves in bg01 without changing bg00 I have to manually change the tile IDs. I wish you could choose which layer to edit.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FF5e Map Editor
« Reply #41 on: October 18, 2016, 12:53:14 PM »
Released the v0.87.

Please STOP using the v0.86. It has a bug which corrupts all the tilemaps whenever two tilemaps are injected in a row (not re-running the tool between the two injections).
The bug is fixed in this new version.

If somebody is interested, I am sharing the source in github.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FF5e Map Editor
« Reply #42 on: October 18, 2016, 01:35:46 PM »
 :whoa: good job  :whoa:

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FF5e Map Editor
« Reply #43 on: November 02, 2016, 10:19:53 AM »
Before I didnt check Encounters tabs. After some examination I found that most names contain [FF].

Maybe change the TLB to contain space in $FF. It will be even better if you do 'trim' after that (so no leading/trailing spaces).

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: FF5e Map Editor
« Reply #44 on: May 25, 2017, 10:40:30 PM »
Any updates to this?