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: soviet
Prerequisite: vehicles.soviet
Now search for the airfield, which should be AFLD and paste this code in there. Change vehicles.soviet to aircrafts.soviet
Race: soviet
Prerequisite: 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 ๐ฆ
- Game Content ๐ฟ
- Hotkeys and Stances ๐ฎ
- Strategies ๐
- Settings ๐ง
- Dedicated Server โพ
- RaspberryPi ๐
- Badges & Icons ๐ฅ
- Changelog ๐
Modders โ๏ธ
- Audio guide ๐
- Traits ๐
- Palettes and Remaps ๐จ
- World Coordinate System ๐
- Map scripting
- Lua-API ๐
- Conditions ๐
- Mapping ๐ง
- Pixelart ๐
Developers ๐ง
- Contributing โค๏ธ
- Compiling
- Hacking
- Coding Standard ๐
- Branches and Releases ๐
- Release Checklist โ
- Sequences
- Glossary
- Reverse engineering ๐
- License ยฉ๏ธ