deratiseur Posted July 11, 2010 Share Posted July 11, 2010 Hello I have made a warrior kit, and i want to make armors and shield unusable for it, but not gloves/bracers. (I must can use them) So the kensai code is bad. The shapeshifter code seems to be a good idea but ... he can use shield ! The "shapeshifters unusable code" doesn't forbid shields, it's the druid class which do it ! So, i need a weidu code, which patch all the shields to be unusable by shapeshifter. It's do no long change the shapeshifter class, but offer a real possibility to forbid armor and shield by another code from the kensaï. There is an exemple of the code in the feralan kit from UB, but it doesn't work, the feralan can use all shields. Please, help me Link to comment
Mike1072 Posted July 11, 2010 Share Posted July 11, 2010 COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) BEGIN PATCH_IF (SHORT_AT 0x1c == 0x0c) BEGIN // shield WRITE_BYTE 0x29 (THIS BOR 0b00010000) // make unusable by shapeshifters END END BUT_ONLY Link to comment
deratiseur Posted July 18, 2010 Author Share Posted July 18, 2010 Cool, it works Really really thanks Link to comment
deratiseur Posted July 29, 2010 Author Share Posted July 29, 2010 This code have worked on the first try, but now, after an uninstall/reinstall, il doesn't work. I have try on a vanilla bg2 freshly reinstalled with no mods installed except the BG3 fixpack, and the error is the same : [D:\Travaux\Copies de travail\Baldurs Gate 2\/DATA/ITEMS.BIF] 659688 bytes, 1990 files, 0 tilesets[./override/AROW15.ITM] loaded, 170 bytes [./override/BAZPLO07.ITM] loaded, 114 bytes [./override/BEHOLD.ITM] loaded, 170 bytes [./override/BLAKBLAD.ITM] loaded, 890 bytes [./override/BLUN14.ITM] loaded, 602 bytes [./override/BOOT01.ITM] loaded, 210 bytes [./override/BULL01.ITM] loaded, 170 bytes [./override/BULL03.ITM] loaded, 170 bytes [./override/BULL04.ITM] loaded, 314 bytes [./override/CHAINS.ITM] loaded, 162 bytes ERROR: [CHALSHLD.ITM] -> [override/CHALSHLD.ITM] Patching Failed (COPY) (Not_found) Stopping installation because of error. Please, help me :/ Link to comment
Mike1072 Posted July 29, 2010 Share Posted July 29, 2010 Are you using the most recent WeiDU version? Link to comment
deratiseur Posted July 29, 2010 Author Share Posted July 29, 2010 I'm using the 21300. Link to comment
Mike1072 Posted July 29, 2010 Share Posted July 29, 2010 The code I provided uses a feature introduced in v214. Link to comment
deratiseur Posted July 30, 2010 Author Share Posted July 30, 2010 I'm using the 21300. Ok, It works with the 2.18. Thanks a lot, again Link to comment
deratiseur Posted August 6, 2010 Author Share Posted August 6, 2010 Hello again:) Same matter, next round. Swords are all enabled for all class except the beastmaster. Except for katanas. These one are the only sword forbidden for all cleric and all druid. So my two fighters kit using the shapeshifter unusable code cannot use katanas. I'm looking for an alternative of the Kensaï, and it's not there for the moment. I have tried to use the same weidu instruction to patche all swords at 0x29 bytes to allow all class, but i haven't sucess. Please, help me to decryt the code (THIS BOR 0b00010000) note : this topic can finally made a good alternative to the kensaï code "use no armor and shield, but have access to bracers", so maybe can it be pinned ? Link to comment
Jarno Mikkola Posted August 6, 2010 Share Posted August 6, 2010 (THIS BOR 0b00010000) Well, the BOR is a "bitwise comparison of OR", the 0b00010000 is the number the "Kit Usability 1" has in the .itm file, the "0b" marks the number to be binary number in the bit "76543210" in the Byte 1. If you wish to make the item usable with each class, you need to also change the 0x001e, 0x001f, 0x0020 and 0x0021, as they determine the common class, alignment and race usability. Link to comment
deratiseur Posted August 6, 2010 Author Share Posted August 6, 2010 (THIS BOR 0b00010000) Well, the BOR is a "bitwise comparison of OR", the 0b00010000 is the number the "Kit Usability 1" has in the .itm file, the "0b" marks the number to be binary number in the bit "76543210" in the Byte 1. If you wish to make the item usable with each class, you need to also change the 0x001e, 0x001f, 0x0020 and 0x0021, as they determine the common class, alignment and race usability. Huuuu .... well, y have try to undestand, so i have try this : COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) BEGIN PATCH_IF (SHORT_AT 0x1c == 0x14) BEGIN // longsword WRITE_BYTE 0x29 (THIS BOR 0b00000000) // make usable by all clerics/druids END END BUT_ONLY It doesn't work. So the 0b00000000 doesn'i indicate to weidu to wrote "O" on all boxes ? Link to comment
Mike1072 Posted August 6, 2010 Share Posted August 6, 2010 So the 0b00000000 doesn'i indicate to weidu to wrote "O" on all boxes ? If you OR something with a 0, you will always get the original value. If you OR something with a 1, you will always get a 1. So, if you want to make an item unusable by a certain kit or class, you use OR with 1s in the positions that should be changed and 0s in the positions that should remain as they are. If you AND something with a 0, you will always get a 0. If you AND something with a 1, you will always get the original value. So, if you want to make an item usable by a certain kit or class, you use AND with 0s in the positions that should be changed and 1s in the positions that should remain as they are. Swords are all enabled for all class except the beastmaster.Except for katanas. These one are the only sword forbidden for all cleric and all druid. So, you want to: * Make short swords, long swords, bastard swords, two-handed swords, wakizashis, ninja-tos, and scimitars usable by everyone except Beast Masters * Make katanas usable by everyone except Beast Masters, Clerics, and Druids Is this right? So my two fighters kit using the shapeshifter unusable code cannot use katanas. I'm looking for an alternative of the Kensaï, and it's not there for the moment. I'm not sure what you mean by this. Link to comment
deratiseur Posted August 6, 2010 Author Share Posted August 6, 2010 So, you want to: * Make short swords, long swords, bastard swords, two-handed swords, wakizashis, ninja-tos, and scimitars usable by everyone except Beast Masters * Make katanas usable by everyone except Beast Masters, Clerics, and Druids Is this right? Actually my kit is a warrior with the beastmaster code who can't use armor AND katana. I want allow him to use katana, so i have to allow katana for beastmasters. in the vanilla game katanas are the only swords not allowed for clerics and druids, so that what i want to change. If i has understand what you said, i so have to use : (THIS BAND 0b00000000) 10 minutes latter. I have test that ingame, it's works Now i have a fighter who cannot use armor and shield, and no other inconvenient cool. I can release my mod now Thanks a lot to you and Jarno Mikkola Link to comment
Mike1072 Posted August 6, 2010 Share Posted August 6, 2010 in the vanilla game katanas are the only swords not allowed for clerics and druids, so that what i want to change. In the vanilla game, clerics can't use any swords, and druids can only use scimitars. Here's code for making katanas usable by beastmasters: COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) BEGIN READ_ASCII 0x22 animation (2) PATCH_IF (~%animation%~ STRING_EQUAL_CASE ~S3~) BEGIN // katana WRITE_BYTE 0x2b (THIS BAND 0b11111101) // make usable by beastmasters END END BUT_ONLY Link to comment
deratiseur Posted August 7, 2010 Author Share Posted August 7, 2010 In the vanilla game, clerics can't use any swords, and druids can only use scimitars. In the vanilla game this is Harcoded. But the items themsefs gone against this. The shields (files) are allowed to druids, and so on shapeshifter -> it's the hardcode that make him unallow to carry thems ingame. As for the swords. Except for katanas, they are all (files) allowed for druids and cleric. That are the game rules who forbid a cleric to carry them ingame. note : the vanilla swords are allowed for everyone, but not for multiclasses with cleric/druid as componant. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.