How ArtStyle system works

Discussion in 'Civ5 - Creation & Customization' started by Protok St, May 25, 2021.

  1. Protok St

    Protok St Chieftain

    Joined:
    Jul 7, 2018
    Messages:
    94
    Gender:
    Male
    Location:
    Univesrity of Planet
    Hello everyone!

    I want to design a custom civ type with individual graphic.
    For that I need to understand - How the art style system organized. How the same objects as units or cities takes a different visual effects for different civ.

    Where it is needed to mark?
    Which files or entries it will connect with and how exactly?

    Thanks for your time and explanation.
     
  2. Recursive

    Recursive Radiating Doom At 10x The Background Level Moderator

    Joined:
    Dec 19, 2017
    Messages:
    2,800
    Gender:
    Male
    Moderator Action: Moved to main forum.
     
    Protok St likes this.
  3. Protok St

    Protok St Chieftain

    Joined:
    Jul 7, 2018
    Messages:
    94
    Gender:
    Male
    Location:
    Univesrity of Planet
    There is a file civ5artdefines_citybuildings.xml in CityModels archive.

    Spoiler Content :
    Code:
    <BuildingArtInfos>
    
    
      <!-- AMERICA *********************************************************** -->
      <Culture name="America">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Amer_Anc_City.gr2</Granny>
          </PopulationBuildings> 
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Amer_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Amer_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>Amer_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
    
      <!-- ASIA ************************************************************** -->
      <Culture name="Asia">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Asia_Anc_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Asia_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Asia_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>Asia_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
    
      <!-- AFRICA ************************************************************ -->
      <Culture name="Africa">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Afri_Anc_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Afri_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Afri_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>Afri_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
     
      <!-- EUROPE ************************************************************ -->
      <Culture name="Europe">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Euro_Anc_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Euro_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Euro_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>Euro_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
    
      <!-- EUROPE ************************************************************ -->
      <Culture name="Mediterranean">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Medit_Anc_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Medit_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Medit_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>Medit_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
    
      <!-- Ruins ************************************************************ -->
      <Culture name="Ruins">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>City_Ruins.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>City_Ruins.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>City_Ruins.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>City_Ruins.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
     
    </BuildingArtInfos>


    How the <Culture name="Asia"> or <Culture name="America"> tags works?
    Where do they transfer the reference?
     
  4. Troller0001

    Troller0001 Watching from a safe distance

    Joined:
    Mar 9, 2016
    Messages:
    754
    Gender:
    Male
    Location:
    The Netherlands
    There've been a few threads related to modding city styles. I"m not sure if anyone has succeeded in actually adding a new city style (with a fake DLC), but I"m fairly certain that that replacing existing ones should be possible in a standard mod.
    See this thread: https://forums.civfanatics.com/threads/modding-city-art-styles.528081/
    And post #6 and below in this one: https://forums.civfanatics.com/thre...-for-wonders-buildings-citystyles-etc.519418/

    My guess would be that the exact relation is hardcoded into the graphics DLL (to which we don't have access).
    However, there's also the ArtDefineTag, ArtStyleType, ArtStyleSuffix, and ArtStylePrefix columns in the <Civilizations>-table which use a similar naming format (although they're not a 100% match all the time) and are likely related

    ---

    Unit graphics on the other hand are very moddable! The <Units>-table contains the UnitArtInfoCulturalVariation-column, which is only used by settlers in the base game.
    Inspecting the <ArtDefine_UnitInfos>-table reveals that settlers have four entries: ART_DEF_UNIT__SETTLER, ART_DEF_UNIT__SETTLER_AFRI, ART_DEF_UNIT__SETTLER_AMER, ART_DEF_UNIT__SETTLER_ASIA
    Note how the last part of these entries matches the ArtStyleSuffix in the <Civilizations>-table (e.g. _AFRI). In other words, civs that have _AFRI as their ArtStyleSuffix use the ART_DEF_UNIT__SETTLER_AFRI graphics for their settlers!

    You're not limited to existing ArtStyleSuffixes. For instance, CL's Simba mod uses an ArtStyleSuffix of "_LIONKING" to make certain units look like Lions.

    An important note is that units cannot both have a UnitArtInfoCulturalVariation and UnitArtInfoEraVariation. The latter allows for different graphics based on the owner's era, which is used by things such as workers, caravans, or great people.
     
    Protok St likes this.
  5. Protok St

    Protok St Chieftain

    Joined:
    Jul 7, 2018
    Messages:
    94
    Gender:
    Male
    Location:
    Univesrity of Planet
    Thank you. Lets solve the cities question first.
    I want to add a new.
    Sid Meiers Civilization V The Complete Edition\Assets\DLC\DLC_03\Buildings\Civ5ArtDefines_CityBuildings_Polynesia.xml
    The rest of files of DLC has no any reference to this new cities atr style pack.

    CIV5Civilization_DLC_Polynesia.xml
    Code:
        <Civilizations>
            <Row>
                <Type>CIVILIZATION_POLYNESIA</Type>
                <ArtDefineTag>ART_DEF_CIVILIZATION_POLYNESIA</ArtDefineTag>
                <ArtStyleType>ARTSTYLE_POLYNESIAN</ArtStyleType>
                <ArtStyleSuffix>_MED</ArtStyleSuffix>
                <ArtStylePrefix>ASIAN </ArtStylePrefix>
            </Row>
        </Civilizations>
    The only connection I can see between this entries is <ArtStyleType>ARTSTYLE_POLYNESIAN</ArtStyleType> which can lead to <Culture name="Polynesian" lighting="Asia">.

    But if I look at America in
    Assets\DLC\Expansion2\Gameplay\XML\Civilizations\CIV5Civilizations.xml
    Code:
            <Row>
                <ID>0</ID>
                <Type>CIVILIZATION_AMERICA</Type>
                <ArtDefineTag>ART_DEF_CIVILIZATION_AMERICA</ArtDefineTag>
                <ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
                <ArtStyleSuffix>_EURO</ArtStyleSuffix>
                <ArtStylePrefix>EUROPEAN </ArtStylePrefix>
            </Row>
    
    It has no straight connection to civ5artdefines_citybuildings.xml
    Where:
    Code:
      <Culture name="America">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Amer_Anc_City.gr2</Granny>
          </PopulationBuildings> 
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Amer_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Amer_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern">
          <PopulationBuildings>
            <Granny>Amer_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
    ***
      <Culture name="Europe">
        <Era name="Ancient">
          <PopulationBuildings>
            <Granny>Euro_Anc_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Rennaisance">
          <PopulationBuildings>
            <Granny>Euro_Ren_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Industrial">
          <PopulationBuildings>
            <Granny>Euro_Ind_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
        <Era name="Modern"> 
          <PopulationBuildings>
            <Granny>Euro_Mod_City.gr2</Granny>
          </PopulationBuildings>
        </Era>
      </Culture>
    
    No <Culture name="Europe">, no <Culture name="America"> both has no straight reference to <ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>.

    So it seems a new city art style pack could not be connected to an any CIV.
     
    Troller0001 likes this.

Share This Page