GeneralSpecific
Libertarian Capitalist
Is there some way that I can quadruple all unit movement without going through the xmls and changing each and every entry?
#!/usr/bin/perl
while(<>){
if ( /iCost>(\d+)/ ){
$OrigCost = $1;
$fhalf = $OrigCost * .5;
$fhalf =~m/(\d+)\.?/;
$half = $1;
$_ =~s/$OrigCost/$half/;
}
print;
}
{
if ( match($0, /iCost/) ) {
num = substr($0, match($0, /[0-9]+/), RLENGTH)
sz = length(num)
num = num / 2
$0 = substr($0, 1, RSTART - 1) num substr($0, sz + RSTART + RLENGTH - 1)
}
print $0
}
EDIT: Scratch everything I previously said in this post. Handicap doesn't take direct effect for some reason. I don't know what to do from here.