Atrinik.org - Multiplayer Online Role Playing Game

Development => Tutorials => Topic started by: Mamoru on June 14, 2010, 08:59:57 pm



Title: Checking your maps
Post by: Mamoru on June 14, 2010, 08:59:57 pm
After creating/modifying a map you should always check it for common bugs.
There is a script built-in the editor which does most of the work for you.


Before you can use this script you have to change the settings.
To do this open the "File" menu and select the "Options..." panel.
Select "Map validation" from the list to view the map validation settings.

Validation settings:
"Automatically run validation after each change" This can be slow and I recommend you to turn it off. Just run the map checker each time when you safe your map.

Validators:
Tick all boxes, except for:
"Completely blocked square" - Not a problem
"Two arches of the same type on the same square" - Not a problem, perfectly possible as long as two arches are not in the same layer (doesn't matter for system objects).
"Square without floor" - Not a problem
"Critical slaying characters" - Warns for using a hyphen ( - ) as a slaying character, while it is allowed. "slaying" is mainly used for paths to files and key strings.

Click "Ok" to save the settings.

When you're saving a map you should use the script.
To run the map validator open the "Tools" menu and select "Check map". In a moment you will see the "7: Warnings" tab turn red. This means the map validator found some problems on your map. If nothing happens, there are no warnings. Open the "7: Warnings" tab and click a warning to see an explanation and how you could solve the issue. If you think you what you did is correct and shouldn't be a problem or you can't solve a problem, you should ask a developer (https://www.atrinik.org/index.php/board,11.0.html) for help.

Feedback on this tutorial is greatly appreciated. :)
~Kiana~


Title: Re: Checking your maps
Post by: Cleo on June 15, 2010, 05:43:13 am
Note that the map validator in Gridarta is not really recommended to be used, as it often warns on bogus things, even with the above things disabled. It is generally a good idea to run it, but not consider most of the warnings 'critical'.

The map checker tool in tools/map-checker/map-checker.py does a far better job of finding legitimate errors, so I think it should be included in the tutorial (you need to install Python 2.6 and PyGTK to run it).


Title: Re: Checking your maps
Post by: Mamoru on June 15, 2010, 08:01:26 am
The python script is better than the script in Gridarta, but I don't know how to use it myself.
Could you add a tutorial for that Cleo?
~Kiana~


Title: Re: Checking your maps
Post by: Cleo on June 15, 2010, 08:58:44 am
I don't use Windows. For me, it's simply either double-clicking the file or running 'python map-checker.py'.

For Windows, I imagine the same exact thing, except you need to install Python 2.6 and PyGTK first.


Title: Re: Checking your maps
Post by: Mamoru on June 15, 2010, 09:06:41 am
Ok, I'll see if I can figure it out using PyGTK then.
~Kiana~


Title: Re: Checking your maps
Post by: ghost101 on June 15, 2010, 09:39:14 am
or you could fix all the warnings it has. simply Embar City had some warning changed it to where no warnings came up in the warnings panel at the bottom


Title: Re: Checking your maps
Post by: Mamoru on July 04, 2010, 11:37:24 am
Hmm, PyGTK is quite difficult to install on windows.
~Kiana~


Title: Re: Checking your maps
Post by: Cleo on July 04, 2010, 12:31:48 pm
It's difficult to execute an installer (http://www.bonifazi.eu/appunti/pygtk_windows_installer.exe)?


Title: Re: Checking your maps
Post by: Mamoru on July 04, 2010, 12:42:36 pm
Quote from: PyGTK.org
PyGTK for Microsoft Windows

In order to install PyGTK on Windows you need:

    * A Python interpreter for Windows (you can get it at the Python downloads) page.
    * The GTK+ runtime. We recommend to install it using the official GTK+ bundle (gtk+-bundle*.zip files).
      To fully install this bundle you need to uncompress its contents in a folder and manually add the bin subfolder to the system path.
    * The PyGTK, PyCairo and PyGObject modules (available from this site, just follow the links).
      When downloading them, you must make sure that the PyCairo, PyGObject and PyGTK versions fit the corresponding Python interpreter version and you have a recent enough GTK+ runtime.


The installer you provided is outdated (all it's installers look for Python 2.5).

How to "manually add the bin subfolder to the system path."?
~Kiana~


Title: Re: Checking your maps
Post by: Cleo on July 04, 2010, 12:46:06 pm
Google is your friend... (http://www.google.com/search?hl=en&safe=off&rls=com.ubuntu%3Aen-US%3Aunofficial&q=windows+add+folder+to+the+system+path&btnG=Search)


Title: Re: Checking your maps
Post by: Mamoru on July 04, 2010, 12:47:28 pm

Hmm, PyGTK is quite difficult to install on windows.
~Kiana~


Title: Re: Checking your maps
Post by: Cleo on July 04, 2010, 12:49:31 pm
http://ftp.acc.umu.se/pub/GNOME/binaries/win32/

All the installers you need using 2.6.


Title: Re: Checking your maps
Post by: Mamoru on July 04, 2010, 01:04:52 pm
Yes I have the bundle from the GTK download page (http://www.gtk.org/download-windows.html#StableRelease).
The ftp-server you just linked to is the same as they link to,
which means there's still no option for automatically "adding the path".

Quote from: gtk+-bundle_2.20.0-20100406_win32.README.txt
This bundle is intended for software developers and packagers. You are
expected to know what to do with it, more or less.

~Kiana~


Title: Re: Checking your maps
Post by: Cleo on July 04, 2010, 01:15:38 pm
Install Python 2.6, then download and install these:

http://ftp.acc.umu.se/pub/GNOME/binaries/win32/pygtk/2.16/pygtk-2.16.0.win32-py2.6.exe
http://ftp.acc.umu.se/pub/GNOME/binaries/win32/pygobject/2.20/pygobject-2.20.0.win32-py2.6.exe
http://ftp.acc.umu.se/pub/GNOME/binaries/win32/pycairo/1.8/pycairo-1.8.6.win32-py2.6.exe

Then download http://ftp.acc.umu.se/pub/GNOME/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip (http://ftp.acc.umu.se/pub/GNOME/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip), uncompress it, copy contents of 'bin' directory to your Python installation directory, and you're done.


Title: Re: Checking your maps
Post by: Mamoru on July 04, 2010, 01:18:22 pm
Thanks, if that works I could create an installer to go with the tools.
~Kiana~


Title: Re: Checking your maps
Post by: Cleo on July 04, 2010, 01:23:40 pm
(or provide a README file in the tools directory with clear instructions how to use the PyGTK applications)


Title: Re: Checking your maps
Post by: Mamoru on July 08, 2010, 08:42:19 pm
Quote
C:\Users\Kiana>C:\Python26\python.exe C:\atrinik\clearhaven-remake\tools\map
-checker\map-checker.py --cli
Traceback (most recent call last):
  File "C:\atrinik\clearhaven-remake\tools\map-checker\map-checker.py", line 785
, in <module>
    archetypes = parse_archetypes()
  File "C:\atrinik\clearhaven-remake\tools\map-checker\map-checker.py", line 720
, in parse_archetypes
    fp = open(arch_dir + "/archetypes")
IOError: [Errno 2] No such file or directory: '../../arch/archetypes'

C:\Users\Kiana>

~Kiana~


Title: Re: Checking your maps
Post by: Cleo on July 08, 2010, 08:45:33 pm
You need to run it from the directory it is in.


Title: Re: Checking your maps
Post by: Cleo on July 08, 2010, 09:46:42 pm
Follow the instructions I posted few posts previously, but when uncompressing http://ftp.acc.umu.se/pub/GNOME/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip (http://ftp.acc.umu.se/pub/GNOME/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip), copy contents of the 'bin' directory to C:\WINDOWS. Then download this http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-bundle_2.16.6-20100207_win32.zip (http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-bundle_2.16.6-20100207_win32.zip), uncompress it, and copy contents of the 'bin' directory to C:\WINDOWS as well. After that, double clicking the map-checker.py file should work.


Title: Re: Checking your maps
Post by: idicus on August 06, 2010, 06:09:14 am
hmmmm i downloaded it all to \My Docs folder.....just run it from that folder or do i need to put it in a atrinik folder?