Page 1 of 2
AIP Renumberer Script - BETA
Posted: Sat Nov 16, 2013 8:44 am
by Red Devil
I modified Nathan's expandui.pl script and expandui.bat file - with some helpful pointers from Ken - to make it quick and easy to renumber the [Plan*] entries in ascending order and the planPriority =* entries in descending order in BZ2 AIP files after you have moved/added/deleted AIP plans in the files.
You need to have Perl installed in Windows and an understanding of Perl and Windows batch files to use it.
Here's a download link if you want to try it out (instructions are included).
The batch file moves and renames files, so be careful using it.
Renumber AIP Entries
Re: AIP Renumberer Script - BETA
Posted: Sat Nov 16, 2013 6:31 pm
by Red Devil
the script doesn't sort plans, so be sure to move any plans that you changed the priority for to be in the correct order before you use the script.
i.e., if you changed the priority of a plan near the bottom of the plan list to run at a higher priority between other plans higher up the plan list, move that plan to the position in the plan list where you would like it to run, then run the bat/script.
also, be sure to save off a copy of the AIP's that are to be modified before you run the bat/script.
Re: AIP Renumberer Script - BETA
Posted: Sat Nov 16, 2013 8:42 pm
by Red Spot
Why not do it in excel using vba, thats how I did it for a bit of trial 'generated AIPs'. Most people do have Office.
Re: AIP Renumberer Script - BETA
Posted: Sat Nov 16, 2013 11:36 pm
by Red Devil
i've always wanted to learn some perl, so it is what it is. all i know is it saves me a ton of time and tedium and thought i'd share it. if you want to do it another way, it's up to you.
Re: AIP Renumberer Script - BETA
Posted: Sat Nov 16, 2013 11:41 pm
by Red Devil
btw, found that renumbering AIP's named gaips66*.aip necessitated making a custom batch file.
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 1:43 pm
by Red Spot
I was just asking RD.
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 3:55 pm
by Red Devil
does using excel/spreadsheet and vba allow you to do multiple files at once or is it one-at-a-time?
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 8:21 pm
by Red Devil
updated perl script to ignore case in search/replace.
redownload from link in first post to update.
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 10:51 pm
by Red Spot
Red Devil wrote:does using excel/spreadsheet and vba allow you to do multiple files at once or is it one-at-a-time?
All up to you. You can make it so it simply checks the active sheet, active workbook, all sheets in a workbook, all sheets in the active workbook. Workbooks in a specific folder ...
Take it a step further and you can make a database out of it where you give the user a couple of predefined options. You'd be surprised how powerfull vba can be, and since pretty much all office programs use it you're not bound to just excel or access (not that using word of such makes much sense

).
edit: forgot to mention, you dont have to edit an excel-file, you can simply edit text-files, or output what you have in a worksheet into a textfile while adding plans and priorities. Look at the very simply macro I made to count the number of object in a .bzn-file for an example how you can run through a number of text-files.
http://members.ziggo.nl/red_spot/BZ2.rar
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 10:57 pm
by Nielk1
Free options are better than office.
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 11:41 pm
by Red Spot
Ever heard of openoffice?
Re: AIP Renumberer Script - BETA
Posted: Sun Nov 17, 2013 11:56 pm
by Nielk1
Red Spot wrote:Ever heard of openoffice?
I prefer libra office.
Re: AIP Renumberer Script - BETA
Posted: Tue Nov 19, 2013 11:07 am
by Vassili
I prefer libra office.
Libre, the french word for free, open, not the astrologic sign or the "book" word in portuguese (libro in latin).
http://libreoffice.org
Re: AIP Renumberer Script - BETA
Posted: Wed Nov 20, 2013 12:43 pm
by AI_Unit
Any chance in improving the Effectiveness of plans? I mean, the DefendArea and ClearArea plans are useless unless you link your AIP with a LUA script. I mean it would be nice to see a Scout Defend an Extractor without having to go through the complication of LUA. You can get a scout to defend a scavenger in the "Collect Pool" or "Collect Field" Priority. However, like I said, it would be nice to see AI units defend other units without the LUA part.
Thanks.
Re: AIP Renumberer Script - BETA
Posted: Wed Nov 20, 2013 1:17 pm
by Nielk1
All the LUA currently lets you do is use far more complex pass/fail triggers for an AIP step...