Wikia

Freeciv

Watchlist Recent changes

Creating freeciv-modpack content

Contents

Freeciv-modpackEdit

Since version 2.3 freeciv has had utility called freeciv-modpack for downloading and installing custom content. User only need to enter modpack URL and it will be automatically correctly installed. This removes need for user to manually copy each file to correct directory where correct directory is something nobody seems to know what it is for some operating systems. This document describes how you as custom modpack author can make your content available for install with freeciv-modpack.

Hosting placeEdit

First of all you need some place in the Internet to store your modpack where freeciv-modpack can fetch it from. Current version of freeciv-modpack supports downloading only by http, so you need content in web-server (as opposed to for example ftp-server) You can place files to where your homepages are, for example. Currently freeciv-modpack has no way to unpack any archives, but each file of your modpack must be separately downloadable.

.modpack-fileEdit

In addition to all the normal contents of your modpack you have to create one file that instructs freeciv-modpack in download process. This file must have .modpack-suffix and it's the one user gives URL for in freeciv-modpack. It's text file similar to other data files freeciv uses, so you as modpack author are already quite familiar with the overall design of the format.

 [info]
 options = "+modpack-090810-2"
 baseURL = "http://www.cazfi.net/freeciv/modinst/2.3/ancients"
 name = "Example"  Since 2.4
 type = "Ruleset"  Since 2.4
 version = "1.0-beta2" Since 2.4
 
 [files]
 list =
 {
   "src", "dest"
   "ancients.serv"
   "ancients.tilespec"
   "ancients/nation/german.ruleset"
   ...
   "ancients/README"
 }

info.options gives capability string of this modpack-file. For content to be downloaded with freeciv 2.3 freeciv-modpack this must be "+modpack-090810-2", and for 2.4 "+modpack-150611"

info.baseURL gives common beginning of the URLs files can be downloaded from, so you don't need to give full URL for every file in your modpack. In the above example all the files of ancients.modpack are placed under directory http://www.cazfi.net/freeciv/modinst/2.3/ancients.

info.name is name of the modpack

info.type is type of this custom content package. One of "Ruleset", "Tileset", "Modpack" or "Scenario". This affects where content gets installed. Scenarios (consisting only .sav) are freeciv version independent and are stored to location shared by all freeciv versions. All other types are specific to certain freeciv version, and are installed to version specific directory.

info.version is version string for modpack

files.list is list of files to download. For each file at least src must be given. It's the end of the URL for this particular file. First file to download in above example is http://www.cazfi.net/freeciv/modinst/2.3/ancients/ancients.serv. dest is what file should be called when installed, relative to main installation directory. If dest is omitted, src is used for this too.

modpack.listEdit

modpack.list file is not concern of normal modpack author, but I document it here for completeness. It's a list maintained by freeciv team about high profile .modpack files. URL for that list is hardcoded to freeciv-modpack and for freeciv 2.3 it's http://download.gna.org/freeciv/modinst/2.3/modpack.list. To install modpack from that list user does not need to know any URLs at all. Since 2.4 it's possible to override that URL by giving commandline parameter "-L <URL>". This is mainly meant for testing freeciv-modpack during development.

 [info]
 options = "+Freeciv-2.3-modlist"
 message = "Freeciv 2.3 is expected to be released quite soon now."
 
 [modpacks]
 list =
 {
   "name", "version", "type", "license", "URL"
   "Amplio", "S2_3", "Tileset", "GLP2+", "http://www.cazfi.net/freeciv/modinst/2.3/amplio.modpack"
   "Ancients", "2.3-0", "Ruleset", "GPL2+", "http://www.cazfi.net/freeciv/modinst/2.3/ancients.modpack"
 }

info.options gives capability string of this modpack.list file. For list compatible with freeciv 2.3 freeciv-modpack it must be "+Freeciv-2.3-modlist", and for freeciv 2.4 "+modlist-011111"

info.message is optional message to be shown to connecting freeciv-modpack.

modpacks.list is list of .modpack-files. name and version are currently just text to be shown to user. type is one of Ruleset, Tileset, Modpack, or, starting from 2.4, Scenario. license is new field in 2.4 containing name of the modpack's license. URL is where .modpack file can be downloaded.

Pages on Freeciv

Add a Page
572pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
573photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki