Modding GFX
Images
Depending on the GFX type, the game engine will render sprites differently:
Simple - Scales the whole sprite equally.
spriteType = {
name = "GFX_main_bg"
texturefile = "gfx\\interface\\main_bg.dds"
}
Sliced - Utilises the 3x3 sprite division so that resizing does not distort corners and only the center part is stretched.
corneredTileSpriteType = {
name = "diplo_dialog"
size= {x=190 y=310 }
textureFile ="gfx\\interface\\tiles_dialog_diplo.tga"
borderSize = { x=94 y=94 }
}
Tiled - Similar to Sliced, but tiles (repeats) the center part rather than stretching it. For sprites with no borders at all, the entire sprite is tiled.
corneredrepeatpritetype = {
name = "GFX_wallpaper_background"
size = { 256 256 }
texturefile = "assets\\wallpaper256.png"
borderSize = { 0 0 }
}
Maskedshieldtype is a special type that is used to render flag of a nation inside a mark of particular form (circle or shield):
maskedShieldType = {
name = "GFX_minishield_small"
textureFile1 = "gfx\\interface\\minishield_small.tga"
textureFile2 = "gfx\\interface\\minimask_small.tga"
effectFile = "gfx\\FX\\maskedflag.fx"
}
tilespritetype and textSpriteType have no special logic associated with them. scrollingsprite is not parsed.
Progress bar
progressbartype = {
name = "GFX_morale_progress_small"
color = { 0.0 0.5 0.0 }
colortwo = { 1.0 0.0 0.0 }
textureFile1 = "gfx\\interface\\morale_progress_small1.tga"
textureFile2 = "gfx\\interface\\morale_progress_small2.tga"
size = { x = 24 y = 6 }
effectFile = "gfx\\FX\\progress.fx"
}
Barcharts
BarChartType = {
name = "GFX_pop_item_chart"
size = { x=40 y=40 }
}
Piecharts
PieChartType = {
name = "GFX_pop_distribution_chart"
size = 35
}
Linecharts
LineChartType = {
name = "GFX_topbar_linechart"
size = { x = 97 y = 26 }
linewidth = 2
allwaystransparent = yes
}