artstyles

CivLucas

Governor-General
Joined
Jun 14, 2009
Messages
92
Location
Nijmegen, the Netherlands
Hey I have a modding question:
If I want to create a new artstyle (Like European, South American and such), which xml files do I have to change and what artfiles (i'll get them from civ4) do I need?. And is it possible to change the city artstyles too?
thanks in advance.
 
Hey CivLucas,

By Artstyles I guess you mean Civ specific and/or unique Units, Buildings, Improvements and Citysets?

As for the Units, I suggest you look at Deliverator's BLU Mod to see how and what he has done cause I can't really help you here... What I can help you with is for the Buildings, Improvements and Citysets.

First, look for Artstyles, Citystyles and Citysets in the Civ4 - Graphics Modpacks thread, you'll find some good ones there and you can also see how they added those.

As for the XML, let's say you want to add a new artsyle for the Spanish and that you've found a Cityset specific for them. Here's what you will need to do:

1. Put your new art files in your mod's "Assets\Art\Structures\Cities" folder.

2. You need to add a new ArtStyleType in the GlobalTypes.xml like this:
Code:
	<ArtStyleTypes>
		<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
		<ArtStyleType>[COLOR="Red"]ARTSTYLE_SPANISH[/COLOR]</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_EAST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_WEST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_SOUTH</ArtStyleType>
	</ArtStyleTypes>

3. In the CIV4CivilizationInfos.xml, change the Spain Civ ArtStyleType to ARTSTYLE_SPANISH

4. Next thing you need to do is edit the CIV4CityLSystem.xml. You need to add your artstyle and path to the nif files for each Leaf LNode you find there. This can be alot of work so I wont get into details, but the best is to simply copy/paste one already existing and change it for your new Artstyle. Also, be careful about Eras too...

5. If you're adding a Native Artstyle, you may want a "LandWorked" improvement that fits your style. To do that, no need to edit the CIV4ImprovementInfos.xml or the CIV4ArtDefines_Improvement.xml, just open your Mod's CIV4PlotLSystem.xml and look for "LandWorked". You'll find one "goal:IMPROVEMENT_LAND_WORKED" for each Artstyles there. Like for the CIV4CityLSystem.xml, copy/paste one and edit it to you Artstyle's name. As for the nif building model, you want to link a node that is 1x1 from your Cityset. Like for the Asian.nif from Warlord your using, I would choose this one (see Thumbnails for pic):

Code:
<Attribute Class="Scalar">NIF:Art/Structures/Cities/[COLOR="Red"]Asian.nif::1x1_05[/COLOR]</Attribute>

Hope that'll help you, let me know if you have any questions...

Aymerick
 

Attachments

  • Asian_1x1_05.jpg
    Asian_1x1_05.jpg
    32.6 KB · Views: 343
Hey CivLucas,

By Artstyles I guess you mean Civ specific and/or unique Units, Buildings, Improvements and Citysets?

As for the Units, I suggest you look at Deliverator's BLU Mod to see how and what he has done cause I can't really help you here... What I can help you with is for the Buildings, Improvements and Citysets.

First, look for Artstyles, Citystyles and Citysets in the Civ4 - Graphics Modpacks thread, you'll find some good ones there and you can also see how they added those.

As for the XML, let's say you want to add a new artsyle for the Spanish and that you've found a Cityset specific for them. Here's what you will need to do:

1. Put your new art files in your mod's "Assets\Art\Structures\Cities" folder.

2. You need to add a new ArtStyleType in the GlobalTypes.xml like this:
Code:
	<ArtStyleTypes>
		<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
		<ArtStyleType>[COLOR="Red"]ARTSTYLE_SPANISH[/COLOR]</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_EAST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_WEST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_SOUTH</ArtStyleType>
	</ArtStyleTypes>

3. In the CIV4CivilizationInfos.xml, change the Spain Civ ArtStyleType to ARTSTYLE_SPANISH

4. Next thing you need to do is edit the CIV4CityLSystem.xml. You need to add your artstyle and path to the nif files for each Leaf LNode you find there. This can be alot of work so I wont get into details, but the best is to simply copy/paste one already existing and change it for your new Artstyle. Also, be careful about Eras too...

Hope that'll help you, let me know if you have any questions...

Aymerick


hey Aymerick, thanks for the good walkthrough. It was easier because for the natives you don't have eras. But there's still a problem.
I made an asian native artstyle, the city looks nice but around the cities with that artstyle strange houses appear.(I marked them with red circles here :) ) Is this because of the artfile? I took it from civ4: warlords.

 
hey Aymerick, thanks for the good walkthrough. It was easier because for the natives you don't have eras. But there's still a problem.
I made an asian native artstyle, the city looks nice but around the cities with that artstyle strange houses appear.(I marked them with red circles here :) ) Is this because of the artfile? I took it from civ4: warlords.

Glad I could help! Yeah it's not realy too complicated, even with Eras it's mostly Copy/Paste stuff...

For your problem, that would be the "LandWorked" improvement that needs to be define for your Artstyle.

I've edited my first post since TC01 has linked it in the tutorial index thread...

5. If you're adding a Native Artstyle, you may want a "LandWorked" improvement that fits your style. To do that, no need to edit the CIV4ImprovementInfos.xml or the CIV4ArtDefines_Improvement.xml, just open your Mod's CIV4PlotLSystem.xml and look for "LandWorked". You'll find one "goal:IMPROVEMENT_LAND_WORKED" for each Artstyles there. Like for the CIV4CityLSystem.xml, copy/paste one and edit it to you Artstyle's name. As for the nif building model, you want to link a node that is 1x1 from your Cityset. Like for the Asian.nif from Warlord your using, I would choose this one (see Thumbnails for pic):

Code:
<Attribute Class="Scalar">NIF:Art/Structures/Cities/[COLOR="Red"]Asian.nif::1x1_05[/COLOR]</Attribute>
 
4. Next thing you need to do is edit the CIV4CityLSystem.xml. You need to add your artstyle and path to the nif files for each Leaf LNode you find there. This can be alot of work so I wont get into details, but the best is to simply copy/paste one already existing and change it for your new Artstyle. Also, be careful about Eras too...

These Era's parameters are compulsory?

I mean, is this a default change for the colonies or does it change only because there is a prediction in the CityLSytem?

I'm asking for this because I'm adding a lot of cities' structures and some will be used for the colonies... as well as I've made some test with the East Indies, I know that, at least, in the beggining there is no problem, but I haven't played till the end of the game...

And what does the iBatchGroup atribute change? I know that the value is 1 for the late colonies, but what does it means functionally?
 
These Era's parameters are compulsory?

I mean, is this a default change for the colonies or does it change only because there is a prediction in the CityLSytem?

Era parameters are compulsory. If you don't use them the graphic won't switch to a new one when the game enters a new era ingame, simple as that.

And what does the iBatchGroup atribute change? I know that the value is 1 for the late colonies, but what does it means functionally?

In Civ4, the iBatchGroup attribute checks which texture it uses for a cityset. There's a hardcoded limit of 2 different textures in each era. In practice this means you can use two .nif files, each with its own texture reference, in the same cityset in the same era.
 
Era parameters are compulsory. If you don't use them the graphic won't switch to a new one when the game enters a new era ingame, simple as that.

In Civ4, the iBatchGroup attribute checks which texture it uses for a cityset. There's a hardcoded limit of 2 different textures in each era. In practice this means you can use two .nif files, each with its own texture reference, in the same cityset in the same era.
Thanks GeoModder!

Hey CivLucas,

By Artstyles I guess you mean Civ specific and/or unique Units, Buildings, Improvements and Citysets?

As for the Units, I suggest you look at Deliverator's BLU Mod to see how and what he has done cause I can't really help you here... What I can help you with is for the Buildings, Improvements and Citysets.

First, look for Artstyles, Citystyles and Citysets in the Civ4 - Graphics Modpacks thread, you'll find some good ones there and you can also see how they added those.

As for the XML, let's say you want to add a new artsyle for the Spanish and that you've found a Cityset specific for them. Here's what you will need to do:

1. Put your new art files in your mod's "Assets\Art\Structures\Cities" folder.

2. You need to add a new ArtStyleType in the GlobalTypes.xml like this:
Code:
	<ArtStyleTypes>
		<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
		<ArtStyleType>[COLOR="Red"]ARTSTYLE_SPANISH[/COLOR]</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_EAST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_WEST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_SOUTH</ArtStyleType>
	</ArtStyleTypes>

3. In the CIV4CivilizationInfos.xml, change the Spain Civ ArtStyleType to ARTSTYLE_SPANISH

4. Next thing you need to do is edit the CIV4CityLSystem.xml. You need to add your artstyle and path to the nif files for each Leaf LNode you find there. This can be alot of work so I wont get into details, but the best is to simply copy/paste one already existing and change it for your new Artstyle. Also, be careful about Eras too...

5. If you're adding a Native Artstyle, you may want a "LandWorked" improvement that fits your style. To do that, no need to edit the CIV4ImprovementInfos.xml or the CIV4ArtDefines_Improvement.xml, just open your Mod's CIV4PlotLSystem.xml and look for "LandWorked". You'll find one "goal:IMPROVEMENT_LAND_WORKED" for each Artstyles there. Like for the CIV4CityLSystem.xml, copy/paste one and edit it to you Artstyle's name. As for the nif building model, you want to link a node that is 1x1 from your Cityset. Like for the Asian.nif from Warlord your using, I would choose this one (see Thumbnails for pic):

Code:
<Attribute Class="Scalar">NIF:Art/Structures/Cities/[COLOR="Red"]Asian.nif::1x1_05[/COLOR]</Attribute>

Hope that'll help you, let me know if you have any questions...

Aymerick
Good tutorial Aymerick, thanks!

Almost all of the cities structures from Cultural Citystyles v0.98 that you recommended worked well... they I'll miss only the africans, but the natives default can be used for them, but the free Ethiopia is going to miss it a lot...
(the attachment shows the result)

Well, now I'll try to work with some buildings and wonders from bts and I hope that I can use them with the miniminum lost, cos it will help me to make the environment...



Obrigado!
 

Attachments

  • Sem título.jpg
    Sem título.jpg
    430.1 KB · Views: 644
What kind of problems do you have with the African (and some other) set(s)? Texture? Shadow?
I'm asking because for instance for shadows it is better to remove it all from Civ4-imported graphics. It might clash with Colonization's auto-generated shadows.
 
What kind of problems do you have with the African (and some other) set(s)? Texture? Shadow?
I'm asking because for instance for shadows it is better to remove it all from Civ4-imported graphics. It might clash with Colonization's auto-generated shadows.
Hey GeoModder,
I tested 10 of the 'Cultural Citystyle': ren_eastern, ren_mediterranean, ren_eu, ren_rus*, med_norsca*, med_asian, med_SouthEastAsia, an_africa*, med_africa*, med_Japan.

These ones, marked with *, didn't show the city, most of them were invisible and all of the nine plots were like desert, and I think the an_africa were invisible too, but instead of the desert in the nine plots, only a road was shown in the plot where the city supposed to be... but in both situations it was like there was a city, with the name tag and an unit defending it...

Sorry for this explanation, I wouldn't be able to answer your question with texture or shadow terms, but you can see the result in my last attachment in this same thread, just before your question...

Something that I noticed is that it's better to use them as native lot, when you are adding them into CityLSystem, otherwise, each building you add changes the city to another style, radomly... But, for those which worked perfect, european buildings don't crash them, they act perfectly as if it was a default one...

Anyway, thanks again for the attention...
 
It sounds like you didn't add new artstyle tags in GlobalTypes.xml.

Check that file. Three paragraphs in you'll see stuff like "Artstyle_European" and three "Artstyle_Natives_[compass direction]". If there are no more artstyles, and you linked your new citysets to other tags then these four, they indeed wouldn't appear or pick randomly from a default artstyle.
 
It sounds like you didn't add new artstyle tags in GlobalTypes.xml.

Check that file. Three paragraphs in you'll see stuff like "Artstyle_European" and three "Artstyle_Natives_[compass direction]". If there are no more artstyles, and you linked your new citysets to other tags then these four, they indeed wouldn't appear or pick randomly from a default artstyle.

I did it already:

Code:
	<ArtStyleTypes>
		<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_EAST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_WEST</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_SOUTH</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_ASIAN</ArtStyleType>
		<ArtStyleType>ARTSTYLE_NATIVES_ARABIAN</ArtStyleType>
		<ArtStyleType>ARTSTYLE_AFRICA</ArtStyleType>
		<ArtStyleType>ARTSTYLE_ETI</ArtStyleType>
		<ArtStyleType>ARTSTYLE_JAP</ArtStyleType>
		<ArtStyleType>ARTSTYLE_VIK</ArtStyleType>
		<ArtStyleType>ARTSTYLE_RUS</ArtStyleType>
		<ArtStyleType>ARTSTYLE_EU</ArtStyleType>
		<ArtStyleType>ARTSTYLE_MED</ArtStyleType>
		<ArtStyleType>ARTSTYLE_ARA</ArtStyleType>
	</ArtStyleTypes>

Besides, I added these terminations into the CityLSystem too, as you can see in the next code example, reduced, cos it's much longer:

Code:
		<!-- LEAF 1x1 AFRICA GENERICS -->
		<ArtRef Name="generic:an_africa.nif::1x1_01">
			<Attribute Class="ArtStyle">ARTSTYLE_AFRICA</Attribute>
			<Attribute Class="Scalar">iBatchGroup:0</Attribute>
		</ArtRef>
		<ArtRef Name="generic:an_africa.nif::1x1_02">
			<Attribute Class="ArtStyle">ARTSTYLE_AFRICA</Attribute>
			<Attribute Class="Scalar">iBatchGroup:0</Attribute>
		</ArtRef>
		<ArtRef Name="generic:an_africa.nif::1x1_03">
			<Attribute Class="ArtStyle">ARTSTYLE_AFRICA</Attribute>
			<Attribute Class="Scalar">iBatchGroup:0</Attribute>
		</ArtRef>
		<ArtRef Name="generic:an_africa.nif::1x1_04">
			<Attribute Class="ArtStyle">ARTSTYLE_AFRICA</Attribute>
			<Attribute Class="Scalar">iBatchGroup:0</Attribute>
		</ArtRef>

Of course I did it multiply by 10, with each one of the types I called in the first code I have shown, and carefully for all the LNodes...

Checking the CityLSystem, I've just noticed that for the south america there is only 3 predictions for the leaf 2x2 and maybe later I will try this variation for those ones which didn't show regularly...

Continuing...
I must say I didn't change other configurations which an artstyle name doesn't appear, and after the leafs I went directly to this one (coded) and skip to each artstyle's appearing:

Code:
	<!-- 4x2 node ***************************** -->
	<LProduction From="Node_4x2">
		<Attribute Class="Scalar">bGoalOnly:1</Attribute>
		<To Name="Leaf_4x2"/>
		<ArtRef Name="decoration:all_city_lot_4x2.nif">
			<Attribute Class="ArtStyle">ARTSTYLE_EUROPEAN</Attribute>
		</ArtRef>
		<ArtRef Name="decoration:native_lot.nif::4x2">
			<Attribute Class="ArtStyle">ARTSTYLE_NATIVES_EAST,ARTSTYLE_NATIVES_WEST,ARTSTYLE_NATIVES_SOUTH,ARSTYLES_NATIVES_ASIAN,ARSTYLES_NATIVES_ARABIAN,ARSTYLES_AFRICA,ARTSTYLE_ETI,ARTSTYLE_JAP,ARTSTYLE_VIK,ARTSTYLE_RUS,ARTSTYLE_EU,ARTSTYLE_MED,ARTSTYLE_ARA</Attribute>
		</ArtRef>
	</LProduction>

As I have said before, I had tested some of these artstyles with the decoration:all_city_lot..., but It didn't look good, so I decided to put them all as native_lot...

For the final design, I even added in the PlotLSystem each particular definition for these new styles...
Ex:

Code:
		<ArtRef Name="goal:IMPROVEMENT_LAND_WORKED">
			<Attribute Class="Scalar">NIF:Art/Structures/Cities/an_africa.nif::1x1_02</Attribute>
			<Attribute Class="Improvement">IMPROVEMENT_LAND_WORKED</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_AFRICA</Attribute>
			<Attribute Class="Scalar">bApplyRotation:0</Attribute>
			<Attribute Class="Scalar">bCutTrees:1</Attribute>
			<Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
			<Attribute Class="Rotation">0,180</Attribute>
			<Attribute Class="Scalar">iPlayAnimationID:0</Attribute>
			<Attribute Class="Scalar">fTwist:-0.7853981633</Attribute>
			<Scale>0.6</Scale>
		</ArtRef>

That's what I did, following this Aymerick's tutorial and always comparing with the East Indies files, cos I know that their files work perfectly, and I think it uses the same Cultural Citystyles, but only the med_SouthEastAsia and the med_asia...

Well, that's it... I don't know if I have interpreted something wrong but what I know is that the most of the tested ones did work, and the most important ones...

At least, after this huge explanation, the Aymerick's tutorial gets even easier for those who are beggining, like myself...

And, GeoModder, if you see any gap where I could improve the configuration, tell me
 
Okay, now I'm reaching for straws.
Did you refer these new artstyles to their civs in CivilizationsInfos.xml? The ArtStyleType tag? But you should see random cityset graphics in your cities then...

And I know that in CityLSystem the 'era_all' attribute is supposed to be default, but it won't harm to add it to your cityset references in CityLSystem.

<Attribute Class="Era">ERA_DISCOVERY,ERA_EXPANSION</Attribute>

Oh, another straw. Did you add new era's, or rename the existing ones?

PlotLSystem is for improvements. Basically all the stuff outside cities.

If you've done all that and some stuff is still invisible, I could try taking a look at your modified files myself.
 
I know it's an old thread, and I think I've asked this before, but I'm just wading into this again and wonder if anyone has every tried using the Freya's South Pacific cityset in Civ4Col?

The models are named 1x1x1_01, 1x1x1_02, 1x1x2_01, etc, instead of the the expected 1x1_01, 1x1_02, 1x2_01, etc. It's not intuitive. Looking at the NIF in NifScope, all of the plots look 2x2 to me.

The game crashes hard when I try to use it.
 
Top Bottom