Hi all,
im in the process of writing a guide about how to include new resources into the game.
So far i'm quite sucessful and got the following working:
- Resource in the Civopedia
- Resource distributed on the map
- (Custom) Resource-Icons showing in the Tech-Tree, Civopedia, and on the Map
- Resource Usable, Improvable, and Consumable
For this i had to mod some .lua files which came with the game, even made one modular (not the AssignStartingPlots yet - thats a big one) so with that change all resources added in the future should work without any further customizations of lua.
But now i want to show the resource icon in the TopPanel.
Currently all i get is a white dot.
TopPanel.lua excerpt:
Thats around line 162.
The pResource.IconString is defined in the Resource.xml and looks something like [ICON_RES_XYZ]
The internal lookup is obviously stored in CivVIconFontMapping.xml
For Iron it looks something like this
But _nowhere_ i am able to specify which .dds file that IconFontMapping should use.
I wanted to make this modular, but i also can't find the function definition of Locale.ConvertTextKey anywhere.
The only thing i found was a file called "icudt44l.dat" in the "/Locale" directory ... and i hope its not in there, cause that one looks encrypted.
Has anyone more information on this? Thats the last step of including a new resource successfully i need.
Thanks in advance
PS: I will create a full tutorial on the steps i did so far soon.. have to sleep now
im in the process of writing a guide about how to include new resources into the game.
So far i'm quite sucessful and got the following working:
- Resource in the Civopedia
- Resource distributed on the map
- (Custom) Resource-Icons showing in the Tech-Tree, Civopedia, and on the Map
- Resource Usable, Improvable, and Consumable
For this i had to mod some .lua files which came with the game, even made one modular (not the AssignStartingPlots yet - thats a big one) so with that change all resources added in the future should work without any further customizations of lua.
But now i want to show the resource icon in the TopPanel.
Currently all i get is a white dot.
TopPanel.lua excerpt:
Code:
if (bShowResource) then
local text = Locale.ConvertTextKey(pResource.IconString);
The pResource.IconString is defined in the Resource.xml and looks something like [ICON_RES_XYZ]
The internal lookup is obviously stored in CivVIconFontMapping.xml
For Iron it looks something like this
Code:
<Row>
<IconName>ICON_RES_IRON</IconName>
<IconMapping>10</IconMapping>
</Row>
But _nowhere_ i am able to specify which .dds file that IconFontMapping should use.
I wanted to make this modular, but i also can't find the function definition of Locale.ConvertTextKey anywhere.

The only thing i found was a file called "icudt44l.dat" in the "/Locale" directory ... and i hope its not in there, cause that one looks encrypted.
Has anyone more information on this? Thats the last step of including a new resource successfully i need.
Thanks in advance
PS: I will create a full tutorial on the steps i did so far soon.. have to sleep now
