Jump to content

Item Restriction Flags


Rabain

Recommended Posts

Hi All!,

 

I have this ongoing issue of items i make being available to classes kits i don't want them available to.

 

Can someone clear this up for me?

 

Am I right in saying:

 

1. In DLTCEP when you tick a class it means that class can use that item including all kits of that class (if they are ticked too but not use the item if the kit is not also ticked).

 

2. In DLTCEP if you have not got a class ticked then even kits of that class cannot use that item. e.g not ticking cleric class means no cleric or cleric kit can use the item.

 

3. In NI if you tick a class or kit it means the opposite to DLTCEP, i.e if you tick cleric it means clerics cannot use the item

 

4. Or am I wrong and every box is separate i.e you can leave cleric unticked (DLTCEP) but tick cleric of lathander and only lanthanderites can use the item?

 

5. And how does this work with multi/dual-class usability.

Link to comment

3. Yes.

 

4. No, see below.

 

5. Multi and dual-classes are treated by the engine as separate classes from clerics or mages or whatever.

 

There are two blocks of unusability flags; the first set is for restrictions by race, alignment, and class and the second is for kits. I use NI where a checked box means it is unusable by X. The first block has separate unusability boxes for, say, mage, fighter-mage, thief-mage, cleric-mage, etc. These flags match the class/race/alignment set in a creature's actual cre file.

 

The kit blocks are a bit trickier. The value you set in kitlist.2da for unusability corresponds the the unusability flag here, and works independently of class/race/alignment, i.e. you could make a ranger kit that uses the invoker unusability flag. You can also combine unusabilities by adding the values, so that if you wanted a kit that was unable to use items not allowed by barbarians and kensais, you would add those two hex values.

 

The key item is that these restrictions stack. So if you made a cleric kit using the kit unusability flags of a stalker, then that means your kit can not use anything disallowed from clerics AND stalkers. So a stalker-item only would not be available to your kit, since the cleric flag would disallow it. A cleric-only item would also be disallowed if it's not usable by a stalker. In your question about making a weapon strictly for Lathanderites, it's not possible. Lathander kits are clerics, therefore checking the cleric unusability flag would make it unusable by the Lathander kit. The reverse is *not* true as you can have an item for trueclass-only by checking the Lathander, Helm, and Talos kit flags--all Morninglords/Watchers/Stormbringers are clerics, but not all clerics are Morninglords/Watchers/Stormbringers.

Link to comment

Hi Guys,

 

I am trying to make an NPC that cannot use any weapons at all, or at least is so restricted that the majority of weapons in the game would be unusable.

 

Has anyone got any suggestions on what mix of restrictions would be best? So far the some kind of kensai/druid combo seems to be the best or monk/kensai/druid.

 

Is it possible to just add 5 or 6 kit restrictions together?

 

Or is there a better way to do this that I haven't thought of?

 

thanks in advance!

Link to comment

Adding kit restrictions should work, yes.

 

However, bear in mind some of the items are keyed to class. For instance, adding the Priest of Helm kit flag to your kit will not stop them being able to use swords, because sword item files are set as unusable by the Cleric class and not the Helm kit itself. :)

 

Off the top of my head, I can think of Cavaliers (no missiles) and Beastmasters (no metal weapons) which have kit restrictions to weapons (though Beastmaster may be armour too, I don't recall).

Link to comment

Okay I want to combine three restriction flags:

 

0x00000004 (kensai; no armour or missile weapons)

0x00020000 (Beastmaster; no metal weapons)

0x00000002 (Wizardslayer; no magic items)

 

Do I just add these to get: 0x00020006 or is that wrong?

 

I guess i can script out the access to the remaining non-metal weapons...clubs, staves etc (baseclass will be fighter to avoid access to spellbooks of mages/clerics).

Link to comment

Thanks for the heads up!

 

So I can't add the restriction flags where there is an overlapping bit...as in the kensai and wizardslayer above? I guess i will have to look at the other restrictions again.

 

Yeah the npc has claws...I am also trying to create creature only usable items...similar to Morte from PST...different kinds of teeth etc. I have figured out how to do this quite easily for the purposes of this npc (the creature isn't a playable race). What i need to do now is dis-allow use of pretty much every game

item possible!

Link to comment

You cannot 'add', but 'or' them up.

 

If the npc has claws, you don't have to screw any items.

Just put an unremovable weapon in its hands.

To make the weapon, copy FIST.ITM, and alter the damage type from nonlethal to slashing and pick a new icon :) It would look pretty good.

Link to comment

I wanted to archive this somewhere before deleting it locally. It turns a 32-bit WeiDU WRITE_LONG value into a series of bitwise patches (I wanted to patchify some really old code without having to manually inspect each file). This is for 32-bit values, but can easily be modified to handle 16- or 8-bit values (WRITE_SHORT, WRITE_BYTE). Obviously, you wouldn't want to patch the file(s) first (the comparison is done from the existing flags and whatever WRITE_LONG value supplied to flags2).

COPY_EXISTING <ITEM_LIST> // list of files that would normally be patched
 READ_LONG 0x1e flags1
 SET flags2 = <UPDATED_FLAGS> // old value patched using WRITE_LONG
 PATCH_IF (flags1 != flags2) BEGIN
   SET origBits = BNOT flags1
   SET origBit00 = ((origBits BAND 0x00000001) = 0x00000001)
   SET origBit01 = ((origBits BAND 0x00000002) = 0x00000002)
   SET origBit02 = ((origBits BAND 0x00000004) = 0x00000004)
   SET origBit03 = ((origBits BAND 0x00000008) = 0x00000008)
   SET origBit04 = ((origBits BAND 0x00000010) = 0x00000010)
   SET origBit05 = ((origBits BAND 0x00000020) = 0x00000020)
   SET origBit06 = ((origBits BAND 0x00000040) = 0x00000040)
   SET origBit07 = ((origBits BAND 0x00000080) = 0x00000080)
   SET origBit08 = ((origBits BAND 0x00000100) = 0x00000100)
   SET origBit09 = ((origBits BAND 0x00000200) = 0x00000200)
   SET origBit0A = ((origBits BAND 0x00000400) = 0x00000400)
   SET origBit0B = ((origBits BAND 0x00000800) = 0x00000800)
   SET origBit0C = ((origBits BAND 0x00001000) = 0x00001000)
   SET origBit0D = ((origBits BAND 0x00002000) = 0x00002000)
   SET origBit0E = ((origBits BAND 0x00004000) = 0x00004000)
   SET origBit0F = ((origBits BAND 0x00008000) = 0x00008000)
   SET origBit10 = ((origBits BAND 0x00010000) = 0x00010000)
   SET origBit11 = ((origBits BAND 0x00020000) = 0x00020000)
   SET origBit12 = ((origBits BAND 0x00040000) = 0x00040000)
   SET origBit13 = ((origBits BAND 0x00080000) = 0x00080000)
   SET origBit14 = ((origBits BAND 0x00100000) = 0x00100000)
   SET origBit15 = ((origBits BAND 0x00200000) = 0x00200000)
   SET origBit16 = ((origBits BAND 0x00400000) = 0x00400000)
   SET origBit17 = ((origBits BAND 0x00800000) = 0x00800000)
   SET origBit18 = ((origBits BAND 0x01000000) = 0x01000000)
   SET origBit19 = ((origBits BAND 0x02000000) = 0x02000000)
   SET origBit1A = ((origBits BAND 0x04000000) = 0x04000000)
   SET origBit1B = ((origBits BAND 0x08000000) = 0x08000000)
   SET origBit1C = ((origBits BAND 0x10000000) = 0x10000000)
   SET origBit1D = ((origBits BAND 0x20000000) = 0x20000000)
   SET origBit1E = ((origBits BAND 0x40000000) = 0x40000000)
   SET origBit1F = ((origBits BAND 0x80000000) = 0x80000000)
   SET newBits = BNOT flags2
   SET newBit00 = ((newBits BAND 0x00000001) = 0x00000001)
   SET newBit01 = ((newBits BAND 0x00000002) = 0x00000002)
   SET newBit02 = ((newBits BAND 0x00000004) = 0x00000004)
   SET newBit03 = ((newBits BAND 0x00000008) = 0x00000008)
   SET newBit04 = ((newBits BAND 0x00000010) = 0x00000010)
   SET newBit05 = ((newBits BAND 0x00000020) = 0x00000020)
   SET newBit06 = ((newBits BAND 0x00000040) = 0x00000040)
   SET newBit07 = ((newBits BAND 0x00000080) = 0x00000080)
   SET newBit08 = ((newBits BAND 0x00000100) = 0x00000100)
   SET newBit09 = ((newBits BAND 0x00000200) = 0x00000200)
   SET newBit0A = ((newBits BAND 0x00000400) = 0x00000400)
   SET newBit0B = ((newBits BAND 0x00000800) = 0x00000800)
   SET newBit0C = ((newBits BAND 0x00001000) = 0x00001000)
   SET newBit0D = ((newBits BAND 0x00002000) = 0x00002000)
   SET newBit0E = ((newBits BAND 0x00004000) = 0x00004000)
   SET newBit0F = ((newBits BAND 0x00008000) = 0x00008000)
   SET newBit10 = ((newBits BAND 0x00010000) = 0x00010000)
   SET newBit11 = ((newBits BAND 0x00020000) = 0x00020000)
   SET newBit12 = ((newBits BAND 0x00040000) = 0x00040000)
   SET newBit13 = ((newBits BAND 0x00080000) = 0x00080000)
   SET newBit14 = ((newBits BAND 0x00100000) = 0x00100000)
   SET newBit15 = ((newBits BAND 0x00200000) = 0x00200000)
   SET newBit16 = ((newBits BAND 0x00400000) = 0x00400000)
   SET newBit17 = ((newBits BAND 0x00800000) = 0x00800000)
   SET newBit18 = ((newBits BAND 0x01000000) = 0x01000000)
   SET newBit19 = ((newBits BAND 0x02000000) = 0x02000000)
   SET newBit1A = ((newBits BAND 0x04000000) = 0x04000000)
   SET newBit1B = ((newBits BAND 0x08000000) = 0x08000000)
   SET newBit1C = ((newBits BAND 0x10000000) = 0x10000000)
   SET newBit1D = ((newBits BAND 0x20000000) = 0x20000000)
   SET newBit1E = ((newBits BAND 0x40000000) = 0x40000000)
   SET newBit1F = ((newBits BAND 0x80000000) = 0x80000000)
   PATCH_IF (origBit00 != newBit00) BEGIN
     PATCH_IF NOT (origBit00) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x01) // mark usable by Chaotic (0)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x01 // mark unusable by Chaotic (0)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit01 != newBit01) BEGIN
     PATCH_IF NOT (origBit01) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x02) // mark usable by Evil (1)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x02 // mark unusable by Evil (1)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit02 != newBit02) BEGIN
     PATCH_IF NOT (origBit02) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x04) // mark usable by Good (2)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x04 // mark unusable by Good (2)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit03 != newBit03) BEGIN
     PATCH_IF NOT (origBit03) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x08) // mark usable by <> Neutral (3)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x08 // mark unusable by <> Neutral (3)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit04 != newBit04) BEGIN
     PATCH_IF NOT (origBit04) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x10) // mark usable by Lawful (4)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x10 // mark unusable by Lawful (4)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit05 != newBit05) BEGIN
     PATCH_IF NOT (origBit05) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x20) // mark usable by Neutral <> (5)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x20 // mark unusable by Neutral <> (5)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit06 != newBit06) BEGIN
     PATCH_IF NOT (origBit06) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x40) // mark usable by Bard (6)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x40 // mark unusable by Bard (6)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit07 != newBit07) BEGIN
     PATCH_IF NOT (origBit07) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BAND (BNOT 0x80) // mark usable by Cleric (7)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1e ~flags~ ELSE 0x00
 WRITE_BYTE 0x1e ~flags~ BOR 0x80 // mark unusable by Cleric (7)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit08 != newBit08) BEGIN
     PATCH_IF NOT (origBit08) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x01) // mark usable by Cleric/Mage (0)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x01 // mark unusable by Cleric/Mage (0)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit09 != newBit09) BEGIN
     PATCH_IF NOT (origBit09) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x02) // mark usable by Cleric/Thief (1)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x02 // mark unusable by Cleric/Thief (1)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit0A != newBit0A) BEGIN
     PATCH_IF NOT (origBit0A) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x04) // mark usable by Cleric/Ranger (2)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x04 // mark unusable by Cleric/Ranger (2)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit0B != newBit0B) BEGIN
     PATCH_IF NOT (origBit0B) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x08) // mark usable by Fighter (3)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x08 // mark unusable by Fighter (3)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit0C != newBit0C) BEGIN
     PATCH_IF NOT (origBit0C) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x10) // mark usable by Fighter/Druid (4)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x10 // mark unusable by Fighter/Druid (4)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit0D != newBit0D) BEGIN
     PATCH_IF NOT (origBit0D) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x20) // mark usable by Fighter/Mage (5)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x20 // mark unusable by Fighter/Mage (5)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit0E != newBit0E) BEGIN
     PATCH_IF NOT (origBit0E) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x40) // mark usable by Fighter/Cleric (6)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x40 // mark unusable by Fighter/Cleric (6)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit0F != newBit0F) BEGIN
     PATCH_IF NOT (origBit0F) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BAND (BNOT 0x80) // mark usable by Fighter/Mage/Cleric (7)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x1f ~flags~ ELSE 0x00
 WRITE_BYTE 0x1f ~flags~ BOR 0x80 // mark unusable by Fighter/Mage/Cleric (7)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit10 != newBit10) BEGIN
     PATCH_IF NOT (origBit10) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x01) // mark usable by Fighter/Mage/Thief (0)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x01 // mark unusable by Fighter/Mage/Thief (0)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit11 != newBit11) BEGIN
     PATCH_IF NOT (origBit11) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x02) // mark usable by Fighter/Thief (1)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x02 // mark unusable by Fighter/Thief (1)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit12 != newBit12) BEGIN
     PATCH_IF NOT (origBit12) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x04) // mark usable by Mage (2)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x04 // mark unusable by Mage (2)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit13 != newBit13) BEGIN
     PATCH_IF NOT (origBit13) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x08) // mark usable by Mage/Thief (3)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x08 // mark unusable by Mage/Thief (3)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit14 != newBit14) BEGIN
     PATCH_IF NOT (origBit14) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x10) // mark usable by Paladin (4)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x10 // mark unusable by Paladin (4)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit15 != newBit15) BEGIN
     PATCH_IF NOT (origBit15) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x20) // mark usable by Ranger (5)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x20 // mark unusable by Ranger (5)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit16 != newBit16) BEGIN
     PATCH_IF NOT (origBit16) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x40) // mark usable by Thief (6)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x40 // mark unusable by Thief (6)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit17 != newBit17) BEGIN
     PATCH_IF NOT (origBit17) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BAND (BNOT 0x80) // mark usable by Elf (7)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x20 ~flags~ ELSE 0x00
 WRITE_BYTE 0x20 ~flags~ BOR 0x80 // mark unusable by Elf (7)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit18 != newBit18) BEGIN
     PATCH_IF NOT (origBit18) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x01) // mark usable by Dwarf (0)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x01 // mark unusable by Dwarf (0)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit19 != newBit19) BEGIN
     PATCH_IF NOT (origBit19) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x02) // mark usable by Half-Elf (1)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x02 // mark unusable by Half-Elf (1)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit1A != newBit1A) BEGIN
     PATCH_IF NOT (origBit1A) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x04) // mark usable by Halfling (2)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x04 // mark unusable by Halfling (2)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit1B != newBit1B) BEGIN
     PATCH_IF NOT (origBit1B) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x08) // mark usable by Human (3)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x08 // mark unusable by Human (3)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit1C != newBit1C) BEGIN
     PATCH_IF NOT (origBit1C) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x10) // mark usable by Gnome (4)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x10 // mark unusable by Gnome (4)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit1D != newBit1D) BEGIN
     PATCH_IF NOT (origBit1D) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x20) // mark usable by Monk (5)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x20 // mark unusable by Monk (5)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit1E != newBit1E) BEGIN
     PATCH_IF NOT (origBit1E) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x40) // mark usable by Druid (6)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x40 // mark unusable by Druid (6)
BUT_ONLY_IF_IT_CHANGES"
   END
   PATCH_IF (origBit1F != newBit1F) BEGIN
     PATCH_IF NOT (origBit1F) BEGIN
       PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BAND (BNOT 0x80) // mark usable by Half-Orc (7)
BUT_ONLY_IF_IT_CHANGES"
     END ELSE PATCH_PRINT "COPY_EXISTING ~%SOURCE_FILE%~ ~OVERRIDE~
 READ_BYTE 0x21 ~flags~ ELSE 0x00
 WRITE_BYTE 0x21 ~flags~ BOR 0x80 // mark unusable by Half-Orc (7)
BUT_ONLY_IF_IT_CHANGES"
   END
 END
BUT_ONLY_IF_IT_CHANGES

I suck.

Link to comment

Archived

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

×
×
  • Create New...