Jump to content

LevelParty Trigger (BG2)


melkor_morgoth75

Recommended Posts

Hi all,

 

as per here -> http://www.shsforums.net/index.php?showtopic=35992 <- i'm trying to create a new spawn system for the Bg1 parte of a BGT game. (based somewhat on tut-levelled spawn system).

 

I'd liked to set different spawn according to Charaters' level and Number of party members.

 

Unfortunately there is a BG2 trigger (LevelParty) that is not working as expected. It doesn't return the HIGHEST levelled member ... i tested it multiple times. Please anyone just has discovered such behaviour?

 

I'm forced right now to arrange the system using Level(Player1) ... so based only on the main character.

 

Maybe anyone has a workaround or a solution to check the highest levelled character in the party?

 

Thanks in advance,

 

mm75

Link to comment

Since your in BG2 engine you could use a series of checks as in:

IF
OR(6)
CheckStat("player1",1,LEVEL)
CheckStat("player2",1,LEVEL)
CheckStat("player3",1,LEVEL)
CheckStat("player4",1,LEVEL)
CheckStat("player5",1,LEVEL)
CheckStat("player6",1,LEVEL)
THEN
RESPONSE #100
/*your actions go here*/
END

Link to comment
Since your in BG2 engine you could use a series of checks as in:

IF
OR(6)
CheckStat("player1",1,LEVEL)
CheckStat("player2",1,LEVEL)
CheckStat("player3",1,LEVEL)
CheckStat("player4",1,LEVEL)
CheckStat("player5",1,LEVEL)
CheckStat("player6",1,LEVEL)
THEN
RESPONSE #100
/*your actions go here*/
END

 

If i got your point, it would be impossibile to manage such checks...u never know how party is composed so, i should check for any values ... :) I would have to check..

1,1,1,1,1,2 ... 1,1,1,1,2,1 .. etc... impossible really ..

 

mm75

Link to comment
Party level works as expected (just not the way you want).

 

You could try to check Level(StrongestOf()), but I can't remember if the strongest was always the highest level or if there were other factors.

 

May i ask u how does it work please? I knew that it should return the highest levelled character.

I will try Level(StrongestOf()) anyway and check, may you let me know how does it work? I don't find it in bg2 triggers...

 

mm75

Link to comment
Since your in BG2 engine you could use a series of checks as in:

IF
OR(6)
CheckStat("player1",1,LEVEL)
CheckStat("player2",1,LEVEL)
CheckStat("player3",1,LEVEL)
CheckStat("player4",1,LEVEL)
CheckStat("player5",1,LEVEL)
CheckStat("player6",1,LEVEL)
THEN
RESPONSE #100
/*your actions go here*/
END

 

If i got your point, it would be impossibile to manage such checks...u never know how party is composed so, i should check for any values ... :) I would have to check..

1,1,1,1,1,2 ... 1,1,1,1,2,1 .. etc... impossible really ..

 

mm75

You can use ranges as well with the GT and LT suffixes.

StrongestOf() is an object identifier in your object.ids file

You could use it in the above, it might even work.

IF
CheckStatGT(StrongestOf([PC]),1,LEVEL)
CheckStatLT(StrongestOf([PC]),4,LEVEL)
THEN
RESPONSE #100
/* you actions here */
END

In this example the level of the party member who is strongest is checked and your actions are done if that party member is at levels 2 or 3.

PC is found in the EA.ids file. All party members fall under the PC enemy/ally category.

If for some reason you wanted to only check the male party members there is the StrongestOfMale() object identifier which I believe Shar-teel uses in bg1 to fight only male party members during her joining dialog.

Link to comment

StrongestOf() will only ever return party members, so StrongestOf([PC]) is pointless. Stick with StrongestOf() (i.e., StrongestOf(Myself)).

 

Note that your example will pick only the first level for dual- or multiclass characters (where additional class levels are stored in LEVEL2 and LEVEL3). Also, there should be a Level() trigger (along with LevelGT() and LevelLT()) in BG2, and it may be smarter (check total level vs. individual class levels).

Link to comment
StrongestOf() will only ever return party members, so StrongestOf([PC]) is pointless. Stick with StrongestOf() (i.e., StrongestOf(Myself)).

 

Note that your example will pick only the first level for dual- or multiclass characters (where additional class levels are stored in LEVEL2 and LEVEL3). Also, there should be a Level() trigger (along with LevelGT() and LevelLT()) in BG2, and it may be smarter (check total level vs. individual class levels).

 

Hi devSin,

 

thanks for your answer. I'm currently at the very beginning of my modding activity so sorry if i cannot get fully your points. I tried [PC] and it seemed to work ... may you explain me the difference please using it and (Myself)?

If i understood u correctly, u suggest to use StrongestOf(Myself) ... but won't it check only against the main character? So it triggers only if a party member has a higher level than him/her ...

 

I got your point for dual-multiclassed chars, but i didn't understand how can i check those ... is there a way to check for ALL levels (any classes) a character may have?

 

The main aim for me is to check the highest levelled character (no matter in which class, or better... maybe in the active class) in my party and then trigger the action.

 

Thanks again,

 

mm75

Link to comment

StrongestOf returns the "strongest" character in the party (this is level or a combination of level and attributes or experience or something -- it may not always return the highest level character, but it probably does, and it would be the easiest thing to use to get you really close to what you want). Extending it with ([PC]) will work but is pointless (it won't change what StrongestOf returns in any way). You can keep using it, but using ([PC]) is meaningless.

 

I think the Level() trigger should check total level (you'll have to test to be sure); there are LEVEL2 and LEVEL3 stats that you can use CheckStat() to check (if a PC has two classes, LEVEL and LEVEL2 will contain the level for the first and second classes, respectively, and for one of the three-class combinations, LEVEL and LEVEL 2 and LEVEL3 will each contain the level for one of the three classes). If you use CheckStat(StrongestOf(),X,LEVEL) and StrongestOf() is a CLERIC_MAGE in the party, the trigger will only return true if the character's cleric level is X (their mage level could be anything, from 1 to the maximum allowed).

 

If you just want the highest level character, I'd really just trust StrongestOf(). Unless you need to know the exact level of the character, just target your actions to StrongestOf() (somebody in the party is always going to be the highest level character in the party, so there's not really anything to check for). E.g., if you wanted to start a dialogue with the highest level character, just check for the conditions you want to be true for the dialogue to run and do StartDialogueNoSet(StrongestOf()) (or DisplayStringHead(StrongestOf(),X) or whatever you want to happen with that character).

Link to comment
StrongestOf returns the "strongest" character in the party (this is level or a combination of level and attributes or experience or something -- it may not always return the highest level character, but it probably does, and it would be the easiest thing to use to get you really close to what you want). Extending it with ([PC]) will work but is pointless (it won't change what StrongestOf returns in any way). You can keep using it, but using ([PC]) is meaningless.

 

I think the Level() trigger should check total level (you'll have to test to be sure); there are LEVEL2 and LEVEL3 stats that you can use CheckStat() to check (if a PC has two classes, LEVEL and LEVEL2 will contain the level for the first and second classes, respectively, and for one of the three-class combinations, LEVEL and LEVEL 2 and LEVEL3 will each contain the level for one of the three classes). If you use CheckStat(StrongestOf(),X,LEVEL) and StrongestOf() is a CLERIC_MAGE in the party, the trigger will only return true if the character's cleric level is X (their mage level could be anything, from 1 to the maximum allowed).

 

If you just want the highest level character, I'd really just trust StrongestOf(). Unless you need to know the exact level of the character, just target your actions to StrongestOf() (somebody in the party is always going to be the highest level character in the party, so there's not really anything to check for). E.g., if you wanted to start a dialogue with the highest level character, just check for the conditions you want to be true for the dialogue to run and do StartDialogueNoSet(StrongestOf()) (or DisplayStringHead(StrongestOf(),X) or whatever you want to happen with that character).

 

OK, understood. I will use StrongestOf() and i will test it also with dual/multiple classes (will use (OR) to check also Level2 and Level3 eventually).

 

Many thanks guys, you rock!

 

mm75

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...