The Wondrous World of Batching
CoAS has the textures for each ship in seperate folders.
Each ship uses deck.tga.tx, but you need to have that file in each folder seperately.
Therefore for all new ships, you need to put that file three times in the download for each ship. Right?
So... instead of putting the file in the modpack around three hundred times, you don't put it in at all.
Then after the installation, run a .bat file and copy it into the required folders from an existing ship.
You can do the same with any other files that are the same, but need to be in different spots or under different names.
It's more complicated to make such a .bat file than adding the files in the download, but it can save LOTS in the final filesize.
Especially in the PotC Build mod, we really had no choice but to do it the batch way for a lot of files.
We found that you can change the texture path of a location through code.
So then we decided to reskin the various town models with different nationalities' looks.
There were several texture files we changed for that, but a lot would remain the same.
So we batched it so that these are copied into the NATION subfolders and we don't need to include them in the download.
And for the BuildingSet, we have lots of building models in the AMMO folder.
But they need their textures as well. So again, we had the batch file copy those instead of including them.
Another trick: All relevant code is in PROGRAM and RESOURCE\INI.
But through modding, files are being renamed and removed.
So when people install modpack edition upon edition, you're going to end up with lots of old crap in these folders.
So we include these folders as PROGRAM_new and RESOURCE\INI_new,
have the batch file REMOVE the original folders, then rename the _new ones to the normal names.
Then you're certain that there's only those files in there that you want.
In some cases, even files with wrong or old filenames end up being loaded anyway,
which does have the potential to mess up things. Doing this prevents that.
Other tricks in the batch-file we've used for the PotC Build Mod that you can also apply to CoAS:
- Delete memory.mp; this is a file that sometimes is part of the PotC game installation (possibly CoAS also) and appears to serve no other purpose than to make the game performance crap (???)
- Remove all files in the SAVE folder to prevent people from using incompatible saves (of course we've got a system in place to prevent people loading incompatible saves even if they DO remain, but you don't have that)
- Delete the "options" file. This restores all settings to default, which is good since especially adding new keyboard controls (which your modpack does) tends to mess up key assignment until you reset the controls to default. This takes care of that automatically.
Here's some sample "empty" batch file code that you can use for your CoAS modpack:
It contains all lines you can directly use for CoAS. All game-specific stuff you'll still need to fill in.
CoAS has the textures for each ship in seperate folders.
Each ship uses deck.tga.tx, but you need to have that file in each folder seperately.
Therefore for all new ships, you need to put that file three times in the download for each ship. Right?
So... instead of putting the file in the modpack around three hundred times, you don't put it in at all.
Then after the installation, run a .bat file and copy it into the required folders from an existing ship.
You can do the same with any other files that are the same, but need to be in different spots or under different names.
It's more complicated to make such a .bat file than adding the files in the download, but it can save LOTS in the final filesize.
Especially in the PotC Build mod, we really had no choice but to do it the batch way for a lot of files.
We found that you can change the texture path of a location through code.
So then we decided to reskin the various town models with different nationalities' looks.
There were several texture files we changed for that, but a lot would remain the same.
So we batched it so that these are copied into the NATION subfolders and we don't need to include them in the download.
And for the BuildingSet, we have lots of building models in the AMMO folder.
But they need their textures as well. So again, we had the batch file copy those instead of including them.
Another trick: All relevant code is in PROGRAM and RESOURCE\INI.
But through modding, files are being renamed and removed.
So when people install modpack edition upon edition, you're going to end up with lots of old crap in these folders.
So we include these folders as PROGRAM_new and RESOURCE\INI_new,
have the batch file REMOVE the original folders, then rename the _new ones to the normal names.
Then you're certain that there's only those files in there that you want.
In some cases, even files with wrong or old filenames end up being loaded anyway,
which does have the potential to mess up things. Doing this prevents that.
Other tricks in the batch-file we've used for the PotC Build Mod that you can also apply to CoAS:
- Delete memory.mp; this is a file that sometimes is part of the PotC game installation (possibly CoAS also) and appears to serve no other purpose than to make the game performance crap (???)
- Remove all files in the SAVE folder to prevent people from using incompatible saves (of course we've got a system in place to prevent people loading incompatible saves even if they DO remain, but you don't have that)
- Delete the "options" file. This restores all settings to default, which is good since especially adding new keyboard controls (which your modpack does) tends to mess up key assignment until you reset the controls to default. This takes care of that automatically.
Here's some sample "empty" batch file code that you can use for your CoAS modpack:
Code:
@echo off
echo -----------------------------------------------------------------------
echo DO NOT WORRY ABOUT "FILE NOT FOUND" ERRORS!
echo These usually occur when removing files that are already not there
echo or moving files that are already where they need to be
echo -----------------------------------------------------------------------
pause
REM Delete unnecessary main game files
del memory.mp
del /Q SAVE\*.*
del options
REM Set up Build 14 code
RD /s /Q PROGRAM
RD /s /Q RESOURCE\INI
ren PROGRAM_new PROGRAM
ren RESOURCE\INI_new INI
REM -- STICK WHATEVER YOU WANT MOVED/COPIED/RENAMED DOWN HERE --
echo -----------------------------------------------------------------------
echo Installation Complete!
echo Batch File will now be removed
echo Please refer to the information in the "Documentation" folder
echo For support and to provide feedback, visit www.piratesahoy.net
echo -----------------------------------------------------------------------
pause
del /Q *.bat