Creating a new tile improvement

KingofGamesYami

Chieftain
Joined
Oct 27, 2016
Messages
6
I would like to add another tile improvement for the military engineer.

If someone could point me in the right direction, that would be great!

I've also been trying to find some sort of documentation for modding. If such a thing exists please refer me to it! I prefer docs over tutorials.

Previous experience: modding FTL / Minecraft, general programming in Lua (and various other languages).

Thanks!
 
I don't know if much in the way of documentation exists, sadly. Usually what I do is look at the files in the Base/Assets/Gameplay/Data folder of my civ installation, and see how existing mechanics are implemented. For making a new improvement, you'll want to look at improvements.xml. You'll also need to figure out how to add any artwork, models and icons. To see exactly how to format your mod, I'd look for one on the workshop that adds an improvement (I've never tried adding one myself).
 
Darn. Docs make everything easier.... Oh well.

Thanks for the tip about improvements.xml, I'm looking through that now. I'm not too concerned about artwork / models/ etc. right now, I'll do that later.

I haven't seen a mod which adds improvements yet, but I haven't spent much time searching either. I'll continue to look, but if someone knows of one please let me know ;)
 
@KingofGamesYami

There's a "flat tile" improvement on Steam. Is this any use?

I'm also working on creating any new improvement (a Village improvement, that gives +1 production and some housing). Any tips or suggestions would be very welcome.
 
I've figured out how to make an improvement work, just no idea how to do the art.

Basically, you need an xml file that looks like this:

Code:
<GameInfo>
<Types>
<Row .../>
</Types>
<Improvements>
...

</GameInfo>

Check Base\Assets\Gameplay\Data\Improvements.xml for all the tags you can use.
 
I don't know how to do the 3-D art but you can find an example of a very simple tile improvement in my Combined Tweaks mod. It's the Brazilwood Camp, which unlocks when Brazil builds a special project. It just reuses the existing "Camp" art.

Basically to do this you need a few things:

Data:
  • INSERT the new Improvement data into the Improvements table
  • Add corresponding yields, terrain, feature data to the other Improvements tables as necessary
  • Add text strings to the text database (name, description)

Art:
  • Create an icon definition an an icons file. I just re-use an existing Icon. Making your own is an added level of difficulty.
  • Create a definition in an .artdef file. You can do this by copying an existing asset. You then have to give your new improvement artdef a name that matches exactly to the unique name in the Improvements table.
  • Create a dependency in the .dep file. At a minimum you need to add a dependency on the improvements stuff. This file is what tells the game to go looking for your new improvement visuals.


IMO the hardest part about cloning art is snipping the XML in exactly the right spot. If you do it wrong all Improvements in the game vanish from view. Fun times.


I attached sample Icon, Dependency and ArtDef files to this post. I had to add a .txt extension to the artdef and dep file to allow the upload.
 

Attachments

I'm trying to work on using the pre-existing art for the Monastery for my unique tile improvement, and per your recommendation I've copied the ArtDef from VikingsLandmarks folder (which also contained the Alcazar; I just left it in and didn't trim it away), and inserted an Improvements section into my Mod.Art. However, I get the Monastery icon in the Builder action box and civilopedia, but there's no art actually on the tile after I build the improvement: The tile remains blank, even though the improvement is listed on the tile when I hover over it.

Which area should I be looking at to fix this missing art?
 
A little bit of necro but was this simple mod posted anywhere?

All I want to do is to make an "airbase" improvement that is exactly the same as the 'airstrip' BUT it has the same properties as the 'missile silo' so I can build it in city-states. Why it was not like that originally I have no idea.


I may put airstrip with the builder and put airbase with engineer just to split it up or vice versa.
 
Back
Top Bottom