The interface icons are defined in interface/icons.gfx, and the image files are found in gfx/interface. Some icon types need to be defined as sprites prior to being used in the game. When that requirement exists, it is common to define a sprite in a .gfx file in <yourmod>/interface/<filename>.gfx. Sprites in the mod file look like this:
spriteType = {
name = "GFX_message_diplomatic_war"
texturefile = "gfx/interface/icons/message/message_diplomatic_war.dds"
}
spriteType = {
name = "GFX_component_weapon_slot_size_icons"
texturefile = "gfx/interface/ship_designer/component_slot_size_weapon_icons.dds"
noOfFrames = 5
}
Note how the sprite file itself makes use of DDS format icons, using that A8R8G8B8 setting. The icons are found in Stellaris/gfx/interface/icons and its subfolders. Some game elements do not require the sprite type to be created first. Instead, the game automatically generates the sprite, and looks for a DDS format file matching the component in the relevant subdirectory. An icon = command is therefore not required. These include:
Entity |
.DDS file location
|
buildings |
gfx/interface/icons/buildings
|
technologies |
gfx/interface/icons/technology
|
civics |
gfx/interface/icons/governments/civics
|
authorities |
gfx/interface/icons/governments/authorities
|
governments |
gfx/interface/icons/governments
|
ethics |
gfx/interface/icons/ethics
|
ascension_perks |
gfx/interface/icons/ascension_perks
|
tile_backgrounds |
gfx/interface/icons/tile_backgrounds
|
tile_blockers |
gfx/interface/icons/tile_blockers
|
environments |
gfx/portraits/environments
|
Note that while for the above items, the icon = is not required, it is often optionally allowed. For example, one might include a line in the entity description that says: icon = GFX_message_diplomatic_war. When this is supported by the game, it looks for a sprite definition (from a .gfx file) with the matching name. This feature is convenient for modders who ant to reuse an existing art file without copying it (thereby saving space in the mod).
Tile Blockers are a special case. These are of the format <tileblocker>_<number>, where 'tileblocker' is the key in the tileblocker file and 'number' is an integer valued from 1 to N. So, for example, for the vanilla tile blocker for mountain ranges, with a key of 'tb_mountain_range', the game will look for tb_mountain_range_1.dds, tb_mountain_range_2.dds, and so forth, and cycle between them, in order to visually differentiate the interface.
Tile Backgrounds (which represent the colonized planet background image) follow a similar pattern to Tile Blockers (the numbers add flavor and variation to the displayed colonies).
The Planetary Modifiers are recognisable by their presence in the interface in planet view. The coloured ring around the modifier is determined by the line iconFrame = 1 within the text file where the planetary modifier is defined. The number determines whether a green, orange or red circle is displayed. Any input number above 5 will lead to a planetary modifier that does have a coloured ring.
Environments graphics are keyed by <planetclass>_ with two different extension types: 'sky' and 'l0'<1..N>. That's an 'Ell' and not a 'One'. So a valid environment set of files might be gaia_sky.dds, gaia_l01.dds, gaia_l02.dds, and so on.
References[編輯 | 編輯原始碼]