Trouble with UnitArtStyleTypeInfo

OzzyKP

Deity
Joined
Dec 16, 2000
Messages
2,044
Location
Washington, DC USA
If I add a new unit as a unique unit it works fine. But if I make that same unit a flavor unit (using the unitstyletypeinfos file) then I get a crash. Very odd.

What am I doing wrong?

I change the following three files:

CIV4UnitArtStyleTypeInfos.xml
CIV4CivilizationInfos.xml
CIV4ArtDefines_Unit.xml

Is that it? Am I leaving something out? I don't get it. I don't get an XML error either, just a crash about 20-30 turns into the game.
 
Are you putting these adjusted files in a Modules folder? If so, the "Schema" files of the 3 you mentioned are needed in this folder.
 
well theres also the civ4unitinfos.xml, but thats just 1 line per unit... simply re-directing to the artdefines_unit.xml....

I've had similar problems, so I just erased all the unit art style stuff for now. I may go back and look at it more, but as of now I don't know how to fix it.
 
well theres also the civ4unitinfos.xml, but thats just 1 line per unit... simply re-directing to the artdefines_unit.xml....
YOU DO NOT TOUCH THE CIV4UNITINFOS.XML OR THE CIV4CIVILIZATIONINFO.XML IF YOU ARE JUST DOING FLAVOR UNITS.

The ONLY files you touch are the Civ4artdefines_unit.xml and the CIV4UnitArtStyleTypeInfos.xml.

If you mess with the CIV4UnitInfos.xml or the CIV4CivilizationInfos.xml for flavor units, you're going about it all wrong.

Create an entry in the Civ4artdefines_unit.xml, and then referance that entry in the CIV4UnitArtStyleTypeInfos.xml. That's it... no more no less... any other file altering will lead to a crash.
 
You need to edit CIV4CivilizationInfos.xml so the civ actually has the flavor you are uploading units for.

Unless there is some other magical way of making sure the Mexico civ is using the Mexican art style that was created.
Okay... you're asking for help, you can't get it to work, and I'm telling you how it's done...

Then you tell me I'm wrong.

Okay whatever... guess the couple-hundred custom flavor units I have in my mod, working just fine, I did all wrong...

Guess I should have modified the CIV4CivilizationInfos.xml all along... funny... I never modified it ONCE for any of my flavor units and all my flavor units worked just fine.

You're confusing flavor units with Unique Units... you only modify the CIV4CivilizationInfos.xml for UU, NOT FOR FLAVOR UNITS.

If you want to do FLAVOR UNITS, you ONLY modify TWO files... NOT THREE. You create an entry in the Civ4artdefines_unit.xml, and then referance that entry in the CIV4UnitArtStyleTypeInfos.xml... nothing more... but I guess you can keep referencing them in the CIV4CivilizationInfos.xml, since you're having such success with that!

But whatever... do what you want... I tried to help and you're telling me I'm wrong.

Oh... and I speak of the UNIT ITSELF... I know you can change Germany from "European" to "German", but I'm talking about adding the flavor unit... and the UNIT does NOT get changed in the CIV4CivilizationInfos.xml. I'm only talking about adding flavor units, and you can do that without ever touching the CIV4CivilizationInfos.xml... you can use that file to narrow a flavor down (from European to German), but it's still not unit-specific.

If you narrowed the cateogry itself down (from European to German), the only thing I would do is copy the European Entry in CIV4UnitArtStyleTypeInfos.xml and rename it from "European" to "German"...

Still, when adding flavor units themselves, you're only modifying TWO files, not three.
 
Wow, quite the attitude. Yikes.

If CivInfo is never touched, what do you put here?

Code:
			<Type>CIVILIZATION_UNION</Type>
			<Description>TXT_KEY_CIV_UNION_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_UNION_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_UNION_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_UNION_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_UNION</ArtDefineTag>
			[b]<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<UnitArtStyleType>NONE</UnitArtStyleType>[/b]
			<bPlayable>1</bPlayable>
			<bAIPlayable>1</bAIPlayable>
 
Wow, quite the attitude. Yikes.

If CivInfo is never touched, what do you put here?

Spoiler :
Code:
			<Type>CIVILIZATION_UNION</Type>
			<Description>TXT_KEY_CIV_UNION_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_UNION_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_UNION_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_UNION_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_UNION</ArtDefineTag>
			[b]<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<UnitArtStyleType>NONE</UnitArtStyleType>[/b]
			<bPlayable>1</bPlayable>
			<bAIPlayable>1</bAIPlayable>

Wow, quite the attitude for someone asking for help from others... I don't need the help... YOU DO... and you copped an attitude with someone trying to help you.

Spoiler :
Code:
			<Type>CIVILIZATION_UNION</Type>
			<Description>TXT_KEY_CIV_UNION_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_UNION_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_UNION_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_UNION_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_UNION</ArtDefineTag>
			[b]<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<UnitArtStyleType>UNIT_ARTSTYLE_EUROPEAN</UnitArtStyleType>[/b]
			<bPlayable>1</bPlayable>
			<bAIPlayable>1</bAIPlayable>

Looks to me like you've already messed with it... for starters, by default, it's listed as I listed it above (UNIT_ARTSTYLE_EUROPEAN)... you don't need to change this file to get flavor units... you only mess with this file if you want to narrow the flavor unit category down further...

As I previously mentioned, messing with this file has nothing to do with actually adding a flavor unit, which is what you asked. Each time you add a flavor unit, you modify TWO files, not three.

So long as this bold line:

Spoiler :
Code:
<StyleUnit>
					<UnitType>UNIT_WARRIOR</UnitType>
					<UnitMeshGroup>
						<EarlyArtDefineTag>[B]ART_DEF_UNIT_WARRIOR_GERMAN[/B]</EarlyArtDefineTag>
						<LateArtDefineTag>ART_DEF_UNIT_WARRIOR_GERMAN</LateArtDefineTag>
						<MiddleArtDefineTag>ART_DEF_UNIT_WARRIOR_GERMAN</MiddleArtDefineTag>
					</UnitMeshGroup>
				</StyleUnit>

Matches this bold line...

Spoiler :
Code:
		<UnitArtInfo>
			<Type>[B]ART_DEF_UNIT_WARRIOR_GERMAN[/B]</Type>
			<Button>,Art/Interface/Buttons/Units/Warrior.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,2,1</Button>
			<fScale>0.44</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>0</bActAsAir>
			<NIF>Art/Units/German/Warrior/Warrior.nif</NIF>
			<KFM>Art/Units/Warrior/Warrior.kfm</KFM>
			<SHADERNIF>Art/Units/German/Warrior/Warrior_FX.nif</SHADERNIF>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>1.0</fShadowScale>
			</ShadowDef>
			<fBattleDistance>0.35</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bActAsRanged>0</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
		</UnitArtInfo>

You've got what you need...
 
You were the first one to come in here with an attitude. Yelling at Shiggs and I like we are idiots.

And I don't understand what your point is with the civinfos.

Your own mod has an edited civ infos. Here is the unit you were using in your example:

Code:
		<UnitArtStyleTypeInfo>
			[B]<Type>UNIT_ARTSTYLE_GERMAN</Type>[/B]
			<StyleUnits>
				<StyleUnit>
					<UnitType>UNIT_WARRIOR</UnitType>
					<UnitMeshGroup>
						<EarlyArtDefineTag>ART_DEF_UNIT_WARRIOR_GERMAN</EarlyArtDefineTag>
						<LateArtDefineTag>ART_DEF_UNIT_WARRIOR_GERMAN</LateArtDefineTag>
						<MiddleArtDefineTag>ART_DEF_UNIT_WARRIOR_GERMAN</MiddleArtDefineTag>
					</UnitMeshGroup>
				</StyleUnit>

You then edited civinfos so the German civ would use the German artstyle, seems logical to me. That is all I was doing. I don't see what you keep yelling about. I did what you did:

Code:
		<CivilizationInfo>
			<Type>CIVILIZATION_GERMANY</Type>
			<Description>TXT_KEY_CIV_GERMANY_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_GERMANY_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_GERMANY_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_GERMANY_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_DARK_GRAY</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_GERMANY</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			[B]<UnitArtStyleType>UNIT_ARTSTYLE_GERMAN</UnitArtStyleType>[/B]
			<bPlayable>1</bPlayable>
 
It's clear you don't want help... I keep pointing out what you need to do to add flavor units, and you keep talking about my attitude.

Okay... well, I'll let the crickets help you out in this thread then.
 
I tell you what put a copy here (if your having the same problem)or PM me, i will look at it ok, and you'll are all right, Wolf is right if all you want to do is flavor, but if you want to change the Number (#) of units in the game is the only reason you mess with civinfo (if the civ is already in the game) besides the artstyle line in it.
I have tons and tons of civs just see signature.
If you still need help, just let me know ok, i am always willing to help people on CFC, OK!!!
Remember "Just to Have Fun."
 
wow this really blew up. Thanks for the pointers Wolfshanze and stategyonly, and yes, you don't need to yell like we're idiots because of a simple mistake. In fact you made a mistake as well, telling us you never edited the civilizationinfos, when in fact you did.
 
Back
Top Bottom