Fandom

Freeciv

How to update a tileset from 2.5 to 2.6

704pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

To update a tileset from 2.5 to 2.6 you must add some new graphics and update the file format strings.

General formatEdit

Separate file can be loaded in as a value for a string. Use asterisks to indicate that the value is a filename and not the string itself. See Tileset Summary and Description for an example.

The .tilespec fileEdit

  • Set format of .tilespec file to options = "+Freeciv-2.6-tilespec".
  • Optional version information of the tileset can now be added
  • Summary and description can be added. Both of these, along the tileset name and version, can be seen from client Help menu.
version = "1.00++super"
summary = _("This is a short summary what the tileset is like.")
description = *tileset_description.txt*
  • Each tile section needs to have tag entry to match with terrain's graphic information in terrain.ruleset. This used to be determined from the end of the section name itself, so to convert you can take just the ending of the section name as value for tag
[tile_lake]

->

[tile_lake]
tag = "lake"
  • unit activity sprite offsets need to be added. To use same sprites as before, set the offsets to value 0
; offset of the normal activity icons
activity_offset_x = 0
activity_offset_y = 0
  • city sprite offsets need to be added. If you keep using same "full size" city sprites as before, set the offsets to value 0
; offset the cities by this amount
city_offset_x = 0
city_offset_y = 0
  • occupied city sprite offsets need to be added. To use same sprites as before, set the offsets to value 0
; offset the city occupied sprite by this amount
occupied_offset_x = 0
occupied_offset_y = 0
  • upkeep sprite offsets can be added.
; offset the upkeep icons by this amount from the top of the unit itself.
; The default is the normal tile height, which means that the upkeep icons
; appear below the unit icon if the unit icons are equal to tile height
; (typical in overhead tileset), or overlay lower part of the unit icon,
; if unit icon is higher than tiles (typical in iso tilesets)
;unit_upkeep_offset_y = 0

; Like unit_upkeep_offset_y, but to be used in case there's only small
; space for the overall icon produced. Defaults to unit_upkeep_offset_y -
; not having alternative layout.
;unit_upkeep_small_offset_y = 0
  • If tileset type is Overview it needs to be changed to new name of the type; Overhead
  • minimap_intro_file (also called the 'radar graphics') is no longer mandatory part of the tileset. Only the (currently unmaintained) xaw-client uses that gfx, and even it can live without it. Simply leave minimap_entry_file entry out from the tilespec if you don't want it.
  • There's no longer support for terrain type specific mine sprites. One needs to define distinct looking extras as distinct extras in ruleset. Remove mine_sprite entries from tile sections.

Fog StyleEdit

Magic number fogstyle has been replaced with fog_style (note the underline) that takes textual value. Rename it, and set values like this:

  • Old 0 should be changed to "Auto"
  • Old 1 should be changed to "Sprite"
  • Old 2 should be changed to "Darkness"

Darkness StyleEdit

Magic number darkness_style has been replaced with one that takes textual value. Set values like this:

  • Old 0 should be changed to "None"
  • Old 1 should be changed to "IsoRect"
  • Old 2 should be changed to "CardinalSingle"
  • Old 3 should be changed to "CardinalFull"
  • Old 4 should be changed to "Corner"

ExtrastyleEdit

Old roadstyle concept has been extended and changed to extrastyle. Now all extras should have their drawing style defined in the .tilespec.

  • Rename [roads] section as [extras]
  • Old AllSeparate road styles should be changed to RoadAllSeparate
  • Old ParityCombined road styles should be changed to RoadParityCombined
  • Old AllCombined road styles should be changed to RoadAllCombined
  • New drawing styles available are Single1, Single2, 3Layer, Cardinals
  • Entries for all the extras missing from the list (i.e., everything but roads) should be added. To match old hardcoded styles:

tx.irrigation: Cardinals, tx.farmland: Cardinals, tx.mine: Single1, tx.pollution: Single2, tx.fallout: Single2, tx.village: Single1, Bases: 3Layer

Event iconsEdit

Tilesets now need to provide icons for event messages. Easiest way is to use default ones by listing misc/events.spec in .tilespec files list.

Name of the preferred themes entryEdit

Themes should now be listed in preferred_themes introduced in freeciv-2.5, not in old prefered_themes, though for the time being later one works for backward compatibility reasons.

Dark city text colorEdit

There's a new definition needed in the [colors] section:

mapview_citytext_dark = {"r", "g", "b"
    0,     0,   0
}

This is used for city-related text on the main map when the background (a player color) is too light-coloured for mapview_citytext to show up well. (Currently it's only used for the city size.)

Most tilesets include the standard color definitions:

*include "misc/colors.tilespec"

Since that includes a definition for mapview_citytext_dark, these tilesets need no change.

The .spec filesEdit

  • Set format of all .spec files to options = "+Freeciv-2.6-spec".

Irrigation and Farmland tagsEdit

If you have had graphics for irrigation or farmland tiles depending on cardinal connections, and thus have had tags of form "tx.s_irrigation_" and "tx.s_farmland_" those prefixes need to be changed to extra tag only. With the supplied rulesets that would be "tx.irrigation_" and "tx.farmland_"

Hex River OutletsEdit

Support for River Outlet sprites on NE, SE, SW, and NW directories, which ever wants of those are cardinal in given hex topology, has been added since 2.5.0. It was already added during the S2_5 lifetime as a bugfix, but 2.6 is the first feature release where you may want to fix it. The sprites that would be shown because of this fix but not without it, are still considered optional but are likely to become mandatory in 3.0.

Path SpritesEdit

Tilesets should define new path.step, path.exhausted_mp, path.normal, and path.waypoint tags for symbols shown along goto line.

Renamed hardcoded tagsEdit

Activity icon for transforming terrain via Mine activity is renamed from unit.mine to unit.plant. Supplied rulesets have a new unit.mine tag, referring to extra called Mine.

Supplied rulesetsEdit

Following changes are needed in tilesets that are, and want to be, compatible with supplied rulesets

New extrasEdit

  • Some of the supplied rulesets have new extra named Oil Well that is used instead of Mine on terrains where old versions had tilesets showing oil derrick as mine_sprite. Tag used is tx.oil_mine.
  • civ2civ3 ruleset has also Oil Rig extra that can be built on Oceanic tiles. Tag used is tx.oil_rig.
  • civ2civ3 ruleset has base/extra types named Fort and Airstrip. Tags for these are base.outpost and base.airstrip.

Renamed tagsEdit

  • Tag for Migrant units should now be u.migrants. Earlier versions used tag u.refugees
How to update from an old to the next...
...tileset 1.14 to 2.0 2.0 to 2.1 2.1 to 2.2 2.2 to 2.3 2.3 to 2.4 2.4 to 2.5 2.5 to 2.6 2.6 to 3.0
...ruleset n/a n/a n/a 2.2 to 2.3 2.3 to 2.4 2.4 to 2.5 2.5 to 2.6 2.6 to 3.0
...lua script n/a n/a n/a n/a n/a n/a 2.5 to 2.6 2.6 to 3.0

Also on Fandom

Random Wiki