Religion Font Icons not showing up

Karatekid5

Warlord
Joined
Nov 11, 2012
Messages
197
Location
Pennsylvania
For one of my custom Civilizations, I was able to get a custom religion up and running. Most of it seems to be working fine. Though, the one problem is that the religion's font icon isn't showing up. I based the XML off of a simple religion XML from another mod, and I don't get any sort of errors. I also checked for typos several times and I didn't notice any. Both the Font Icon dds and the GGXML file are set to VFS = True.


XML:
Code:
<GameData>
	<Religions>
		<Row>
			<Type>RELIGION_RAOCOWISM</Type>
			<Description>TXT_KEY_RELIGION_RAOCOWISM</Description>
			<Civilopedia>TXT_KEY_RELIGION_RAOCOWISM_PEDIA</Civilopedia>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</IconAtlas>
			<IconString>[ICON_RELIGION_RAOCOWISM]</IconString>
		</Row>
	</Religions>
	<IconFontTextures>
		<Row>
			<IconFontTexture>ICON_FONT_TEXTURE_RAOCOWISM</IconFontTexture>
			<IconFontTextureFile>RaocowFontIcons</IconFontTextureFile>
		</Row>
	</IconFontTextures>
	<IconFontMapping>
		<Row>
			<IconName>ICON_RELIGION_RAOCOWISM</IconName>
			<IconMapping>1</IconMapping>
			<IconFontTexture>ICON_FONT_TEXTURE_RAOCOWISM</IconFontTexture>
		</Row>
	</IconFontMapping>
	<IconTextureAtlases>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>128</IconSize>
			<Filename>RaocowAlpha128.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>80</IconSize>
			<Filename>RaocowAlpha80.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>64</IconSize>
			<Filename>RaocowAlpha64.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>48</IconSize>
			<Filename>RaocowAlpha48.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>32</IconSize>
			<Filename>RaocowAlpha32.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>24</IconSize>
			<Filename>RaocowAlpha24.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>16</IconSize>
			<Filename>RaocowAlpha16.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
		<Row>
			<Atlas>RELIGION_ATLAS_ALPHA_RAOCOWISM</Atlas>
			<IconSize>22</IconSize>
			<Filename>RaocowReligionFontIcons22.dds</Filename>
			<IconsPerRow>1</IconsPerRow>
			<IconsPerColumn>1</IconsPerColumn>
		</Row>
	</IconTextureAtlases>

	<Language_en_US>
		<Row Tag="TXT_KEY_RELIGION_RAOCOWISM">
			<Text>Raocowism</Text>
		</Row>
		<Row Tag="TXT_KEY_RELIGION_RAOCOWISM_PEDIA">
			<Text>It's a thing! Raocow got himself a religion now!</Text>
		</Row>
	</Language_en_US>
</GameData>


GGXML
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<glyphgen>
	<textures width="22" height="22">
		<texture name="" src="RaocowReligionFontIcons22.dds" allowcolor="1" alloweffects="1" inuse="1" />
	</textures>
	<styles count="1">
		<style name="">
			<layers count="1">
				<layer tex="" />
			</layers>
		</style>
	</styles>
	<glyphs fudgeadv="0" ascadj="-6" spacing="0" count="25" height="0" ascent="0" descent="0">
		<glyph ch="1" u="0" v="0" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="2" u="22" v="0" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="3" u="44" v="0" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="4" u="66" v="0" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="5" u="88" v="0" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="6" u="0" v="22" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="7" u="22" v="22" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="8" u="44" v="22" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="9" u="66" v="22" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="10" u="88" v="22" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="11" u="0" v="44" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="12" u="22" v="44" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="13" u="44" v="44" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="14" u="66" v="44" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="15" u="88" v="44" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="16" u="0" v="66" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="17" u="22" v="66" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="18" u="44" v="66" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="19" u="66" v="66" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="20" u="88" v="66" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="21" u="0" v="88" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="22" u="22" v="88" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="23" u="44" v="88" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="24" u="66" v="88" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
		<glyph ch="25" u="88" v="88" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
	</glyphs>
	<imports />
	<toolonly>
		<metainfo pt="0.000000" width="256" height="256" alphabias="64" maxsize="256" bestfit="0" pow2="1" freetype="2" fontsrc="" />
		<glyphsets>
			<set name="GlyphSetAscii" />
		</glyphsets>
	</toolonly>
</glyphgen>
 
You appear to have a mis-match between the dds file referred to in the ggxml file (src="RaocowReligionFontIcons22.dds") and the base name of the dds/ggxml files refrered to in the IconFontTextures entry (<IconFontTextureFile>RaocowFontIcons</IconFontTextureFile>)
 
I changed the value of <IconFontTextureFile> to "RaocowReligionFontIcons22" and rebuilt the solution, but the font icon in-game still appears blank.

I attached the DDS file for the font icon (inside the zip file) in case that might be the cause.

EDIT: I fixed it! :D It seems that the DDS file was the problem. I originally exported the Icon in DXT5 compression in Paint.NET. This time I opened the 128 Alpha icon in GIMP, resized it to 22x22, and exported as a DDS uncompressed. Seems like it fixed the problem!
I originally had a feeling that it was the DDS since there were no log or in-game errors, but I wanted to post the code here just to make sure. Thank you very much! :)
 

Attachments

  • Font Icon.zip
    451 bytes · Views: 41
Best to attach the entire mod (see 2nd link in my sig) rather than abstract parts of it
 
I know that, and I usually do when asked, but since only a couple of files were involved, I didn't think it would've been needed. Either way I figured out the source of the problem, so we won't need to do that ^^ .
Though, for the future, what's the best way to export DDS files? Would DXT5 in Paint.NET be preferred or exporting uncompressed from GIMP?
 
Either way I figured out the source of the problem

Care to enlighten us ... for others coming along afterwards with a similar problem who may find the info useful.

what's the best way to export DDS files? Would DXT5 in Paint.NET be preferred or exporting uncompressed from GIMP?

The DXT algorithms are lossy, and so best used for large images where slight loss of detail/bluring is unnoticable. In situations where you have defined lines (eg icons) RGBA8 is loss-less, so will retain all the sharp detail.
 
Top Bottom