1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

AutoPak 2016-10-05

AutoPak

  1. TC01
    autopak v0.1

    I was looking for a way to automate parts of "building" Final Frontier Plus, and I realized one of the clumsier parts of the workflow had to be compiling art assets into a FPK file.

    The traditional way to do this is to use PakBuild, a Firaxis tool. See http://forums.civfanatics.com/showthread.php?t=136023 and http://forums.civfanatics.com/showthread.php?t=297865 for the download hosted on CFC and the tutorial.

    The workflow described in the second tutorial is a bit... clumsy, but as it happens PakBuild supports command line options! So it wasn't too difficult to throw together a script that downloaded PakBuild from CFC and ran it, excluding the right files and setting the right options.

    I opted to use VBScript, a scripting language with which I am not really familiar at all but I know is available on all Windows systems out of the box, instead of something like Python, for maximum ease-of-use. As it happens, VBScript isn't too hard to pick up.

    Usage:

    Make a new directory where you'll build your art assets, let's call it "civ4mod-art".

    Copy the Art/ folder for your mod into civ4mod-art, and then copy autopak.vbs into civ4mod-art. Double-click to run it.

    If everything works, PakBuild should be auto-downloaded and invoked, and a AutoPak0.fpk will appear!

    If you run autopak.vbs on the command line as "autopak.vbs name", "name" will replace the default root of AutoPak. So you could run "autopak.vbs FFPak" to get FFPak0.fpk (the default Final Frontier Plus name).

    Possibly, in the future, I'll add support to automatically create the civ4mod-art working directory, so you don't need to create a clean, empty directory for autopak and Art/.

    License/Credits:

    This uses, but does not bundle, Firaxis's PakBuild tool.

    You're free to include this in your own mods, to make modifications, etc. You may not hold me liable (or Firaxis) if this does any damage to you or your computer.