Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Kitlist.2DA Questions ... Kit issues

CorsymyrCorsymyr Member Posts: 146
edited February 2015 in General Modding
So I am working on creating a kit and all is going well except the Kitlist.2DA. From my understanding I can add the Hex values under the "Unusable" column to create additional restrictions of items to the kit. The Kit I am making is under the Paladin (6) class, and when I add the Cavalier restrictions "0x00000008" with the restrictions of any of the Thief Kits (i.e. Assassin 0x00040000 + Cavalier 0x00000008 = New Kit 0x00040008) I do not get the Thief restrictions. The Cavalier restrictions are working (no ranged weapons), but I can still wear helmets et cetera.

Ideally it would be nice if there was a way for me to remove the following items from the Kits usability.

Ranged weapons (got this one w/Cavalier)
Armor Restricted to Thief (Leather, and up to Elven Chain)
No Helmets like a Thief (can still use ioun stones etc.)
Shields restricted to Buckler (like Thief or Bard)

If anyone can provide me with the Hex value I would be very grateful.


It seems there are other issues. Maybe something is not right with my Kit. I have included a RAR of the files so far. What I am noticing is that if I create the Kit, it doesn't display the Kit Name in game, but instead Paladin. If someone wants to look at the TP2 etc, they are in the RAR.

Post edited by Corsymyr on


  • AquadrizztAquadrizzt Member Posts: 958
    Hex restriction is tricky because of how the game handles restrictions in general; there is both a class restriction item flag and a kit restriction flag (for the vanilla kits). The class restriction flags overrides the kit restriction, so Assassins don't have an inherent helmet restriction because Thieves cannot use helmets; the no helmets restriction is in the Thief flag, not in the Assassin flag).

    I'm not sure if restriction hexes are the best way to do what you want, maybe consider using OpCode 181 for the types of equipment you want to prevent the use of?

  • CorsymyrCorsymyr Member Posts: 146
    Thanks for the information. The Opcode 181 does look to be a much better overall solution.

  • CorsymyrCorsymyr Member Posts: 146
    @Aquadrizzt I am using Near Infinity v.1.35.0-snapshot-20150125.

    Opcode 181 doesn't seem to function. I have tried numerous settings but it never "disallows" the item type.

    Target: Self (1) tried Preset Target (2) as well
    Power: was set to 0, tried it at 9
    Item Type: Splint Mail (63) and tried shields et cetera, makes no difference
    Restriction: Equip (0), also tried Use (1)
    Timing Mode: Instant/Permanent - 9
    Dispel/Resistance: No dispel/bypass resistance (0)
    Duration: 0 tried setting it to 10000 no change
    Probability 1: 100
    Probability 2: 0
    Save Type: (no save)
    Description: -1

    This is set in the CLAB file as an AP_SPELL. I put a few other items in the spell effects so I know it is running. It just doesn't seem that the opcode is functional. On IESDP it states that type should be set to "0" but the only type field I have is the Item Type, which cannot be set to "0".

    Any thoughts?

  • AquadrizztAquadrizzt Member Posts: 958
    @Corsymyr , that's weird, because I have had great success with it. I'll poke around and get back to you.

  • CorsymyrCorsymyr Member Posts: 146
    @Aquadrizzt if it helps here is the SPL file. Thanks again for your assistance.

  • CrevsDaakCrevsDaak Member Posts: 7,145
    Are you trying on one of the Enhanced Editions or in BG2:ToB? Because in BG2:ToB it only works if you leave par2 = 0.

  • CorsymyrCorsymyr Member Posts: 146
    I am trying this on BG:EE and hopefully on BG2:EE if I can get it to work.

  • argent77argent77 Member Posts: 2,809
    Opcode 181 should work correctly. The bear Wilson in BG2EE (wilson9.cre or wilson13.cre) is using it, for example. You can't specify item type "Splint Mail (63)" however. It's only used in IWD2 (afaik). BGEE uses item category "Armor (2)" for all kinds of armor. The same is true for shields which are all covered by category "Shields (12)", including bucklers.

  • CorsymyrCorsymyr Member Posts: 146
    @argent77 I thought that might be the case, as the old BG1 prof. system. I did exclude shields (12) but it still made no change. My guess is that Opcode 181 just doesn't apply to BG:EE.

  • kjeronkjeron Member Posts: 2,135
    @Corsymyr Remove the #dice/maxlevel and dice_size/minlevel values, currently "1" and "6".

  • CorsymyrCorsymyr Member Posts: 146
    @kjeron That helped ... now I cannot use large shields, and halberds? I don't know why halberds but oh well.

  • KvaellKvaell Member Posts: 1
    edited March 2015
    Hi guys, I'm also trying to use hex values under the "Unusable" part, it would be nice if there would a way for me to keep inside:

    No Helmets like a Thief (can still use ioun stones etc.)
    Keep at least plat armors

    Any idea how I could proceed?

    I've tried opcode 181 to exclude helmet but had the same issue has Corsymyr had, it seems that i can't get the opcode 181 to work, because i'm trying to change it with an item.

    Maybe if the someone can send this wilson.cre I should be able to check it.

    By the way what are the Hex values for thief and druids? I never found it.


  • subtledoctorsubtledoctor Member Posts: 11,466
    Generally, trying to give unique usability rules for a new kit is a Bad Idea. Your first instinct should be to find another way to make the kit special, of to simply piggyback on an existing kit's usability rules.

    If you want to keep experimenting with this, know that there are two kinds of usability: class-based, and kit-based.

    Class-based usability is governed by your kit's base class I believe; in the ADD_KIT routine in Weidu, if you specify class = 19, it will be unable to use items that sorcerer's can't use (I think sorcerer's are 19, but you see what I mean.)

    Then you can also assign a kit flag, which are listed in kitlist.2da and kits.ids. This will add more items that cannot be used, and also associates some other hard-coded kit characteristics: using the wild mage flag will result in wild surges when casting spells, for instance. (It could be interesting to use that with a ranger or cleric kit.)

    Base class hex flags are 00004000 - that just means "trueclass" and all trueclass kits share the same flag. Meaning, you can't apply class-based usability restrictions with a kit-based flag.

Sign In or Register to comment.