Link
Though, that's probably a common need, so you could probably find a 'copy file multiple times' thread somewhere if you look long enough.
The rest is covered in my tutorial in the sticky in the Scripting forum on how to datamine and mass edit your module. You can loop files outside of a module with Moneo just as easily as you can loop them inside. See, for example, this script, taken from the example scripts linked in that tutorial, which loops a palette:
%pal = '../gff/placeablepal.itp.gff';
for (/MAIN) {
$pre1 = /~/DELETE_ME;
for (/~/LIST) {
if (/~/ID < 100) { print " "; }
if (/~/ID < 10) { print " "; }
print /~/ID, " ", $pre1, " | ", /~/DELETE_ME, " (", /~/STRREF, ")\\n";
$pre2 = /~/DELETE_ME;
for (/~/LIST) {
if (/~/ID < 100) { print " "; }
if (/~/ID < 10) { print " "; }
print /~/ID, " ", $pre1, " | ", $pre2, " | ", /~/DELETE_ME, " (", /~/STRREF, ")\\n";
$pre3 = /~/DELETE_ME;
for (/~/LIST) {
if (/~/ID < 100) { print " "; }
if (/~/ID < 10) { print " "; }
print /~/ID, " ", $pre1, " | ", $pre2, " | ", $pre3, " | ", /~/DELETE_ME, " (", /~/STRREF, ")\\n";
}
}
}
}
Likewise, here's one looping a hak file:
%hak = '../hak/cep2_add_sb_v1.hak';
for (%hak['*.utp']) {
/PaletteID = 59;
print /TemplateResRef, " ", /PaletteID, "\\n";
}
%hak = '>';
close(%hak);
Lastly, here's one shuffling palette ids (without altering the palette itself, just organizing resources) within the module:
%mod = '..\\Path of Ascension CEP Legends.mod';
for (%mod['uaq*.uti']) {
replace('PaletteID', '23', '228');
}
for (%mod['es_*.uti']) {
replace('PaletteID', '2', '241');
}
for (%mod['qc_*.uti']) {
replace('PaletteID', '2', '242');
}
for (%mod['*.uti']) {
replace('PaletteID', '0', '185');
replace('PaletteID', '2', '233');
replace('PaletteID', '3', '186');
replace('PaletteID', '24', '238');
}
for (%mod['it_mpot*.uti']) {
replace('PaletteID', '238', '24');
}
for (%mod['rand00*.uti']) { replace('PaletteID', '1', '196'); }
for (%mod['rand01*.uti']) { replace('PaletteID', '1', '190'); }
for (%mod['rand02*.uti']) { replace('PaletteID', '1', '192'); }
for (%mod['rand03*.uti']) { replace('PaletteID', '1', '193'); }
for (%mod['randck*.uti']) { replace('PaletteID', '1', '194'); }
for (%mod['randam*.uti']) { replace('PaletteID', '1', '189'); }
for (%mod['randrg*.uti']) { replace('PaletteID', '1', '198'); }
for (%mod['randsh*.uti']) { replace('PaletteID', '1', '199'); }
for (%mod['randbl*.uti']) { replace('PaletteID', '1', '191'); }
for (%mod['randwp*.uti']) { replace('PaletteID', '1', '200'); }
for (%mod['randtr*.uti']) { replace('PaletteID', '1', '197'); }
for (%mod['rand*.uti']) { replace('PaletteID', '1', '188'); }
%mod = '>';
close %mod;
The last shows how you can move stuff around after you've created new PaletteID entries.
I took a new job yesterday, so my time is suddenly quite constrained, and it's great if you want to try to tackle this yourself first. If not, say so, and I'll get to it asap.
Funky





Retour en haut






