Hydromancerx
C2C Modder
Yikes! I will fix.
<BonusInfo>
<Type>BONUS_WINE</Type>
<Description>TXT_KEY_BONUS_WINE</Description>
<Civilopedia>TXT_KEY_BONUS_WINE_PEDIA</Civilopedia>
<BonusClassType>BONUSCLASS_GENERAL</BonusClassType>
<ArtDefineTag>ART_DEF_BONUS_WINE</ArtDefineTag>
<TechReveal>TECH_GRAIN_GATHERING</TechReveal>
<TechCityTrade>TECH_GRAIN_GATHERING</TechCityTrade>
<TechObsolete>NONE</TechObsolete>
<YieldChanges>
<iYield>0</iYield>
<iYield>0</iYield>
<iYield>1</iYield>
</YieldChanges>
<iAITradeModifier>2</iAITradeModifier>
<iAIObjective>0</iAIObjective>
<iHealth>0</iHealth>
<iHappiness>1</iHappiness>
<iPlacementOrder>3</iPlacementOrder>
<iConstAppearance>40</iConstAppearance>
<iMinAreaSize>3</iMinAreaSize>
<iMinLatitude>20</iMinLatitude>
<iMaxLatitude>50</iMaxLatitude>
<Rands>
<iRandApp1>25</iRandApp1>
<iRandApp2>25</iRandApp2>
<iRandApp3>0</iRandApp3>
<iRandApp4>0</iRandApp4>
</Rands>
<iPlayer>100</iPlayer>
<iTilesPer>0</iTilesPer>
<iMinLandPercent>0</iMinLandPercent>
<iUnique>0</iUnique>
<iGroupRange>1</iGroupRange>
<iGroupRand>25</iGroupRand>
<bArea>0</bArea>
<bHills>1</bHills>
<bFlatlands>1</bFlatlands>
<bNoRiverSide>0</bNoRiverSide>
<bNormalize>0</bNormalize>
<TerrainBooleans>
<TerrainBoolean>
<TerrainType>TERRAIN_GRASS</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
[COLOR="Red"][B]<FeatureTerrainBoolean>
<TerrainType>TERRAIN_LUSH</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>
<FeatureTerrainBoolean>
<TerrainType>TERRAIN_SCRUB</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>[/B][/COLOR]
</TerrainBooleans>
<FeatureBooleans />
<FeatureTerrainBooleans />
<bUseLSystem>1</bUseLSystem>
</BonusInfo>
From the schema:
<element type="bNormalize" minOccurs="0"/>
<element type="TerrainBooleans" minOccurs="0"/>
<element type="FeatureBooleans" minOccurs="0"/>
<element type="FeatureTerrainBooleans" minOccurs="0"/>
<element type="bUseLSystem" minOccurs="0"/>
<element type="PropertyManipulators" minOccurs="0"/>
looks like its in the WRONG place??? I am just guessing here![]()
<TerrainBooleans>
<TerrainBoolean>
<TerrainType>TERRAIN_GRASS</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
[COLOR="Red"]<FeatureTerrainBoolean>
<TerrainType>TERRAIN_LUSH</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>
<FeatureTerrainBoolean>
<TerrainType>TERRAIN_SCRUB</TerrainType>
<bFeatureTerrain>1</bFeatureTerrain>
</FeatureTerrainBoolean>[/COLOR]
</TerrainBooleans>
The preceding code points ranges contain the following controls which are only valid in certain contexts in XML 1.0 documents, and whose usage is restricted and highly discouraged:
- U+007FU+0084, U+0086U+009F: this includes a C0 control character and all but one C1 control.
Also to everyone please don't use those characters in Xml-Files.
Since you're not telling me how I would know if I was using them, I'm assuming it would be obvious...![]()
No it's not that obvious but since those are special characters i think you would know if you use them. I post some examples later because i can't do this with my phone.
I have never seen those in C2C??
My work on the Xsd-Schema is causing me alot
I wanted to update all the Xml files for the new Xsd-Schema and convert all of them to utf-8 but i have a little problem with invalid control characters used in alot GameText files. I have written a tool to edit all files at once but these invalid control characters get removed. I now have to find a way to replace them with allowed characters.
This is from http://en.wikipedia.org/wiki/Valid_characters_in_XML
Also to everyone please don't use those characters in Xml-Files.
Ok i found another big issue.
The game can't display unicode characters.
This means i won't convert the files and all files with unicode characters in them must be changed.
Also this issue still remains because the only way to use those characters in Xml is to replace them with unicode characters.
Jeez... I've never attempted to understand character issues to this depth but it really sounds like it's being a PAIN in the ARSE! I definitely appreciate your work on this subject though!
Am I correct in saying most of the character problems are coming from extended character map values necessary to be used in foreign language translations or do those odd letters have anything to do with this and it's just such simple things like ;,',",@,!,. etc...?
7F = U+007F : DELETE
80 = U+20AC : EURO SIGN
82 = U+201A : SINGLE LOW-9 QUOTATION MARK
83 = U+0192 : LATIN SMALL LETTER F WITH HOOK
84 = U+201E : DOUBLE LOW-9 QUOTATION MARK
86 = U+2020 : DAGGER
87 = U+2021 : DOUBLE DAGGER
88 = U+02C6 : MODIFIER LETTER CIRCUMFLEX ACCENT
89 = U+2030 : PER MILLE SIGN
8A = U+0160 : LATIN CAPITAL LETTER S WITH CARON
8B = U+2039 : SINGLE LEFT-POINTING ANGLE QUOTATION MARK
8C = U+0152 : LATIN CAPITAL LIGATURE OE
8E = U+017D : LATIN CAPITAL LETTER Z WITH CARON
91 = U+2018 : LEFT SINGLE QUOTATION MARK
92 = U+2019 : RIGHT SINGLE QUOTATION MARK
93 = U+201C : LEFT DOUBLE QUOTATION MARK
94 = U+201D : RIGHT DOUBLE QUOTATION MARK
95 = U+2022 : BULLET
96 = U+2013 : EN DASH
97 = U+2014 : EM DASH
98 = U+02DC : SMALL TILDE
99 = U+2122 : TRADE MARK SIGN
9A = U+0161 : LATIN SMALL LETTER S WITH CARON
9B = U+203A : SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
9C = U+0153 : LATIN SMALL LIGATURE OE
9E = U+017E : LATIN SMALL LETTER Z WITH CARON
9F = U+0178 : LATIN CAPITAL LETTER Y WITH DIAERESIS
The characters that Civ IV can display are held in the game font files in assets/res/gamefont.tga and gamefont_75.tga. I have no idea how these are used and the game font editor by Asaf does not work with that region of the file. I do know that you can screw up all the fonts if you place something even one pixel out of alignment.
Civ4 uses wide characters that are displayed as a mixture of TTF and bitmap font. Depending on the language version of Civ4 the part of the TTF that is visible (or even present in the font) varies. So while most UI functions ingame expect unicode characters, most are not displayed, some are mapped from the gamefont TGA and some are only visible in certain language versions.
<German>Der Haastadler (Harpagornis moorei) war der größte Greifvogel der Neuzeit. Er war auf der Südinsel Neuseelands heimisch, wo er hauptsächlich Moas und andere große flugunfähige Vögel jagte. Haastadler erreichten eine enorme Spannweite von 3 Metern und ein Gewicht von 10[COLOR="Red"]–[/COLOR]18 kg. Trotz ihres riesigen Körpers konnten sie im Sturzflug Geschwindigkeiten bis zu 80 km/h erreichen, was ihrer Beute ein Entkommen nahezu unmöglich machte.[PARAGRAPH:2]Es wird heute angenommen, dass er bei der Besiedlung Neuseelands von den Vorfahren der heutigen Māori als Menschenfresser gefürchtet und im Gegensatz zu seinen Beutetieren gezielt ausgerottet wurde. Aber auch das Verschwinden seiner Hauptbeute und die Abholzung seines Lebensraums trugen dazu bei, dass er wohl im Laufe des 15. Jahrhunderts ausstarb.</German>
Well, it is possible to add some characters to the TGA font and remap those characters to the range that belongs to the TGA font during XML reading. You could also display a warning for all non displayable characters then.Thanks for the infomy version of the game can't display those special characters if they are unicode and i can't test it with other laguage versions. I quess the asian versions only include the additional characters needed for those languages.
This means we should not encode GameText XML-Files with utf-8 and i saw some usages of numeric character references e.g. '–' there is no point in using them beacause the game won't display it.
Code:<German>Der Haastadler (Harpagornis moorei) war der größte Greifvogel der Neuzeit. Er war auf der Südinsel Neuseelands heimisch, wo er hauptsächlich Moas und andere große flugunfähige Vögel jagte. Haastadler erreichten eine enorme Spannweite von 3 Metern und ein Gewicht von 10[COLOR="Red"]–[/COLOR]18 kg. Trotz ihres riesigen Körpers konnten sie im Sturzflug Geschwindigkeiten bis zu 80 km/h erreichen, was ihrer Beute ein Entkommen nahezu unmöglich machte.[PARAGRAPH:2]Es wird heute angenommen, dass er bei der Besiedlung Neuseelands von den Vorfahren der heutigen Māori als Menschenfresser gefürchtet und im Gegensatz zu seinen Beutetieren gezielt ausgerottet wurde. Aber auch das Verschwinden seiner Hauptbeute und die Abholzung seines Lebensraums trugen dazu bei, dass er wohl im Laufe des 15. Jahrhunderts ausstarb.</German>
Well, it is possible to add some characters to the TGA font and remap those characters to the range that belongs to the TGA font during XML reading. You could also display a warning for all non displayable characters then.
AS StrategyOnly pointed out to me in a PM, some mods have multiple XML files for the same object in the core area eg in Assets/XML/Units they may have Land_CIV4UnitInfos.XML, Naval_CIV4UnitInfos.XML and Air_CIV4UnitInfos.XML which are treated as if they were the usual one CIV4UnitInfos.XML file. We can't at the moment.
It would be useful if we could split the units file up a bit so that different people don't trip over each other when making updates. I could even move most of the Subdue Animals mod into core!
How difficult would it be to allow this? I am not expecting it for the next release or anything.