[R&F] Icons

Geminus

Chieftain
Joined
Sep 11, 2016
Messages
15
Location
Novi Sad, Serbia
Hi all,

I was wondering how the game knows which icon is for what.
I mean, in the Icons_Districts file for example for Hansa there are only these two lines:

Code:
<Row Name="ICON_DISTRICT_HANSA"                   Atlas="ICON_ATLAS_DISTRICTS" Index="9"/>

and

Code:
<Row Name="ICON_DISTRICT_HANSA_FOW"                 Atlas="ICON_ATLAS_DISTRICTS_FOW" Index="9"/>

But how will the game know that ICON_DISTRICT_HANSA belongs to DISTRICT_HANSA?
Some other districts like Ikanda in addition to the above mentioned lines have also this one:

Code:
<Row Name="DISTRICT_IKANDA"                                      Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="3"/>

I hope somebody can help.
 
So if I want to use an already existing icon for a mod I create, I would have to copy and rename the icon?
And were are the icon textures located, in ArtDef or BLP files?
 
If by „use” you mean „create my own based on original one”, then yes. If you want to just use existing one in the game, then it’s there - just use, no need to do anything.
All art assets eventually end-up in .blp files, however with icons you can omit that step and just use raw .dds files. This is a shortcut, not the standard way. See my mods like Real Great People or Real Building Upgrades. I create hundreds of icons there with no .blp nor fiddling with art assets, .blp files, etc. It is much easier that way.
 
These are for the regular icon used by the game
Code:
    <Row Name="ICON_DISTRICT_GOVERNMENT"                                  Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="0"/>
    <Row Name="ICON_DISTRICT_WATER_ENTERTAINMENT_COMPLEX"                 Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="1"/>
    <Row Name="ICON_DISTRICT_SEOWON"                                      Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="2"/>
    <Row Name="ICON_DISTRICT_IKANDA"                                      Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="3"/>
These as noted are for the FontIcons (ie, Icons that appear in the middle of in-game text) related to the districts listed above:
Code:
    <!-- Font Icons -->
    <Row Name="DISTRICT_GOVERNMENT"                                  Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="0"/>
    <Row Name="DISTRICT_WATER_ENTERTAINMENT_COMPLEX"                 Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="1"/>
    <Row Name="DISTRICT_SEOWON"                                      Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="2"/>
    <Row Name="DISTRICT_IKANDA"                                      Atlas="ICON_ATLAS_XP1_DISTRICTS" Index="3"/>
The rule is if it is for the Icon that shows within in-game text, "ICON_" is not added to the "Name" field in table <IconDefinitions>.

If the icon is used anywhere else, like in loading screens or for the actual icon shown on the civilopedia page, or the icon in the city production menus, then "ICON_" is added to the basic element. So a Building called BUILDING_TEMPLE needs a "Name" in <IconDefinitions> of ICON_BUILDING_TEMPLE.
 
first of, thank you both for your help. I appreciate that.

However, I am still struggling with making the icons appear in game. I tried looking at some other mods, like MyCiv6Changes_Expac1_2 from you LeeS or Real Great People or Real Building Upgrades from you Infixo or
Ionian Empire from CutesyGoddess (she seems to have same problem like I do) etc. But...I don't know what I am doing wrong.

Attached you can find my test mod, so if you have time and will to check it out and give feedback, that would be really great and helpful.
 

Attachments

  • Cree.7z
    5.5 KB · Views: 123
lua.log:
Code:
CivilopediaScreen: Error: Couldn't set the icon to ICON_BELIEF_GREAT_CATHEDRAL
I don't see where you've ever defined such an icon.

---------------------------------------

So far as the building Icons go, I cannot see where there is a problem getting the icons to work. They all appear where they ought to, except for the aforementioned issue with attempting to assign a Belief-linked building to a civilization. This causes civilopedia-page oddities in addition to not being able to register the undefined icon.

You won't get 3d main map models, though, of your unique buildings, since each main-map model is defined by a far more complicated "artdef" method, and requires a 3d model.
 
To be honest, I was so occupied with trying make the buildings appear in game, that I didn't even noticed that this is missing. XD
Thank you man for bringing my attention to it, now It's fixed.

Regarding the second part, ok, maybe I described the problem wrong. I wanted to know exactly that, why they don't appear in game.
I mean, these are only building and we could argue that it ok if they don't appear graphically until the effects they provide are there, but
what if you want to add for example a unique district? If the district is invisible... that would be ridicules, you wouldn't see anything.

I made earlier artdef files, but after I discovered your mod MyCiv6Changes_Expac1_2, I thought that maybe I don't need them and then I deleted them. lol XD
Anyway, I made those again and you can find them attached in case you want to check them out.
Please tell just me one more thing, do I need to create new 3D models or can I reuse those that are already in game? And this is done in .dep file, right?
 

Attachments

  • Cree.7z
    9.1 KB · Views: 117
I believe you can reuse the existing ones, and I think this is done within the blp file/process but I've not played around with doing so. The exact steps required are something you would have to find by browsing the tutorials sub-forum.
 
Please tell just me one more thing, do I need to create new 3D models or can I reuse those that are already in game? And this is done in .dep file, right?

You can re-use existing 3D assets. The 3D art assets themselves are cooked into .blp files (Binary Library Packages). If you are using base game assets you won't need to cook new .blp files. Provided the base game/Expansion/DLC .blp file containing the asset you want to use is being loaded already them you will just need to set up .artdef files and entries to refer to the asset(s) you want to use. You can look at the base game .artdef entries and if you want to be just copy/paste/rename the entries you want to replicate. Be aware that the Asset Editor is not the most efficient way to do that. I just use Notepad++ as I've learnt my way around the .artdef structure but a better tool for beginners is Sukritact's Art Def Editor: http://www.sukrittan.com/Files/ArtDef_Editor-win32-x64.7z. After you have made your .artdef files with their cloned entries you will need to reference them from the .dep files (which is cooked from your (Mod).Art.xml file if you are using Modbuddy).
 
As I said in my privies post, I made ArtDef (Landmarks & Buildings) and dep files, but it still doesn't work.
Maybe I am just doing something wrong, I don't know, will try it with the ArtDef editor you mentioned.
Thank you all for your help.

P.S. I was also making ArtDef files with Notepad++ :D
 
After you have made your .artdef files with their cloned entries you will need to reference them from the .dep files (which is cooked from your (Mod).Art.xml file if you are using Modbuddy).

Can i have an exaple of this part? i`m making something wrong
 
Can i have an exaple of this part? i`m making something wrong
If you want to reuse art for a building, then you need to write the following in the Art.xml file which is being created when you start a new project:
HTML:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects..GameArtSpecification>
  <id>
    <name text="// Here goes the name"/>
    <id text="// Here goes your mod ID that ModBuddy generates on the beginning"/>
  </id>
  <artConsumers>
    <Element>
      <consumerName text="Landmarks"/>
      <relativeArtDefPaths>
     // Here you reference the artdef files you have created. For buildings you need buildings and landmarks artdefs
         <Element text="Buildings.artdef"/>
         <Element text="Landmarks.artdef"/>
      </relativeArtDefPaths>
      <libraryDependencies>
      </libraryDependencies>
      <loadsLibraries>true</loadsLibraries>
    </Element>
  </artConsumers>
  <gameLibraries>
  </gameLibraries>
  <requiredGameArtIDs>
    <Element>
   // Here you write art dependencies. I am using the vanilla cathedral art, so I needed the base game ID and name
      <name text="Civ6" />
      <id text="cb2f71b7-843e-4af3-9ca7-992acda9c195" />
    </Element>
  </requiredGameArtIDs>
</AssetObjects..GameArtSpecification>
After that you go PROJECT
Project.png

then Properties...
Properties.jpg

and then you select In-Game Actions and add a new Action with Type UpdateArt, give it a unique ID and add Mod Art Dependency File under Files
Add Art.png

That's all. You should see now you building in game, if you wrote the artdefs correctly.

P.S. In the last menu under Mod Info you can find your mod ID.
 
Top Bottom