After some experimentation I have come back to answer the original questions.
- Do you think it's possible to call a letter from this file like you call an icon ?
You don't have to concern yourself with how to call the letters themselves. Just make sure the game gets the right int.
Code:
bool CvGameText::read(CvXMLLoadUtility* pXML)
In here there is
setText(wszTextVal);
What you want to do is to modify wszTextVal before setText(). wszTextVal is a wstring, but in this case view it as an array of shorts (16 bit ints). If wszTextVal[4] = 8562, then the icon in slot with ID 8562 is displayed. If this is a letter, then it will print a letter.
I would recommend looking at (copying)
static CvWString convertString(CvWString wszTextVal) in Medieval Conquest. It converts UTF-8 Russian characters into GameFont.tga IDs. It just needs to be told the ID of the first letter. M:C also contain a tga file with the complete Russian alphabet. One reason why copying the code is attractive is because modifying the string with numbers like that resulted in funny issues like it added a space between every single Russian character. I have fixed those issues with a bit of creativity.
The ID of the first slot is 8483 and increase one at a time. It goes row by row (left to right). Sometimes it skips empty slots. An easy solution is to use GameFontEditor to fill all slots. I have plenty of smilies to ensure everything stays at the right locations.
Be warned however. The exe appears to assume certain icons, such as BULLET_CHAR to be at specific IDs.
- Is there a limit of slot in this file ?
276
For some reason this is the number of different icons the city billboards can handle. Any higher than that and it becomes questionmarks. This goes for both name/production and icons on top of the billboard.
It doesn't look like there is a limit besides this. That mean if you have icons you only use in python pages (city screen, pedia, etc), then place those icons after the 276 threshold.
If you are picky about what you put into those 276 slots and only add those icons you actually need for the billboards, then 276 appears to be plenty. It would however be a problem to add Japanese (2140 characters) or Chinese (even more). For comparison Russian has 64 characters and that is for both upper and lowercase.