bugBattle for Wesnoth - Bugs: bug #22382, Restore whitespace-aligned columns...

Show feedback again

bug #22382: Restore whitespace-aligned columns in map format

Submitted by:  Lari Nieminen <zookeeper>
Submitted on:  Tue Jul 22 14:00:09 2014  
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: Wont FixPrivacy: Public
Assigned to: Simon Forsyth <alarantalara>Open/Closed: Closed
Release: 1.11Operating System: all

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu Apr 9 14:04:47 2015, comment #3:

I agree with anon; the file sized saved makes up for the lack of columns. One NR maps I converted lost ~100KB in size. I doubt it would be a good idea at this point to make UMC authors' map files larger again.

I'm marking this Won't Fix and closing it.

Charles Dang <vultraz>
Project Administrator
Sat Jul 26 13:11:26 2014, comment #2:

There is one tangible benefit, the change reduces the installed size of Wesnoth by several megabytes if applied to all the maps (most still have the larger spacing). It's about 300K of whitespace in UtBS alone. While this doesn't matter too much on desktops, I suspect that it's a nice benefit on the assorted mobile devices now supported in one way or another.

Tue Jul 22 22:16:11 2014, comment #1:

I don't think I made the change to eliminate the padding, though I did reformat all the maps after the code was changed.

Practically, I doubt it makes much difference from an editing standpoint, since I suspect almost no one edits the files directly. For those that do, treating it as a .csv file would restore the columns.

The longest terrain string is actually 11 characters thanks to starting locations (unless they've been removed from the map).
1 Xxxx^Yyyy

Tue Jul 22 14:00:09 2014, original submission:

In ea3028 (see also 7f5f62 and possibly also 1a27a8), the old method of aligning up the columns in map data with spaces was dropped. This makes reading and editing of plain map data a lot harder for no apparent tangible benefit.

The old way padded each entry to a length of 12 (excluding the preceding space):

The new format only includes the preceding space:

So, I'd suggest restoring the old padding behavior, although the number of spaces could be reduced if necessary; since a terrain string cannot be longer than 9 characters, the column width could be reduced from 12 to 9. As future-proofing, the code should probably handle even longer strings gracefully, or to signal an error if one is encountered.

P.S. Alarantalara made the change, so I'm assigning to him initially just so he gets notified, in case he has input.

Lari Nieminen <zookeeper>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by vultraz (Posted a comment)
  • -unavailable- added by zookeeper (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Apr 9 14:04:47 2015vultrazStatusNone=>Wont Fix
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup