Jump to content


Photo

Kit checks in .d and .baf


  • Please log in to reply
3 replies to this topic

#1 JustMe

JustMe
  • Member
  • 47 posts

Posted 29 December 2012 - 07:23 PM

I know next to nothing about the code used in these files but I can read them and get the general idea of what it is doing.  Trying to edit some files but I haven't seen an example on how to check for a specific kit when you check for a class.  For example a something may say...

 

IF ~Class(Player1, FIGHTER_ALL)~ THEN [do something to the player that is a fighter]

or something along the lines of...

IF ~ OR(2) !Class(Player1, MONK) !Class(Player1, CLERIC_ALL)~ THEN [do something to the player that is not a monk or a cleric]

 

My question is how do I specify a kit, like a barbarian, or swashbuckler.  Do I change it to THIEF_SWASHBUCKLER, or just SWASHBUCKLER.  Is it possible?  I am trying to change something to check if the player is any class except for a thief, unless they are a swashbuckler.  So it should turn out something like this:

 

IF ~ OR(2) !Class(Player1, THIEF_ALL) Class(Player1, [insert here what I don't know])~ THEN [do something]

 

Sorry if this isn't clear.  In short, can you specify a kit when checking an npc for a class.  If yes, how.

 

Thank you for your time

 

edit:  sorry about the double post, not sure how that happened...  Can a mod delete one of them?


Edited by JustMe, 29 December 2012 - 07:25 PM.


#2 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 29 December 2012 - 10:14 PM

Use the Kit() trigger.

The original kit.ids file is very broken and will mess up detection of many kits, so make sure you have a mod installed that fixes it (e.g. BG2 Fixpack) before testing.

Even doing this, it's not possible to detect Wild Mages and Barbarians in all circumstances because of a bug in the engine. ToBEx fixes this and it has also been fixed in BGEE.

#3 JustMe

JustMe
  • Member
  • 47 posts

Posted 29 December 2012 - 10:50 PM

@Mike1072 Thank you!



#4 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 29 December 2012 - 11:44 PM

Use the Kit() trigger.
The original kit.ids file is very broken and will mess up detection of many kits, so make sure you have a mod installed that fixes it (e.g. BG2 Fixpack) before testing.
Even doing this, it's not possible to detect Wild Mages and Barbarians in all circumstances because of a bug in the engine. ToBEx fixes this and it has also been fixed in BGEE.
It's not really that broken, if used correctly and you wouldn't have the headache of the problem being tried to be fixed by several other mods... but what ever. The precise idea here is to use the Kit.ids files text identification as the reference for the trigger; You want a Swashbuckler to trigger something special:
IF ~Kit(Player1, SWASHBUCKLER)~ THEN [do something to the player that is a swashbuckler]
Or you could just use the number within the kit.ids file, with the knowledge that if it's file is not the same in the other games the trigger might fail, the idea here is the same as if the kit.ids file is altered after the mod is installed, it can fail the same way.
Why I repeat what Mike said... is cause he failed to use any code...

Deactivated account. The user today is known as The Imp.