Root Admin Chewett Posted August 1, 2022 Root Admin Report Posted August 1, 2022 It looks like for some reason the default spell casting code (which sets a level 1 duration spell at 8 minutes) is overriding movelock, attacklock, petrify, and probably others. Luckily the HC has uncovered this. I'm going to go over the code to work out what ones need changing, Please be aware spells may be lasting for shorter periods than you expect. Quote
Root Admin Chewett Posted August 1, 2022 Author Root Admin Report Posted August 1, 2022 Thanks go to @Else @Ledah and @Sunfire for noticing and helping me test Quote
Root Admin Chewett Posted August 2, 2022 Author Root Admin Report Posted August 2, 2022 Apart from Petrify, are there any other spells that we think should last longer than 8 minutes by default? Quote
lashtal Posted August 2, 2022 Report Posted August 2, 2022 "lock in chaos", "movebind" and perhaps "weaken" come to mind... Chewett 1 Quote
Root Admin Chewett Posted August 2, 2022 Author Root Admin Report Posted August 2, 2022 Thanks all. So story time! Yesterday quite late after I had been busy I was informed that Petrify was not working properly and it had been earlier that day. So I spent some time immediately checking into the code as it was deemed important in the HC. As I was rushing I was checking the petrify item and not the petrify spell. The petrify Item runs for 30 minutes although the code, structure, etc, is very similar. This is important later. Digging into the casting code I found an odd feature where any spells that run set up a trigger, but then if they are cast on others they are then deleted and re-created using a different set of parameters. Because of name shadowing and a few different variable names this actually caused a bug whereby: Petrify runs, trigger created with X minutes Petrify deleted from triggers Petrify trigger re-created, with different params and using a new variable This is pretty deep into the code and it looks like it has been around for a while but I have now fixed it. However after fixing it I still didn't see petrify being cast for 30 minutes. This is where I left it as I didn't have time to debug and it was already much past midnight for me. Today I investigated again and noticed that I had the wrong spell file, finding the correct spell file did indeed show me that the petrify spell follows the same pattern for spell casting. So the petrify spell has never lasted for 30 minutes. Long story short, Petrify spell level 1 has the standard 8 minute cast duration, it has always been the case. There was a bug that was affecting some items which have a special "longer" duration, but these are now fixed again. If you have any questions, feel free to post or message me! Invie, lashtal and Ledah 1 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.