Decreasing campaign-maintenance overhead with new tools

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
User avatar
esr
Retired Developer
Posts: 228
Joined: November 26th, 2006, 6:40 pm
Location: Pennsylvania, USA
Contact:

Decreasing campaign-maintenance overhead with new tools

Post by esr »

The just-released 1.3.2 contains two new tools, macroscope and upconvert, aimed at making it easier to sanity-check and maintain WML.

As a player, I want us to carry a lot more more stuff in mainline. As a developer, I know this is not realistic if it means devs and designers would have to sink hugely many more hours into campaign-maintenance work.

Therefore, I've set myself the goal of drastically decreasing the overhead of maintainer-hours required per campaign per year. The purpose of macroscope, broadly speaking, is to automate as much sanity checking as possible. The purpose of upconvert, broadly speaking, is to automate the fiddly bits of forward-porting campaigns as WML and the resource files in Wesnoth mainline change.

If any of you have ideas for more tools that would decrease maintainers' burdens, I'd like to hear those ideas.

What else would make the job easier? What other time-intensive tasks might be mechanized? Please speculate and brainstorm.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

A tool to convert all WML to be properly indented and formatted.
User avatar
vonHalenbach
Translator
Posts: 398
Joined: May 3rd, 2006, 10:23 am
Location: united europe

Post by vonHalenbach »

I can just think of a device, that is attached to the campaign maintainers computer, which gives light electric shocks to them if they upload broken stuff on the campaign server. It should be called unlazydevice, or something. :lol:
ju5t1n
Posts: 2
Joined: April 27th, 2007, 10:47 am
Location: Perth, Western Australia

Post by ju5t1n »

A line counter would be really handy as well (I find a use up 15-30 mins or so just counting lines for common typos, like messgae instead of message).
ju5t1n - Wesnoth Player
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

zookeeper wrote:A tool to convert all WML to be properly indented and formatted.
This assumes that there is a universally accepted system of indentation for WML... there's not, from what I can tell.


And I personally would find it rather frustrating to have to write WML in an indentation format that I'm not used to. ;)
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

I do not know if any of the existing tools does it, but IMHO it would be good to have:

1) WML syntax check, also for included files and expanding macros. Also check whether links to images are correct.

2) check whether all tags and attributes are from a specified set (specified in a configuration file; it will be different for different versions). Something like a DTD check for XML files. In addition to errors, it could also give warnings about atrributes that should/shoudn't be localized (for example unit id must not be localized; unit name should be localized).

The tools should give a human-readable output, which can be sent by e-mail to campaign maintainer.
User avatar
esr
Retired Developer
Posts: 228
Joined: November 26th, 2006, 6:40 pm
Location: Pennsylvania, USA
Contact:

Post by esr »

Thanks, Villam, this exactly the sort of thing I was looking for.

Macroscope already does much of what you're asking for, and could
be made to do more.
  • * WML syntax check -- no, that would require a full WML parser
    * included files -- no, though I'm thinking hard about it
    * expanding macros -- yes, checks for bad references or unused macros
    * check whether links to images are correct -- yes
    * check whether all tags and attributes are from a specified set -- yes
    * DTD check for XML files -- no, what XML files do we have?
    * warnings about attributes that should/shouldn't be localized -- no.
    * human-readable output -- yes
If you can give me a list of attribute names that should be localized, that check would be relatively easy to add and entirely appropriate.
User avatar
esr
Retired Developer
Posts: 228
Joined: November 26th, 2006, 6:40 pm
Location: Pennsylvania, USA
Contact:

Formatter and syntax checker are the same problem

Post by esr »

Writing a WML formatter and writing a WML syntax checker are essentially the same problem, and fairly difficult to get right. I might do it, but I'd rather identify and do all the easier useful things first.

Both problems would require an XML parser in Python. Rather than write one from scratch, I might at some point swipe campgen's parser or refactor campgen so its parser becomes reusable.
User avatar
Baufo
Inactive Developer
Posts: 1115
Joined: January 29th, 2006, 4:53 pm
Location: Vienna, Austria

Re: Formatter and syntax checker are the same problem

Post by Baufo »

esr wrote:Writing a WML formatter and writing a WML syntax checker are essentially the same problem, and fairly difficult to get right. I might do it, but I'd rather identify and do all the easier useful things first.

Both problems would require an XML parser in Python. Rather than write one from scratch, I might at some point swipe campgen's parser or refactor campgen so its parser becomes reusable.
Well, my WML editor can already do both, I just have to find some time to fix some minor problems with WML parsing so rewriting such a tool is probably wasted time.
ju5t1n wrote:A line counter would be really handy as well (I find a use up 15-30 mins or so just counting lines for common typos, like messgae instead of message).
Just use a decent text editor (I use vim).
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
User avatar
Temuchin Khan
Posts: 1845
Joined: September 3rd, 2004, 6:35 pm
Location: Player 6 on the original Agaia map

Post by Temuchin Khan »

I do not doubt the usefulness of this tool, but I've noticed that sometimes when I play a multiplayer game a list of five or six instances of "Deprecated WML found" partially obscures portions of the map. Is there any way to make these notices go away, short of revising the maps, once they have been noted? In other words, do you have to stop the game and make the required corrections every time one of these notices appears, or can you leave them for later?
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Post by Eleazar »

Temuchin Khan wrote:I do not doubt the usefulness of this tool, but I've noticed that sometimes when I play a multiplayer game a list of five or six instances of "Deprecated WML found" partially obscures portions of the map. Is there any way to make these notices go away, short of revising the maps, once they have been noted? In other words, do you have to stop the game and make the required corrections every time one of these notices appears, or can you leave them for later?
I don't believe that's the result of macroscope.
":clear" will bring you temporary relief.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
Post Reply