QuestInfos and CvQuestManager

Discussion in 'Civ4 - Creation & Customization' started by Padmewan, Apr 29, 2006.

  1. Padmewan

    Padmewan King

    Joined:
    Nov 26, 2003
    Messages:
    748
    Location:
    Planet
    Has anyone tried playing with either of these, which look like they were primarily set up for the purpose of the tutorial, but look like they could (easily?) be repurposed for game quests/missions/survival conditions? Did a search of the forums, wikis, etc. and found nothing, so sorry if this repeats any previous questions.
     
  2. Padmewan

    Padmewan King

    Joined:
    Nov 26, 2003
    Messages:
    748
    Location:
    Planet
    :bump:

    Well, if no one knows anything about quests, how about FEATS (like when you first hook up copper, or a health resource, or build a unit, or archer, etc...)
     
  3. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Feats? Where? I've been looking for the thing that controls those damned popups for a while!

    Sadly no idea about quests BTW.
     
  4. Padmewan

    Padmewan King

    Joined:
    Nov 26, 2003
    Messages:
    748
    Location:
    Planet
    Look in CvAdvisorUtils.py

    featPopup
    populationFeat
    unitBuiltFeat
    buildingBuiltFeats
    endTurnFeats

    I have no idea what is calling these functions. I've done a preliminary search for featPopup, but more thorough investigation is necessary.

    The all refer the structure FeatTypes.FEAT_(whatever)

    No idea where FeatTypes is defined, either.
     
  5. Belizan

    Belizan Emperor

    Joined:
    Jan 11, 2006
    Messages:
    1,060
    mmm, they are called from CvAdvisorUtils, which in turn is called from CvEventManager...


    e.g.
    EventManager:
    00431: CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

    AdvisorUtils:
    00199: def buildingBuiltFeats(pCity, iBuildingType):
     
  6. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Thanks for this - I was having problems with my new UnitCombatTypes causing all the unitBuilt feats to pop up as soon as I'd built one of them.
     
  7. woodelf

    woodelf Bard Retired Moderator

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    Ick, is this the thing where you build a Settler and you get 12 popups congratulating you on making the first X, Y, and Z of each type? That was a bugger early on in SotM.
     
  8. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Yes. Really annoying!

    My next mission is to see if I can find the code which tells you a great person has been born... and kill it!
     
  9. Belizan

    Belizan Emperor

    Joined:
    Jan 11, 2006
    Messages:
    1,060
    Glad I could be of help ;). As for GPs, I'm pretty sure those messages are generated from the C++ layer. Although, I guess, now that we have the SDK, it's probably findable... *mutters to himself*

    Ok, that was easy.. In CvCity.cpp in the void CvCity::createGreatPeople() function...

    e.g.
    C:\Documents and Settings\Shin\My Documents\Visual Studio Projects\CvGameCoreDLL_v161\CvGameCoreDLL\CvCity.cpp(891): szBuffer = gDLL->getText("TXT_KEY_MISC_GP_BORN", pGreatPeopleUnit->getNameKey(), getNameKey());

    and
    C:\Documents and Settings\Shin\My Documents\Visual Studio Projects\CvGameCoreDLL_v161\CvGameCoreDLL\CvCity.cpp(900): szBuffer = gDLL->getText("TXT_KEY_MISC_GP_BORN", pGreatPeopleUnit->getNameKey(), getNameKey());

    and line 905.
     
  10. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Thanks - I was hoping it wasn't going to be in the SDK (like the feats). I'm at uni so I'm refraining from making SDK changes until I can actually compile them (in ~8 weeks).

    Thanks anyway!
     
  11. Padmewan

    Padmewan King

    Joined:
    Nov 26, 2003
    Messages:
    748
    Location:
    Planet
    Thank you Belizan. I think we will make use of this ourselves.

    Now, back to quests. Any ideas? Anyone using them?
     

Share This Page