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

Remind me how Agendas connect to Leaders

Discussion in 'Mod Creation Help' started by isau, Feb 8, 2018.

  1. isau

    isau Warlord

    Joined:
    Jan 15, 2007
    Messages:
    2,750
    It's been a while since I worked on my mod and I've totally blanked on this. I've forgotten the chain through which Agendas connect to Leaders. There is some code in this post for hopeful added clarity, but I don't necessarily need code advice, just to know the correct tables to join.

    This code produces a linkage from Agendas to the Trait level, using Agendas >> AgendaTraits >> Traits.

    select * from agendas
    left join agendatraits on agendas.AgendaType = agendatraits.AgendaType
    left join traits on traits.TraitType = agendatraits.TraitType

    Spoiler :
    upload_2018-2-8_18-53-54.png



    I would assume adding a left join to LeaderTraits would fix show which leader the Trait is attached to:

    select * from agendas
    left join agendatraits on agendas.AgendaType = agendatraits.AgendaType
    left join traits on traits.TraitType = agendatraits.TraitType
    left join leadertraits on leadertraits.TraitType = traits.TraitType


    ...but it returns nothing because there are no matches. What the is actual correct linkage from Agendas to Leaders?
     
  2. criZp

    criZp Chieftain

    Joined:
    Jul 19, 2013
    Messages:
    710
    Location:
    Nidaros, Norway
    I don't do sql, but agendas and leaders are connected in the leaders.xml or the agendas.xml, can't remember which one.
     
  3. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    1,867
    Location:
    Portugal
    I think you are missing "HistoricalAgendas" table, this is the one that matches agendas to leaders: "LeaderType" , "AgendaType"
     

Share This Page