View previous topic :: View next topic |
Author |
Message |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Sun Jul 18, 2010 2:53 pm Post subject: Import From External Map Editor? |
|
|
Is it possible or documented how to use an external editor? I prefer working in TileStudio, or even Mappy, and can export binary or user-defined XML from those. |
|
Back to top |
|
 |
NeoSpade Of course!

Joined: 23 Sep 2008 Posts: 249 Location: Wales GB
|
Posted: Sun Jul 18, 2010 4:20 pm Post subject: |
|
|
Provided that you save/can save the tiles as a 320x200 BMP image, and the tiles are 20x20 then you can import the tile set into custom by selecting import/export full map-tile sets from the edit graphics menu.
I also recommend that you only use colours from one of the default palettes (or whatever palette you're using in your game) so that the colours don't shift when you import the BMP. |
|
Back to top |
|
 |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Sun Jul 18, 2010 7:28 pm Post subject: |
|
|
I'm not talking about tiles, I'm talking about map data. |
|
Back to top |
|
 |
Aussie Evil

Joined: 28 Apr 2009 Posts: 27
|
Posted: Sun Jul 18, 2010 10:20 pm Post subject: |
|
|
Currently I do not think it is possible. _________________
and you, sir, are no lady |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Jul 19, 2010 6:51 am Post subject: |
|
|
Neat! I'll try implementing map import from Tile Studio tomorrow. I haven't looked at how Mappy does export, maybe that would also be worth doing.
I think James has said that the map editor is the old surviving part of the OHR, about 14-15 years old. I've often thought wishfully about throwing it out and replacing it with a nice open source map editor, but that's not really possible currently. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Mon Jul 19, 2010 9:33 am Post subject: |
|
|
I'm seeing that we can extract the files in a *.rpg, and as long as the maps are self-contained files, I'm sure it's possible.
If there's a reference for the map file format, it's just a matter of either exporting in binary or writing a Tile Studio Definition file for the output. |
|
Back to top |
|
 |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Wed Jul 21, 2010 4:33 am Post subject: |
|
|
I can put a binary map file in the *.T## file, but I can't get the dimensions to go right. It keeps thinking my map is 257x257, but it's definitely getting the right tile data. Any ideas? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Jul 21, 2010 5:28 am Post subject: |
|
|
EDIT: Oh, you replied while I was posting. I'm adding an option to Custom to safely import a tilemap file, but if you can't be bothered waiting for it, you can do it by hand as you apparently already are. Just make sure to resize the map to the same dimensions and 3 layers before replacing the 'T' file with the file generated by the .TSD below. (Yes, there appears to be some kind of bug in reporting a bad map size if there's a problem.) Also, completely leave the map menu before replacing the file. END EDIT.
Well, I'll get the new map import/export map menu into the next nightly (might be the one after that, depending on timezones), but thought I should post this quote from the .tsd I wrote (EDIT: replaced with whole file), in case you think about starting on maps early:
Code: | ; --------------------------------------------------------
; Tile Studio Definition file for OHRRPGCE maps
; Supports Tile Studio 3.0 only (2.55 does not support binary files)
; See http://tilestudio.sourceforge.net/
;
; Place this .tsd file either in your project directory, or in the
; Tile Studio directory.
;
; You can only create maps with a single tileset. A TS map is exported
; as a 3 layer OHR map (delete any layers you don't want after import).
; Tile rotations, 'Map Codes', and wallmaps/"bounds" are ignored, and tile
; animations are not supported.
; You can create as many maps as you want, with various tilesets,
; just make sure to name each map something different.
;
; Tile Studio has bugs and limitations, to avoid having to scrub your map
; of garbage files after importing it, follow these instructions carefully
; if you want to use more than one layer:
; - tile 0 of your tileset should be completely filled with colour zero
; (which is normally black)
; - While importing your tileset into TS, click on a patch of colour zero
; to make that the transparent colour
; - Create a new map, select the Block Fill tool, and set the back, mid,
; and front tiles to tile 0, then fill the map with it (you won't see
; any difference). Otherwise "empty" tiles will be filled with garbage
; when exported.
;
; --------------------------------------------------------
#tileset
#map ""
#binfile <ProjectName>_<MapIdentifier>.tmap 8
<0><0><0><0><0><0><0>
<MapWidth:"16">
<MapHeight:"16">
#mapdata
<TSBackTile>
#end mapdata
#mapdata
<TSMidTile>
#end mapdata
#mapdata
<TSFrontTile>
#end mapdata
#end binfile
#end map
#end tileset |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Wed Jul 21, 2010 4:03 pm Post subject: |
|
|
Awesome! This is exactly what I needed. I've always wanted to do something in OHR but I've never been able to do large-scale design in that little window, so this helps tremendously.
One thing that I noticed while messing around was that OHR didn't seem to mind those huge glitched maps. Theoretically, could I do a 256x256 map this way, or would it create issues? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Jul 23, 2010 4:09 am Post subject: |
|
|
NayusDante wrote: | Awesome! This is exactly what I needed. I've always wanted to do something in OHR but I've never been able to do large-scale design in that little window, so this helps tremendously. |
Yes, it's a bit painful. I'm pretty close to experimentally allowing the map editor to run at a higher resolution. There are other things to be fixed, like added mouse support to it.
NayusDante wrote: | One thing that I noticed while messing around was that OHR didn't seem to mind those huge glitched maps. Theoretically, could I do a 256x256 map this way, or would it create issues? |
Actually, the maximum size of a map is currently capped at 32,000 tiles, but that's just a relic from memory limitations in the old DOS version. I'll increase the cap to something higher (I think having some cap is still a good idea, to discourage wasting memory on needlessly large maps, which could be a problem if we want to port to handheld devices) _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Fri Jul 23, 2010 10:18 am Post subject: |
|
|
The Mad Cacti wrote: | Actually, the maximum size of a map is currently capped at 32,000 tiles, but that's just a relic from memory limitations in the old DOS version. I'll increase the cap to something higher (I think having some cap is still a good idea, to discourage wasting memory on needlessly large maps, which could be a problem if we want to port to handheld devices) |
Not to mention performance issues on really large maps. This may also be a relic of times past, but I remember the town map on Scary Game 2 being a prime offender - a combination of very large map and full NPC load. I haven't played it recently, so I don't know if recent engine improvements have made this a non-issue, but presumably it would become an issue again anyway if the NPC and map caps were both raised to ridiculous levels. _________________
|
|
Back to top |
|
 |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Fri Jul 23, 2010 2:39 pm Post subject: |
|
|
You bring up portable devices... What are the chances of seeing a full-on Android port? iOS has that Square Enix exclusive, so I'm extremely interested in seeing some RPG love on Android. _________________
  |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Jul 28, 2010 9:54 am Post subject: |
|
|
Moogle1 wrote: | Not to mention performance issues on really large maps. This may also be a relic of times past, but I remember the town map on Scary Game 2 being a prime offender - a combination of very large map and full NPC load. I haven't played it recently, so I don't know if recent engine improvements have made this a non-issue, but presumably it would become an issue again anyway if the NPC and map caps were both raised to ridiculous levels. |
I assume you are talking about DOS versions of the OHR. For some reason they ran really slowly under virtual x86 mode, and when the OHR was ported to FB/Windows I noticed an immediate speedup of something like 10x in places including graphics drawing. Despite going from hand-optimised assembly to FB code written with zero regard for speed, compiled by a completely non-optimising compiler.
Theoretically, the map size should have no impact on speed at all other than larger wallmaps requiring more CPU cache.
I decided on 100,000 tiles. Maybe it should be higher, but it's trivial to raise.
NayusDante wrote: | You bring up portable devices... What are the chances of seeing a full-on Android port? iOS has that Square Enix exclusive, so I'm extremely interested in seeing some RPG love on Android. |
Definitely. It's in the plans, but it depends on the compiler for the language we're using, FreeBASIC. They are working on rewriting part of it to make it portable. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
chronoboy Into the past with a splash

Joined: 04 Jun 2010 Posts: 162 Location: Canada
|
Posted: Wed Oct 13, 2010 10:35 am Post subject: |
|
|
A simple map exporter program could be written that simply writes out many write map block that could be placed in an HSI file to used on a map autorun script to display an import map from an unsupported map editor. It may also be-able to create NPCs as well, as plotscript has commands for just about everything these days.
Although, for a map completely created by a huge script, I could see some performance issues when loading a really large map. However, after seeing some interesting rouge clones made for OHR which generate random dungeons, this may not be such a problem.
Another idea would be to write a seperate plotscript engine for automating CUSTOM.EXE tasks, a plotscript engine build into CUSTOM.EXE as a batch file type system, IE, generating maps and randomizing trees and various textures to speed up runtime during gameplay. _________________ Current project: Chronoboy Adventures
Website: http://www.chronoboy.com/ |
|
Back to top |
|
 |
|