Invisible Unique Building?

FYI I'm going to have to put getting to the bottom of this on the back burner. Fortunately my new civilization is entirely functional as is so I've uploaded it to the Steam Workshop and the downloads page here. It's called Forest.
 
Interesting bug on this matter, may be worth others seeing if this also impacts their mods. I played again against my Logan/Albion mod & noticed two things. Note I reused Hansa & Sukiennice repurposed for Albion.

Now when as Germany, I build the Hansa, it constructs, but gives me only are part built image in the world view, plus I cant add a workshop.
In my Polish market, I can build the Sukiennice, but no graphics appear.
 
Odd. I reused the Acropolis graphic for my Precinct district, but the Greek Acropolis still seems to function properly graphics-wise. Can't verify with buildings though because my mod doesn't have any of that in yet.
 
Odd. I reused the Acropolis graphic for my Precinct district, but the Greek Acropolis still seems to function properly graphics-wise. Can't verify with buildings though because my mod doesn't have any of that in yet.

I am getting quite vexed. I have cured the Sukiennice. Although I had to edit manually again as ModBuddy wont pull the Polish content.
But the Hansa is proving down right obstinate. As Germany, playing against Albion, it will just build the base building, but no ability to add workshops etc. ( Although at least now it is a completed district graphic. )

I followed your steps as per your other post. Everything seems good on paper, certainly works 100% fine for Albion.

Magil, could I trouble you to do two things...
#1 Play Greece against your mod & ensure you can build an amphitheatre as Greece.
#2, if the above is fine, could you post your .artdefs - district.# Landmarks.# & Buildings.#

I must be doing something incorrect, & it is my hope that comparing these file will highlight the issue.

Thanks in advance.
 
I am getting quite vexed. I have cured the Sukiennice. Although I had to edit manually again as ModBuddy wont pull the Polish content.
But the Hansa is proving down right obstinate. As Germany, playing against Albion, it will just build the base building, but no ability to add workshops etc. ( Although at least now it is a completed district graphic. )

I followed your steps as per your other post. Everything seems good on paper, certainly works 100% fine for Albion.

Magil, could I trouble you to do two things...
#1 Play Greece against your mod & ensure you can build an amphitheatre as Greece.
#2, if the above is fine, could you post your .artdefs - district.# Landmarks.# & Buildings.#

I must be doing something incorrect, & it is my hope that comparing these file will highlight the issue.

Thanks in advance.

I'm a bit uncertain here. If you're unable to build things period, that suggests to me that the problem isn't in art. I am perfectly able to build the Amphitheater as Greece in my mod, but keep in mind I've changed things around so the Amphitheater no longer is in the Acropolis, since I have the Acropolis replacing my new district (buildings don't appear properly in the Acropolis, but that's because I haven't coded them yet).

If you mean the graphics aren't appearing for buildings, my files might not be of much help, since I haven't actually coded in much in the way of unique district/buildings. I only coded in two buildings so far, and while they "work" they're not fully coded. The graphics tend to break if the game is loaded in a later era because I haven't properly defined everything yet (but I know why they are breaking, I haven't defined all combinations of buildings/eras yet).

Now, my original list of steps/files provided was mostly intended for improvements. For buildings, I suggest looking at what Firebug posted, since it's a little different:

I FIGURED IT OUT!

The way it's done is with both the buildingart.def and the landmarks.artdef.
This quick tutorial isn't going to be the best but the best way to learn is to load up the .artdefs from the pantry into asseteditor and just compare what you need to type in your own.

  • Create a buildings.artdef for your mod. You need to add a new element under both the buildings and the building chains tabs.
  • When you create the new element under Building, name it the same as you do in your files. For example i did BUILDING_FB_ROYAL_ACADEMY.
  • You don't need to worry about the audio section of your building but the Strategic View part is where you enter in the name of the icon you want your building to use while in Strategic View. I was making a University replacement so i copied that one. (The best way to know what you need to type in here is to load the buildings.artdef from the pantry into asseteditor and take a look at Firaxis' stuff)
  • You're already done with the Building section, so move onto BuildingChains. Here is where you need to make sure your building is linked to particular type of building. Again, take a look at the building.artdef from the pantry and copy the layout you need. I added my building to the ScienceBuildings element, and since it was a University replacement i added it to Buildings (Level 2).

  • Now it's time for the Landmarks.artdef, this is a bit more complex but you'll need to add an element for the district that your building is going to be put inside and then make the basevariants, the buildingvariants and the buildingsets. Again, look at the landmarks.artdef from the pantry and take a look at how firaxis did it.
  • You only need to reference the landmark.artdef once in your mod.art.xml for this to work, you don't need to reference the building.artdef at all.
 
I think districts are a different animal... I have sorted buildings & improvements with ease, but the district is being obstinate.

It is not a case of it not working. My modded version works 100%. But what it has done has somehow disabled buildings for the original Hansa that I cloned. Pedia says it should have the buildings, but in game, it can only build the base. I will let it sit for a day & come back with fresh eyes...

Thanks.
 
the basevariants, the buildingvariants and the buildingsets
What I can't make sense of in these is how the program comes to know that it needs to start with the variant "LIBRARY, UNIVERSITY, RESEARCH_LAB" or whatever. If it had said "BUILDING_LIBRARY, BUILDING_UNIVERSITY, BUILDING_RESEARCH_LAB" then I'd have figured that it's just reading the existing buildings in the district. Maybe they made it cut off the "BUILDING_" to make it more readable so we don't confuse the BUILDING_LIBRARY building with the BUILDING_LIBRARY graphical element, but it's still left me confused. As far as I can tell I may have it back to front. (Typing as I think now) Maybe the basevariants are deduced from the buildingsets, but then the variants would need to have meaningful m_name fields, wouldn't they? No, because other factors intervene, era etc. Bleep! I think I need to add 22 base variants, and that just to copy 3 building appearances that already exist – Sigh. Maybe there's a way to do this with little to no work, but without a guide… Yes I know I harp on about that, but what were they thinking? I mean seriously when I make a building that replaces another couldn't I just ignore the art entirely and assume the program would put it where the one it replaces goes and use the same art? Apparently not. It seems the system is missing (for non-Units) a layer of indirection between objects and how they appear, and another for where they appear.

<dream gamedesign="designed to be modded">
So the elements in Buildings.artdef and Landmarks.artdef wouldn't have m_names like BUILDING_LIBRARY. Instead they'd have LibraryArt (a reference to how it looks) and LibraryPosn (a reference to where it's placed). Then in the BUILDING_LIBRARY element of Buildings.xml there'd be an art field holding the value LibraryArt and a posn field holding LibraryPosn. A Library replacement could have the same two values and shazam! Or it could make a replacement for LibraryArt (maybe with a satellite receiver on the roof). Neither way would the modder have to interact with the positioning or eras or cultures or the positions or existence of other buildings on the Campus or Campus replacement.​
</dream>
 
Snort! 20 extra basevariants later and it doesn't work. It's :lol: or :cry: time – You can tell because I'm using smilies. Oh wait. I've left the original ones in there. I presume that's causing a duplicate element bug and stopping the rest of the Landmarks.artdef from working. I'll be right back.
 
That was hard work, but I've finally got custom buildings appearing in my Campus with the same appearance as the buildings they replace. I'd been trying to fix it by directly editing the files through ModBuddy, but Asset Editor is the right tool for the job. Even with that it's a ridiculously complicated process and some of the XML pieces don't appear to fit together logically.

I'm happy with how it's turned out but I'm curious that the base doesn't appear to be changing, so the buildings appear to have been built around to make the library and university replacements. While it seems possible (though unlikely) that my liberal use of FireTuner could be the cause, the only anomaly I can find in the files that could be causing this is differences between the m_template fields in the two Landmarks.artdef files:
In the base in the Set_HeroBuildings parameter element it's set to "". In mine it's set to "Landmarks".
In the base in the Tag_Era parameter element it's set "Eras". In mine it's set to "".

As I have no idea what m_template fields do (and I'm happy with the result) I'm loath to experiment. However, I'd appreciate it if anyone could enlighten me please.
 
Hi, guys, I'm currently working on a tile improvement mod and have been following along with your discussion here, to great help! But I seem to be missing something somewhere that's eluding me to no end. I think everything is set up correctly as per me looking at the code for other things side by side, but there's always things I don't really understand if its super technical.

I'm fairly certain the problem is in the modart.xml file, since it's the one I have the least understanding of, but it could be something else.

If any of you could take a look and help me figure it out, that'd be much appreciated! Once I learn how to get 3D assets to appear in game, most everything else seems like it should fall into place.

Thanks in advance ^^
 

Attachments

When I try to follow Firebug's steps on the asset editor some sort of autocomplete function won't let me type in my own building's name in places I think I'm supposed to, like the Landmark Building Sets. Any solution for this?
 
Usually that seems to happen when the asset editor is trying to reference something that already exists, so typing something in manually wouldn't amount to much anyway. It's gonna be a bit different depending on what you're trying to edit.

If you're working with an artdef, you're likely missing either an element in that or another artdef that the autocomplete can reference. It's also possible you might be missing a type of file (geo/anm/dds or whatever) if you're trying to reference something like a texture or so.

If worst comes to worst, try opening the asset you're editing in notepad++ and compare it to another asset of the same type form the pantry and make manual changes there. That comes with the caveat that, like I said, if there's a missing element you're trying to reference, it won't help any until that element is created.

Hope that helps!
 
Hi guys, thanks for all the info in this thread. I want to port the nilometer from the Nile River scenario into the game as a replacement for the water mill. I'm really confused on this. What has worked so far is to follow what Poukai did for his Gold Resources mod: literally just copy and paste the XML that's in the DLC into a mod. I did that, and changed the Nilometer's adjacency requirement to river instead of the unique Nile terrain. So that worked, it showed up in game, but the model is built right in the middle of the city with a lot of overlap of buildings, instead of on the river like a water mill. What can I do to make it appear on the river? Do I need to take an entirely different approach?
 
I FIGURED IT OUT!

The way it's done is with both the buildingart.def and the landmarks.artdef.
This quick tutorial isn't going to be the best but the best way to learn is to load up the .artdefs from the pantry into asseteditor and just compare what you need to type in your own.

  • Create a buildings.artdef for your mod. You need to add a new element under both the buildings and the building chains tabs.
  • When you create the new element under Building, name it the same as you do in your files. For example i did BUILDING_FB_ROYAL_ACADEMY.
  • You don't need to worry about the audio section of your building but the Strategic View part is where you enter in the name of the icon you want your building to use while in Strategic View. I was making a University replacement so i copied that one. (The best way to know what you need to type in here is to load the buildings.artdef from the pantry into asseteditor and take a look at Firaxis' stuff)
  • You're already done with the Building section, so move onto BuildingChains. Here is where you need to make sure your building is linked to particular type of building. Again, take a look at the building.artdef from the pantry and copy the layout you need. I added my building to the ScienceBuildings element, and since it was a University replacement i added it to Buildings (Level 2).
  • Now it's time for the Landmarks.artdef, this is a bit more complex but you'll need to add an element for the district that your building is going to be put inside and then make the basevariants, the buildingvariants and the buildingsets. Again, look at the landmarks.artdef from the pantry and take a look at how firaxis did it.
  • You only need to reference the landmark.artdef once in your mod.art.xml for this to work, you don't need to reference the building.artdef at all.

Hi Firebug,

can you upload here your artdef file? I would like to compare it to my file and try to figure out, what I am doing wrong, since I always
get this black background with yellow triangle. XD
 

Attachments

  • Sid Meier's Civilization VI Screenshot 2019.05.26 - 21.28.43.19.png
    Sid Meier's Civilization VI Screenshot 2019.05.26 - 21.28.43.19.png
    2.9 MB · Views: 123
Last edited:
Back
Top Bottom