Equipment requiring improvement?
If I wanted to require a Blacksmith before units could be trained with Axes, how would I do that?
If I wanted to require a Blacksmith before units could be trained with Axes, how would I do that?
Have a technology that is not part of the tech tree. The improvement unlocks the tech once built. This solution gives you permanent access to the weapon everywhere, even if you lose the blacksmith.
Option 2: Weapon unlocks from tech in tech tree like normal. Build an improvement that roduces a local resource in the city. The weapon requires the resource. This solution gives you a weapon that can only be built in a city with a blacksmith, and only while you control it. This type of weapon is problematic because the AI doesn't understand stuff like this, and you will rarely see a unit with such a weapon as long as there are other unit designs for the AI to choose.
Thanks, this is what I was going for. Are there examples in vanilla FE of improvements that produce local resources? If all equipment had improvement requirements, would the AI build them, or would it not produce any units until it happened to build them?
It appears the AI can build anything the human player can build, ie if it appears as trainable in the train window the AI will build it. There are no local resources in FE, but check out the comments in CoreResources.xml and you'll soon find your way (it is still possible to use them as such).
So I would put this in CoreResources.xml:
...and this in CoreImprovements.xml:
...then this in CoreWeapons.xml:
No, you need to treat it like a resource all the way through. Not prereq but
Also you definitely want to make the improvement creating the resource PerTurn=1, or you won't have enough to build any unit. Also keep in mind the resource needs to cover the eventuality of the player building 50 units in one turn, so just set it to something very high such as 1000.
PS. Please use quote instead of code so I can copy it into XML to check that it works.
Got it.
Will do on the quoting.
Welcome Guest! Please take the time to register with us.