CamDawg Posted February 11, 2006 Share Posted February 11, 2006 Got this coded up easily enough, and included items as well. The issue is that I've currently got this going through as a regexp, which means we're probably granting elves resistance to sleep spells they shouldn't (think Irenicus forcing the party to sleep at Spellhold, for instance). The following have sleep/charm effects: [ABZAWAY.SPL] [bALTH01.SPL] [bALTH09.SPL] [bEGUILE.SPL] [CH3AWAY.SPL] [CH3DRAIN.SPL] [CH3FLASH.SPL] [CH3WEAK.SPL] [DEMOCHM.SPL] [DGWHIRL.SPL] [JWFALL.SPL] [JWSIEGE.SPL] [JWSLEEP.SPL] [JWWHIRL.SPL] [sPCL311.SPL] [sPCL641.SPL] [sPCL751A.SPL] [sPCL911B.SPL] [sPIN108.SPL] [sPIN119.SPL] [sPIN531.SPL] [sPIN547.SPL] [sPIN553.SPL] [sPIN558.SPL] [sPIN600.SPL] [sPIN614.SPL] [sPIN643.SPL] [sPIN656.SPL] [sPIN658.SPL] [sPIN695.SPL] [sPIN775.SPL] [sPIN785.SPL] [sPIN802.SPL] [sPIN883.SPL] [sPIN892.SPL] [sPIN910.SPL] [sPIN937.SPL] [sPIN940.SPL] [sPIN966.SPL] [sPIN975.SPL] [sPIN980.SPL] [sPIN985.SPL] [sPOGRE01.SPL] [sPPR102.SPL] [sPPR204.SPL] [sPPR405.SPL] [sPPR512.SPL] [sPPR720.SPL] [sPPR982.SPL] [sPWI004.SPL] [sPWI104.SPL] [sPWI105.SPL] [sPWI116.SPL] [sPWI213.SPL] [sPWI316.SPL] [sPWI411.SPL] [sPWI506.SPL] [sPWI711.SPL] [sPWI922.SPL] [sPWI925.SPL] [sPWI929.SPL] [sPWI930.SPL] [sPWI939.SPL] [sPWI943.SPL] [sPWI996.SPL] [sPWISH27.SPL] [sPWM179.SPL] [sPWM187.SPL] [sPYANC01.SPL] [uRGEKILL.SPL] [AURSTAF.ITM] [AX1H16.ITM] [CLCK07.ITM] [DAGG13.ITM] [DWBOLT01.ITM] [GORWOM1.ITM] [HGNYMPH.ITM] [MISC2P.ITM] [MISC9X.ITM] [PSDCLAW.ITM] [RAVAG01.ITM] [REGISAMU.ITM] [RING03.ITM] [RING30.ITM] [sCRL81B.ITM] [sPER12.ITM] [sTAF09.ITM] [sTAF14.ITM] [sTAF15.ITM] [sTAF21.ITM] [sTAF22.ITM] [WAND08.ITM] Of these, does any one have a list handy of which ones not to dick around with? For those playing along at home, the current code: // elven sleep/charm immunity COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~ ~^.+\.itm$~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" PATCH_IF (~%SOURCE_FILE%~ STRING_MATCHES_REGEXP ~^.+\.itm$~ = 0) BEGIN // items and spells have different length headers SET "abil_length" = 0x38 END ELSE BEGIN SET "abil_length" = 0x28 END SET "fx_delta" = 0 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // start iterating through abilities READ_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx" SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%") WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%") FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode" PATCH_IF (("%opcode%" = 39) OR ("%opcode%" = 5)) BEGIN // if there's a sleep or charm opcode READ_BYTE ("%fx_off%" + 0x02 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "target" READ_BYTE ("%fx_off%" + 0x12 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob1" READ_BYTE ("%fx_off%" + 0x13 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob2" PATCH_IF ("%opcode%" = 5) BEGIN // if charm SET "new_fx" = 12 END ELSE BEGIN SET "new_fx" = 10 END SET "fx_delta" = "%fx_delta%" + "%new_fx%" FOR (index4 = 2; index4 < 4; index4 = index4 + 1) BEGIN FOR (index3 = 0; index3 < (("%new_fx%" / 2)); index3 = index3 + 1) BEGIN INSERT_BYTES ("%fx_off%" + (0x30 * "%abil_fx_idx%")) 0x30 // insert new effect WRITE_SHORT ("%fx_off%" + (0x30 * "%abil_fx_idx%")) 177 // use eff file WRITE_BYTE ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) "%target%" // preserve target WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * "%abil_fx_idx%")) "%index4%" // elf or half elff WRITE_LONG ("%fx_off%" + 0x08 + (0x30 * "%abil_fx_idx%")) 4 // race.ids WRITE_BYTE ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) ("%prob2%" + ((21 - ("%index4%" * 6)) * ("%prob1%" - "%prob2%") / 10)) // 90% WRITE_BYTE ("%fx_off%" + 0x13 + (0x30 * "%abil_fx_idx%")) "%prob2%" // base prob WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~cdelfcm%index3%~ // eff file PATCH_IF ("%opcode%" = 39) BEGIN WRITE_ASCII ("%fx_off%" + 0x19 + (0x30 * "%abil_fx_idx%")) ~sl~ #2 // eff file END END END SET "index2" = "%index2%" + "%new_fx%" SET "abil_fx_num" = "%abil_fx_num%" + "%new_fx%" END END WRITE_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "%abil_fx_num%" END PATCH_IF ("%fx_delta%" > 0) BEGIN PATCH_PRINT ~[%SOURCE_FILE%]~ END BUT_ONLY_IF_IT_CHANGES The various eff files actually handle the portrait icon/animation/string/opcode immunities. Link to comment
devSin Posted February 11, 2006 Share Posted February 11, 2006 Any of the JW and DG spells (these "designer" spells are only used for dramatic effect -- you don't want Melissan to twirl and knock everyone but the elves away from her). Any item or spell that uses sleep as an addition to the knockback effect shouldn't grant immunity (it's not magical sleep, but a getting-knocked-off-your-feet thing). I'd probably avoid CH3 spells (the ravager's funky "I care only for <CHARNAME>! Away!" spells). The rest you'll have to go through manually... Link to comment
CamDawg Posted February 11, 2006 Author Share Posted February 11, 2006 Thanks. I'll do the slogging from here. Link to comment
cirerrek Posted February 11, 2006 Share Posted February 11, 2006 CamDawg ROXORS While Cam is on a roll, are any of the other races missing their innate racial abilities? If the answer is yes, then are those abilities easily implementable? Half-Orcs - Infravision? Elves - Bonus to THAC0 for Longswords and Shortswords It's safe to say that implementing the Dwarven ability to detect sloping passages is pretty useless. I've got the 2nd Ed Players handbook in case you want a complete list. Link to comment
CamDawg Posted February 11, 2006 Author Share Posted February 11, 2006 Half-orc infravision is pretty easy. I coulda sworn someone on the old Interplay boards did some tests and figured that elves did have a bonus with all swords--perhaps someone with some free time could turn on attack rolls and see if this is the case? The other big thing I'll need here is something in-game to back these up, so we know if they should go into the core fixes or OBC. Link to comment
CamDawg Posted February 11, 2006 Author Share Posted February 11, 2006 Sleep/charm fixes. Remembered to check eff files as well, but nothing exciting going on there. // elven sleep/charm immunity COPY_EXISTING ~beguile.spl~ ~override~ // beguiling gaze (demogorgon) ~demochm.spl~ ~override~ // demonic charm (demogorgon) ~spcl311.spl~ ~override~ // ranger charm animal ~spcl641.spl~ ~override~ // charm person or animal (unused?) ~spcl751a.spl~ ~override~ // huh? used as bard song for HELL_PRIDE_EVIL ~spin108.spl~ ~override~ // charm animal (elminster version) ~spin119.spl~ ~override~ // charm person (elminster version) ~spin553.spl~ ~override~ // nalmissra innate charm ~spin558.spl~ ~override~ // erinyes charm ~spin775.spl~ ~override~ // psionic mind blast ~spin802.spl~ ~override~ // mind cripple ~spin883.spl~ ~override~ // vampire domination ~spin910.spl~ ~override~ // psionic domination ~spin937.spl~ ~override~ // mephit color spray ~spin940.spl~ ~override~ // mephit stinking cloud ~spin966.spl~ ~override~ // troll sleep ~spin975.spl~ ~override~ // mind flayer domination ~spin980.spl~ ~override~ // beholder charm person ~spin985.spl~ ~override~ // beholder domination ~sppr102.spl~ ~override~ // command ~sppr204.spl~ ~override~ // charm person or mammal ~sppr405.spl~ ~override~ // mental domination ~sppr512.spl~ ~override~ // greater command ~sppr982.spl~ ~override~ // dire charm (trap) ~spwi004.spl~ ~override~ // stinking cloud (trap) ~spwi104.spl~ ~override~ // charm person ~spwi105.spl~ ~override~ // color spray ~spwi116.spl~ ~override~ // sleep ~spwi213.spl~ ~override~ // stinking cloud ~spwi316.spl~ ~override~ // dire charm ~spwi411.spl~ ~override~ // emotion ~spwi506.spl~ ~override~ // domination ~spwi711.spl~ ~override~ // sphere of chaos ~spwi929.spl~ ~override~ // succubus charm male ~spwi930.spl~ ~override~ // succubus charm female ~spwi943.spl~ ~override~ // sirine dire charm ~spwm179.spl~ ~override~ // wild surge charm ~spwm187.spl~ ~override~ // wild surge sleep ~urgekill.spl~ ~override~ // ravager charm READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" SET "abil_length" = 0x28 SET "fx_delta" = 0 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // start iterating through abilities READ_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx" SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%") WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%") FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode" PATCH_IF (("%opcode%" = 39) OR ("%opcode%" = 5)) BEGIN // if there's a sleep or charm opcode READ_BYTE ("%fx_off%" + 0x02 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "target" READ_BYTE ("%fx_off%" + 0x12 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob1" READ_BYTE ("%fx_off%" + 0x13 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob2" PATCH_IF ("%opcode%" = 5) BEGIN // if charm SET "new_fx" = 12 END ELSE BEGIN SET "new_fx" = 10 END SET "fx_delta" = "%fx_delta%" + "%new_fx%" FOR (index4 = 2; index4 < 4; index4 = index4 + 1) BEGIN FOR (index3 = 0; index3 < (("%new_fx%" / 2)); index3 = index3 + 1) BEGIN INSERT_BYTES ("%fx_off%" + (0x30 * "%abil_fx_idx%")) 0x30 // insert new effect WRITE_SHORT ("%fx_off%" + (0x30 * "%abil_fx_idx%")) 177 // use eff file WRITE_BYTE ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) "%target%" // preserve target WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * "%abil_fx_idx%")) "%index4%" // elf or half elff WRITE_LONG ("%fx_off%" + 0x08 + (0x30 * "%abil_fx_idx%")) 4 // race.ids WRITE_BYTE ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) ("%prob2%" + ((21 - ("%index4%" * 6)) * ("%prob1%" - "%prob2%") / 10)) // 90% WRITE_BYTE ("%fx_off%" + 0x13 + (0x30 * "%abil_fx_idx%")) "%prob2%" // base prob WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~cdelfcm%index3%~ // eff file PATCH_IF ("%opcode%" = 39) BEGIN WRITE_ASCII ("%fx_off%" + 0x19 + (0x30 * "%abil_fx_idx%")) ~sl~ #2 // eff file END END END SET "index2" = "%index2%" + "%new_fx%" SET "abil_fx_num" = "%abil_fx_num%" + "%new_fx%" END END WRITE_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "%abil_fx_num%" END BUT_ONLY_IF_IT_CHANGES // elven sleep/charm immunity COPY_EXISTING ~clck07.itm~ ~override~ // cloak of the nymph ~dagg13.itm~ ~override~ // pixie prick +3 ~dwbolt01.itm~ ~override~ // drow bolt o' sleep ~gorwom1.itm~ ~override~ // undroppable nalmissra weapon - charm effect ~hgnymph.itm~ ~override~ // undroppable nymph weapon - charm effect ~misc2p.itm~ ~override~ // harp; appears unused ~misc9x.itm~ ~override~ // illithid control circlet ~psdclaw.itm~ ~override~ // ToB pseudodragon melee weapon ~regisamu.itm~ ~override~ // Ruby Pendant of Beguiling on Regis ~ring03.itm~ ~override~ // Ring of Animal Friendship ~ring30.itm~ ~override~ // Ring of Human Influence ~staf09.itm~ ~override~ // staff of command ~staf14.itm~ ~override~ // staff of the woodlands ~staf15.itm~ ~override~ // staff of air ~wand08.itm~ ~override~ // wand of sleep READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" SET "abil_length" = 0x38 SET "fx_delta" = 0 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // start iterating through abilities READ_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "abil_fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx" SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%") WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%") FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode" PATCH_IF (("%opcode%" = 39) OR ("%opcode%" = 5)) BEGIN // if there's a sleep or charm opcode READ_BYTE ("%fx_off%" + 0x02 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "target" READ_BYTE ("%fx_off%" + 0x12 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob1" READ_BYTE ("%fx_off%" + 0x13 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob2" PATCH_IF ("%opcode%" = 5) BEGIN // if charm SET "new_fx" = 12 END ELSE BEGIN SET "new_fx" = 10 END SET "fx_delta" = "%fx_delta%" + "%new_fx%" FOR (index4 = 2; index4 < 4; index4 = index4 + 1) BEGIN FOR (index3 = 0; index3 < (("%new_fx%" / 2)); index3 = index3 + 1) BEGIN INSERT_BYTES ("%fx_off%" + (0x30 * "%abil_fx_idx%")) 0x30 // insert new effect WRITE_SHORT ("%fx_off%" + (0x30 * "%abil_fx_idx%")) 177 // use eff file WRITE_BYTE ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) "%target%" // preserve target WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * "%abil_fx_idx%")) "%index4%" // elf or half elff WRITE_LONG ("%fx_off%" + 0x08 + (0x30 * "%abil_fx_idx%")) 4 // race.ids WRITE_BYTE ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) ("%prob2%" + ((21 - ("%index4%" * 6)) * ("%prob1%" - "%prob2%") / 10)) // 90% WRITE_BYTE ("%fx_off%" + 0x13 + (0x30 * "%abil_fx_idx%")) "%prob2%" // base prob WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~cdelfcm%index3%~ // eff file PATCH_IF ("%opcode%" = 39) BEGIN WRITE_ASCII ("%fx_off%" + 0x19 + (0x30 * "%abil_fx_idx%")) ~sl~ #2 // eff file END END END SET "index2" = "%index2%" + "%new_fx%" SET "abil_fx_num" = "%abil_fx_num%" + "%new_fx%" END END WRITE_SHORT ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "%abil_fx_num%" END BUT_ONLY_IF_IT_CHANGES Link to comment
cirerrek Posted February 19, 2006 Share Posted February 19, 2006 I coulda sworn someone on the old Interplay boards did some tests and figured that elves did have a bonus with all swords--perhaps someone with some free time could turn on attack rolls and see if this is the case? <{POST_SNAPBACK}> Description of the Elven Race says they should get a +1 to Hit with Bows and Longswords. I haven't gotten into the attack rolls, yet, but just looking at THAC0's for swords: Non-proficient: Base THAC0: 14 THAC0 Unarmed: 11 THAC0 Katana: 12 THAC0 Longsword: 12 THAC0 Shortsword: 12 Proficient Base THAC0: 14 THAC0 Unarmed: 11 THAC0 Katana: 10 THAC0 Longsword: 10 THAC0 Shortsword: 10 Conclusion: If its anywhere, the bonus is going to have to be in the attack rolls. If its not in the attack rolls, then I'm not sure how you would implement this, unless there is some unknown in .itm files that be set to account for this bonus, and since it is an unknown, it probably isn't going to do us much good Thanks, Link to comment
the bigg Posted February 19, 2006 Share Posted February 19, 2006 I remember that BG1 did have this. It could be worth (?) to start comparing unkowns in BG1 items to see if something turns up. (sorry, I played it only off the CDs of a guy I'm not in friendly terms with anymore). Link to comment
icelus Posted March 4, 2006 Share Posted March 4, 2006 WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~cdelfcm%index3%~ // eff file I'm assuming that cdelf.eff (or something similar) is being assigned here, and it's a custom .eff file, right? But... I don't see any such file in the download package. Am I just lost? Link to comment
devSin Posted March 4, 2006 Share Posted March 4, 2006 The stupid thing about the wiki is that most external files are only accessible to Cam until the next full release. Not that Cam wouldn't give you the files if you asked, but still... Go, wiki! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.