Icon modding

本页面部分全部内容上次核对于2.0版本
(重定向自Interface Icons


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[编辑 | 编辑源代码]


帝国 帝国思潮政府 • 国民理念 • 起源承诺议程传统 • 飞升天赋法令政策遗珍科技自定义帝国
人口 岗位派系
领袖 领袖领袖特质
物种 物种物种特质
行星 行星行星特征 • 轨道矿藏建筑 • 区划行星决议
星系 星系恒星基地巨型结构虫洞 • 星门地图
舰队 舰队舰船 • 部件
地面战 陆军轰炸姿态
外交 外交 • 联邦 • 星海共同体评价修正宣战理由 • 战争目标
事件 事件异常现象特殊项目考古遗址
游玩 游玩定义研究 • 经济游戏开局
动态修改 动态指令效果触发条件作用域修正变量AI
媒体/本地化 Maya 导出器图形肖像旗帜事件图片界面图标音乐本地化
Other 控制台命令存档编辑Steam 创意工坊模组制作教程