Jump to content

CLAB and Armor Restriction Questions


Fochmarc

Recommended Posts

Is there a table that shows the codes for Applied and Gained abilities when building a CLAB table? I've opened (for instance) SPPR322 in NearInfinity, but it just says that it's innate and non-indexed, without giving the name of what's being applied (it's an applied ability at level one in the CLABFI02 table).

 

How do I restrict armor types in my TP2? I've restricted weapon usage already to a modified Thief list, but I'd like to restrict the class to no heavier an armor than Chainmail, but I'm not sure how.

 

Thanks for any help!

Link to comment

It's best if you look at the contained effects, but a general overview can be had here (if you mean bg2): http://gemrb.org/iesdp/appendices/bg2kitabilities.htm

 

You have to patch all the items (ee) or reuse a kit usability that is closest to what you want.

 

That list is perfect, exactly what I needed! Do multiple versions of the same effect stack or replace each other? For instance, if I give a kit AP_spcl131 +1% Magic Resistance at each level, will it increase by 1% each time or overwrite and stay at 1%?

 

It looks like the Blade has the Chain Mail restriction I wanted, so I would just set the Usability Flag as 0x00200000? Will that impact anything else (Weapons usability, stronghold choice, HLA, etc)?

Link to comment

it depends on the effects and their timing/mode, but the MR one does stack.

 

usability is for all items, so it would also apply to weapons. Of course, you could patch that too if you sacrifice all blades (Hier'dalis).

Link to comment

it depends on the effects and their timing/mode, but the MR one does stack.

 

usability is for all items, so it would also apply to weapons. Of course, you could patch that too if you sacrifice all blades (Hier'dalis).

 

Per usability, evidently you can get around an expanded weapon list by setting weapon proficiencies for unwanted weapons to 0. Woohoo!

Link to comment

Note, setting usability codes will never give you an "expanded list" of usable items. You can mix and match usability for different classes, kits, etc., and the result will always be a *more restricted* set of usable items.

Basically the more you mess with this, the more likely there will be an unintended and undesired result. Not for nothing when veteran modders give advice to new modders, a common refrain is "don't include altered item usability as a kit advantage or disadvantage!"

Now, you *can* do this, if you're willing to simplify things and take all the results as they come. I think it's actually difficult to restrict a kit to chain mail, because there is not any existing kit that has that restriction. You may find an acceptable compromise in simply matching barbarian usability. This is good for a fighter kit, since it will not mess with weapons, but will apply armor restrictions. You give the kit the barbarian usability code (0x40000000), and then you need to do a bit of clean-up to make the game files work as they are meant to:

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
    PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
        READ_BYTE 0x1f "use"
        READ_BYTE 0x29 "kit"
        PATCH_IF ((("%kit%" BAND 0b01000000) = 0b01000000) AND
                (("%use%" BAND 0b00001000) = 0b00001000)) THEN BEGIN
            WRITE_BYTE 0x29 ("%kit%" BAND 0b10111111)
        END
    END
BUT_ONLY_IF_IT_CHANGES

EDIT - I just noticed that you said "I've restricted weapon usage already to a modified Thief list" ... how did you manage to do that? Are you actually changing item usability, or do you just mean you limited proficiency availability in the WEAPPROF column for your kit?

 

If you are giving your kit a set of proficiency limits, and using the Blade usability code to restrict it to chain mail, there may be problems. Blades have weapon restrictions as well (IIRC) so if the Blade kit's weapon restrictions don't line up with your custom kit's proficiency restrictions, you could create a situation where the player can spend a proficiency pip on a weapon they can't use. Which would be frustrating for the player.

 

tl;dr: limiting a new kit's proficiencies is easy and straightforward; messing with item usability invites problems. The best way to do with it, if you're very handy with Weidu and targeting EE games, is to apply an Ashes of Embers-style patch to all weapons, and then use opcode 319 to make usability match proficiency. But this is not easy. I'm just now learning how to do it well.

Link to comment

My point is, altering usability is a very blunt tool - you basically just have to mimic an existing kit. But you can't simply pay attention to the kit's armor restrictions; you also have to pay attention to the interplay between that other kit's weapon restrictions and your proficiency restrictions.

 

I'm just trying to help, to make sure the OP sees everything he needs to see. Doesn't mean it can't be done - I do it myself with several kits. E.g. I have a fighter/mage kit with the Archer item usability flag. But before doing that, I looked at the weapon usability and made sure it works.

Link to comment

I'm just trying to help, to make sure the OP sees everything he needs to see. Doesn't mean it can't be done - I do it myself with several kits. E.g. I have a fighter/mage kit with the Archer item usability flag. But before doing that, I looked at the weapon usability and made sure it works.

At which you have to also make sure that the intention of the kit is to be able to wear the armor or cast arcane spells, OR do both but with a consequence ... as usually the two block each others, like in vanilla, the mage can't wear armor so he is out, while the fighter/mage can but can't casts spells in them, other than the elf chains/robes.

 

But there are mods that remove that while setting a other negative aspects, such as spell failure rate.. or other effects... all of which the kit could also protect the character against for what ever reason. Such as the player hating to fail to cast a level 9th spell that does nothing while preferring that they would be slower at finishing casting of spells ... which again can be blocked by the kit effect etc etc etc...

Link to comment

Archived

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

×
×
  • Create New...