1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Disabling Research for a Particular Civ - Tech Advisor Problem

Discussion in 'Civ4 - SDK/Python' started by deanej, Sep 6, 2010.

  1. deanej

    deanej Deity

    Joined:
    Apr 8, 2006
    Messages:
    4,859
    Location:
    New York State
    I've set up my Star Trek mod so that one civ can't research techs normally. I've done this by adding a new XML tag in Civ4CivilizationInfos and referencing that tag in CvPlayer::canResearch. Problem is, using the tech advisor screen, you can still research techs! It seems that canResearch is only used by goody huts and the tech selection popup. What does the tech advisor use?
     
  2. Jarlaxe Baenre

    Jarlaxe Baenre Emperor

    Joined:
    Feb 17, 2010
    Messages:
    1,958
    Location:
    Calgary, Alberta, Canada
    How about you just make their palace provide -1000000 research points?
     
  3. deanej

    deanej Deity

    Joined:
    Apr 8, 2006
    Messages:
    4,859
    Location:
    New York State
    I just found and looked at the tech advisor screen and it uses canEverResearch to display and changing that function fixed the problem (I prefer clean solutions anyways).
     
  4. MegalodonShark

    MegalodonShark Chieftain

    Joined:
    Oct 3, 2010
    Messages:
    39
    Location:
    Land of Oz
    I know you've already solved your problem, but just for reference: in the XML files you can disable a civ from researching certain techs. I probably would have just listed the techs in the research tree that I didn't want them to progress past, since all those after would be dependent on having them.
     
  5. deanej

    deanej Deity

    Joined:
    Apr 8, 2006
    Messages:
    4,859
    Location:
    New York State
    Yes, but I also wanted them to be able to get techs from huts and to recieve techs on conquest (using the goody hut code). The idea is to represent a civ that assimilates technology from others rather than researching themselves.
     

Share This Page