Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Party leadership

  
  1. #11
    Imp
    Join Date
    Nov 2009
    Location
    Tecumseh, OK
    Posts
    14

    Default Re: Party leadership

    Judging from the code, it certainly has *something* to do with experience levels:
    Code:
                    if ( v15 <= get_highest_experience_level_in_group(v5) )
                    {
                      add_creature_to_group(v9, v5);
                    }
                    else
                    {
                      add_creature_to_group_as_leader(v9, v5);
                      v14 = v9;
                    }
    None of the functions called are trivial though, and seem to do a lot of weird checks against flag fields that I don't have a clue about (I gain more and more respect for what Mefistotelis has managed to accomplish every time I look at the disassembly).

    Keep in mind that not all creatures have the same amount of EXP to reach a given level. It may be based in fact on the numeric amount of experience, and not the creature's level. I wish I could answer that more definitively.

  2. #12
    Dungeon Keeper Duke Ragereaver's Avatar
    Join Date
    Aug 2009
    Location
    The Netherlands
    Posts
    1,065

    Default Re: Party leadership

    Thanks for providing with the code, maybe Mefistotelis can make some sense out of it.

    I cheaked the experience levels (named as LevelsTrainValues, right?) of the party in question, but they all seem pretty much the same, and would more support the fact of 'the strongest leads'.

    Code:
    CREATE_PARTY(ELITE)
        ADD_TO_PARTY(ELITE,SAMURAI,9,1000,ATTACK_ENEMIES,0)   <- 16000
        ADD_TO_PARTY(ELITE,WIZARD,8,1500,STEAL_SPELLS,0)        <- 13000
        ADD_TO_PARTY(ELITE,BARBARIAN,8,1000,STEAL_GOLD,0)       <- 13000
        ADD_TO_PARTY(ELITE,GIANT,7,1000,STEAL_SPELLS,0)           <- 10500
    Last edited by Duke Ragereaver; December 24th, 2009 at 08:41.


    Dungeon Keeper I campaign: Undead Keeper
    Download it here!

    Dungeon Keeper I campaign: Post Undead Keeper
    Download it here!

  3. #13
    Dark God DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: Party leadership

    I did some tests and all I can say is that the Leader selection is based upon two things: the experience level of the creatures and the order of the creatures added into a party. It's absolutely not related about creature's speed, amount of spells, kind, strength or such. As strange as it may seem, the first two creatures and their level experiences added in the party influence the Leader selection.

    The game will always check for the creature with the highest experience level from the first added to the last added, but there's a weird exception involving the first and second creatures added.

    Here are some examples of parties of 4 members with the leader indicated and their explanations:

    Level 1 <- Leader
    Level 1
    Level 1
    Level 1

    If all the creatures in a party are level 1, the FIRST creature will become the leader. Once one of them is level 2 or above, he becomes the leader.

    Level 1
    Level 1
    Level 2 <- Leader
    Level 1 or 2

    Level 1
    Level 2 <- Leader
    Level 1 or 2
    Level 1 or 2

    Level 2 <- Leader
    Level 1
    Level 1 or 2
    Level 1 or 2

    When more than a creature is of the same highest level, the game takes the first one encountered (from top to bottom) and he becomes the leader, excepted for a case:

    Level 2
    Level 2 <- Leader
    Level 1 or 2
    Level 1 or 2

    As you can see above, when the two first creatures are of the same level, the game will take the SECOND creature added, I don't know why. This also apply when the last creatures are of the same level or lower. Weird, huh? But wait, it's not over!

    Level 3 <- Leader
    Level 1
    Level 1 or 2 or 3
    Level 1 or 2 or 3

    This one's normal because the first encountered creature is the highest experienced creature. But now, the weird part when we add a level to the second creature:

    Level 3
    Level 2 <- Leader
    Level 1 or 2 or 3
    Level 1 or 2 or 3

    In the example above, the FIRST creature has been ignored because the SECOND creature is level 2 or above with an experience level LOWER than the FIRST one. Indeed, you could set the first creature to level 10 and he won't become the leader at all. Again, I don't know what's causing that, but this is what happens. The only way to get rid of that is to set one of the three last creatures to level 4 or above so that he becomes the leader, like as follows:

    Level 3
    Level 2
    Level 1 or 2 or 3
    Level 4 <- Leader

    Level 3
    Level 2
    Level 4 <- Leader
    Level 1 or 2 or 3 or 4

    Level 3
    Level 4 <- Leader
    Level 1 or 2 or 3 or 4
    Level 1 or 2 or 3 or 4

    As long as the third, fourth, fifth, sixth and seventh creatures added don't have an experience level higher than the first one with a minimum experience level of 3, and that the second creature have a LOWER or equal experience level than the first one, the second creature will become the leader. Otherwise, the first highest experienced creature met (from top to bottom) will become the leader.

    Here's a last example:

    Level 8
    Level 6 <- Leader
    Level 7
    Level 3

    Hope this clarify everything!
    Last edited by DragonsLover; December 25th, 2009 at 23:34.
    I like dragons! They're the center of my life! I'll never forget them...



  4. #14
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,620

    Default Re: Party leadership

    Quote Originally Posted by DragonsLover View Post
    Hope this clarify everything!
    Nope! Just made my tiny brain hurt!
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

    LOL, WFTO

  5. #15
    Dungeon Keeper Duke Ragereaver's Avatar
    Join Date
    Aug 2009
    Location
    The Netherlands
    Posts
    1,065

    Default Re: Party leadership

    Weird system, but it it's actually nice that you can designate pretty much every Hero or Creature as leader, as long you do it right!


    Dungeon Keeper I campaign: Undead Keeper
    Download it here!

    Dungeon Keeper I campaign: Post Undead Keeper
    Download it here!

  6. #16
    Dark God DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: Party leadership

    Yeah, so briefly :


    • To be sure to set your highest experienced creature as a leader in your party, place it at the second position.
    • To be sure to set your lowest experienced creature (level 2 minimum) or a medium experienced creature as a leader in your party, place it at the second position and place the highest experienced creature of the party at the first position.
    • To be sure to have a level 1 creature as a leader, place it at the first position and make sure that all the members of his party are also of level 1. You can't have a level 1 leader with higher experienced creatures as members.
    I like dragons! They're the center of my life! I'll never forget them...



  7. #17
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,620

    Default Re: Party leadership

    Shoulded Duke, or one of the other mods with the power, edit Duke's first post here to include the information DL included in his last post? And this should be stickied, it is a very useful topic that I use. (I came here to use it again ^.^
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

    LOL, WFTO

  8. #18
    Dungeon Keeper Duke Ragereaver's Avatar
    Join Date
    Aug 2009
    Location
    The Netherlands
    Posts
    1,065

    Default Re: Party leadership

    Quote Originally Posted by Metal Gear Rex View Post
    Shoulded Duke, or one of the other mods with the power, edit Duke's first post here to include the information DL included in his last post? And this should be stickied, it is a very useful topic that I use. (I came here to use it again ^.^
    Done.


    Dungeon Keeper I campaign: Undead Keeper
    Download it here!

    Dungeon Keeper I campaign: Post Undead Keeper
    Download it here!

  9. #19

    Default Re: Party leadership

    The leader, will be the creature, that does NOT have the command "DEFEND_PARTY".

Similar Threads

  1. Hero Party actions
    By GamingAddict15 in forum DK2 Troubleshooting
    Replies: 2
    Last Post: November 16th, 2009, 11:32

Tags for this Thread

Posting Permissions

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