How to make a new building for a new civ?

BeatriceBernardo

Chieftain
Joined
Apr 28, 2017
Messages
10
Hi everyone, this is my first time modding.

I want to make a new civilization. I'm using the Jasper Kitty template, I have succeeded thus far.

What's next is that I want to make a new building, let's say Litter Box, to replace the Granary, giving +3 productions.

How can I do that?

I know that I have to edit the NewLeader_LitterBox.xml file.

Code:
<?xml version="1.0" encoding="utf-8"?>
<GameData>
    <Types>
        <Row Type="BUILDING_LITTER_BOX" Kind="KIND_BUILDING" />
    </Types>
    <Buildings>
        <Row BuildingType="BUILDING_LITTER_BOX" Name="LOC_BUILDING_LITTER_BOX_NAME" PrereqDistrict="DISTRICT_CITY_CENTER" TraitType="TRAIT_CIVILIZATION_BUILDING_LITTER_BOX" PurchaseYield="YIELD_GOLD" Cost="100" AdvisorType="ADVISOR_GENERIC"/>
    </Buildings>
    <Building_YieldChanges>
        <Row BuildingType="BUILDING_LITTER_BOX" YieldType="YIELD_CULTURE" YieldChange="3"/>
    </Building_YieldChanges>
</GameData>

I know at some point I have to include REPLACE_BUILDING and BUILDING_GRANARY and YIELD_PRODUCTION and YieldChange=3. But I have no idea where and how.

Thank You.
 
  • Like
Reactions: hdd
Simplest answer would be to look at how it's done in another mod. It's not as simple as it looks at first glance. You'll also have to amend Landmarks.artdef to make the building show in 3D and Buildings.artdef to make it show in strategic view. My Jedi mod (link in my signature) has an example of how to change a city center building that adopts the appearance of the building it replaces, the Monument in my case but the same principles apply. Whatever you do it's best to not try to get the artdef files right with ModBuddy — That is a fiddly nightmare. Asset Editor is the right tool for the job — Half the work and a tenth of the confusion. Use it to open my Landmarks.artdef and explore before you make one for yourself. The main code to make Holocron replace Monument is in Buildings.xml. It's relatively simple.

P.S. After subscribing to a mod the files appear in a numbered folder like so: C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\914746869. That's actually the number for my Jedi mod. I think those numbers are consistent, but even if they're not it'll be there somewhere once you've started the program at least once after subscribing. If you can't find it just search for ForceSensitive from "C:\Program Files (x86)\Steam\steamapps\workshop\content". I'd upload it to CivFanatics, but it's too large.

I hope this helps, but the full answer would be a multi-page guide.
 
  • Like
Reactions: hdd
BTW here are the Mod.Art.xml <Element>s that generate the relevant parts of the .dep file:
Code:
<?xml version="1.0" encoding="UTF-8" ?>

<AssetObjects::GameArtSpecification>
    <artConsumers>
        <Element>
            <consumerName text="Buildings"/>
            <relativeArtDefPaths>
                <Element text="Buildings.artdef" />
            </relativeArtDefPaths>
        </Element>
        <Element>
            <consumerName text="Landmarks"/>
            <relativeArtDefPaths>
                <Element text="Landmarks.artdef" />
            </relativeArtDefPaths>
        </Element>
     </artConsumers>
</AssetObjects::GameArtSpecification>
 
  • Like
Reactions: hdd
Thanks a lot!

But I'm more of a gameplay mod than an art mod. I don't mind just using the existing art resources.
 
  • Like
Reactions: hdd
Wow... I'm downloading your Jedi mod...

I was expecting there is already a guide/tutorial somewhere for something as basic as this...

*****************

downloaded,

C:\Program Files (x86)\Steam\SteamApps\workshop\content\289070\914746869

it is consistent

**********************

So, to replace 1 buildings, which files do I have to look into?
 
  • Like
Reactions: hdd
Buildings.xml (and the entry for that in the mod properties under InGame/UpdateDatabase) for the functionality. To make it show Buildings.artdef, Landmarks.artdef and Mod.Art.xml. There's a natural order to approach the Landmarks.artdef in:
  1. HeroBuildingTags
  2. BuildingVariants
  3. BuildingSets
  4. BaseVariants
Note that in your Landmarks.artdef the BuildingSets you need to set up have to account for all the possible new combinations. The BaseVariants then follow from them.
 
  • Like
Reactions: hdd
I didn't edited all the files, but THANK YOU! I managed to make a new civ with unique building, unique unit is next!
 
  • Like
Reactions: hdd
Back
Top Bottom