Project Gnd_edit

Note: This is a mirror site for CuriousKitten's GNDedit. To make sure you are downloading the latest version or for any kind of support you might want to check the official forums and the post in eAthena boards.


Informations

This is a tool for editing the GND/GAT/RSW files relating to RO maps.... There is also some grf support for reading multiple grfs (order specific) also can read files from a folder.

Currently Known As.. "Project Gnd_edit"...

Most changes/credits listed in the readme.txt


Downloads

Last version:
R85
Extra files (if needed)
dll.rar
TABCTL32.OCX
Older releases:
R80
R77
R76

mini-server

Last version:
v1.0.0.1
Older releases:
v1.0.0.0

GNDedit readme

I'll expand this as I get any feed back, as well as any
changes given time constraints...

**************************************************************
Disclaimer...

This PROGRAM is provided by myself "as is" and
"with possible faults." No representations or warranties of
any kind concerning the safety, suitability, lack of viruses,
inaccuracies, typographical errors, or other harmful component
of this PROGRAM.

There are inherent dangers in the use of any software,
therefore the user is solely responsible for the protection
of your equipment and backup of your data, and I will not be
liable for any damages you may suffer in connection with
using, modifying, or distributing this PROGRAM.

**************************************************************


Table of Contents...
--------------------------------------------------------------

I.	Version History

II.	General Info

III.	Controls

IV.	EXE Requirements

V.	FAQ / Known Errors (Troubleshooting)

VI.	"I ran into a bug/error, how do I report it" / Future releases

VII.	Credits


--------------------------------------------------------------
I.  Version History
--------------------------------------------------------------
	0.5.0085 - Changed: Different Floodfill Algorithm
		 - Changed: Minimap uses openGL code
		 - Changed: 3 texture modes (1: show, 2: wire texture, 3: wireframe)
		 - Changed: Mapping tile texture matching more dynamic
		 - Removed: Wireframe checkbox (default if no textures)
		 - Added: Keyboard keys to the 3d window
		 - Added: More Message Box phrases run through the language map.
		 - Fixed: OpenGL texture error with gluBuild2DMipmaps() on some systems
		 - Fixed: Various Minor Fixes

	0.5.0080 - Added: Mapper, Different arrangement of Gat Groups
		 - Added: Mapper, 3 Different Group Sets
		 - Added: Safeguard limit for models
		 - Added: "Excessive Errors" Check for bad RSW files
		 - Added: Option to suppress RSW Version Check Warnings
		 - Added: Support for RSW v1.6 files
		 - Added: Support for RSw v1.9 files
		 - Added: Support for RSw v2.0 files
		 - Changed: More readable version number for files
		 - Added: Directional Lighting (x,y) boxes under RSW->lighting
		 - Fixed: "Light & Shadow" is only Lighting (label)
		 - Changed: "Shadow" to "Ambient Lighting"
		 - Fixed: Clicking on minimap updates 3d Window Selection as well
		 - Fixed: Grid Drawing, Aligns per tile instead of global
		 - Fixed: Selection Box Drawing on Magnification change
		 - Fixed: Non-Model objects drawn in wrong spot
		 - Added: Custom Key Editing
		 - Added: Language Mapping Capability
		 - Added: Change Translations on the fly
		 - Removed: Some Unused Excess Garbage
		
	0.5.0077 - Fixed: Panning in 3D window
		 - Fixed: Positioning of certain objects
		 - Adjusted: Object Layouts in Main Window
		 - Fixed: Model Copy/paste not working on all objects
		 - Changed: Clipboard import/export.
		 - Added: Mapper, Partial update of screen instead of complete update
		 - Added: Mapper, Quick	edits of objects (model,sound,effect)
		 - Added: Main, Name list
		 - Fixed: Main, Objects autosave on changes (no more "Save object" button)
		 - Added: Hover Over For Objects(Models) on selection
		 - Added: Move Tool (for graphical moving instead of textual)
		 - Fixed: Minor errors

	0.5.0076 - Fixed: "Use RSW file reference" loading with double extension
		 - Added: Use of Mouse Wheel for Tilt/angle (similar to RO)
		 - Fixed: Zoom, zooms on center of view area instead of selection	

	0.5.0075 - Fixed: 3d window is much faster
		 - Added: North + East textures to 3d window
		 - Added: Mapper, Cube mode, can use CTRL to select multiple "Cube height grid"
		 - Added: 3d Window Updates when cube height and tiles change
		 - Added: Simple Ramping in cube mode (old dialog is still there though)
		 - Added: More Options to Global mode in the mapper
		 - Added: Color Mask editing to the mapper
		 - Fixes: A few minor ones

	0.5.0074 - Fixed: "Zero Model" Glitch
		 - Added: "Insert Model" to Edit(model) menu of mapper
		 - Added: Preview of waves to GRF dialog
		 - Added: "..." to colors of Light Models

	0.5.0073 - Minor Fixes before Release

	0.5.0068 - Major rewrite of some sections of code
		 - Fixed: Bug when opening mapper with no RSW loaded
		 - Added: 3 fields to the RSW->Water tab
		 - Removed: Light Ambient (RGB), it was for water not light
		 - Adjusted Minimap Window Drawing
		 - Sped up drawing code a bit
		 - Added: Ability to change alignment of sidebar in mapper
		 - Fixed: Keeping Selection in mapper
		 - Added: Extra test for tabctl32.ocx
		 - Added: Hand tool
		 - Added/Moved: Toolbox
		 - Added: Fixed GAT blocks in mapper (old method still works also)
		 - Fixed: GAT copy/paste, selected number of squares is now accurate
		 - Fixed: GND copy/Paste, same off by one bug (as above)
		 - Added: Grid, Texturing, Water, and WireFrame to 3D window
		 - Moved: In mapper, 3d window is under OPTIONS menu
		 - Added: Error Guard on mapper loading
		 - Added: Use of -,+,/, or * for height increase decrease instead of just typing it
		 - Fixed: Found some more old code to update

	0.5.0067 - Fixed: Overflow when clicking minimap
		 - Fixed: Goto Menu Jumping (cancel actually cancels now)
		 - Added: Something forgotten to be uncommented...
		 - Fixed: Mini-Map Saving Glitch (4 bytes are apparently important)
		 - Fixed: Updated some old code

	0.5.0066 - Fixed: When you Select "All GRFs" in GRF file dialog, it
			now shows all files instead of nothing.
		 - Added: Write Mini-map Button (No models though)
		 - Added: Mini-Map Write Options and palette selector
		 - Added: Preview for Palettes to GRF dialog
		 - Fixed: Fixed "Certain options not saving", 
			removed some excess redundancy
		 - Added: JPeg Loading support using intel lib. (preview too)
		 - Added: Support for "ilj.dll","ilj11.dll", and "ilj15.dll"
		 - Added: JPG to the "texture" tab options of the main window
		 - Added: Ability to add custom water types 
			(if the graphic "data\texture\¿öÅÍ\water#00.jpg" exists, #=0 to 2000000000)
		 - Fixed: A few minor errors
		 - Added: A few more status bar descriptions

	0.5.0063 - Fixed: An Error #5 with flipping thru models in main window
			(the name of the model is 2 or less characters)

	0.5.0062 - Fix for lightmap dumps
		 - Added Option to dump two BMPs instead of one

	0.5.0061 - 3d window added for cube editing (non-textured)
			- Reacts to actions from both mapper and main
		 - Switched back to old GRF.dll file (libgrf 1.3 too slow), called grf2.dll to avoid confusion
		 - Merged grfvb.dll into grf2.dll
		 - Patched the memory leak in grf2.dll
		 - Added Quadratic Ramping (connected and unconnected)
		 - A few extra tools to certain modes
		 - Added Import/Export of Lightmaps to 32 bit BMP file
		 - Added a Progress dialog (currently in Lightmap E/I and GRF parsing)

	0.5.0057 - Small fix for GRF loader
		 - Fix: A really strange bug in a statement that shouldn't have it
		 - More Statusbar messages in main
		 - Cleaned up some messy code
		 - Fix: A few typos
		 - Integrated tabctl32.ocx into the exe (will create/register if missing)
		 - different GRF.dll (libgrf 1.3)
		 - Model Viewing
		 - GRF bitmap preview
			
	0.5.0018 - Added a CleanUp Tab for tiles
		 	>Includes 3 functions for missing, doubly, and unused tiles.
		 - Added a "Clear Tiles" to the Edit(Tiles)" Menu
		 - Added option for VIEWING alternate charsets in the options
		 - Fix for loading a map with ZERO tiles
		 - Fix for mapper when setting model X or Z (Y would be doubled)
		 - A few minor things

	0.5.0017 - Adjusted how tiles drawn...
		 - A tad more speed in loading of GND
		 - Fixed a bug in adding an image
		 - Added Undo Support for Tile/Walkable/Lightmap Modes
		 - Fixed concept mistake with lightmap from R16
		 - Made Undo Enablable and Clearable

	0.5.0016 - Added a Clickable Minimap for the mapper
		 - Changed how lightmaps are drawn
		 - Added viewing of 2 lightmap types
			>Both the "bright" type and "color" type
		 - Added saving of some options for mapper
			>Grid, Minimap, lightmap, an coordinate selection
		 - Added Caching of GRF entries for GRF browser (and option)
                 - Added option of viewing files from a single GRF (instead of all mixed) in GRF browser
                 - Added 3 different coordinate displays
			>Block (the current default), GND and GAT

	0.5.0015 - More Mapper GUI edits
		 - Made the edit area larger
		 - Added status bar
		 - Fixed bug in Copy Tile
		 - Fixed bug in drawing border tiles
		 - Added Texture Area Display on texture with
			eyedropper(its the box on the texture)
		 - Added Jump to Cube/Tile in the Mapper Menu
		 - Sped up drawing on lower zooms a bit more
		 - Added Viewing of lightmap in mapper
			(not that its perfect yet)
		 - Changed how RSW "Verticies" are displayed
			in the main window

	0.5.0013 - Moved "Edit Mapping" button to top level
		 - Some GUI adjustments/additions/changes/etc...
		 - Added Maximize to the editor...(yeah finally)
		 - Sped up drawing for lower % zooms (like 10/20/30)
		 - Added: Won't draw complete grid for outside boundery
			>Should make it a bit easier to find the border
		 - Fixed some minor bugs
		 - Added a few loading options
		 - Made the 40 bytes in "Texture" Editable
		 - Saves Options on MORE than "on exit" now for IMPORTANT things (like GRF files, setups, options)
		 - Fixed a crashy on bad "write" file names (main)
		 - Fixed crashy if you delete the last model (mapper)

	0.5.0011 - The first verson released public (aka... 0.5 Revision 11)
	0.X.XXXX - Anything below 0.5.X
		 - Combining Projects RSW/GAT/GND
		 - Represenitive Graphical Editor (Its under the "Edit Mapping" Button)
		 - GRF support (for the most part)
		   - Won't crash if it can't find a texture
		 - Can load multiple GRFs (Topmost Loads first in list)


--------------------------------------------------------------
II.  General Info
--------------------------------------------------------------

(1)  BEFORE you can load maps you must specify locations for
things like a data folder, GRF's (multiple), and a temporary
location for extraction.

(2)  You can ONLY goto "Path Config" or "Options" without loading
a map.

(3)  The Graphic Editor is on the right of the main window...
Still has the title "Edit Mapping".

(4)  Under the Cube tab in the main window or under the Options menu
of the mapper you can view the 3D map.

(5)  When saving you can choose to only save one of the three
files... the RSW (models), GAT (walkable areas),
GND (Tiles, Cubes, etc). Also you can choose a different name
for these files if you don't want to overwrite your origional.

(6)  An option lets you also choose whether the RSW file can choose
which GND and GAT files to open, or have the editor just open
by common name.  When starting a map project, it is recommended that you
edit the GND and GAT in the RSW tab FIRST so the client knows which
GND and GAT to use.

(7)  To load from the GRF files, just click the "GRF" button next to then
assocciated "..." button.

(8)  Most data is open... so there will be some possibility of 
crashing your EXE if you mess with ??? or unknown data.
(Theres lots of stuff thats open and available to edit too)

To elaborate better, things in the MAIN window are moreso generally unchecked
than in the mapper window.  Eventually, The main window will become smaller
as focus is shifted to the MAPPER.

(9)  Textures can be added or removed from the MAIN window under the TEXTURE tab.

(10)  "File Offset" is mainly reference to the byte position in the file of
said particular data.  This information is for viewing only and does NOT get saved
into the files.  This can safely be ignored otherwise.

(11)  This works best currently if you take a preexisting map to start with.

(12)  You can open multiple of this EXE as well as "dump" the 
clipboard so you can move objects from one file to another,
just be sure to make sure the ground (Y-AXIS) is aligned
correctly.

(13)  The alternate to duplicating and creating new tiles, (for
walls with TileNorth and TileEast) is to use Unused Tiles
instead of creating new ones... Be sure "Summary Only" is
selected when using the check for unused tiles under the
cleanup tab otherwise it will auto-remove unused tiles.

"Doubly Used Tiles" are a huge culprit in the client not displaying a texture,
when clearly it should.

(14)  With Mini-maps...  While it doesn't dump models (because I
haven't gotten that far in the editor), it can dump either
RGBA 32 bit bitmaps which you can palettize with whatever
image editor you'd like or select from the handful of
Options, experiment at your will...
(None)      - >Exports RGBA,32 bit (not RO compatible)
Halftone     ->Standard 216 websafe (hah!) colors
Octree       ->An tree balanced in color based on the image
H/L Fixed    ->A custom palette with emphesis on bright colors
(Import File)->Select a palette from a file (MS, JASC, or RO)
(Import GRF) ->Import a palette from a GRF file.
[Note: in all options, Index 0 is set to 0xFF00FF (the transparent color)]

Palette Basic Info... (If you really wanted to know)

MS: RIFF header, RiffChunkHeader, LOGPALETTE structure
JASC: Its a text File (by line); Header,Version,Num Colors, Colors R G B (to the number of "Num  Colors")
RO: 1024 bytes, RGBF; Similar to palpalEntry[256] of LOGPALETTE


(15)  When Editing the Tile Height (mode Cube) in the mapper when you select a
field a box appears around it, you can either type a number youself or
use "-" and "+" on the number pad to increase of decrease the number by 0.5.

>Holding "Shift": Value is by 0.25 instead of 0.5.
>Holding "Alt" or "Ctrl": Value is by 0.1 instead of 0.5.
>Using "/" or "*": is the value times 2.

(16)  Simple ramping refers to use of the mapper window (not the dialog) in tandem
with the 3D window with a multiple selection.  While the 3D view is not required to
use this option, it makes it a lot easier.

(17)  For the language files, they ONLY read from the language folder and must have
a lng extension.  If you add one uncheck and recheck the box in the program will
recheck the directory for new files.  If you'd like to create a language then
make a copy of the "MasterTranslateTemplate.txt" and place it in the language folder
with a lng extension.

Note: The first 6 fields listed in the Template must be present for the file to be
read.  Even if their empty, these fields are...

"*#AUTHOR#*","If you made it, Your name here."
"*#LANGUAGE#*","Language that this is"
"*#COMMENT#*","Anything you wish..."
"*#FILEVERSION#*","Reserved for future use"
"*#LANGVERSION#*","Reserved for future use"
"*#PROGVERSION#*","Program version" (Specified by the master template)

PROGVERSION isn't checked and you can use older language files with newer
revisions. This currently is for informational purposes as to which 
Master Template was used.

(18) If you'd like the default controls that were preset before, set
these in your options.ini under the [controls] setting.

[controls]
#13=112
#14=113
#15=114
#16=115
#17=116
#18=117
#19=118
#20=119
#21=120
#23=131157
#24=131156
#25=131150
#26=131141
#27=131145
#28=131139
#40=131117
#41=131158

--------------------------------------------------------------
III.  Controls
--------------------------------------------------------------

Here are some control shortcuts...

MAIN Window
	-Nothing Specific

MAPPER Window (These were the default controls)
(You may set your own now)
	-CTRL-C, CTRL-INS  = Copy  (whichever edit menu is visible)
	-CTRL-V, SHIFT-INS = Paste (whichever edit menu is visible)
	-CTRL-U		   = Jump to Cube reference in MAIN window
	-CTRL-T		   = Jump to Tile (Top Reference)
	-CTRL-N	 	   = Jump to Tile (North Reference)
	-CTRL-E		   = Jump to Tile (East Reference)
	-CTRL-I		   = Jump to Tile ...
	-CTRL-C		   = Jump to Cube ...
	-F1,F2,F3,F4,F5,F6,F7,F8,F9 = Magnification
	
(These still work)
	-When clicking on the text boxes in cube mode...
		+	Increase Value by 0.5
		-	Decrease Value by 0.5
		*	Increase Value by 1
		/	Decrease Value by 1

		Shift and Any of the above values...	Value is halved.
		ALT/CTRL and any of the above...	Value is 1/10th

		(This works for SW,SE,NW,NE, and Peak Height)

3D Window
	-Mouse Left		= Pan
	-Shift-Mouse Left	= Zoom (any direction)
	-Mouse Right		= Rotate (Left or right)
	-Shift-Mouse Right	= Angle (up,down)
	-Mouse Wheel Up		= Zoom In
	-Mouse Wheel Down	= Zoom Out
	-Shift Mouse Wheel Up	= Angle Up
	-Shift Mouse Wheel Down	= Angle Down

RSM Viewer
	-Nothing Specific


--------------------------------------------------------------
IV.  EXE Requirements
--------------------------------------------------------------

Requires: grf2.dll, vb40032.dll, TABCTL32.ocx (this ocx self-creates), ilj11.dll (for jpg support)

Toss these together in the folder with the EXE...

GRF2.DLL:	Custom Dll, combination of my interface and grftool src (Application folder only)...
vb40032.dll:	Visual Basic Runtime Library (Windows\System32 folder safe)
ilj15.dll:	Intel JPeg Library (Required for jpg images)
(Note: it can also use ili11.dll and ilj20.dll as well)

Check "Known Errors" if you are experiencing problems loading...


--------------------------------------------------------------
V.  FAQ / Known Errors (Troubleshooting)
--------------------------------------------------------------

Q:	Sometimes when starting it will give a "File Failed to load"
message and fail to start... this is from TabCtl32.ocx...

A:	A way around this would to open a Run box and type...
"Regsvr32", a space, and drop the file from windows explorer.
(In Vista/win7 you have to open a "Command Window As Administrator")

Ex: "RegSvr32 %SystemRoot%\system32\TabCtl32.ocx"


(Note: Version 0.5R57 and above will auto-create and register the file)

--------
Q:	When I load a map a tile i just created (or alternate tile) is black?

A:	This occurs with duplicated tiles... (2 cubes using the same tile)
The first is loaded and the second is not...
You may also use the Check for doubly used tiles in the CleanUp tab.

--------
Q:	When pasting Unicode Text it may display ???? ...

A:	This is still parsed by ansi in nature, the character sets are for
viewing only (ansi by default).

--------
Q:	When loading/editing a "NULL PICTURE" graphic is displayed instead...

A:	This graphic is a dummy graphic for when a image fails to load or
is non-existant.

--------
Q:	What exactly is ramping...

A:	In the graphic editor, this allows you to select a group of cubes and
create an automaticly leveled walkway.  This saves time in hand editing values
like if you want to flatten an entire piece of ground, or create a bubble in the
road.

--------
Q:	Error: "Run-time error "9': Subscript out of range"

A:	This can pop-up for a variety of reasons, mostly array overflows.

When switching from an old version of the mapper to a newer one this may
occur on loading... Especially with the GRFcache... The resolution to this
version of the error is to delete the grfcache.dat file and restart
(will be auto recreated).

As these are annoying, please report these but be specific as to where and how
to recreate it, generally what map you loaded (or worked from) helps.

--------
Q:	Should I reorganize this file a bit to be easier to read...

A:	Yes, its on my todo list (still)...  hopefully it looks a bit better now.


--------------------------------------------------------------
VI.  "I ran into a bug/error, how do I report it" / Future releases
--------------------------------------------------------------

First, The website is "http://mapro.proboards80.com/".  I don't require
registration for viewing/posting but if its abused it may require it in the future.

When Reporting, in the proper topic, please include the following information...

...Version
...Map You were editing
...Window(s) that were open/active
...The error message itself

You are open to include pictures if you think it may better clarify your point.

For releases, you can check under the "Releases" section at the above address.


Note: There is also an eA link that can be used...
"http://www.eathena.ws/board/Map-Editor-Release-t116024.html"
...just be aware I may not check this certain topic with much frequency.

--------------------------------------------------------------
VII.  Credits
[For the things that can't be done solo...]
--------------------------------------------------------------

GRF.DLL - from the OpenKore Library (libgrf 1.2)
GRF.dll - from GrfBuilder by MagicalTux (libgrf 1.3)
GRF.DLL - from grftool (r4646)
iljxx.dll - Intel® JPEG Library

End_of_Exam for the excellent work on Igun...

Ximosoft (for his rolaboratory site)
	>I actually got some of the type descriptors from
	 The listing here.
	>As well as assitance with RSM and some openGL

VictorSan (From the eA/ASB forums)
	  (I would have never found out what those 
		U/V vectors did if he didn't give me the
		heads-up on the current GND findings he had)
neovanglist (Some Testing support)

r_sarvas from eA (www.neatocool.com) for posting version R11

blackhole89 (from eA) 
	>The Lightmap structure

toshiaki (From eA)
	>The Extra Data knowledge currently surfacing

Syao	(Bug testing, and assistance on various things)
	[And a huge huge huge help with the language feature]

And to anyone else I might have accidentally missed...
	(Drop me a line if I missed you...)


(End of File)