You are not logged in.

#1 2016-09-04 08:53:09

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Packaging

Introduction

Version 0.4.4 introduces a new tool called Cargo. Cargo allows you to create your own packages for maps or tilesets or what you want. If you compile Goat Attack from source, Cargo will be used to create the base.pak. Cargo can be used to create packages, inspect them, show the CRC64 hash of a package or extract a package. Let's see how to work with it.

Make sure that Cargo is installed. You can enable installing in the configure script. For more informations, have a look here.

Creating package (-p or --pack)

Specify a source directory and the package name:

$ goatattack-cargo -p data/files mypak.pak

Large packages may take a while. Cargo will generate an output like this:

Cargo, packager utility for Goat Attack paks (0.4.4-dev)
...
Successfully 3 files packaged. (hash: d2beb5c9e6c7222a)
Inspect package (-l or --list)

Specify a package:

$ goatattack-cargo -l mypak.pak

Cargo will generate an output like that:

Cargo, packager utility for Goat Attack paks (0.4.4-dev)
maps/dmtraps.lmp
maps/dmtraps.map
maps/dmtraps.png
3 files in package.
Show hash (-h or --hash)

If you want to find out the hash of a package, specify the package:

$ goatattack-cargo -h mypak.pak

Cargo will generate an output like this:

Cargo, packager utility for Goat Attack paks (0.4.4-dev)
Hash: d2beb5c9e6c7222a
Extracting files (-x or --extract)

You can extract all files from package. Specify the package and a destination folder. The destination folder can be omitted. Current folder will be taken:

goatattack-cargo -x mypak.pak ~/.goatattack

or

goatattack-cargo -x mypak.pak

Cargo will generate an output like that:

Cargo, packager utility for Goat Attack paks (0.4.4-dev)
3 files extracted.
Map preview icon

If you want to add a preview icon for your new map, I recommend to run your game, start this map and take a screenshot. Consider to turn off the scanlines before taking a screenshot. Crop your screenshot to quadratic proportion and size it down to 64x64. IT MUST BE 64x64 px and PNG. Save that png to your maps directory with the same name like the map. In near future, the map editor will generate a map icon for you. But for now, you have to do that manually.

Publish your new package

If you want to add a package in your dedicated server, copy your generated pak file into ~./goatattack or into the default system folder /usr/share/goatattack, or /usr/local/share/goatattack. If done, restart your dedicated server. The new package will be read out and set up. Connecting clients will download your new package automatically, if needed. Consider to add the new created map in your rotation list. How to do this, see here.

Be aware of duplicates

If you're working on new maps, they resides normally in ~/.goatattack. After packaging, be aware, that if that package resides in that folder too, your game client will read out this package too. It may be, that your maps appear twice, because they are in an open folder structure AND in your newly generated package. You should have cleaned up your working directory, before starting a game.

Offline

Board footer

Powered by FluxBB