Unit flags appear as settlers in worldbuilder

j_mie6

Deity
Joined
Dec 20, 2009
Messages
2,963
Location
Bristol (uni)/Swindon (home)
I added a new unit graphic to my mod this morning and in the worldbuilder (and presumably the strategic layer, but I didn't test that) the flag shows up as the settler flag (whereas the flag is set to the missionary flag and appears as such in-game)

What could the problem be here?

here are my art defines and how the unit is defined:

Spoiler :
Code:
<ArtDefine_UnitInfos>
		<Row>
			<Type>ART_DEF_UNIT_MISSIONARY_BUDDHIST</Type>
			<DamageStates>1</DamageStates>
			<Formation>EarlyGreatArtist</Formation>
		</Row>
	</ArtDefine_UnitInfos>

<ArtDefine_UnitInfoMemberInfos>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_MISSIONARY_BUDDHIST</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MISSIONARY_BUDDHIST</UnitMemberInfoType>
			<NumMembers>1</NumMembers>
		</Row>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_MISSIONARY_BUDDHIST</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MISSIONARY_BUDDHIST_01</UnitMemberInfoType>
			<NumMembers>1</NumMembers>
		</Row>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_MISSIONARY_BUDDHIST</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MISSIONARY_BUDDHIST_02</UnitMemberInfoType>
			<NumMembers>1</NumMembers>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>
	<ArtDefine_UnitMemberInfos>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_MISSIONARY_BUDDHIST</Type>
			<Scale>0.12</Scale>
			<Model>buddhist_missionary.fxsxml</Model>
			<MaterialTypeTag>CLOTH</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>FLESH</MaterialTypeSoundOverrideTag>
		</Row>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_MISSIONARY_BUDDHIST_01</Type>
			<Scale>0.12</Scale>
			<Model>buddhist_missionary_01.fxsxml</Model>
			<MaterialTypeTag>CLOTH</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>FLESH</MaterialTypeSoundOverrideTag>
		</Row>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_MISSIONARY_BUDDHIST_02</Type>
			<Scale>0.12</Scale>
			<Model>buddhist_missionary_02.fxsxml</Model>
			<MaterialTypeTag>CLOTH</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>FLESH</MaterialTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberInfos>

Code:
		<Row>
			<Class>UNITCLASS_MISSIONARY</Class>
			<Type>UNIT_NEPALESE_MONK</Type>
			<Cost>-1</Cost>
			<FaithCost>150</FaithCost>
			<Moves>4</Moves>
			<Capture>UNITCLASS_MISSIONARY</Capture>
			<CivilianAttackPriority>CIVILIAN_ATTACK_PRIORITY_LOW</CivilianAttackPriority>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_MISSIONARY</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_NEPALESE_MONK</Description>
			<Civilopedia>TXT_KEY_CIV5_NEPALESE_MONK_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_NEPALESE_MONK_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_NEPALESE_MONK</Help>
			<AdvancedStartCost>-1</AdvancedStartCost>
			<CombatLimit>0</CombatLimit>
			<SpreadReligion>true</SpreadReligion>
			<ReligionSpreads>2</ReligionSpreads>
			<ReligiousStrength>1000</ReligiousStrength>
			<UnitArtInfo>ART_DEF_UNIT_MISSIONARY_BUDDHIST</UnitArtInfo>
			<UnitFlagAtlas>EXPANSION_UNIT_FLAG_ATLAS</UnitFlagAtlas>
			<UnitFlagIconOffset>20</UnitFlagIconOffset>
			<IconAtlas>EXPANSION_UNIT_ATLAS_1</IconAtlas>
			<PortraitIndex>20</PortraitIndex>
		</Row>
 
example from one of my mods for strategic view 'flag':
Code:
	<ArtDefine_StrategicView>
		<Row>
			<StrategicViewType>ART_DEF_UNIT_KNIGHT_TEMPLAR</StrategicViewType>
			<TileType>Unit</TileType>
			<Asset>Knights_32.dds</Asset>
		</Row>
	</ArtDefine_StrategicView>
I think settler is the unit '0' in terms of the unit ID #s, so it may be acting as the default when nothing is specified. (I could also be FOP on this)
 
ahhh... I forgot the strategic flag! Funny, I remembered for all the other units
 
*headsmack* Of course you're aware of that table.:)

BTW I use your XML-checker quite often when I've added a bunch of rows in a mod and I want to root out all those annoying typos.
 
awesome :D good to know somebody is using it! I do the same thing, as soon as I am ready to test my changes I run the checker first, so I don't have to keep reloading :) How's the runtime on it, is it fairly fast or slow or?
 
it took 10-15 seconds, maybe, to run through the database and then check through my mod where I'm adding about 300 new rows to the <Unit_UniqueNames> table. Though I did see a bunch of missing reference error listings for stuff (I assume was ) related to mods that were active last time I ran the game with mods active, but none of which is stuff located within my mod.
 
that is a bit weird... The tool only reads the game's xml, not the altered database so it should only load the data in the main game and your mod... By 15 seconds do you mean for the first run or every run? it should take around 15 seconds to do the base game AND your mod, then around 1 second every successive time
 
That was total time. I haven't used it for a couple of weeks since it's taken me that long to get my mod put together to the point where I have enough new Rows where I need a tool to help me find any typos.

with a simple-simple mod, after I had already run on my more complex mod, I got this (which is correct because I know that mod has no errors in it)
Code:
Running: C:\Users\Lee\Documents\Firaxis ModBuddy\BuildingFaithBuys\Build

Loading cache
Eliminating base game requires errors

Checking for dependencies
0 dependencies found

Calculating number of files
Loading 1 mod files

Finding reference errors
Finding requires errors
Checks complete

Execution Time: 2969ms

With the other mod (add 300-odd rows) I'm adding a column to the <Unit_UniqueNames> table in SQL, then adding rows in the <Unit_UniqueNames> table and the <Language_en_US> table for all my new unique great general and admiral names. What I am seeing in the XML checker is an error message listing (I think) every single TXT_KEY reference that exists within the game database, but nothing related to anything within my mod. I'm assuming the extra column is the root of the problem. The listing is too big I think to throw into a single forum post, but I saved all that text to a notepad file.
 
Top Bottom