Jump to content

Item Quantity/Charge mismatches


Nythrun

Recommended Posts

A bunch of these are harmless, and the Fixpack has caught some already;

// Checking areas for overcharged items
"AR0063.ARE" "override" // POTN08 (num 53) has assigned 8 to stack 5 charges 1 in header 1
"AR0305.ARE" "override" // DAGG01 (num 10) has assigned 3 to stack 1 charges 0 in header 1
"AR0305.ARE" "override" // SW1H01 (num 11) has assigned 3 to stack 1 charges 0 in header 1
"AR0334.ARE" "override" // BOW01 (num 5) has assigned 2 to stack 1 charges 0 in header 1
"AR0334.ARE" "override" // BOW03 (num 6) has assigned 2 to stack 1 charges 0 in header 1
"AR0505.ARE" "override" // BOW01 (num 19) has assigned 2 to stack 1 charges 0 in header 1
"AR0505.ARE" "override" // BOW03 (num 20) has assigned 2 to stack 1 charges 0 in header 1
"AR0505.ARE" "override" // BOW05 (num 21) has assigned 2 to stack 1 charges 0 in header 1
"AR0505.ARE" "override" // SW1H01 (num 25) has assigned 2 to stack 1 charges 0 in header 1
"AR0530.ARE" "override" // SW2H01 (num 3) has assigned 2 to stack 1 charges 0 in header 1
"AR0711.ARE" "override" // WAND12 (num 2) has assigned 50 to stack 1 charges 10 in header 1
"AR0801.ARE" "override" // MISC6W (num 0) has assigned 3 to stack 1 charges 0 in header 1
"AR0801.ARE" "override" // MISC6W (num 3) has assigned 2 to stack 1 charges 0 in header 1
"AR0903.ARE" "override" // POTN08 (num 11) has assigned 8 to stack 5 charges 1 in header 1
"AR0903.ARE" "override" // DAGG01 (num 15) has assigned 4 to stack 1 charges 0 in header 1
"AR1202.ARE" "override" // KEY07 (num 4) has assigned 4 to stack 1 charges 0 in header 1
"AR1303.ARE" "override" //  (num 20) has assigned 20 to stack 1 charges 0 in header 1
"AR2209.ARE" "override" // MISC36 (num 3) has assigned 45 to stack 20 charges 0 in header 1
"AR2400.ARE" "override" // MISC3O (num 4) has assigned 3 to max 0 in header 2
"AR2802.ARE" "override" // DAGG05 (num 5) has assigned 20 to stack 10 charges 1 in header 1
"AR2802.ARE" "override" // DAGG05 (num 6) has assigned 20 to stack 10 charges 1 in header 1
"AR2802.ARE" "override" // DAGG05 (num 7) has assigned 20 to stack 10 charges 1 in header 1
"AR2901.ARE" "override" // POTN11 (num 2) has assigned 6 to stack 5 charges 1 in header 1
"AR3001.ARE" "override" // POTN20 (num 16) has assigned 6 to stack 5 charges 1 in header 1
"AR3016.ARE" "override" // POTN55 (num 29) has assigned 6 to stack 5 charges 1 in header 1
"AR3016.ARE" "override" // WAND18 (num 44) has assigned 6 to max 5 in header 2
"AR3016.ARE" "override" // WAND19 (num 128) has assigned 1 to max 0 in header 2
"AR3016.ARE" "override" // WAND19 (num 128) has assigned 1 to max 0 in header 3
"AR3017.ARE" "override" // POTN08 (num 78) has assigned 10 to stack 5 charges 1 in header 1
"AR3021.ARE" "override" // WAND19 (num 2) has assigned 1 to max 0 in header 2
"AR3021.ARE" "override" // WAND19 (num 2) has assigned 1 to max 0 in header 3
"AR3022.ARE" "override" // WAND18 (num 10) has assigned 6 to max 5 in header 2
"AR5502.ARE" "override" // SW1H05 (num 5) has assigned 2 to stack 1 charges 0 in header 1
"AR6300.ARE" "override" // PLOT16A (num 6) has assigned 2 to stack 1 charges 0 in header 1

// Checking areas for undercharged items
"AR0018.ARE" "override" // TTWAND (num 5) has assigned 0 to stack 1 charges 100 in header 1
"AR0060.ARE" "override" // AROW01 (num 58) has assigned 0 to stack 40 charges 1 in header 1
"AR0065.ARE" "override" // WAND05 (num 55) has assigned 0 to max 50 in header 2
"AR0311.ARE" "override" // AX1H04 (num 1) has assigned 0 to stack 10 charges 1 in header 1
"AR0317.ARE" "override" // WAND05 (num 3) has assigned 0 to stack 1 charges 50 in header 1
"AR0317.ARE" "override" // WAND05 (num 3) has assigned 0 to max 50 in header 2
"AR0329.ARE" "override" // RING26 (num 7) has assigned 0 to stack 1 charges 1 in header 1
"AR0405.ARE" "override" // BOLT01 (num 36) has assigned 0 to stack 40 charges 1 in header 1
"AR0412.ARE" "override" // STAF17 (num 7) has assigned 20 to max 30 in header 2
"AR0412.ARE" "override" // STAF17 (num 7) has assigned 20 to max 30 in header 3
"AR0527.ARE" "override" // WAND03 (num 0) has assigned 0 to stack 1 charges 100 in header 1
"AR0706.ARE" "override" // AX1H04 (num 1) has assigned 0 to stack 10 charges 1 in header 1
"AR1202.ARE" "override" // MISC3H (num 20) has assigned 0 to stack 1 charges 1 in header 1
"AR1202.ARE" "override" // SW1H32 (num 50) has assigned 0 to max 1 in header 2
"AR1202.ARE" "override" // BOW10 (num 52) has assigned 0 to max 1 in header 2
"AR1302.ARE" "override" // DART03 (num 74) has assigned 0 to stack 40 charges 1 in header 1
"AR1512.ARE" "override" // MISCAF (num 6) has assigned 0 to stack 1 charges 1 in header 1
"AR1514.ARE" "override" // AROW05 (num 53) has assigned 0 to stack 40 charges 1 in header 1
"AR1514.ARE" "override" // BOLT04 (num 54) has assigned 0 to stack 40 charges 1 in header 1
"AR2400.ARE" "override" // STAF09 (num 2) has assigned 21 to max 25 in header 2

// Checking creatures for overcharged items
"AERBOD01.CRE" "override" // slng01 (num 2) has assigned 20 to max 1 in header 1
"AERIE6.CRE" "override" // slng01 (num 2) has assigned 20 to max 1 in header 1
"AMARCH01.CRE" "override" // helm33 (num 0) has assigned 30 to max 1 in header 1
"AMARCH02.CRE" "override" // helm33 (num 1) has assigned 30 to max 1 in header 1
"AR18DWAF.CRE" "override" // AX1H04 (num 0) has assigned 1 to max 0 in header 2
"ARAN.CRE" "override" // helmnoan (num 0) has assigned 2 to max 1 in header 1
"ARAN02.CRE" "override" // misc6w (num 7) has assigned 3 to max 1 in header 1
"ARNFGT02.CRE" "override" // DAGG16 (num 0) has assigned 20 to max 10 in header 1
"ARNWAR04.CRE" "override" // DAGG16 (num 0) has assigned 20 to max 10 in header 1
"BEAST.CRE" "override" // arow01 (num 4) has assigned 20 to max 0 in header 2
"BHGHOUL5.CRE" "override" // ARRW01 (num 4) has assigned 20 to max 1 in header 1
"BHGHOUL5.CRE" "override" // ARRW01 (num 5) has assigned 20 to max 1 in header 1
"C6CATTI.CRE" "override" // ring05 (num 2) has assigned 10 to max 1 in header 1
"C6KNGT1.CRE" "override" // BOW01 (num 2) has assigned 20 to max 1 in header 1
"C6REGIS.CRE" "override" // RING05 (num 4) has assigned 6 to max 1 in header 1
"CHANG01.CRE" "override" // ring05 (num 6) has assigned 10 to max 1 in header 1
"CHANG02.CRE" "override" // ring05 (num 6) has assigned 10 to max 1 in header 1
"CHGOOD08.CRE" "override" // RING05 (num 3) has assigned 10 to max 1 in header 1
"DECKASS1.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"DESHAR.CRE" "override" // ring05 (num 3) has assigned 5 to max 1 in header 1
"DOCSOL01.CRE" "override" // chan01 (num 0) has assigned 20 to max 1 in header 1
"DOCSOL02.CRE" "override" // chan01 (num 0) has assigned 20 to max 1 in header 1
"DUEARC01.CRE" "override" // AX1H01 (num 1) has assigned 20 to max 1 in header 1
"E33.CRE" "override" // SW1H10 (num 5) has assigned 10 to max 1 in header 1
"FSHORDE2.CRE" "override" // BOW01 (num 0) has assigned 20 to max 1 in header 1
"FSHORDE6.CRE" "override" // BOW03 (num 3) has assigned 20 to max 1 in header 1
"GENTMG01.CRE" "override" // dagg16 (num 0) has assigned 20 to max 10 in header 1
"GIANTF01.CRE" "override" // dart06 (num 1) has assigned 5 to max 1 in header 1
"GORDECK5.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"GORDECK6.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"GORDECK7.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"GORDECK8.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"GORDECK9.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"GORDECKA.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"GORKUO05.CRE" "override" // XBOW01 (num 1) has assigned 20 to max 1 in header 1
"GORORC02.CRE" "override" // BOW03 (num 3) has assigned 20 to max 1 in header 1
"GRVLCH01.CRE" "override" // rods05 (num 6) has assigned 5 to max 1 in header 1
"HGSKL02.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"HLKETTA.CRE" "override" // POTN10 (num 2) has assigned 10 to max 5 in header 1
"HOBARC02.CRE" "override" // BOW03 (num 4) has assigned 20 to max 1 in header 1
"ICGOB01.CRE" "override" // BOW01 (num 0) has assigned 20 to max 1 in header 1
"ICGOB02.CRE" "override" // BOW01 (num 0) has assigned 20 to max 1 in header 1
"JAGA4.CRE" "override" // SW1H08 (num 4) has assigned 2 to max 1 in header 1
"KELDOR8.CRE" "override" // HELM01 (num 1) has assigned 20 to max 1 in header 1
"KOBARC01.CRE" "override" // BOW01 (num 1) has assigned 20 to max 1 in header 1
"KOBCAP01.CRE" "override" // BOW01 (num 0) has assigned 20 to max 1 in header 1
"KUOWHI01.CRE" "override" // XBOW01 (num 1) has assigned 20 to max 1 in header 1
"LATKNI01.CRE" "override" // BOW01 (num 2) has assigned 20 to max 1 in header 1
"LATKNI02.CRE" "override" // BOW01 (num 2) has assigned 20 to max 1 in header 1
"MAEVAR.CRE" "override" // helmnoan (num 10) has assigned 2 to max 1 in header 1
"MOOKFT02.CRE" "override" // DAGG16 (num 0) has assigned 20 to max 10 in header 1
"NALIA13.CRE" "override" // bow05 (num 2) has assigned 20 to max 1 in header 1
"ORC02.CRE" "override" // BOW03 (num 3) has assigned 20 to max 1 in header 1
"PIRSEA02.CRE" "override" // chan01 (num 0) has assigned 20 to max 1 in header 1
"PIRSEA02.CRE" "override" // dagg05 (num 1) has assigned 20 to max 10 in header 1
"PLSHHG01.CRE" "override" // BOW03 (num 4) has assigned 20 to max 1 in header 1
"PPARAN2.CRE" "override" // misc6w (num 7) has assigned 3 to max 1 in header 1
"PPGUARD1.CRE" "override" // BOW01 (num 1) has assigned 20 to max 1 in header 1
"SAERK.CRE" "override" // RING34 (num 8) has assigned 4 to max 1 in header 1
"SAHUAG01.CRE" "override" // XBOW01 (num 2) has assigned 20 to max 1 in header 1
"SARGRD05.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"SARGRD09.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"SARKIS01.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"SARKIS02.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"SARKIS03.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"SARKIS04.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1
"SENANI03.CRE" "override" // bwbolt01 (num 0) has assigned 20 to max 1 in header 1
"SENANI05.CRE" "override" // leat02 (num 0) has assigned 5 to max 1 in header 1
"SENDAI.CRE" "override" // wand19 (num 5) has assigned 1 to max 0 in header 2
"SENDAI.CRE" "override" // wand19 (num 5) has assigned 1 to max 0 in header 3
"SENDAI4.CRE" "override" // potn10 (num 1) has assigned 8 to max 5 in header 1
"SENDAI6.CRE" "override" // potn10 (num 1) has assigned 8 to max 5 in header 1
"SENDRO03.CRE" "override" // bwbolt01 (num 0) has assigned 20 to max 1 in header 1
"SENDRO05.CRE" "override" // leat02 (num 0) has assigned 5 to max 1 in header 1
"SENGUA05.CRE" "override" // dwbolt01 (num 6) has assigned 40 to max 20 in header 1
"SEVPAT05.CRE" "override" // ring05 (num 3) has assigned 4 to max 1 in header 1
"SHABOD01.CRE" "override" // BOW01 (num 1) has assigned 20 to max 1 in header 1
"SHADELD.CRE" "override" // clck25 (num 0) has assigned 1 to max 0 in header 2
"SHADELD.CRE" "override" // clck25 (num 0) has assigned 1 to max 0 in header 3
"SHTHASS1.CRE" "override" // DAGG16 (num 1) has assigned 20 to max 10 in header 1
"SHTHASS2.CRE" "override" // DAGG16 (num 1) has assigned 20 to max 10 in header 1
"SHTHASS3.CRE" "override" // DAGG16 (num 1) has assigned 20 to max 10 in header 1
"SWSFOLL4.CRE" "override" // BOW01 (num 1) has assigned 20 to max 1 in header 1
"SWSFOLL5.CRE" "override" // BOW01 (num 1) has assigned 20 to max 1 in header 1
"TANTHF01.CRE" "override" // ring05 (num 6) has assigned 4 to max 1 in header 1
"UDMASTER.CRE" "override" // MISC32 (num 1) has assigned 53 to max 20 in header 1
"WAUKNI01.CRE" "override" // BOW01 (num 2) has assigned 20 to max 1 in header 1
"YAGA05.CRE" "override" // leat02 (num 1) has assigned 5 to max 1 in header 1

Link to comment
// Checking creatures for undercharged items
"AERIE10.CRE" "override" // bull01 (num 1) has assigned 0 to stack 40 charges 1 in header 1
"AERIE11.CRE" "override" // bull01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"AERIE9.CRE" "override" // bull01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
"AMARCH01.CRE" "override" // bow20 (num 3) has assigned 0 to max 1 in header 2
"AMCARRAS.CRE" "override" // boot12 (num 7) has assigned 0 to stack 1 charges 2 in header 1
"AMMERC08.CRE" "override" // arow11 (num 5) has assigned 0 to stack 40 charges 1 in header 1
"BDTURM02.CRE" "override" // bolt03 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"BHCRYPT.CRE" "override" // SW1H36 (num 4) has assigned 0 to max 3 in header 2
"BONEBLD.CRE" "override" // IPSION (num 0) has assigned 0 to stack 1 charges 50 in header 1
"C6CLER3.CRE" "override" // misc4y (num 2) has assigned 0 to stack 1 charges 25 in header 1
"CHALCY02.CRE" "override" // RING34 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALCY02.CRE" "override" // chalcy3 (num 7) has assigned 0 to stack 1 charges 50 in header 1
"CHALPC01.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC01.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC01.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC01.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC02.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC02.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC02.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC02.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC03.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC03.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC03.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC03.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC04.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC04.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC04.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC04.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC05.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC05.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC05.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC05.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC06.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC06.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC06.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC06.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC07.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC07.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC07.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC07.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC08.CRE" "override" // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC08.CRE" "override" // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC08.CRE" "override" // ring29 (num 4) has assigned 0 to max 1 in header 2
"CHALPC08.CRE" "override" // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC09.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC09.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC09.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC09.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC09.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC10.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC10.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC10.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC10.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC10.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC11.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC11.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC11.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC11.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC11.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC12.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC12.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC12.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC12.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC12.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC13.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC13.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC13.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC13.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC13.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC14.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC14.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC14.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC14.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC14.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC15.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC15.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC15.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC15.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC15.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHALPC16.CRE" "override" // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC16.CRE" "override" // ring29 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC16.CRE" "override" // ring29 (num 2) has assigned 0 to max 1 in header 2
"CHALPC16.CRE" "override" // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"CHALPC16.CRE" "override" // sw2h10 (num 10) has assigned 0 to max 3 in header 2
"CHEVIL09.CRE" "override" // RING34 (num 5) has assigned 0 to stack 1 charges 1 in header 1
"CHEVIL09.CRE" "override" // STAF11 (num 8) has assigned 0 to max 3 in header 2
"CHEVIL09.CRE" "override" // STAF11 (num 8) has assigned 0 to max 1 in header 3
"CHSAM01.CRE" "override" // STAF12 (num 4) has assigned 0 to max 10 in header 2
"CHSAM01.CRE" "override" // STAF12 (num 4) has assigned 0 to max 10 in header 3
"CHSAM02.CRE" "override" // STAF12 (num 4) has assigned 0 to max 10 in header 2
"CHSAM02.CRE" "override" // STAF12 (num 4) has assigned 0 to max 10 in header 3
"CHTAZ01.CRE" "override" // CLCK20 (num 3) has assigned 0 to stack 1 charges 50 in header 1
"E33.CRE" "override" // AMUL01 (num 6) has assigned 0 to stack 1 charges 25 in header 1
"ELEMIMIX.CRE" "override" // halb10 (num 2) has assigned 0 to max 2 in header 2
"FIRKRA02.CRE" "override" // SW2H10 (num 4) has assigned 1 to max 3 in header 2
"FIRMON01.CRE" "override" // SW1h32 (num 3) has assigned 0 to max 1 in header 2
"FLYFGT03.CRE" "override" // AROW01 (num 0) has assigned 0 to stack 40 charges 1 in header 1
"FSDRAGON.CRE" "override" // sw1h70 (num 4) has assigned 0 to max 1 in header 2
"GORLIC01.CRE" "override" // slng08 (num 3) has assigned 0 to max 1 in header 2
"GORSTA09.CRE" "override" // arow01 (num 6) has assigned 0 to stack 40 charges 1 in header 1
"GORWOM02.CRE" "override" // helm16 (num 6) has assigned 0 to stack 1 charges 1 in header 1
"GORWOM02.CRE" "override" // helm16 (num 6) has assigned 0 to max 1 in header 2
"GORWOM02.CRE" "override" // helm16 (num 6) has assigned 0 to max 1 in header 3
"GRVLCH01.CRE" "override" // wand05 (num 5) has assigned 10 to max 50 in header 2
"HABIB.CRE" "override" // SW1H57 (num 1) has assigned 0 to stack 10 charges 1 in header 1
"HABIB2.CRE" "override" // DART07 (num 0) has assigned 0 to stack 1 charges 1 in header 1
"HGNYA01.CRE" "override" // ring03 (num 5) has assigned 0 to stack 1 charges 100 in header 1
"HLDEMI.CRE" "override" // ring39 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"HLDEMI.CRE" "override" // ring39 (num 1) has assigned 0 to max 3 in header 2
"HLKANG.CRE" "override" // RING39 (num 3) has assigned 0 to stack 1 charges 1 in header 1
"HLKANG.CRE" "override" // RING39 (num 3) has assigned 0 to max 3 in header 2
"JAYLOS.CRE" "override" // DAGG05 (num 1) has assigned 0 to stack 10 charges 1 in header 1
"KAYSMG01.CRE" "override" // AROW01 (num 4) has assigned 0 to stack 40 charges 1 in header 1
"KPROEN03.CRE" "override" // wand07 (num 1) has assigned 0 to stack 1 charges 50 in header 1
"KUOARC20.CRE" "override" // kuobolt3 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"LATKNI02.CRE" "override" // AROW01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"NALIA13.CRE" "override" // arow01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"PBHUNT03.CRE" "override" // CLCK20 (num 2) has assigned 0 to stack 1 charges 50 in header 1
"PCAPT03.CRE" "override" // bolt03 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"PCAPT03.CRE" "override" // bolt01 (num 4) has assigned 0 to stack 40 charges 1 in header 1
"PCAPT04.CRE" "override" // wand05 (num 1) has assigned 0 to stack 1 charges 50 in header 1
"PCAPT04.CRE" "override" // wand05 (num 1) has assigned 0 to max 50 in header 2
"PIREXE01.CRE" "override" // BOLT01 (num 1) has assigned 0 to stack 40 charges 1 in header 1
"PIREXE01.CRE" "override" // BLUNT06 (num 2) has assigned 0 to stack 40 charges 1 in header 1
"PIRMUR07.CRE" "override" // DART02 (num 0) has assigned 0 to stack 40 charges 1 in header 1
"PPCOWLED.CRE" "override" // misc3a (num 1) has assigned 0 to stack 1 charges 1 in header 1
"RESUNA.CRE" "override" // sw1h27 (num 3) has assigned 0 to max 1 in header 2
"RUMAR01.CRE" "override" // WAND07 (num 4) has assigned 0 to stack 1 charges 50 in header 1
"SARKIS04.CRE" "override" // figure01 (num 4) has assigned 0 to stack 1 charges 1 in header 1
"SARTEM01.CRE" "override" // miscau (num 4) has assigned 0 to stack 5 charges 1 in header 1
"SARTEM01.CRE" "override" // miscau (num 5) has assigned 0 to stack 5 charges 1 in header 1
"SARTEM01.CRE" "override" // miscau (num 6) has assigned 0 to stack 5 charges 1 in header 1
"SARVIE01.CRE" "override" // ring20 (num 4) has assigned 0 to stack 1 charges 50 in header 1
"SENDAI3.CRE" "override" // arow05 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"SEWDUE01.CRE" "override" // fragsap (num 2) has assigned 0 to stack 1 charges 1 in header 1
"SEWYAG01.CRE" "override" // fragsap (num 2) has assigned 0 to stack 1 charges 1 in header 1
"SHTH01.CRE" "override" // BULL01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
"SHTH011.CRE" "override" // BULL01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
"SHTH03.CRE" "override" // AROW05 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"SWORD01.CRE" "override" // IPSION (num 1) has assigned 0 to stack 1 charges 50 in header 1
"SWSHAMAN.CRE" "override" // MISC5T (num 1) has assigned 0 to max 1 in header 2
"TALMISS.CRE" "override" // misc4y (num 2) has assigned 0 to stack 1 charges 25 in header 1
"TELTIEF3.CRE" "override" // wand18 (num 4) has assigned 0 to max 5 in header 2
"TOLGER.CRE" "override" // RING33 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"TOLGER2.CRE" "override" // RING33 (num 2) has assigned 0 to stack 1 charges 1 in header 1
"TRGENI03.CRE" "override" // B3-18 (num 0) has assigned 0 to stack 1 charges 1 in header 1
"TRRAK01.CRE" "override" // amul22 (num 1) has assigned 0 to stack 1 charges 1 in header 1
"UHMAN02.CRE" "override" // BOLT01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"UHOGRE04.CRE" "override" // AROW01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
"VAKG02.CRE" "override" // BOLT01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
"VIEKANG.CRE" "override" // ring20 (num 6) has assigned 0 to stack 1 charges 50 in header 1
"VULFGT02.CRE" "override" // DART01 (num 1) has assigned 0 to stack 40 charges 1 in header 1
"XAPPREN1.CRE" "override" // wand03 (num 0) has assigned 0 to stack 1 charges 100 in header 1

// Checking stores for overcharged items
"AMSMUG01.STO" "override" // RODS06 (num 88) has assigned 20 to max 10 in header 1
"AMSMUG02.STO" "override" // RODS06 (num 89) has assigned 20 to max 10 in header 1
"GARLENA.STO" "override" // RESTORE (num 92) has assigned 1 to max 0 in header 2
"RIBALD2.STO" "override" // POTN20 (num 36) has assigned 10 to max 5 in header 1
"SAHPR1.STO" "override" // RESTORE (num 92) has assigned 1 to max 0 in header 2
"SUELF10.STO" "override" // RESTORE (num 92) has assigned 1 to max 0 in header 2
"TYPE2.STO" "override" // POTN20 (num 38) has assigned 10 to max 5 in header 1
"UDDROW24.STO" "override" // RODS04 (num 32) has assigned 20 to max 1 in header 1

// Checking stores for undercharged items
"AMSMUG02.STO" "override" // BOOT12 (num 91) has assigned 0 to stack 1 charges 2 in header 1
"BAG20.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG20.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG21.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG21.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG21.STO" "override" // BRAC16 (num 8) has assigned 0 to stack 1 charges 1 in header 1
"BAG22.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG22.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG23.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG23.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG23.STO" "override" // SW1H27 (num 6) has assigned 0 to max 1 in header 2
"BAG24.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG24.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG24.STO" "override" // SW1H27 (num 3) has assigned 0 to max 1 in header 2
"BAG25.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG25.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG25.STO" "override" // SW1H27 (num 4) has assigned 0 to max 1 in header 2
"BAG26.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG26.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG26.STO" "override" // BULL03 (num 15) has assigned 0 to stack 40 charges 1 in header 1
"BAG27.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG27.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG27.STO" "override" // BULL03 (num 15) has assigned 0 to stack 40 charges 1 in header 1
"BAG27.STO" "override" // MISC3D (num 17) has assigned 0 to stack 1 charges 1 in header 1
"BAG28.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG28.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG28.STO" "override" // BULL03 (num 15) has assigned 0 to stack 40 charges 1 in header 1
"BAG28.STO" "override" // MISC3D (num 17) has assigned 0 to stack 1 charges 1 in header 1
"BAG29.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG29.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG29.STO" "override" // DART04 (num 16) has assigned 0 to stack 40 charges 1 in header 1
"BAG30.STO" "override" // MISC3E (num 0) has assigned 0 to stack 1 charges 1 in header 1
"BAG30.STO" "override" // MISC3I (num 1) has assigned 0 to stack 1 charges 1 in header 1
"BAG30.STO" "override" // MISC3D (num 17) has assigned 0 to stack 1 charges 1 in header 1
"BAG30.STO" "override" // MISC3M (num 20) has assigned 0 to stack 1 charges 3 in header 1
"BDBART01.STO" "override" // AROW02 (num 33) has assigned 0 to stack 40 charges 1 in header 1
"BSHOP01.STO" "override" // WAND05 (num 28) has assigned 5 to max 50 in header 2
"BSHOP02.STO" "override" // AX1H04 (num 25) has assigned 0 to stack 10 charges 1 in header 1
"GARLENA.STO" "override" // AX1H04 (num 2) has assigned 0 to stack 10 charges 1 in header 1
"RIBALD.STO" "override" // RING28 (num 132) has assigned 0 to stack 1 charges 1 in header 1
"RIBALD.STO" "override" // RING28 (num 132) has assigned 0 to max 1 in header 2
"RIBALD3.STO" "override" // BOW10 (num 30) has assigned 0 to max 1 in header 2
"SAHPR1.STO" "override" // AX1H04 (num 2) has assigned 0 to stack 10 charges 1 in header 1
"SUELF10.STO" "override" // AX1H04 (num 2) has assigned 0 to stack 10 charges 1 in header 1
"TRCAR04.STO" "override" // WAND05 (num 29) has assigned 5 to max 50 in header 2
"TRMER02.STO" "override" // SW1H33 (num 27) has assigned 0 to max 1 in header 2
"TYPE1.STO" "override" // AX1H04 (num 35) has assigned 0 to stack 10 charges 1 in header 1
"UDDROW23.STO" "override" // STAF16 (num 46) has assigned 20 to max 30 in header 2
"UDDROW23.STO" "override" // STAF16 (num 46) has assigned 0 to max 30 in header 3

Link to comment

Woo, this is coded. Some of this had already been fixed (notably, the goodie bags for starting ToB already had their charges fixed) but otherwise most to all of this is new.

 

A few of these were excluded; the general rule I imposed was that non-zero illegal stacks of items were left intact; i.e. all of the thieves running around with stacks of 20 poison daggers (max stack is 10) or stores selling partially charged wands were left intact. If the charges/stacks were zero, however, they were moved up to the maximum, i.e. all of the characters running around with stacks of 0 arrows/bolts/bullets were bumped up to their stack maxes.

 

I'll post code once I verify it's working. ;)

Link to comment

Wow, that was quick - I've only trudged through the stores and areas so far ;)

 

The chalpc creatures aren't scripted to use their Rings of Spell Turning (and they DestroySelf when killed, so no drops) so just charging their rings doesn't do much. I think this is a scripting omission (they do use their potions and Whirlwind) and will be adding such to chalpc01.bcs, but it's debateable :D

 

Fixpack got all four of the zero-quantity-thus-sold-singly throwing axes already :D

Link to comment

Do you want to come up with a list for the days duration fields in attached items in ARE and CRE files (2 bytes at 0x8 in the structure)? These need to be 0 so the items don't spontaneously vanish after a few days. There are a number of these in CRE files (hello, RINGDEMN), but I don't think any of the AREs were bugged.

 

Bonus points if you can figure out the exact format of the duration value here.

Link to comment

I'd dallied on doing that in case the expiry were intentional, but when would it ever be? ;)

 

Areas checked out cleanly.

COPY_EXISTING "abydem01.cre" "override" // ringdemn
		  "bdturm02.cre" "override" // bolt03
		  "csiren.cre"   "override" // STAF01, RNDTRE04
		  "deaddem2.cre" "override" // ringdemn
		  "demosum2.cre" "override" // ringdemn, balor, immune3
		  "demosum3.cre" "override" // ringdemn, immune2
		  "dglab01.cre"  "override" // ringdemn, immune2
		  "dquas01.cre"  "override" // ringdemn
		  "duegau01.cre" "override" // BULL01
		  "duegau02.cre" "override" // AX1H01, BULL01
		  "duemag01.cre" "override" // STAF01, SLNG01, POTN08, BULL01
		  "duemag02.cre" "override" // STAF01, SLNG01, POTN08, BULL01
		  "duergar1.cre" "override" // BULL01
		  "duergar3.cre" "override" // AX1H01, BULL01
		  "gorbat1.cre"  "override" // RINGdemn, immune3, reghp2r
		  "gorchr.cre"   "override" // ringdemn
		  "gortan1.cre"  "override" // ringdemn, balor, immune3
		  "gortan2.cre"  "override" // ringdemn
		  "gortan3.cre"  "override" // ringdemn, dwplat01, dwsw1h01
		  "gortan4.cre"  "override" // ringdemn, immune2
		  "gortan5.cre"  "override" // ringdemn
		  "lavok01.cre"  "override" // STAF01, RNDTRE04
		  "lavok02.cre"  "override" // STAF01, RNDTRE04
		  "melsum01.cre" "override" // ringdemn, immune2
		  "melsum04.cre" "override" // ringdemn, balor, immune3
		  "obsdem01.cre" "override" // S1-10, ringdemn
		  "pmaster.cre"  "override" // S1-10, ringdemn
		  "ppdemon.cre"  "override" // S1-10, ringdemn
		  "shth01.cre"   "override" // BULL01
		  "shth011.cre"  "override" // BULL01
		  "shth03.cre"   "override" // AROW05
		  "sumtan01.cre" "override" // ringdemn
		  "sumtan02.cre" "override" // ringdemn
		  "tanari01.cre" "override" // S1-10, ringdemn
		  "teltan1.cre"  "override" // ringdemn
		  "teltan2.cre"  "override" // ringdemn
		  "teltief3.cre" "override" // wand18
		  "tolger.cre"   "override" // STAF01, RNDTRE04
		  "tolger2.cre"  "override" // STAF01, RNDTRE04
		  "uddwarf.cre"  "override" // BULL01
		  "uhman02.cre"  "override" // BOLT01
		  "uhogre04.cre" "override" // AROW01
		  "vakg02.cre"   "override" // XBOW01
 PATCH_IF (%SOURCE_SIZE% > 0x2d3) THEN BEGIN
READ_LONG   0x2bc "io"
READ_LONG   0x2c0 "ic"
FOR ("i" = 0x00; "i" < (0x14 * "ic"); "i" += 0x14) BEGIN
  WRITE_SHORT  ("io" + "i" + 0x08) 0x00
END
 END
BUT_ONLY_IF_IT_CHANGES

Link to comment

Store fixes:

 

// overcharged store items
COPY_EXISTING ~amsmug01.sto~ ~override~ // rods06 (num 88) has assigned 20 to max 10 in header 1
		  ~amsmug02.sto~ ~override~ // rods06 (num 89) has assigned 20 to max 10 in header 1
		  ~garlena.sto~  ~override~ // restore (num 92) has assigned 1 to max 0 in header 2
		  ~ribald2.sto~  ~override~ // potn20 (num 36) has assigned 10 to max 5 in header 1
		  ~sahpr1.sto~   ~override~ // restore (num 92) has assigned 1 to max 0 in header 2
		  ~suelf10.sto~  ~override~ // restore (num 92) has assigned 1 to max 0 in header 2
		  ~type2.sto~	~override~ // potn20 (num 38) has assigned 10 to max 5 in header 1
		  ~uddrow24.sto~ ~override~ // rods04 (num 32) has assigned 20 to max 1 in header 1
 READ_LONG 0x34 "itm_off" ELSE 0
 READ_LONG 0x38 "itm_num" ELSE 0
 FOR (index = 0; index < itm_num; index = index + 1) BEGIN
READ_ASCII ("%itm_off%" + (0x1c * "%index%")) "item"
PATCH_IF ("%item%" STRING_COMPARE_CASE "potn20" = 0) BEGIN
  WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 5
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "restore" = 0) BEGIN
  WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 0 // no secondary abilities
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "rods04" = 0) BEGIN
  WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 1
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "rods06" = 0) BEGIN
  WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 10
END 
 END
 BUT_ONLY_IF_IT_CHANGES

// undercharged store items
COPY_EXISTING ~amsmug02.sto~ ~override~ // boot12 (num 91) has assigned 0 to stack 1 charges 2 in header 1
		  ~bdbart01.sto~ ~override~ // arow02 (num 33) has assigned 0 to stack 40 charges 1 in header 1
		  ~bshop01.sto~  ~override~ // wand05 (num 28) has assigned 5 to max 50 in header 2
//			  ~bshop02.sto~  ~override~ // ax1h04 (num 25) has assigned 0 to stack 10 charges 1 in header 1
//			  ~garlena.sto~  ~override~ // ax1h04 (num 2) has assigned 0 to stack 10 charges 1 in header 1
		  ~ribald.sto~   ~override~ // ring28 (num 132) has assigned 0 to stack 1 charges 1 in header 1
		  ~ribald3.sto~  ~override~ // bow10 (num 30) has assigned 0 to max 1 in header 2
//			  ~sahpr1.sto~   ~override~ // ax1h04 (num 2) has assigned 0 to stack 10 charges 1 in header 1
//			  ~suelf10.sto~  ~override~ // ax1h04 (num 2) has assigned 0 to stack 10 charges 1 in header 1
		  ~trcar04.sto~  ~override~ // wand05 (num 29) has assigned 5 to max 50 in header 2
		  ~trmer02.sto~  ~override~ // sw1h33 (num 27) has assigned 0 to max 1 in header 2
//			  ~type1.sto~	~override~ // ax1h04 (num 35) has assigned 0 to stack 10 charges 1 in header 1
		  ~uddrow23.sto~ ~override~ // staf16 (num 46) has assigned 20 to max 30 in header 2
 READ_LONG 0x34 "itm_off" ELSE 0
 READ_LONG 0x38 "itm_num" ELSE 0
 FOR (index = 0; index < itm_num; index = index + 1) BEGIN
READ_ASCII ("%itm_off%" + (0x1c * "%index%")) "item"
PATCH_IF ("%item%" STRING_COMPARE_CASE "arow02" = 0) BEGIN // arrows +1
  READ_SHORT  ("%itm_off%" + 0x0a + (0x1c * "%index%")) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 40 // typical quantity
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "ax1h04" = 0) BEGIN // throwing axes
  READ_SHORT  ("%itm_off%" + 0x0a + (0x1c * "%index%")) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 10 // typical quantity
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "boot12" = 0) BEGIN // boots of the gargoyle
  READ_SHORT  ("%itm_off%" + 0x0c + (0x1c * "%index%")) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 2 // two secondary charges
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "bow10" = 0) OR	  // heartseeker
		  ("%item%" STRING_COMPARE_CASE "sw1h33" = 0)) BEGIN // ras +2
  READ_SHORT  ("%itm_off%" + 0x0c + (0x1c * "%index%")) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 1 // one secondary charge
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "ring28" = 0) BEGIN // ring of air control
  READ_SHORT  ("%itm_off%" + 0x0a + (0x1c * "%index%")) "charge1"
  READ_SHORT  ("%itm_off%" + 0x0c + (0x1c * "%index%")) "charge2"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 1 // once per day
  END
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 1 // once per day
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "staf16" = 0) BEGIN // ring of earth
  READ_SHORT  ("%itm_off%" + 0x0c + (0x1c * "%index%")) "charge2"
  READ_SHORT  ("%itm_off%" + 0x0e + (0x1c * "%index%")) "charge3"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 30
  END
  PATCH_IF ("%charge3%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0e + (0x1c * "%index%")) 30
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "wand05" = 0) BEGIN // wand of fire
  READ_SHORT  ("%itm_off%" + 0x0c + (0x1c * "%index%")) "charge2"
  PATCH_IF ("%charge2%" < 50) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 50 // max charges
  END
END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Creature fixes:

 

// overcharged items on creatures
COPY_EXISTING ~aerbod01.cre~ ~override~ // slng01 (num 2) has assigned 20 to max 1 in header 1
		  ~aerie6.cre~   ~override~ // slng01 (num 2) has assigned 20 to max 1 in header 1
		  ~amarch01.cre~ ~override~ // helm33 (num 0) has assigned 30 to max 1 in header 1
		  ~amarch02.cre~ ~override~ // helm33 (num 1) has assigned 30 to max 1 in header 1
		  ~ar18dwaf.cre~ ~override~ // ax1h04 (num 0) has assigned 1 to max 0 in header 2
		  ~aran.cre~	 ~override~ // helmnoan (num 0) has assigned 2 to max 1 in header 1
		  ~aran02.cre~   ~override~ // misc6w (num 7) has assigned 3 to max 1 in header 1
		  ~beast.cre~	~override~ // arow01 (num 4) has assigned 20 to max 0 in header 2
		  ~bhghoul5.cre~ ~override~ // arrw01 (num 4) has assigned 20 to max 1 in header 1
		  ~c6catti.cre~  ~override~ // ring05 (num 2) has assigned 10 to max 1 in header 1
		  ~c6kngt1.cre~  ~override~ // bow01 (num 2) has assigned 20 to max 1 in header 1
		  ~c6regis.cre~  ~override~ // ring05 (num 4) has assigned 6 to max 1 in header 1
		  ~chang01.cre~  ~override~ // ring05 (num 6) has assigned 10 to max 1 in header 1
		  ~chang02.cre~  ~override~ // ring05 (num 6) has assigned 10 to max 1 in header 1
		  ~chgood08.cre~ ~override~ // ring05 (num 3) has assigned 10 to max 1 in header 1
		  ~deckass1.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~deshar.cre~   ~override~ // ring05 (num 3) has assigned 5 to max 1 in header 1
		  ~docsol01.cre~ ~override~ // chan01 (num 0) has assigned 20 to max 1 in header 1
		  ~docsol02.cre~ ~override~ // chan01 (num 0) has assigned 20 to max 1 in header 1
		  ~duearc01.cre~ ~override~ // ax1h01 (num 1) has assigned 20 to max 1 in header 1
		  ~e33.cre~	  ~override~ // sw1h10 (num 5) has assigned 10 to max 1 in header 1
		  ~fshorde2.cre~ ~override~ // bow01 (num 0) has assigned 20 to max 1 in header 1
		  ~fshorde6.cre~ ~override~ // bow03 (num 3) has assigned 20 to max 1 in header 1
		  ~gordeck5.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~gordeck6.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~gordeck7.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~gordeck8.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~gordeck9.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~gordecka.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~gorkuo05.cre~ ~override~ // xbow01 (num 1) has assigned 20 to max 1 in header 1
		  ~gororc02.cre~ ~override~ // bow03 (num 3) has assigned 20 to max 1 in header 1
		  ~grvlch01.cre~ ~override~ // rods05 (num 6) has assigned 5 to max 1 in header 1
		  ~hgskl02.cre~  ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~hobarc02.cre~ ~override~ // bow03 (num 4) has assigned 20 to max 1 in header 1
		  ~icgob01.cre~  ~override~ // bow01 (num 0) has assigned 20 to max 1 in header 1
		  ~icgob02.cre~  ~override~ // bow01 (num 0) has assigned 20 to max 1 in header 1
		  ~jaga4.cre~	~override~ // sw1h08 (num 4) has assigned 2 to max 1 in header 1
		  ~keldor8.cre~  ~override~ // helm01 (num 1) has assigned 20 to max 1 in header 1
		  ~kobarc01.cre~ ~override~ // bow01 (num 1) has assigned 20 to max 1 in header 1
		  ~kobcap01.cre~ ~override~ // bow01 (num 0) has assigned 20 to max 1 in header 1
		  ~kuowhi01.cre~ ~override~ // xbow01 (num 1) has assigned 20 to max 1 in header 1
		  ~latkni01.cre~ ~override~ // bow01 (num 2) has assigned 20 to max 1 in header 1
		  ~latkni02.cre~ ~override~ // bow01 (num 2) has assigned 20 to max 1 in header 1
		  ~maevar.cre~   ~override~ // helmnoan (num 10) has assigned 2 to max 1 in header 1
		  ~nalia13.cre~  ~override~ // bow05 (num 2) has assigned 20 to max 1 in header 1
		  ~orc02.cre~	~override~ // bow03 (num 3) has assigned 20 to max 1 in header 1
		  ~pirsea02.cre~ ~override~ // chan01 (num 0) has assigned 20 to max 1 in header 1
		  ~plshhg01.cre~ ~override~ // bow03 (num 4) has assigned 20 to max 1 in header 1
		  ~pparan2.cre~  ~override~ // misc6w (num 7) has assigned 3 to max 1 in header 1
		  ~ppguard1.cre~ ~override~ // bow01 (num 1) has assigned 20 to max 1 in header 1
		  ~saerk.cre~	~override~ // ring34 (num 8) has assigned 4 to max 1 in header 1
		  ~sahuag01.cre~ ~override~ // xbow01 (num 2) has assigned 20 to max 1 in header 1
		  ~sargrd05.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~sargrd09.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~sarkis01.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~sarkis02.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~sarkis03.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~sarkis04.cre~ ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
		  ~senani05.cre~ ~override~ // leat02 (num 0) has assigned 5 to max 1 in header 1
		  ~sendai.cre~   ~override~ // wand19 (num 5) has assigned 1 to max 0 in header 2
		  ~sendro05.cre~ ~override~ // leat02 (num 0) has assigned 5 to max 1 in header 1
		  ~sevpat05.cre~ ~override~ // ring05 (num 3) has assigned 4 to max 1 in header 1
		  ~shabod01.cre~ ~override~ // bow01 (num 1) has assigned 20 to max 1 in header 1
		  ~shadeld.cre~  ~override~ // clck25 (num 0) has assigned 1 to max 0 in header 2
		  ~swsfoll4.cre~ ~override~ // bow01 (num 1) has assigned 20 to max 1 in header 1
		  ~swsfoll5.cre~ ~override~ // bow01 (num 1) has assigned 20 to max 1 in header 1
		  ~tanthf01.cre~ ~override~ // ring05 (num 6) has assigned 4 to max 1 in header 1
		  ~waukni01.cre~ ~override~ // bow01 (num 2) has assigned 20 to max 1 in header 1
		  ~yaga05.cre~   ~override~ // leat02 (num 1) has assigned 5 to max 1 in header 1
 READ_LONG 0x2bc "itm_off" ELSE 0
 READ_LONG 0x2c0 "itm_num" ELSE 0
 FOR (index = 0; index < itm_num; index = index + 1) BEGIN
READ_ASCII ("%itm_off%" + (0x14 * "%index%")) "item"
PATCH_IF (("%item%" STRING_COMPARE_CASE "arow01" = 0) OR	 // arrows
		  ("%item%" STRING_COMPARE_CASE "ax1h04" = 0)) BEGIN // throwing axes
  WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 0 // no secondary charge
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "ax1h01" = 0) OR	 // battle axe
		  ("%item%" STRING_COMPARE_CASE "bow01" = 0) OR	  // composite long bow
		  ("%item%" STRING_COMPARE_CASE "bow03" = 0) OR	  // long bow
		  ("%item%" STRING_COMPARE_CASE "bow05" = 0) OR	  // short bow
		  ("%item%" STRING_COMPARE_CASE "chan01" = 0) OR	 // chain mail
		  ("%item%" STRING_COMPARE_CASE "helm01" = 0) OR	 // generic helm
		  ("%item%" STRING_COMPARE_CASE "helm33" = 0) OR	 // gold-horned helm
		  ("%item%" STRING_COMPARE_CASE "helmnoan" = 0) OR   // invisible helm
		  ("%item%" STRING_COMPARE_CASE "leat02" = 0) OR	 // leaher armor +1
		  ("%item%" STRING_COMPARE_CASE "misc6w" = 0) OR	 // wooden stake
		  ("%item%" STRING_COMPARE_CASE "rods05" = 0) OR	 // rod of terror
		  ("%item%" STRING_COMPARE_CASE "slng01" = 0) OR	 // sling
		  ("%item%" STRING_COMPARE_CASE "sw1h08" = 0) OR	 // short sword +1
		  ("%item%" STRING_COMPARE_CASE "sw1h10" = 0) OR	 // short sword of backstabbing
		  ("%item%" STRING_COMPARE_CASE "xbow01" = 0)) BEGIN // heavy crossbow
  WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 0 // no charges, not stackable
  WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 0
  WRITE_SHORT ("%itm_off%" + 0x0e + (0x14 * "%index%")) 0
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "clck25" = 0) OR	 // cloak of the stars
		  ("%item%" STRING_COMPARE_CASE "wand19" = 0)) BEGIN // wand of cursing
  WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 0 // no secondary charges
  WRITE_SHORT ("%itm_off%" + 0x0e + (0x14 * "%index%")) 0 // no tertiary charges
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "ring05" = 0) OR	 // ring of invisibility
		  ("%item%" STRING_COMPARE_CASE "ring34" = 0)) BEGIN // ring of spell turning
  WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 1 // once per day
END
 END
 BUT_ONLY_IF_IT_CHANGES

// checking creatures for undercharged items
COPY_EXISTING ~aerie10.cre~  ~override~ // bull01 (num 1) has assigned 0 to stack 40 charges 1 in header 1
		  ~aerie11.cre~  ~override~ // bull01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~aerie9.cre~   ~override~ // bull01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
		  ~amarch01.cre~ ~override~ // bow20 (num 3) has assigned 0 to max 1 in header 2
		  ~amcarras.cre~ ~override~ // boot12 (num 7) has assigned 0 to stack 1 charges 2 in header 1
		  ~ammerc08.cre~ ~override~ // arow11 (num 5) has assigned 0 to stack 40 charges 1 in header 1
		  ~bdturm02.cre~ ~override~ // bolt03 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~bhcrypt.cre~  ~override~ // sw1h36 (num 4) has assigned 0 to max 3 in header 2
		  ~bonebld.cre~  ~override~ // ipsion (num 0) has assigned 0 to stack 1 charges 50 in header 1
		  ~chalcy02.cre~ ~override~ // ring34 (num 5) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc01.cre~ ~override~ // ring29 (num 4) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc02.cre~ ~override~ // ring29 (num 4) has assigned 0 to max 1 in header 2
		  ~chalpc03.cre~ ~override~ // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc04.cre~ ~override~ // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc05.cre~ ~override~ // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc06.cre~ ~override~ // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc07.cre~ ~override~ // amul22 (num 5) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc08.cre~ ~override~ // ring34 (num 3) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc09.cre~ ~override~ // amul22 (num 3) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc10.cre~ ~override~ // sw2h10 (num 10) has assigned 0 to max 3 in header 2
		  ~chalpc11.cre~ ~override~ // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc12.cre~ ~override~ // sw2h10 (num 10) has assigned 0 to max 3 in header 2
		  ~chalpc13.cre~ ~override~ // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc14.cre~ ~override~ // sw2h10 (num 10) has assigned 0 to max 3 in header 2
		  ~chalpc15.cre~ ~override~ // ring34 (num 1) has assigned 0 to stack 1 charges 1 in header 1
		  ~chalpc16.cre~ ~override~ // sw2h10 (num 10) has assigned 0 to max 3 in header 2
		  ~chevil09.cre~ ~override~ // ring34 (num 5) has assigned 0 to stack 1 charges 1 in header 1
		  ~chsam01.cre~  ~override~ // staf12 (num 4) has assigned 0 to max 10 in header 2
		  ~chsam02.cre~  ~override~ // staf12 (num 4) has assigned 0 to max 10 in header 3
		  ~chtaz01.cre~  ~override~ // clck20 (num 3) has assigned 0 to stack 1 charges 50 in header 1
		  ~e33.cre~	  ~override~ // amul01 (num 6) has assigned 0 to stack 1 charges 25 in header 1
		  ~elemimix.cre~ ~override~ // halb10 (num 2) has assigned 0 to max 2 in header 2
		  ~firkra02.cre~ ~override~ // sw2h10 (num 4) has assigned 1 to max 3 in header 2
		  ~firmon01.cre~ ~override~ // sw1h32 (num 3) has assigned 0 to max 1 in header 2
		  ~flyfgt03.cre~ ~override~ // arow01 (num 0) has assigned 0 to stack 40 charges 1 in header 1
		  ~fsdragon.cre~ ~override~ // sw1h70 (num 4) has assigned 0 to max 1 in header 2
		  ~gorlic01.cre~ ~override~ // slng08 (num 3) has assigned 0 to max 1 in header 2
		  ~gorsta09.cre~ ~override~ // arow01 (num 6) has assigned 0 to stack 40 charges 1 in header 1
		  ~gorwom02.cre~ ~override~ // helm16 (num 6) has assigned 0 to stack 1 charges 1 in header 1
		  ~habib.cre~	~override~ // sw1h57 (num 1) has assigned 0 to stack 10 charges 1 in header 1
		  ~hgnya01.cre~  ~override~ // ring03 (num 5) has assigned 0 to stack 1 charges 100 in header 1
		  ~hldemi.cre~   ~override~ // ring39 (num 1) has assigned 0 to stack 1 charges 1 in header 1
		  ~hlkang.cre~   ~override~ // ring39 (num 3) has assigned 0 to max 3 in header 2
		  ~jaylos.cre~   ~override~ // dagg05 (num 1) has assigned 0 to stack 10 charges 1 in header 1
		  ~kaysmg01.cre~ ~override~ // arow01 (num 4) has assigned 0 to stack 40 charges 1 in header 1
		  ~kproen03.cre~ ~override~ // wand07 (num 1) has assigned 0 to stack 1 charges 50 in header 1
		  ~kuoarc20.cre~ ~override~ // kuobolt3 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~latkni02.cre~ ~override~ // arow01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
//			  ~nalia13.cre~  ~override~ // arow01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~pbhunt03.cre~ ~override~ // clck20 (num 2) has assigned 0 to stack 1 charges 50 in header 1
		  ~pcapt03.cre~  ~override~ // bolt03 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~pcapt04.cre~  ~override~ // wand05 (num 1) has assigned 0 to stack 1 charges 50 in header 1
		  ~pirexe01.cre~ ~override~ // bolt01 (num 1) has assigned 0 to stack 40 charges 1 in header 1
		  ~pirmur07.cre~ ~override~ // dart02 (num 0) has assigned 0 to stack 40 charges 1 in header 1
		  ~ppcowled.cre~ ~override~ // misc3a (num 1) has assigned 0 to stack 1 charges 1 in header 1
//			  ~resuna.cre~   ~override~ // sw1h27 (num 3) has assigned 0 to max 1 in header 2
		  ~rumar01.cre~  ~override~ // wand07 (num 4) has assigned 0 to stack 1 charges 50 in header 1
		  ~sarkis04.cre~ ~override~ // figure01 (num 4) has assigned 0 to stack 1 charges 1 in header 1
		  ~sarvie01.cre~ ~override~ // ring20 (num 4) has assigned 0 to stack 1 charges 50 in header 1
		  ~sendai3.cre~  ~override~ // arow05 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~sewdue01.cre~ ~override~ // fragsap (num 2) has assigned 0 to stack 1 charges 1 in header 1
		  ~sewyag01.cre~ ~override~ // fragsap (num 2) has assigned 0 to stack 1 charges 1 in header 1
		  ~shth01.cre~   ~override~ // bull01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
		  ~shth011.cre~  ~override~ // bull01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
		  ~shth03.cre~   ~override~ // arow05 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~sword01.cre~  ~override~ // ipsion (num 1) has assigned 0 to stack 1 charges 50 in header 1
		  ~swshaman.cre~ ~override~ // misc5t (num 1) has assigned 0 to max 1 in header 2
		  ~teltief3.cre~ ~override~ // wand18 (num 4) has assigned 0 to max 5 in header 2
//			  ~tolger.cre~   ~override~ // ring33 (num 2) has assigned 0 to stack 1 charges 1 in header 1
//			  ~tolger2.cre~  ~override~ // ring33 (num 2) has assigned 0 to stack 1 charges 1 in header 1
		  ~trrak01.cre~  ~override~ // amul22 (num 1) has assigned 0 to stack 1 charges 1 in header 1
		  ~uhman02.cre~  ~override~ // bolt01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~uhogre04.cre~ ~override~ // arow01 (num 3) has assigned 0 to stack 40 charges 1 in header 1
		  ~vakg02.cre~   ~override~ // bolt01 (num 2) has assigned 0 to stack 40 charges 1 in header 1
		  ~viekang.cre~  ~override~ // ring20 (num 6) has assigned 0 to stack 1 charges 50 in header 1
		  ~vulfgt02.cre~ ~override~ // dart01 (num 1) has assigned 0 to stack 40 charges 1 in header 1
		  ~xappren1.cre~ ~override~ // wand03 (num 0) has assigned 0 to stack 1 charges 100 in header 1
 READ_LONG 0x2bc "itm_off" ELSE 0
 READ_LONG 0x2c0 "itm_num" ELSE 0
 FOR (index = 0; index < itm_num; index = index + 1) BEGIN
READ_ASCII ("%itm_off%" + (0x14 * "%index%")) "item"
PATCH_IF ("%item%" STRING_COMPARE_CASE "amul01" = 0) BEGIN // necklace of missiles
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 25
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "amul22" = 0) OR	 // periapt of proof v poison
		  ("%item%" STRING_COMPARE_CASE "figure01" = 0) OR   // shakti figurine
		  ("%item%" STRING_COMPARE_CASE "fragsap" = 0) OR	// fragmentation skull
		  ("%item%" STRING_COMPARE_CASE "misc3a" = 0) OR	 // book of infinite spells
		  ("%item%" STRING_COMPARE_CASE "ring33" = 0) OR	 // ring of the ram
		  ("%item%" STRING_COMPARE_CASE "ring34" = 0)) BEGIN // ring of spell turning
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 1 // once per day
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "arow01" = 0) OR	 // arrows
		  ("%item%" STRING_COMPARE_CASE "arow05" = 0) OR	 // arrows
		  ("%item%" STRING_COMPARE_CASE "bolt01" = 0) OR	 // bolts
		  ("%item%" STRING_COMPARE_CASE "bolt03" = 0) OR	 // bolts of lightning
		  ("%item%" STRING_COMPARE_CASE "dart01" = 0) OR	 // darts
		  ("%item%" STRING_COMPARE_CASE "dart02" = 0) OR	 // darts +1
		  ("%item%" STRING_COMPARE_CASE "kuobolt3" = 0) OR   // kuo-toa bolts +3
		  ("%item%" STRING_COMPARE_CASE "ring03" = 0)) BEGIN // ring of animal friendship
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 20 // typical total for stacks
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "arow11" = 0) BEGIN // arrows +2
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 30 // typical total for stacks
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "boot12" = 0) OR	 // gargoyle boots
		  ("%item%" STRING_COMPARE_CASE "halb10" = 0)) BEGIN // ravager +4
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 2 // two secondary charges
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "bow20" = 0) OR
		  ("%item%" STRING_COMPARE_CASE "misc5t" = 0) OR // shaman's staff
		  ("%item%" STRING_COMPARE_CASE "slng08" = 0) OR // erinne sling
		  ("%item%" STRING_COMPARE_CASE "sw1h27" = 0) OR // arbane
		  ("%item%" STRING_COMPARE_CASE "sw1h32" = 0) OR // dragonslayer
		  ("%item%" STRING_COMPARE_CASE "sw1h70" = 0)) BEGIN // hindo's doooooom
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 1 // one secondary charge
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "bull01" = 0) BEGIN // bullets
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 20 // typical total for stacks
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "chalcy3" = 0) OR	// greenstone amulet
		  ("%item%" STRING_COMPARE_CASE "clck20" = 0) OR	 // cloak of the shield
		  ("%item%" STRING_COMPARE_CASE "ipsion" = 0) OR	 // greenstone amulet
		  ("%item%" STRING_COMPARE_CASE "ring20" = 0)) BEGIN  // ring of energy
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 50 // max charges; none of the affected items can be dropped
  END
END ELSE
PATCH_IF (("%item%" STRING_COMPARE_CASE "dagg05" = 0) OR // throwing daggers
		  ("%item%" STRING_COMPARE_CASE "sw1h57" = 0)) BEGIN // habib's throwing daggers
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 10
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "helm16" = 0) BEGIN // helm of brilliance
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  READ_SHORT  ("%itm_off%" + 0x0e + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 1
  END
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 1
  END
  PATCH_IF ("%charge3%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0e + (0x14 * "%index%")) 1
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "ring29" = 0) BEGIN // ring of earth control
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 1
  END
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 1
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "ring39" = 0) BEGIN // ring of gaxx
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 1
  END
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 3
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "staf11" = 0) BEGIN // staff of the magi
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  READ_SHORT  ("%itm_off%" + 0x0e + ("%index%" * 0x14)) "charge3"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 3
  END
  PATCH_IF ("%charge3%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0e + (0x14 * "%index%")) 1
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "staf12" = 0) BEGIN // staff of power
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  READ_SHORT  ("%itm_off%" + 0x0e + ("%index%" * 0x14)) "charge3"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 10
  END
  PATCH_IF ("%charge3%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0e + (0x14 * "%index%")) 10
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "sw1h36" = 0) BEGIN // namarra
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 3
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "sw2h10" = 0) BEGIN // carsomyr
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 3
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "wand03" = 0) BEGIN // wand of magic missiles
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 10 // typical total for stacks
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "wand05" = 0) BEGIN // wand of fire
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 10
  END
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 10
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "wand07" = 0) BEGIN // wand of lightning
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + ("%index%" * 0x14)) 8 // typical total for stacks
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "wand18" = 0) BEGIN // wand of spell striking
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge2%" > 5) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + ("%index%" * 0x14)) 5 // max 5 secondary charges
  END
END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Some of the creatures and store copies are commented out because they're already fixed by the core fixes; once these move into the core they'll supersede the existing patches.

Link to comment

Also decided to check up on these when invoked via script. Cespy's handing out uncharged items:

 

// cespy's handing out undercharged items
COPY_EXISTING ~botsmith.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~GiveItemCreate("clck31",Player1,0,0,0)~ ~GiveItemCreate("clck31",Player1,1,1,0)~
REPLACE_TEXTUALLY ~GiveItemCreate("sw1h69",Player1,0,0,0)~ ~GiveItemCreate("sw1h69",Player1,0,1,1)~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

 

As are a whole mess of other folks in SoA (.d):

// creatures handing out uncharged items
REPLACE_ACTION_TEXT ~drshsp01~ ~GiveItemCreate("misc3d",LastTalkedToBy,0,0,0)~ // spirit of the grove
						   ~GiveItemCreate("misc3d",LastTalkedToBy,1,0,0)~ // golden lion figurine
REPLACE_ACTION_TEXT ~shop03~   ~GiveItemCreate("misc3\([jk]\)",LastTalkedToBy,0,0,0)~ // maheer
						   ~GiveItemCreate("misc3\1",LastTalkedToBy,1,0,0)~	   // horn upgrades
REPLACE_ACTION_TEXT ~uddemon~  ~GiveItemCreate("HALB06",Player1,0,0,0)~ // greater demon in UD ritual
						   ~GiveItemCreate("HALB06",Player1,0,3,0)~ // blackmist halberd
REPLACE_ACTION_TEXT ~udtrap02~ ~GiveItemCreate("sw1h34",LastTalkedToBy,0,0,0)~ // raevilin strathi (trapped in UD device)
						   ~GiveItemCreate("sw1h34",LastTalkedToBy,0,1,0)~ // albruin
REPLACE_ACTION_TEXT ~wish~	 ~GiveItemCreate("misc3p",LastTalkedToBy,0,0,0)~ // wish genie
						   ~GiveItemCreate("misc3p",LastTalkedToBy,3,0,0)~ // glasses of idenification

 

And ToB (.d):

// creatures handing out uncharged items
REPLACE_ACTION_TEXT ~gorcamb~  ~GiveItemCreate("SW1H68",LastTalkedToBy,0,0,0)~ // WK gamblin' cambion
						   ~GiveItemCreate("SW1H68",LastTalkedToBy,0,1,0)~ // spectral brand
REPLACE_ACTION_TEXT ~marlowe~  ~GiveItemCreate("amsoul01",Player1,0,0,0)~ // marlowe the lich
						   ~GiveItemCreate("amsoul01",Player1,1,0,0)~ // malla's soulstone

 

Nythrun, when you get the chance could you run your check against stores and creatures post-patch? There's a lot of copy & paste, so I'm sure I've got at least one error somewhere. ;)

Link to comment

Done and done ;)

 

In undercharged store fixes, you'll want to change this:

	PATCH_IF ("%item%" STRING_COMPARE_CASE "boot12" = 0) BEGIN // boots of the gargoyle
  READ_SHORT  ("%itm_off%" + 0x0c + (0x1c * "%index%")) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x1c * "%index%")) 2 // two secondary charges
  END
END ELSE

to

	PATCH_IF ("%item%" STRING_COMPARE_CASE "boot12" = 0) BEGIN // boots of the gargoyle
  READ_SHORT  ("%itm_off%" + 0x0a + (0x1c * "%index%")) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x1c * "%index%")) 2 // two charges
  END
END ELSE

so you're writing to the first header where the charges are.

 

In undercharged creature fixes 0x0a should be changed to 0x0c here:

	PATCH_IF ("%item%" STRING_COMPARE_CASE "sw1h36" = 0) BEGIN // namarra
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 3
  END
END ELSE

 

There's a typo here, reading first charge and writing to the second

	PATCH_IF (("%item%" STRING_COMPARE_CASE "amul22" = 0) OR	 // periapt of proof v poison
		  ("%item%" STRING_COMPARE_CASE "figure01" = 0) OR   // shakti figurine
		  ("%item%" STRING_COMPARE_CASE "fragsap" = 0) OR	// fragmentation skull
		  ("%item%" STRING_COMPARE_CASE "misc3a" = 0) OR	 // book of infinite spells
		  ("%item%" STRING_COMPARE_CASE "ring33" = 0) OR	 // ring of the ram
		  ("%item%" STRING_COMPARE_CASE "ring34" = 0)) BEGIN // ring of spell turning
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 1 // once per day
  END
END ELSE

You'll want to change the Gargoyle Boots/Ravager patch into separate patches, as the Ravager's Cloak of Fear ability is on header two.

	PATCH_IF ("%item%" STRING_COMPARE_CASE "boot12" = 0) BEGIN // gargoyle boots
  READ_SHORT  ("%itm_off%" + 0x0a + ("%index%" * 0x14)) "charge1"
  PATCH_IF ("%charge1%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0a + (0x14 * "%index%")) 2 // two secondary charges
  END
END ELSE
PATCH_IF ("%item%" STRING_COMPARE_CASE "halb10" = 0) BEGIN // ravager +4
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF ("%charge2%" = 0) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + (0x14 * "%index%")) 2 // two secondary charges
  END
END ELSE

For the Wand of Spell Striking, teltief3.cre's has zero charges

	PATCH_IF ("%item%" STRING_COMPARE_CASE "wand18" = 0) BEGIN // wand of spell striking
  READ_SHORT  ("%itm_off%" + 0x0c + ("%index%" * 0x14)) "charge2"
  PATCH_IF (("%charge2%" > 5) OR ("%charge2%" = 0)) BEGIN
	WRITE_SHORT ("%itm_off%" + 0x0c + ("%index%" * 0x14)) 5 // max 5 secondary charges
  END
END

 

Deliberately opted out of dart06.itm (Giant Troll's Head/Giant Rock), potn10.itm (Potion of Invisibility), dwbolt01.itm (Drow Bolt of Sleep), dagg05.itm (Throwing Dagger), dagg16.itm (Poisoned Throwing Dagger), udmaster.cre's misc32.itm (shandon gem), undercharged wand05.itm (Wand of Fire), undercharged sw2h10.itm (Carsomyr as dropped by Firkragg comes with one charge), so no issues there.

 

Omitted from the patch is sartem01.cre, she has three zero quantity stacks of miscau.itm (Elven Holy Water), probably ought to be fives just in case someone wants to acquire these useless items by murder, I guess.

Link to comment

Figured I should go along at some point and winnow the unused stuff ;)

Only did stores though.

ALLOW_MISSING
~amsmug01.sto~
~amsmug02.sto~
~bag20.sto~
~bag21.sto~
~bag22.sto~
~bag23.sto~
~bag24.sto~
~bag25.sto~
~bag26.sto~
~bag27.sto~
~bag28.sto~
~bag29.sto~
~bag30.sto~
~garlena.sto~

COPY_EXISTING ~amsmug01.sto~ ~override~ // Amkethran Smugglers (Carras)
		  ~amsmug02.sto~ ~override~ // Amkethran Smugglers (Carras)
		  ~bag20.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag21.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag22.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag23.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag24.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag25.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag26.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag27.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag28.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag29.sto~	~override~ // Thone of Bhaal Goodwill Bag
		  ~bag30.sto~	~override~ // Thone of Bhaal Goodwill Bag
 // (unused) ~bdbart01.sto~ ~override~ // Five Flagons
		  ~bshop01.sto~  ~override~ // Merchant (Cutpurse) (Bridge District)
		  ~bshop02.sto~  ~override~ // Merchant (Storekeep) (Bridge District)
		  ~garlena.sto~  ~override~ // Temple of Helm (Sister Garlena) (Watcher's Keep)
		  ~ribald.sto~   ~override~ // Adventurers' Mart (Ribald)
 // (unused) ~ribald2.sto~  ~override~ // Adventurers' Mart
		  ~ribald3.sto~  ~override~ // Adventurers' Mart (Ribald's special stock)
		  ~sahpr1.sto~   ~override~ // Temple of Sekolah (Priestess of Sekolah)
		  ~suelf10.sto~  ~override~ // Temple of Rillifane (Rierra)
		  ~trcar04.sto~  ~override~ // Merchant (Caravan Merchant) (Trademeet Hut)
		  ~trmer02.sto~  ~override~ // Merchant (Merchant) (Trademeet)
 // (unused) ~type1.sto~	~override~ // Merchant
 // (unused) ~type2.sto~	~override~ // Adventurers' Mart
		  ~uddrow23.sto~ ~override~ // Merchant (Drow) (Ust Natha)
		  ~uddrow24.sto~ ~override~ // Shop (Drow) (Ust Natha)
 PATCH_IF (%SOURCE_SIZE% > 0xb4) THEN BEGIN
READ_LONG 0x34 "io"
READ_LONG 0x38 "ic"
FOR ("i1" = 0x00; "i1" < ("ic" * 0x1c); "i1" += 0x1c) BEGIN
  READ_ASCII	("io" + "i1" + 0x00) "it"
  READ_SHORT	("io" + "i1" + 0x0a) "c1"
  READ_SHORT	("io" + "i1" + 0x0c) "c2"
  READ_SHORT	("io" + "i1" + 0x0e) "c3"
  PATCH_IF		  ((NOT "%it%" STRING_COMPARE_CASE "arow02" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x28 // Arrows +1
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "ax1h04" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x0a // Throwing Axe
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "boot12" ) AND ("c1"  < 0x02)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x02 // Gargoyle Boots
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "bow10"  ) AND ("c2"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x01 // Heartseeker +3
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "brac16" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x01 // Bracers of Blinding Strike
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "bull03" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x28 // Bullet +2
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "dart04" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x28 // Dart of Wounding
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "misc3d" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x01 // Golden Lion Figurine
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "misc3e" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x01 // Black Spider Figurine
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "misc3i" ) AND ("c1"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x01 // Silver Horn of Valhalla
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "misc3m" ) AND ("c1"  < 0x03)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x03 // Harp of Discord
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "potn20" ) AND ("c1"  > 0x05)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x05 // Antidote
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "restore") AND ("c2"  > 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x00 // Restoration
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "ring28" ) AND (("c1" = 0x00) OR ("c2" = 0x00))) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x01 // Ring of Air Control
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x01
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "rods04" ) AND ("c1" != 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x00 // Rod of Smiting
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "rods06" ) AND ("c1"  > 0x0a)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0a) 0x0a // Rod of Reversal
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "staf16" ) AND (("c2" < 0x1e) OR ("c3" < 0x1e))) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x1e // Staff of Earth +2
	WRITE_SHORT ("io" + "i1" + 0x0e) 0x1e
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "sw1h27" ) AND ("c2"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x01 // Arbane's Sword +2
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "sw1h33" ) AND ("c2"  = 0x00)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x01 // Ras +2
  END ELSE PATCH_IF ((NOT "%it%" STRING_COMPARE_CASE "wand05" ) AND ("c2"  < 0x32)) THEN BEGIN
	WRITE_SHORT ("io" + "i1" + 0x0c) 0x32 // Wand of Fire
  END
END
 END
BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

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

×
×
  • Create New...