1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Unit With Two Prereq Techs?

Discussion in 'CivBE - General Modding Discussion' started by Bandobras Took, Aug 26, 2017.

  1. Bandobras Took

    Bandobras Took Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    1,914
    Location:
    Orem, UT
    Is it possible to make a unit require two different techs to be researched before it can be built?
     
  2. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,065
    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.
     
  3. Bandobras Took

    Bandobras Took Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    1,914
    Location:
    Orem, UT
    Actually, just creating a building for a prereq might work just as well. Thanks.
     
  4. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,065
    Haha... yeah, that's of course even easier if you're willing to alter the core concept. ^^
     
  5. Bandobras Took

    Bandobras Took Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    1,914
    Location:
    Orem, UT
    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. :)
     
    Last edited: Aug 28, 2017

Share This Page

Ebates: Get Paid to Shop