subtledoctor Posted February 10, 2023 Share Posted February 10, 2023 (edited) 49 minutes ago, TotoR said: It seems that I arrive after the battle... a PR have been done some times ago (https://github.com/Gibberlings3/PnP_Celestials/pull/4) and it is waiting for the head chief @CamDawg for approval. Ah, well it seems I was too late with figuring it , I was going to offer code for the fix. FWIW I know Bartimaeus can tend to change things around in his IRR/SRR more often than others, so some more flexible code to handle potential future adjustments in IR(R) might look like this: Spoiler COPY_EXISTING ~rods04.itm~ ~override/ca#monrd.itm~ SAY NAME1 @303 SAY NAME2 @303 WRITE_BYTE 0x18 (THIS BAND `BIT2) // removes droppable flag WRITE_ASCII 0x22 ~S1~ // long sword WRITE_LONG 0x60 3 LPF ALTER_EFFECT INT_VAR silent = 1 STR_VAR match_resource = rods04 resource = ~ca#monrd~ END // pick up any self-targeted 324/318s LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 233 match_parameter2 = 109 parameter1 = 3 END LPF ALTER_ITEM_HEADER INT_VAR header_type = 1 dicenumber = 1 dicesize = 8 thac0_bonus = 3 damage_bonus = 3 identify = 0 END PATCH_IF MOD_IS_INSTALLED "ITEM_REV.TP2" "0" BEGIN LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 177 match_parameter1 = 144 parameter1 = 188 parameter2 = 5 END // Slay vs earth elemental PATCH_FOR_EACH to_hit IN ~1~ ~2~ ~3~ ~4~ BEGIN LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 177 STR_VAR match_resource = EVAL "GOLEHIT%to_hit%" resource = EVAL "CA#HIT%to_hit%" END // to hit bonus vs earth elemental INNER_ACTION BEGIN ACTION_IF (FILE_EXISTS_IN_GAME ~GOLEHIT%to_hit%.eff~) BEGIN COPY_EXISTING ~GOLEHIT%to_hit%.eff~ ~override\CA#HIT%to_hit%.eff~ // to hit bonus vs elemental - earth WRITE_LONG 0x1C 188 WRITE_LONG 0x20 5 END END END PATCH_FOR_EACH dam_bo IN ~3~ ~4~ ~5~ ~6~ ~7~ ~8~ BEGIN LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 177 STR_VAR match_resource = EVAL "GOLEDAM%dam_bo%" resource = EVAL "CA#DAM%dam_bo%" END // dmg bonus vs earth elemental INNER_ACTION BEGIN ACTION_IF (FILE_EXISTS_IN_GAME ~GOLEDAM%dam_bo%.eff~) BEGIN COPY_EXISTING ~GOLEDAM%dam_bo%.eff~ ~override\CA#DAM%dam_bo%.eff~ // dmg bonus vs elemental - earth WRITE_LONG 0x1C 188 WRITE_LONG 0x20 5 END END END END ELSE BEGIN LPF CLONE_EFFECT INT_VAR match_opcode = 177 parameter1 = 188 parameter2 = 5 STR_VAR match_resource = smitgol1 END // vs earth elemental LPF CLONE_EFFECT INT_VAR match_opcode = 55 parameter1 = 188 parameter2 = 5 END // vs earth elemental END IF_EXISTS That will work with both IR and IRR, and still continue to work in the future if those mods set the to-hit bonus anywhere between +1 and +4, and the damage bonus anywhere between +3 and +8. 49 minutes ago, TotoR said: Compatibility with SR is a huge headache and seems not really possible : Creatures Stats differs, spells known differs and are not balanced as SR, descriptions are no more accurate... So my current statement seems good in fact. However, and technically speaking, PnP Clectials can be installed after SR. I don't think it's that big a deal... the onus is not on you to conceptually make them work as SR intends celestials to be. I think it's fine to have it such that installing this after SR will obliterate SR's changes to the spells, but in a way that leaves things clean and working well for players who intentionally choose to obliterate those SR spells. To that end, I changed the .SPL patches near line 570 of the Celestials .tp2 file to this: Spoiler COPY_EXISTING ~spcl923.spl~ ~override~ /* Paladin Innate spell to summon deva through invis and invulen creature */ WRITE_LONG 0x50 63829 WRITE_LONG 0x34 1 LPF ALTER_EFFECT INT_VAR match_opcode = 177 STR_VAR resource = ~ca#inv1~ END IF_EXISTS BUT_ONLY COPY_EXISTING ~spcl935.spl~ ~override~ /* blackguard Innate spell to summon fallen deva */ WRITE_LONG 0x50 63831 LPF ALTER_EFFECT INT_VAR match_opcode = 177 STR_VAR resource = ~ca#fdeva~ END IF_EXISTS BUT_ONLY COPY_EXISTING ~sppr726.spl~ ~override~ /* Cleric spell to summon deva through invis and invulen creature */ WRITE_LONG 0x50 63829 LPF ALTER_EFFECT INT_VAR match_opcode = 177 STR_VAR resource = ~ca#inv1~ END IF_EXISTS BUT_ONLY COPY_EXISTING ~sppr727.spl~ ~override~ /* Cleric spell to summon fallen deva */ WRITE_LONG 0x50 63831 LPF ALTER_EFFECT INT_VAR match_opcode = 177 STR_VAR resource = ~ca#fdeva~ END IF_EXISTS BUT_ONLY COPY_EXISTING ~spwi923.spl~ ~override~ /* Wizard spell to summon planetar */ WRITE_LONG 0x50 63232 LPF ALTER_EFFECT INT_VAR match_opcode = 177 STR_VAR resource = ~ca#plan~ END IF_EXISTS BUT_ONLY COPY_EXISTING ~spwi924.spl~ ~override~ /* Wizard spell to summon fallen planetar */ WRITE_LONG 0x50 63237 LPF ALTER_EFFECT INT_VAR match_opcode = 177 STR_VAR resource = ~ca#fplan~ END IF_EXISTS BUT_ONLY That makes the same op177 patches that the mod does now, and also sets the spell descriptions to the original unmodded descriptions (since PnP Celestials seems to be intended for use with those original descriptions). Edited February 10, 2023 by subtledoctor Quote Link to comment
TotoR Posted February 10, 2023 Share Posted February 10, 2023 49 minutes ago, subtledoctor said: Ah, well it seems I was too late with figuring it , I was going to offer code for the fix. FWIW I know Bartimaeus can tend to change things around in his IRR/SRR more often than others, so some more flexible code to handle potential future adjustments in IR(R) might look like this: it as been added, it is never too late when it is better... 49 minutes ago, subtledoctor said: also sets the spell descriptions to the original unmodded descriptions idem. Thank you ! Quote Link to comment
Endarire Posted March 3, 2023 Share Posted March 3, 2023 Should P&P Celestials be installed before or after SCS? aTweaks? (I didn't see this elsewhere.) Thankee! Quote Link to comment
TotoR Posted March 3, 2023 Share Posted March 3, 2023 On 12/19/2022 at 1:13 PM, TotoR said: It should be installed after mods that alter spells and items, but before kits, tweaks and SCS. Quote Link to comment
Guest morpheus562 Posted March 3, 2023 Share Posted March 3, 2023 (edited) Running into this error: "Cannot append column-wise because there are 11 lines in 7eyes.2da but I was only given 10 things to append" Updating functions.tph to account for SNARE_ARROW resolves the error: ACTION_IF ((FILE_EXISTS_IN_GAME ~7eyes.2da~) AND (FILE_CONTAINS_EVALUATED (~7eyes.2da~ ~[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]~))) THEN BEGIN COPY_EXISTING ~7eyes.2da~ ~override~ SPRINT mind ~*~ SPRINT sword ~*~ SPRINT mage ~*~ SPRINT venom ~*~ SPRINT spirit ~*~ SPRINT fortitude ~*~ SPRINT stone ~*~ SPRINT snare ~*~ COUNT_2DA_COLS cols SET cols = cols - 2 REPLACE_EVALUATE CASE_INSENSITIVE ~\(^EYEMIND[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT mind ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^EYESWORD[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT sword ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^EYEMAGE[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT mage ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^EYEVENOM[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT venom ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^EYESPIRIT[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT spirit ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^EYEFORTITUDE[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT fortitude ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^EYESTONE[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT stone ~%destination%~ END ~\1~ REPLACE_EVALUATE ~\(^SNARE_ARROW[ %TAB%].+[ %TAB%]%source%[ %TAB%%LNL%%MNL%%WNL%]\)~ BEGIN SPRINT stone ~%destination%~ END ~\1~ BUT_ONLY APPEND_COL ~7eyes.2da~ ~$ $ %cols% %mind% %sword% %mage% %venom% %spirit% %fortitude% %stone% %snare%~ END Edited March 3, 2023 by morpheus562 Quote Link to comment
subtledoctor Posted March 3, 2023 Share Posted March 3, 2023 5 minutes ago, morpheus562 said: Running into this error: "Cannot append column-wise because there are 11 lines in 7eyes.2da but I was only given 10 things to append" Updating functions.tph to account for SNARE_ARROW resolves the error: SNARE_ARROW may or may not be present in any given game. In fact any number of mods may append rows to 7eyes.2da, so a function that appends a column to it is going to have to do a lot more generalizing about how many rows there are. OTOH other mods that are installed later won't know that this mod added columns, so the end result is that the file will not have a uniform number of columns and rows. I just glanced at my copy and this is the case. In-game, my spells that utilize this table seem to be working fine, so the engine doesn't seem to mind mismatched row lengths. (Similar to CLAB .2da tables.) In which case, rather than using APPEND_COL, maybe the best idea for this mod would be to selectively extend the particular rows it needs to extend. (Seems like it is the EYESPIRIT row?) Quote Link to comment
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.