Results 1 to 5 of 5

Thread: Faction Leader Traits

  1. #1

    Icon1 Faction Leader Traits

    With this mod, leaders now get traits made on for leaders rather than minister traits.
    However, you should note that these properties appear only after one round, after the new leaders and ministers have appeared.

    https://github.com/Nathan-Hades/Faction-Leader-Trait

  2. #2

    Default Re: Faction Leader Traits

    Hi Kivaniel! Thank you for your splendid job! Could you please elaborate on how exactly you achieved this? I can't figure it out by looking at the script.

  3. #3

    Default Re: Faction Leader Traits

    Herewith my code begins:
    Code:
    events.CharacterTurnEnd[#events.CharacterTurnEnd+1] =
    Thus, the assignment of traits does not begin until one turn after appearance.
    If the assignment were triggered directly upon appearance, the game would still understand the leaders as ministers.

    Code:
    and conditions.CharacterTrait("C_Leader_Agent_99", context) < 1 
    and conditions.CharacterTrait("C_Leader_Army_Buff", context) < 1 
    and conditions.CharacterTrait("C_Leader_Clever_Stick", context) < 1 
    and conditions.CharacterTrait("C_Leader_Debauched", context) < 1
    and so on
    To prevent the leader from getting new traits every turn, this only happens if he doesn't have any traits yet.

    Code:
    effect.trait("C_Leader_Agent_99", "agent", 1, 8, context)
    effect.trait("C_Leader_Agent_99", "agent", 4, 8, context)
    effect.trait("C_Leader_Army_Buff", "agent", 1, 8, context)
    effect.trait("C_Leader_Army_Buff", "agent", 4, 8, context)
    effect.trait("C_Leader_Army_Buff", "agent", 6, 8, context)
    effect.trait("C_Leader_Clever_Stick", "agent", 1, 8, context)
    effect.trait("C_Leader_Clever_Stick", "agent", 4, 8, context)
    effect.trait("C_Leader_Clever_Stick", "agent", 6, 8, context)
    and so on
    I hereby give the leaders the different characteristics. Since there are more traits that subtract points than add, positive traits appear more often.

  4. #4

    Default Re: Faction Leader Traits

    Thank you for explanation! Does that basically mean, that the initial source of the problem is that the game treats leaders as ministers on the turn of their appearance?

  5. #5

    Default Re: Faction Leader Traits

    It seems so.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •