[Request] Crossbows for clerics and mages
TheArtisan
Member Posts: 3,277
I have tried and failed many times to make this work myself. At this point I've basically given up and am reaching out to more experienced modders.
I'm pretty sure there is a way to flag all of a certain weapon, including mod ones, to be usable for a certain class but I cannot for the life of me figure it out. Anyone got any insight on this?
I'm pretty sure there is a way to flag all of a certain weapon, including mod ones, to be usable for a certain class but I cannot for the life of me figure it out. Anyone got any insight on this?
0
Comments
Tome and Blood's core component edits crossbows to be usable by mages/sorcerers with the following code block.
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
READ_BYTE 0x31 "prof" ELSE 0
PATCH_IF ("%prof%" = 103) BEGIN
READ_BYTE 0x1f "fighter"
PATCH_IF (("%fighter%" BAND "0b00001000") = "0b00000000") BEGIN
READ_BYTE 0x20 "mage"
WRITE_BYTE 0x20 ("%mage%" BAND "0b11111011")
END
END
END
BUT_ONLY
Basically, it iterates through all item files in the game's engine, checks if the item is a real item (source size check), and then checks if the item uses the crossbow proficiency. If it does, it patches the proficiency bits of the item to allow mages.
I'm a bit rusty when it comes to modifying kits & classes, but the following TP2 code should handle both items (crossbows and bolts) and crossbow proficiencies: