Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Defining Correct Prerequisites
It may happen that while modding, you give the ability for one team to make the units for another team. For example, Allies do not have an airfield, but you want to give them an airfield. When you do that, the Allies will get possibility of making the Yak aircraft. What if you do not want the Allies to make the Yak aircraft? How will you go about doing this?
The way you do this is to tell the building, which is airfield in this case, to provide custom prerequisites.
To do that, first of all go into the "rules" folder and open structures.yaml
Search for the War factory entry which should be WEAP in this case.
In this entry search for the following code and copy it
Race: sovietPrerequisite: vehicles.soviet
Now search for the airfield, which should be AFLD and paste this code in there. Change vehicles.soviet to aircrafts.soviet
Race: sovietPrerequisite: aircrafts.soviet
Now, open the aircrafts.yaml and find the YAK entry. Its prerequisites might say this:
Prerequisites: afld, ~techlevel.medium
change that to
Prerequisites: afld, ~techlevel.medium, ~aircrafts.soviet
and save
Now the Yak aircraft should only appear for the soviets.
- made by Umair Azfar Khan
Players 🎲
- FAQ ❓
- Installation 📦
- Hotkeys andStances 🎮
- Strategies 🏁
- Settings 🔧
- Dedicated Server ◾
- Badges & Icons 🥇
- Changelog 📓
- Donating 🪙
Modders ✏️
- Tools 🧰
- Audio guide 🔉
- Traits 📝
- Palettes and Remaps 🎨
- World Coordinate System 🌐
- Map scripting
- Lua-API 📋
- Conditions 🆕
- Mapping 🚧
- Modding Guide
- Pixelart 🌃
- Utility
Developers 🔧