How do I replace a building?

So I've been playing around with some of the xml files. I've been able to create a new faction as well as create buildings that actually work in-game (thanks to all the helpful posts on the forum)!

 

But now I have a question: How do I replace an existing building with one that I made? I just created a nice Watchtower, but when playing I have the option to build both the standard watchtower as well as my own creation. How do I replace it?

Do I have to create a new xml? I haven't really worked on any xml mods before, what do I do?

3,026 views 3 replies
Reply #1 Top

In order to remove the old watchtower, you need to give the old watchtower a prerequisite that cannot possibly be fufilled. For example, you could have this in your mod file:

<ImprovementType InternalName="k_watchtower">
<Prereq>
<Type>Wonderland</Type>
<Attribute>Frogboy</Attribute>
</Prereq>
</ImprovementType>

End of quote

Reply #2 Top

Quoting Heavenfall, reply 1
In order to remove the old watchtower, you need to give the old watchtower a prerequisite that cannot possibly be fufilled. For example, you could have this in your mod file:




<ImprovementType InternalName="k_watchtower">
<Prereq>
<Type>Wonderland</Type>
<Attribute>Frogboy</Attribute>
</Prereq>
</ImprovementType>
End of Heavenfall's quote

 

Thanks Heavenfall.

 

I just added this at the end of my Watchtower xml. Can I create just one xml file replacing all the buildings in this way?

 

Reply #3 Top

Yes.