temnix Posted March 29, 2022 Posted March 29, 2022 I came up with this today. How to make it so that Turn Undead not only works against the undead but also against fiends, as it should by the Player's Handbook's rules? The easiest possibility is to patch all creatures of the DEMONIC race with the PALADIN class, and then they will be routed with a yellow panic circle and the "Turned Paladin" message when the turning attempt succeeds. The text strings, this one and the usual, could be changed to read "Turn Unholy." That's simple, but evil paladins never get destroyed or controlled, and the panic looks different from the usual turning. A more natural way would be to do a different patching: convert DEMONIC creatures to the UNDEAD General first, give the ZOMBIE default race (for instance) to those whose race is NONE or NO_RACE unless they use one of the ghost animations, in which case make them WRAITH (or SPECTRAL_UNDEAD or SPECTRE, there is no practical difference). Where it is important to keep the creature's race, class can be changed. I went through all of the suspicious creatures in BG1 and BG2, and here are all of the ones that need to be specially changed by name: "Ulcaster" -> wraith 134, undead DAITEL.CRE -> undead (it can't hurt to convert anything with "ghost" in the name to the UNDEAD general, actually) "Ghost Knight" -> undead "Death Tyrant" -> zombie 148 "Eye of the Dead" -> undead "Spectral Troll" - > undead, equip somewhere immune1, ring95, wraith 134, class wolf_dread 148 (to keep the troll race for the ranger bonus) "Helmite Ghost" - > wraith 134, undead "Ghostly Monk" - > wraith 134, undead "Ghostly Priest" - > wraith 134, undead "Badon's Ghost" - > wraith 134 "Dettseh's Ghost" - > wraith 134 "Ghostly Apparition" - > wraith 134, undead "Wraith Sarevok" - > wraith 134, undead, WRITE_BYTE 0x234 20 (increase level to 20 for his fight not to be easy) "Slave Wraith" - > class 148, undead "Demon Wraith" - > class 148, undead These are all of them. The other undead have the right races or classes. There may be a few special cases to look up in the Icewind Dales. Those who know this stuff well already understand how to proceed, but I'll lay it down for the others. When after this clean-up all of the demons have been converted to the UNDEAD General, you would go on to step two: alter the UNDEAD-targeting effects of spells and items to target or ignore those races instead. There is about half a dozen of undead races to go around and a couple of classes. You would clone the effects and delete the originals, like this for effect 318 with the criterion "GENERAL = UNDEAD" (line 2 of SPLPROT): LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 155 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 108 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 150 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 132 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 115 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 175 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 125 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 126 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 148 parameter2 = 104 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 147 parameter2 = 105 END LPF CLONE_EFFECT INT_VAR match_opcode = 318 match_parameter2 = 1 parameter1 = 148 parameter2 = 105 END This covers all of the races and the exceptional case of the dread and vampiric wolves. (The WIGHT class is not important, because there is no WIGHT race.) Then you would insert DELETE_EFFECT for the original. After this you would need to do a similar replacement for line 3 of SPLPROT, "GENERAL != UNDEAD," but here you would need to write a composite condition: NOT race ZOMBIE and NOT race GHOUL and NOT race SPECTRE and NOT class WOLF_DREAD... All of them are on the list above. Here is where I stopped, because here it stops being fun for me. But I know there are people out here who enjoy writing things like that. So this is why I'm putting up this idea and the info on the exceptions. After covering lines 1 and 2 of SPLPROT for effects with opcode 318 you would need to do the same for opcode 326, and then take care of possible versions of both that use the "GENERAL = specified value" down the list to target UNDEAD or NOT UNDEAD instead. That is easy enough and will also cover opcode 177. Simply run this code: LPF ALTER_EFFECT INT_VAR match_opcode = 177 match_parameter1 = 4 match_parameter2 = 3 parameter1 = 134 parameter2 = 104 END This will replace UNDEAD targeting in 177s with targeting the WRAITH race. You would need to repeat this for the other combinations, and then the same for 178 and 179 ("THAC0 vs. Type" and "Damage vs. Type") and 318 and 326. You would also need to replace the "Golem or undead" condition in SPLPROT (line 31) with another extension of your long race-class condition, and do a reverse for line 32, "Not golem or undead." With these replacements in place for SPL and ITM files the undead-affecting powers and weapons would still home in on their targets while clerics and paladins would get a cool new power. It's all long but straightforward secretarial work. I don't enjoy that, but some modders embark on these things for the good of the community and whatnot. Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.