øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1123.0;prev_next=nexte:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index511f.htmldelayedslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1123.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index511f.html.zxÓ|g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0°j‡ÉOKtext/htmlISO-8859-1gzip8:Ö‡ÉÿÿÿÿÿÿÿÿÑHTue, 10 Mar 2020 11:57:31 GMT0ó°° ®0®P®€§²ð®Ó|g^ÿÿÿÿÿÿÿÿ±$‡É Javascript FF4 Location Map Creator

Author Topic: Javascript FF4 Location Map Creator  (Read 4283 times)

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Javascript FF4 Location Map Creator
« on: December 10, 2008, 12:31:44 AM »
I've been working on a few location map changes lately, and I decided to rewrite my Applescript location map creator/hex parser into Javascript. It's not quite a map editor, but it's a step in that direction. You can test it out here:

phoenixhacks.blackapplehost.com/Location%20Map%20Creator.html

It requires you to input the map in hex. You can test it out by inputting the hex for the town of Baron (apologies for the length):

Code: [Select]
800293027C9315800393011618190017980614AF0C9301800114151680021B799C05AF0155D6065717152F95019301151619001B9C08555659E8066B00172F950116141619001B9C096B68670684056B01002F9501161416001B9C0A6B242507252684036B010017181516141600799C0A6B39B2023A84036B01800217191455D608579C025864566456645669046A590180037C156BE8013E416061413F686B1C555666386838683868675A665E01800293011A6BE801446D62636D45686B1C6B6866336833683368675A6658D6016456571A006B030F48534954534A016B796B68663368336833686706E601E8014D686B80016B0300504B704B4C52026B5659013934323432343A00040066E80174686B01006B03000300840280016B6867012CAD0132AD012E008402031380016B01006B0380040400036B3EC1023D000E800504001A80016B010058D60469046A565944ED0245002CB1050D312680016B010066E80467056668674809490A4A01800604033080016B010066E80343675A664367504B704B5202003CC1013D800104003080016B010066E804675A6668670584046C44ED0145040004003000136B01005EC302E801675A666867058403EC0144ED01450584010330001A6B01006B6870E80267066668670684047B4849534A050483013080016B01006B01001B1D6C840B50704C52060480010E80016B01006B011B9C01840640606142840780013000136B01006B011E1C1F8406446263458407555664D6015901006B01464147840140414284014849534A05044041606141426B684DE8016701006B014E6D4F0437446D45840150704C520604446D62636D456B6838E8016702006B01504B52050448274A058406480849D3014A6B24322680036B01507052060450705206840650704BCC01526B397A32252680016B01800284117B6B39B2023A030058D60B6984026AD6055939B2023A030066E808C3026705840166C302E802672CB2017A2E800166E80B6702800166E80567022C2D2E8010FC02800D
The map tiles are small png files, so it might be a little slow to load depending on your internet connection. If you plan on using it frequently, you probably want to download the zip file of the html and pngs. Let me know if adding the .zip extension and unzipping it doesn't work -- I tried to use a Windows compatible zip format, but I can't really test it, so it's possible it won't play nicely.
« Last Edit: July 18, 2009, 07:30:06 AM by Phoenix »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Javascript FF4 Location Map Creator
« Reply #1 on: December 10, 2008, 05:25:27 AM »
This is really nice. The zip file opens fine using Vista's built-in zip manager after adding the extension, but for some reason none of the tiles load when trying to use it locally, even if I extract the files from the zip (this usually isn't needed). Speaking of extracting files, there are blank, extensionless files with the same filenames as the folders; I'm not sure if these are a Mac thing but Windows doesn't like them, it's easy enough to just not extract those files though.

I have a few suggestions to improve this. Being able to see the tile numbers in the tileset would be great, though I'm not sure what the best way to go about doing that would be. Also, it would be nice if the RLE could be expanded when loaded into the map editor box, then recompressed when you were done editing. Lowercase letters should probably work in addition to capitals, it took me a bit to figure out why I was getting two blank half-tiles on the side of the row I was editing instead of the tile I was trying to put in the middle. Tiles $38 and $64 in the town tileset should be marked as walkable.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Javascript FF4 Location Map Creator
« Reply #2 on: December 10, 2008, 10:00:11 AM »
Thanks for the suggestions. Mine works great when trying it locally...not sure why yours isn't. Were you using IE? Did you try it in a different browser? It should work in Mozilla browsers and Webkit browsers. I also am not sure what you mean by blank, extensionless files. I'm not finding those in my own zip file or the one I download, even when I use Unix to view all file contents.

I considered labeling the tiles. I think I'll just add a 0-F grid above it and a 0-7 grid down the side. Also, the parsed hex and hex data boxes are linked -- changes in one are copied to the other one. So once you're done editing, you can copy the hex data from the top text box. Lastly, lowercase letters work for me. If you were using IE that also might be the reason...if not I'll have to look into it a bit more.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Javascript FF4 Location Map Creator
« Reply #3 on: December 10, 2008, 11:00:24 AM »
I was using Firefox, it behaves the same way in IE though.

Blank files:




Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Javascript FF4 Location Map Creator
« Reply #4 on: December 10, 2008, 10:38:03 PM »
OK, figured out the empty file things. It was the same thing as when I submitted my first patches to RHDN.  :bah:  I thought I had fixed it, but I hadn't...but I found a program that makes correct zip files. I'll update the zip file tonight or tomorrow. Hopefully that fixes the locally-linked files not working, as well.

I put the reference numbers for the tiles, but I'm not sure I like how it looks. To be honest, I don't have any trouble picking out a tile, but maybe that's because I've been doing it a lot. What do you think: keep the numbers, or are they as distracting as I think they are?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Javascript FF4 Location Map Creator
« Reply #5 on: December 11, 2008, 06:29:22 AM »
That tile guide looks fine, I think the only thing that could improve it farther would be a grid separating the tiles.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Javascript FF4 Location Map Creator
« Reply #6 on: December 11, 2008, 10:44:01 AM »
How's this? I separated the tiles by one pixel. I also posted a better zip file here. Hopefully that solves the locally-linked files issue. If it doesn't, I'm not sure what to change.

I don't know how long it will take for me to compose all the tilesets,then add the grid and separate the tiles. As you can see, I only have four tilesets right now, and about 10 or 12 more to do. I'll get around to it eventually, but I'm trying to focus on writing the events for my hack. I'll drudge up this thread when I have a more completed version.
« Last Edit: July 18, 2009, 07:30:35 AM by Phoenix »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Javascript FF4 Location Map Creator
« Reply #7 on: December 11, 2008, 11:02:52 AM »
The new tile grid is good. I'm still having a problem with the tiles not showing when using it locally with Firefox, but it's working fine with IE7 now. Is anyone else having this problem? Maybe it's something on my end.

 :edit:

Yep, it was on my end, working fine with Firefox now too. :happy:

With this and your event editor, I think I'm going to need to expand the scope of my hack when I get back to it. I already have two things in mind, one sane, one less so. I'll probably go with the saner one.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Javascript FF4 Location Map Creator
« Reply #8 on: July 18, 2009, 07:29:06 AM »
UPDATED

I've updated my Location Map Creator with some new features:

• Added Airship, Castle Exterior, Magnes/Sealed Cave, Mountain, and Ship tilesets
• Removed static image for tileset grid and replaced with table of tiles
• Added onMouseOver attributes for table tiles to show current tile in status bar
• Added onMouseOver attributes for map tiles to show that tile's (x,y) position in status bar
• Added auto-map loader for the first 8 original maps

If anyone would like to help extract the hex data for the rest of the maps, I can provide the beginning and ending offsets of the maps. Otherwise, I'll probably do a few here and a few there when I have time. Note: the old links are no longer valid. You can grab it here. Like before, remember to add .zip to the file once you download it in order to extract it. You can also test it out on my website at phoenixhacks.blackapplehost.com/LocationMapCreator.html. The Javascript might be a little slow depending on your internet connection/browser, so downloading it is probably the better option.

(Also, I just noticed that blackapplehost added ugly banners at the bottom of their sites. I hadn't noticed it before because I use ad-blocking, but it's another good reason to just download it. I'll probably have to pay for an actual host one of these days.)
:lame:

Post here or PM me if you have any comments/questions.