Project : creation of a Perl function library for use to easily parse and edit/create map files (in the first version), and later mods.
Currently, I've just finished the parsing function, that read a .map file (*any* map file, can be from a normal random map to a manually edited one with tabulations, comments, and others nastiness usually not welcomed by scripts, or at least it should work with these) and returna perl hash structure with all the map informations (included : lists of commandes, features, terrains types (and not the code, but the list of all terrains types and specials like 'manysites'), ...)
I planned to make the output function too before this week-end and release both for beta testing, but I now have other plans for the days to come, so I pre-release the parsing part , and I would need some brave people to test my script and check if there's map commands/infos that are not recognized or parsed correctly.
What do you need to do to help me ?
1°) install Perl if you don't already have it (for windows, you can use ActivePerl, see
http://www.activeperl.org/Products/ActivePerl/ and don't worry, activeperl, the core install, is free)
This first version doesn't need any non standard perl module, but later version will require some, buth they will be easy to install with activeperl
For Unix/Linux/BSD users, hell you already have Perl on your machine, and you probably don't need any help to compile/install new modules (but if you really need, I can help)
2°) Inside the archive (see attachment), There will be 5 files :
JTmap.pm => the library/package itself (.pm stand for Perl Module)
test.pl => a small test script that use the library, and parse a map file
Forgotten Cliffs.map => a map file (from a map released on this forum) that I choose as an exemple because it use most map commands (but not all, that's why I need your help guys).
test.bat => an exemple batch file for windows that call the perl script with "Forgotten Cliffs.map" as the map to parse, andthem pause (the windows won't close once the script is done, it will wait for you to press a key, so you can read any potential error message from the script and report them)
This is this file that you will edit (to change the map file) and execute to test the script.
output.txt => currently as the ouput function is not available yet to create another .map file, I print to this file a dump of the full perl structure parsed. Even those that don't know any programming langage should be able to recognize familiar informations from the original map.
In the archive an exemple result parsed from the "Forgotten Cliffs.map" file is provided, so those that want can loo without even having to run the script.
What I need testers for :
- run the script with any map you can (the more diverse the better), and report any error during parsing
- when the parsing run without any message/error, check the output.txt file and check the "leftover" value. There should only be there comments and others informations not directly depending from the map itself.
If commands are in the leftover value, please reports them (provide the original .map file or a link to download it, so I can test myself)
- if there's no error, and the leftover ha only comments, check the map structure itself to see if there's nothing important missing or invalid.
Thanks in advance for the help.
For other Perl programmers out there : if some want to participate, with those files you will already have the perl map structure, and so you should be able to make your own function to add/edit/remove any province or commander or general map settings.
If you have questions I will be pleased to answer (I can also give advice to Perl beginners if needed)