Discussion in 'CivBE - General Modding Discussion' started by Bandobras Took, Aug 26, 2017.
Is it possible to make a unit require two different techs to be researched before it can be built?
No, not directly.
Assuming you really want to do it for Beyond earth and have not just chosen the wrong forum, the most elegant workaround I can think of:
- Give the unit a Unit_BuildingClassRequireds-Prereq.
- Then you create a dummy building that has no Tech requirement and a cost of -1 (which means it can't be constructed and won't show up in the UI, other than the Civilopedia) as well as a ConquestProbability to 0.
- Add a free PlayerPerk to the other Tech via Technology_FreePlayerPerks.
- Make that PlayerPerk grant the free FreeBuilding. (Note that this requires the buildingCLASS, not a building type -> <FreeBuilding>BUILDINGCLASS_RELIC</FreeBuilding>)
That way, you have the unit show up on one technology, and on the other Technology you can use the PlayerPerk to add a Note via the Help-Tag.
If instead you meant to post in the Civ5 forums, the easiest way to do it would be via lua. Use City.CanTrain() and check for both technologies.
Actually, just creating a building for a prereq might work just as well. Thanks.
Haha... yeah, that's of course even easier if you're willing to alter the core concept. ^^
It's not even that much of an alteration -- I'm learning how to change the tech web and I wanted people to have to research some spacey stuff to build satellites without putting all the satellites in that area.
Separate names with a comma.