1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

How to add new city art

Discussion in 'Civ4 - Modding Tutorials & Reference' started by Chamaedrys, Oct 17, 2006.

  1. Chamaedrys

    Chamaedrys Emperor

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    This tutorial is about adding new city art. With "city art" I refer to the normal houses that appear in the cities.

    The vanilla city art is in the folder assets/art/structures/cities. You may have to unpak the art files if you haven't done it allready (there is a tutorial about this).
    In this folder are also the nifs for the pavement. All pavement files include the word "lot" in their title, like "ren_city_lot".

    Okay, now back to the city art. When you put a city art file (for example med_eu.nif) in the nif viewer, you can see several buildings and their shadows (the plane areas)


    open the screen graph and you see that this one nif file consitst of several NiNodes. In every NiNode is a building nif and a shadow nif.


    The easiest way of creating new city art is to create new building nifs and replace the vanilla nifs them. The shadow can stay were they are.

    BUT: ALL YOUR NEW BUILDINGS NIFs MUST USE THE SAME TEXTURE FILE!!! otherwise you get weird results

    Some more facts about these buildings:

    -the med_eu set has 16 NiNodes, so you need 16 new Nifs for it, the other art sets have about 20 NiNodes.
    -I sugguest to make the normal houses not bigger than 20 kb. But it is no problem if one or two are about 30-40 kb. Each of the following buildings have about 15 kb.



    This is an orc camp i have made for the Warhammer mod. As you see, the NiNodes are untouched, I just replaced the vanilla building nifs with my new art.
     
  2. Chamaedrys

    Chamaedrys Emperor

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    Now it's time to start with the xml work.

    Maybe your new city art should represent a new artstyle. In this case take a look at the file Globaltypes.xml. There is a list of the existing artstyles (like "ARTSTYLE_EUROPEAN") if your artstyle is not there, than add it to the list

    The next file is the cityLsystem.xml in the xml/buildings folder. This file is devides in several "leafs". The entries for city art are usual at the start of a leaf. Here you see the entry for the medivieal European art in the first leaf.



    Every art ref includes the information about the nif file, the NiNode, the Eras in which this art is shown and the artstyle(s) this art is used for.

    Something about this Era- and Artstyle-Lines:

    -If you remove them the art will be shown in every era and by all civ.
    -On the other hand: I you create to art refs for an object, and want to make era or artstyle specific, you have to add this attributes to both art refs.

    Now back to our new art: Because my new art is based on the med_eu.nif I have copy'n'pasted the Medieval entry and modify it to fit with my new art. I have also changed the eras in which it is shown:



    I have done the same with every entry for the mediecal art. Fortuneately, all entries for city art are in the first half of the file.

    But there is also the pavement and it doesn't fit for an orc city.:mad:

    The art refs for the pavement are in other half of the file:



    Because this xml is for a fantasy mod, the modern pavement is not needed and be use for a reskin.;)
    To have different pavements for different civs I put the artstyle attributes in:



    As you see, I have put an attribute with the other artstyles in the art refs of the normal art. Why that? Well, an attribute just limit it's art ref to the named styles or era's, but it doesn't inhibit other art. In our case: If there where only the arttributes in the art refs for the special orc pavement, there would be TWO pavement in the orc cities.
     
  3. Chamaedrys

    Chamaedrys Emperor

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    reserved for further use!
     
  4. Arexack_heretic

    Arexack_heretic Emperor

    Joined:
    Oct 10, 2006
    Messages:
    1,119
    Location:
    Lugdunum
    Usefull! :)

    A double pavement is not necesarily bad, I can think of some civs that might have pavement, but caked them with detritus.
    (I plan to do skavencities as ruins.)
    Is this second pavement replacing the first one, or can the first one be seen through it?
    (like a multiply-layer) alphalayers? or see-through parts of texture?
     
  5. Psychic_Llamas

    Psychic_Llamas Wizard in the Making

    Joined:
    Nov 25, 2005
    Messages:
    6,366
    Location:
    Western Australia
    Very nice Chamaedrys! thats exactly what i needed to know thanks!:D
    i will have a proper look at it later on today:p
     
  6. Chamaedrys

    Chamaedrys Emperor

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    He, he, he, you're a Skaven fan, right?

    Yes, both pavements are shown more or less. But I think it would be better if we add the detritus layer directly to the cities.

    btw: Very cool idea for the Skaven
     
  7. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    Great Writeup! Hope some modders will do some new cityart as well now. That might ease your own efforts:)
     
  8. woodelf

    woodelf Bard Retired Moderator

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    As usual I'm late to finding a great Tutorial. If I get back into max I hope to attempt to tackle city art again.
     
  9. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,844
    Gender:
    Male
    Location:
    MN
    This is what i have for cities, when the city/town reaches the holy city founded by the civ, all cities/towns disappear?? How do you fix this??:confused:
     
  10. Chamaedrys

    Chamaedrys Emperor

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    There is just one case, in which cities and towns can dissappear: the civ steps into a new era and the game can't find the nifs.
    You use the lea_eu.nif from FFH2, right? I didn't see anything about "lea_eu.nif" in your xml. Are you sure that you post the right file?

    In FFH2 the city style changed when a civ changes the religion. If you use xml, python or sdk (don't ask me about python or sdk) from that mod, this feature could be responsible for the problem.
     
  11. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,844
    Gender:
    Male
    Location:
    MN

    Not in python, is this what your talking about? Its in Civ4PlotLSystem:

    Spoiler :
    <!-- FELLOWSHIP -->
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_01</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_02</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_03</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_04</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_06</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_07</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_08</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>



    EDIT: Cant be it either, darn!!!
     
  12. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    You'll probably need to adjust the eras. This cityart like it is here will only show up in the era_leaf. If you dont have that in your mod it won't show.
     
  13. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,844
    Gender:
    Male
    Location:
    MN
    I took out the PlotL and tried it, and it still disappears? This is from FfH1 not 2 ok!!
     
  14. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    I was talking about these lines:
    <Attribute Class="Era">ERA_LEAF</Attribute>
    Now do you have an era_leaf in your mod or not?
     
  15. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,844
    Gender:
    Male
    Location:
    MN
    Yes its there!:crazyeye:
    Spoiler :
    <!-- FELLOWSHIP -->
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_01</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_02</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_03</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_04</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_06</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_07</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>
    <ArtRef Name="art:building">
    <Attribute Class="Era">ERA_LEAF</Attribute>
    <Attribute Class="Scalar">NIF:Art/Structures/Cities/lea_eu.nif::1x1_08</Attribute>
    <Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
    <Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
    <Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
    <Scale>0.35</Scale>
    </ArtRef>


    Have one for each religion.
     
  16. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    I meant the era infos. Not the PlotL. If you want to use FFH cityart with a mod that uses ancient, classical, medieval eras. You will have to change those lines to the era you want to have them in. If you want to use eras similar to FFH I can't help you.
     
  17. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,844
    Gender:
    Male
    Location:
    MN
    Looked at my erainfo, and no they are not there.
    I looked at the Warlords and Vanilla files and there are NO <attribute> listed at all in that file?
    The only one i found that tag in was the CityLSystem one.
     
  18. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    So there you are;) If you don't base your mod on FFH code you'll have to do it exactly as in vanilla/warlords...
     
  19. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,844
    Gender:
    Male
    Location:
    MN
    But i looked in the Warlords files and the vanilla files and nothing there also, and i copied and pasted everything that was in the FfH file over to my file, word for word.
     
  20. Ploeperpengel

    Ploeperpengel academic precarity

    Joined:
    Feb 2, 2006
    Messages:
    4,748
    Location:
    Berlin
    You can't just copy FFH xml into a vanilla mod and expect it to work.
     

Share This Page