Page 1 of 1

mild proposal: convert maps to CSV already!

Posted: 11 Jul 2012, 21:31
by o11c
Today I wrote a script that does the tmx-to-wlk conversion formerly done by the java converter (which didn't handle CSV).

So, we can finally convert all the maps to CSV. This will have benefits such as automatic merge conflict resolution, meaningful diffs, and better compression.

I've got commits mostly ready if no one is touching maps right now. And actually, the easiest resolution if there *is* anyone else touching maps, is to let me do my commit, then just save your modified version as CSV (since I'm not actually *changing* any maps).

Re: mild proposal: convert maps to CSV already!

Posted: 11 Jul 2012, 21:36
by Crush
Are you talking about server-sided maps, client-sided maps or both?

Would it be possible to port your script to a Tiled export plugin? It would make the workflow of the mappers much simpler when they would still be able to export files directly from Tiled instead of having to use an additional tool for converting the map format.

Re: mild proposal: convert maps to CSV already!

Posted: 12 Jul 2012, 00:09
by o11c
Crush wrote:Are you talking about server-sided maps, client-sided maps or both?
changing the client-side maps and the implementation of the converter that generates server-side maps.
Crush wrote:Would it be possible to port your script to a Tiled export plugin?
"Port", no. As for implementing a from-scratch Tiled plugin, the main issue with that is that that would require all mappers to build Tiled from source.
Crush wrote:It would make the workflow of the mappers much simpler when they would still be able to export files directly from Tiled instead of having to use an additional tool for converting the map format.
Not really - there are other things that need to be done (such as updating the submodule pointer); 'make maps' is not that hard.

Re: mild proposal: convert maps to CSV already!

Posted: 12 Jul 2012, 08:02
by Jenalya
o11c wrote:I've got commits mostly ready if no one is touching maps right now. And actually, the easiest resolution if there *is* anyone else touching maps, is to let me do my commit, then just save your modified version as CSV (since I'm not actually *changing* any maps).
There are some map changes in progress, and I'd like them to get in before you do the conversion.

I changed the caves near the theater. It's already on the testserver and I created a test topic to get it ready for mainline as soon as possible: http://forums.themanaworld.org/viewtopi ... 13&t=15967

Also, baseballboy is working on fixing the inconsistencies on the tutorial maps, which is also on the testserver.

Re: mild proposal: convert maps to CSV already!

Posted: 13 Jul 2012, 00:18
by o11c
All code changes done; I can now remove the Java converter completely.

I've found (and fixed) a number of bugs in the object properties on certain maps, such as mosnter_id, which would prevent certain mobs from appearing.

Any changes on the following maps are likely to cause headaches, though since the changes are not in the binary portion, it can be resolved.

The following are the maps that had errors:
# modified: maps/003-1.tmx
# modified: maps/006-3.tmx
# modified: maps/011-6.tmx
# modified: maps/017-1.tmx
# modified: maps/025-3.tmx
# modified: maps/025-4.tmx
# modified: maps/027-3.tmx
# modified: maps/028-3.tmx
# modified: maps/031-2.tmx
# modified: maps/046-1.tmx
# modified: maps/047-1.tmx
# modified: maps/048-1.tmx

I think I'm going to manually rebase Jenalya's and baseballboy's branches, separately, on top of mine, since mine is stable and yours might be squashed or otherwise edited.

Edit: also, some mobs used the server ID (1000-2000) instead of the stupid client ID (0-1000); my script handles both so eventually we can get rid of the stupid client ID.

Edit2: done in my fork: https://github.com/o11c/tmwa-client-data
If you don't have any local commits or uncommitted changes, just force-push my version of your branch.
If you have local, uncommitted changes, save your version, and copy the files over my version of your branch, open tiled, save as CSV.
If you have local commits you want to preserve, you'll need to do a 3-point rebase, you might need my help with that. But if it's only one commit and no uncommitted changes, you can just treat it as uncommitted.

Edit3: talked baseballboy through it; apparently you have to have a named remote to do a reset, a url won't work.

Re: mild proposal: convert maps to CSV already!

Posted: 19 Jul 2012, 18:05
by o11c
pushed

Re: Trying to make minor fix on 009-4

Posted: 13 Aug 2012, 14:37
by o11c
Frost wrote:The TMW server had serious and unforeseen problems with CSV format maps. Why would this would even be considered as the default format?
The server didn't have a problem with it. The last client build on the hardest-to-support platform did.

While I understand the desirability of not breaking TMW for our Mac OS X users, I find it hard to have any sympathy when Apple is going out of their way to make our lives difficult.