AIP Renumberer Script - BETA

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

AIP Renumberer Script - BETA

Post 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
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: AIP Renumberer Script - BETA

Post 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.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: AIP Renumberer Script - BETA

Post 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.
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: AIP Renumberer Script - BETA

Post 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.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: AIP Renumberer Script - BETA

Post by Red Devil »

btw, found that renumbering AIP's named gaips66*.aip necessitated making a custom batch file.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: AIP Renumberer Script - BETA

Post by Red Spot »

I was just asking RD.
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: AIP Renumberer Script - BETA

Post by Red Devil »

does using excel/spreadsheet and vba allow you to do multiple files at once or is it one-at-a-time?
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: AIP Renumberer Script - BETA

Post by Red Devil »

updated perl script to ignore case in search/replace.

redownload from link in first post to update.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: AIP Renumberer Script - BETA

Post 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
Last edited by Red Spot on Sun Nov 17, 2013 11:41 pm, edited 1 time in total.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: AIP Renumberer Script - BETA

Post by Nielk1 »

Free options are better than office.
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: AIP Renumberer Script - BETA

Post by Red Spot »

Ever heard of openoffice?
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: AIP Renumberer Script - BETA

Post by Nielk1 »

Red Spot wrote:Ever heard of openoffice?
I prefer libra office.
User avatar
Vassili
Thunderbolt
Posts: 186
Joined: Mon Oct 21, 2013 9:09 pm
Location: France
Contact:

Re: AIP Renumberer Script - BETA

Post 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
User avatar
AI_Unit
Thunderbolt
Posts: 186
Joined: Fri Mar 30, 2012 11:53 pm
Location: Mire, negotiating with Scions.
Contact:

Re: AIP Renumberer Script - BETA

Post 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.
Current Mod: AI's Expansion Pack

AI_Unit was here.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: AIP Renumberer Script - BETA

Post by Nielk1 »

All the LUA currently lets you do is use far more complex pass/fail triggers for an AIP step...
Post Reply