mild proposal: convert maps to CSV already!

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

mild proposal: convert maps to CSV already!

Post 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).
Former programmer for the TMWA server.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: mild proposal: convert maps to CSV already!

Post 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.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: mild proposal: convert maps to CSV already!

Post 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.
Former programmer for the TMWA server.
User avatar
Jenalya
TMW Adviser
TMW Adviser
Posts: 717
Joined: 22 Sep 2010, 19:28

Re: mild proposal: convert maps to CSV already!

Post 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.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: mild proposal: convert maps to CSV already!

Post 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.
Former programmer for the TMWA server.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: mild proposal: convert maps to CSV already!

Post by o11c »

pushed
Former programmer for the TMWA server.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Trying to make minor fix on 009-4

Post 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.
Former programmer for the TMWA server.
Post Reply