Unique Building Art?

NotSoGood

Emperor
Joined
Jan 25, 2009
Messages
1,077
Location
Finland
Well, I guess everyone knows you can use the UNIT_ARTSTYLE tag to give even every civilization unique unit graphics. But can you do the same for buildings? Like europeans having different kind of bank than arabians (graphically, I mean).
I have bunch of different building graphics waiting to get in my mod. (See signature.)
 
Yes you can. You need to use the CityLSystem XML though, I suppose that's the equivalent to the UnitArtStyleTypeInfos file for buildings. You don't need to define stuff in an art defines file either when using the CityLSystem, the CityLSystem file is basically a combination of an ArtDefines and ArtStyleTypeInfos file. Be warned though, you can crash things pretty easily by screwing things up in the CityLSystem file.
 
Well, I'm not that familiur with the CityLSystem file. I have used it once to change the model for a monument for the Native artstyle in the Legends of Revolution mod. Though I'm aprehensive about giving advice on it. I basically just used my knowledge of the XML in Civ to do it. How familiur are you with the XML? Can you do things like add units?
 
Can you explain little more how you can change the building graphs with it?

I know a little about it, just from looking at (and doing a bit of modding to) that file from the ethnic citystyles mod.

First, whatever building you want to have ethnic art for has to be set up to use the CityLSystem file in Civ4ArtDefinesBuilding.xml. For instance, if you want to have an ethnic jail, in Civ4ArtDefinesBuilding.xml you change:

PHP:
			<LSystem>LSYSTEM_2x1</LSystem>

To

PHP:
			<LSystem>LSYSTEM_JAIL</LSystem>

And that's it for Civ4ArtDefinesBuilding.xml.

Next, you have to define the jail in Civ4CityLSystem.xml. Let's say everyone's going to use the regular jail, but Greco-Roman civs are going to have a different one. So, first you set up the generic jail in Civ4CityLSystem.xml. Search the file for "leaf 2x1 buildings" (without the quotes), presuming your new jail is the same size and shape as the old jail and fits in a 2x1 space. Your new jail may fit better in a 2x2 space or something, in which case your generic vanilla jail goes under "leaf 2x1 buildings" and your new ethnic jail will go under "leaf 2x2 buildings". They don't have to both be under the same leaf, they just each have to be under a leaf that is appropriate to the size and shape of the space you want to reserve for them in your cities.

Below "leaf 2x1 buildings", presuming that we're still using the vanilla jail as the default, put:

PHP:
		<ArtRef Name="building:LSYSTEM_JAIL">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/NationalEpic/NationalEpic.nif</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_EUROPEAN,ARTSTYLE_ASIAN,ARTSTYLE_SOUTH_AMERICA,ARTSTYLE_MIDDLE_EAST,ARTSTYLE_BARBARIAN</Attribute>
			<Scale>1.5</Scale>
		</ArtRef>

So that sets up the generic jail. Now, set up the jail for the Greco-Roman artstyle:

PHP:
		<ArtRef Name="building:LSYSTEM_JAIL">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/RomanJail/RomanJail.nif</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_GRECO_ROMAN</Attribute>
			<Scale>1.5</Scale>
		</ArtRef>

You can also set it up to use different art for different eras:

PHP:
		<ArtRef Name="building:LSYSTEM_JAIL">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/AncientRomanJail/AncientRomanJail.nif</Attribute>
			<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL,ERA_MEDIEVAL</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_GRECO_ROMAN</Attribute>
			<Scale>1.5</Scale>
		</ArtRef>

		<ArtRef Name="building:LSYSTEM_JAIL">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/ModernRomanJail/ModernRomanJail.nif</Attribute>
			<Attribute Class="Era">ERA_RENAISSANCE,ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_GRECO_ROMAN</Attribute>
			<Scale>1.5</Scale>
		</ArtRef>

It's also worthwhile to check out the ethnic citystyles mod, just to see how it's done there. I think you may not have to set the artstyles for the generic jail; it might default to it only if a given artstyle doesn't have an artstyle jail set up. I'm not entirely sure about that, so to be safe I just set up the generic buildings with all the artstyles that I want to use the generic building.
 
Well I tried adding the building art. And it wasn't a huge succes.

I'm not very familiar with the code in CityLSystem? Did I possibly misunderstood something? What does those different leaf things do? And does it matter where I put my newly added LSYSTEM? Sorry if those are stupid questions...
 
Leafs are kind of containers that contain buildings having the same proportions, if I rembember correctly. For instance squared buildings should be put into a 1x1, or 2x2, or 3x3, or 4x4 leaf. Just to use the space of the city square on the map (inside the game) effectively.

My hint for you is download the ethnic citystyles mod and take a look how it's done there. That's what I've done. You will find it in the graphics modpacks section of civfanatics' forum. There were posts recently, so it shouldn't take you long to find it. I am not aware of a tutorial about this (so don't worry, you are not asking stupid questions as these things are not well documented), something like that would be badly needed, I guess.
 
Sound advice from everyone so far. As actually looking at a working model yourself is the best way to learn.

Notsobad: what exactly happened on your first attempt? Did it not show up, did it show up in world builder but not in build menu, did the game crash, did your computer catch fire? Any clue to how or if its is showing up would help in diagnosing.
 
I tried to add a special barracks to ARTSTYLE_ASIAN, but it didn't show up. It looked like a normal barracks. I probably didn't do it right. I'll take a look at the ethnic citystyles mod...

EDIT:Seems like the file has gone from the download...
Now what I'm doing?:confused::(
 
You know what? If you would have asked for that 2 weeks earlier, I could have reuploaded it, but recently I cleaned up my harddrive and deleted it... You could load my Magyar Mod and take a look at that one. Even the current, already old one should contain 2 unique building graphics: the Turul statue and my MTA. So go to the "new civilizations" section and search for the "Ho ho ho... A magyar civ" thread (you may reorder the threads by threadstarter and then search for my threads - there should be two only, quite selfexplanatory from there on). Download link is in the first post. You won't need the leaderhead patch mentioned there if you only want to take a look at the building artstyle. The 2 buildings in question are in the non-modular branch of the mods file structure, so not in the modules/..., also most of the xml. I copied that from the ethnic citystyle mod as it seemed to me that this can not be made modular. I remember that it took me a while to understand things, so don't give up to soon! Good luck!

I hope I made the building artstyle correctly, but so far no errors have been encountered and buildings showed up correctly, so I think it works :mischief:

BTW: the building artstyle is called ARTSTYLE_MAGYAR and have been defined in the Hungary_CIV4CivilizationInfos.xml (which is one of the few xmls you have to change that is in the modular part of the mod) via the following line:
<ArtStyleType>ARTSTYLE_MAGYAR</ArtStyleType>
Hope this will ease your job a bit and help you finding a point where to start!
 
Back
Top Bottom