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

Tech web eras

Discussion in 'CivBE - Mod Development' started by Starrynite120, Dec 1, 2015.

  1. Starrynite120

    Starrynite120 Chieftain

    Joined:
    Jul 15, 2015
    Messages:
    472
    I'm playing around with the tech tree a bit, moving some things around, and something that really bothers me is it's so easy to beeline techs. So I thought of adding a requirement for moving among the rings. You can't research anything in the second ring until you have so many techs in the first ring, so each ring is like an era. I would actually like to make each ring an era (I'll be moving techs around and making a fourth ring) and make it a requirement that you need so many techs per era. Unfortunately I'm not too skilled in modding (yet, I'm working on it), and I was wondering if anyone could give me advice for how to go about this.
     
  2. Machiavelli24

    Machiavelli24 Mod creator

    Joined:
    May 9, 2012
    Messages:
    818
    You should be able to use PlayerCanResearch(playerID, techType) add additional restrictions to techs. If the techType has a radius of X count the number of less than radius X techs they have. If they don't have enough return false and the player will not be allowed to research that tech.
     
  3. Starrynite120

    Starrynite120 Chieftain

    Joined:
    Jul 15, 2015
    Messages:
    472
    Ah ok. Sounds simple enough. Thanks!
     
  4. Starrynite120

    Starrynite120 Chieftain

    Joined:
    Jul 15, 2015
    Messages:
    472
    Would you (or anyone) mind giving me an example of code showing me how I could do this? I'm only beginning to code lua, and I'm finding it a bit tricky to get the hang of it.

    Would it be something like this?

    local Variable = ResearchedTechs where GridRadius = 1
    If Variable < 4 then
    PlayerCanResearch where GridRadius = 2
    Return false
    Else
    PlayerCanResearch = true

    I'm sure there are plenty of problems with this haha I'm just trying to figure it out.
     

Share This Page

Ebates: Get Paid to Shop