Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Make mappy write data statements

Author
Message
Lost Dragon
13
Years of Service
User Offline
Joined: 22nd Aug 2010
Location:
Posted: 10th Jan 2011 07:45
Have you ever had tile map data statements that you wish you could edit with something fancier than the IDE, but are too lazy to learn a new map format or write your own map editor?

If you'd like to use Mappy as a simple map editor and all you want it to do is export data statements make the following adjustments to the "Export Flash actionscript.lua" file in the lua script directory of your Mappy folder:



That's it. This is a simple edit.

Any other changes you want to make (like changing line 23 to say "export data" and so on should be entirely cosmetic (although recommended).

When you run the script in Mappy it will prompt you to "adjust exported values by" (some value). Leaving it as 0 should be okay. Once your file is made, open it up in Notepad and copy your data statements over to your code.

This script probably just handles one layer. I haven't tried more than one so I can't say.

If you don't want to edit your Export Flash actionscript.lua file then save it as a new file called "Export data statements.lua" and edit the mapwin.ini file line 99 to say lua16=Export data statements.lua The selection should show up under the "custom" option as the last item.

You can get Mappy here:

http://tilemap.co.uk/mappy.php

I hope that's useful to somebody. It was useful to me when I was testing out tile scrolling methods.
Lost Dragon
13
Years of Service
User Offline
Joined: 22nd Aug 2010
Location:
Posted: 10th Jan 2011 09:24
If you're confused as to what this actually does, the exported data from Mappy will look like:



That'd be output for an 8x8 map. If you have a 100x100 map you'd get 100 data statements with 100 comma separated values. That's all it does for you, but it's still handy for certain things.

Login to post a reply

Server time is: 2024-03-29 11:58:26
Your offset time is: 2024-03-29 11:58:26