Bartimaeus Posted May 27, 2020 Share Posted May 27, 2020 (edited) Oh. Yeah, no, I didn't realize it worked like that. That's kind of unfortunate. Engine limitations, . Edited May 27, 2020 by Bartimaeus Quote Link to comment
Jarno Mikkola Posted May 28, 2020 Share Posted May 28, 2020 (edited) 7 hours ago, subtledoctor said: Now that I think about it, the way it could actually achieve its true aim is to use innate abilities instead of actual spells - something like my bardic casting system. Now I think about it, it would be pretty simple to add Igi-style timed restoration to my system. Hmmm... But this is waaaay off-topic, sorry. (And it would not play well with SCS AI.) Thing is, Innate spells: don't, have, levels. And we already have this code: BEGIN ~Innate Spell Refreshment~ DESIGNATED 3 PRINT ~First we build a list of spells to patch~ OUTER_TEXT_SPRINT ability_list ~~ COPY_EXISTING - ~kitlist.2da~ ~override~ COUNT_2DA_COLS kit_numCols COUNT_2DA_ROWS kit_numCols kit_numRows FOR (kit_row = 0; kit_row < kit_numRows; ++kit_row) BEGIN READ_2DA_ENTRY kit_row 5 kit_numCols clabFile PATCH_IF (FILE_EXISTS_IN_GAME ~%clabFile%.2da~) BEGIN INNER_ACTION BEGIN COPY_EXISTING - ~%clabFile%.2da~ ~override~ COUNT_2DA_COLS clab_numCols COUNT_2DA_ROWS clab_numCols clab_numRows FOR (clab_row = 0; clab_row < clab_numRows; ++clab_row) BEGIN FOR (clab_col = 1; clab_col < clab_numCols; ++clab_col) BEGIN READ_2DA_ENTRY clab_row clab_col clab_numCols entry // processing GA_* entries... PATCH_IF (~%entry%~ STRING_MATCHES_REGEXP ~GA_.+~ = 0) BEGIN INNER_PATCH_SAVE splFile ~%entry%~ BEGIN REPLACE_TEXTUALLY ~GA_\(.+\)~ ~\1~ END PATCH_IF (~%ability_list%~ STRING_CONTAINS_REGEXP ~%splFile%~ != 0) BEGIN TEXT_SPRINT ability_list ~%ability_list%%splFile%%WNL%~ END END END END END END END TEXT_SPRINT ability_list ~%ability_list% SPIN101 SPIN102 SPIN103 SPIN104 SPIN105 SPIN106~ PRINT ~Abilities found:~ PRINT ~%ability_list%~ PRINT ~Now you need to deside if you wish the spell the refresh rate to apply on successfull casting only or even when you are interrupted ? Choose: 1) Only on successful casting 2) Even when interrupted Answer with a single digit and push ENTER~ ACTION_READLN sucfail OUTER_WHILE (!(IS_AN_INT %sucfail%) || (%sucfail% > 2) || (%sucfail% < 1)) BEGIN PRINT ~Choose: 1) Only on successful casting 2) Even when interrupted~ ACTION_READLN sucfail END PRINT ~Set a refresh rate timer for all Innate spells, recommendation is to set it to be at least 900 which is 15 minutes in real time~ ACTION_READLN timer0 OUTER_WHILE !(IS_AN_INT %timer0%) BEGIN PRINT ~What number do you wish to set for the timer to ?~ ACTION_READLN timer0 END ACTION_IF (IS_AN_INT %timer0% AND %sucfail% = 1) THEN BEGIN COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~ PATCH_IF ((SOURCE_SIZE > 0x113) AND (~%ability_list%~ STRING_CONTAINS_REGEXP ~%SOURCE_RES%~) AND (STRING_LENGTH ~%ability_list%~ > 8 )) THEN BEGIN READ_SHORT 0x1c "spl_type" PATCH_IF ("%spl_type%" = "4") THEN BEGIN LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode = 172 target = 1 timing = 1 resist_dispel = 2 probability1 = 100 STR_VAR resource = EVAL "%SOURCE_RES%" END LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode = 171 target = 1 timing = 4 resist_dispel = 2 duration = timer0 probability1 = 100 STR_VAR resource = EVAL "%SOURCE_RES%" END END END BUT_ONLY ACTION_IF (IS_AN_INT %timer0% AND %sucfail% = 2) THEN BEGIN COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~ PATCH_IF ((SOURCE_SIZE > 0x113) AND (~%ability_list%~ STRING_CONTAINS_REGEXP ~%SOURCE_RES%~) AND (STRING_LENGTH ~%ability_list%~ > 8 )) THEN BEGIN READ_SHORT 0x1c "spl_type" PATCH_IF ("%spl_type%" = "4") THEN BEGIN LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 172 target = 1 timing = 1 resist_dispel = 2 probability1 = 100 STR_VAR resource = EVAL "%SOURCE_RES%" END LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 171 target = 1 timing = 4 resist_dispel = 2 duration = timer0 probability1 = 100 STR_VAR resource = EVAL "%SOURCE_RES%" END END END BUT_ONLY PRINT ~Success.~ But that has the ACTION_READLN ... 9 hours ago, Bartimaeus said: I'd probably select something like 1 in-game hour - a bit long for BG1, but necessary to make sure it's not too short for BG2. 8 hours would be way too long to really bother with it unless all you wanted was for spells to refresh when traveling between areas, which, hey, if you don't want any real modification to the vancian system, isn't too bad of an idea. 1 hour is game time... is: real 6 seconds = 5 in game minutes or a round; so 20 rounds or 120 real seconds = 1 ingame hour. That's, I'll say, way too fast too. At least on high levels. Now it might work on level 1 spells, but not on level 9 with level 8, 7... and so forth along. Which is why I allow multiple level variaty. 7 hours ago, subtledoctor said: it is cast, but only sets a timer for each restoration and then restores spells in alphabetical order. Which is utterly nuts IMHO. (Think about it: you cast Magic Missile, then Larloch’s Drain, then Burning hands... the first spell you get back will be Burning Hands. Cast it again... and then you’ll get it right back again. If you keep casting whatever is available each rounds, you’ll get infinite casts of Burning Hands, and never get another chance to cast Magic Missile. Not cool! You don't need to keep casting the Burning Hands if you want to keep casting Magic Missile. And you can select the spell picks so you end up with what you want, after resting of course. Yeah, after level up you still need to rest to gain the spells that will restore themselves eventually. Unless you are a Sorcerer ... who will get their spell instance from any of their spells, allowing them still to cast any of their spells, of the same level. Now, you'll have to tell me why this wouldn't play well with SCS AI ? If you set the timer right of course. No one is recomending to set the timer to zero so the SCS AI constantly can cast Time Stop. Or any AI. Edited May 28, 2020 by Jarno Mikkola Quote Link to comment
Bartimaeus Posted May 28, 2020 Share Posted May 28, 2020 (edited) Yeah, I'm not going to pretend to be able to correctly interpret the magical math you just did, so I'm only going to read the last "120 real seconds = 1 in-game hour" bit. 1 round is 6 real seconds, 1 turn is 60 real seconds (10 rounds), 1 hour is 300 real seconds (5 turns). Not 120 real seconds. Stoneskin set to duration of 6: https://dl.dropboxusercontent.com/s/yq2le4xa4g1h0wr/0yA1MGS9yS.mp4 Stoneskin set to a duration of 300: https://dl.dropboxusercontent.com/s/cocacy0qugct8um/MetQ2gd71P.mp4 Edited May 28, 2020 by Bartimaeus Quote Link to comment
subtledoctor Posted May 28, 2020 Share Posted May 28, 2020 10 hours ago, Jarno Mikkola said: You don't need to keep casting the Burning Hands if you want to keep casting Magic Missile. You miss the point. The the alphabetically-later spells will be renewed later, regardless of which one was cast first. So yes, you can wait around for the Magic Missile to be renewed, but you cannot cast any other 1st-level spells that begin with A-L while you are waiting for that; if you do, that other spell will be renewed instead of MM. 10 hours ago, Jarno Mikkola said: Now, you'll have to tell me why this wouldn't play well with SCS AI ? I said my modified casting system that uses innate versions of spells would not play well with SCS, because SCS (presumably) has checks to see which spells are memorized. And with my system you don't have memorized spells, you have innate clones of spells. (And no, it works just fine with spell levels and caster levels, don't throw shade.) So my system wouldn't work well with SCS. Quote Link to comment
Jarno Mikkola Posted May 28, 2020 Share Posted May 28, 2020 (edited) 2 hours ago, subtledoctor said: You miss the point. The the alphabetically-later spells will be renewed later, regardless of which one was cast first. So yes, you can wait around for the Magic Missile to be renewed, but you cannot cast any other 1st-level spells that begin with A-L while you are waiting for that; if you do, that other spell will be renewed instead of MM. I said my modified casting system that uses innate versions of spells would not play well with SCS, because SCS (presumably) has checks to see which spells are memorized. And with my system you don't have memorized spells, you have innate clones of spells. (And no, it works just fine with spell levels and caster levels, don't throw shade.) So my system wouldn't work well with SCS. ... 1: and how many spells that linger in between A and L do you need to select to be in your casting book if you want to exclusively use Magic Missile ? Zero... and you can't remove memorized spells during the restorations effects, WRONG you can actually do that too, and so forth and on... so you want to be able to cast the Burning Hands spell one time during a battle. You memorize it, then after you cast that, you pause the game, go into your characters spellbook, and remove the memorization slot and you pick another spell... and at some point i n t h e far future you get a Magic Missile spell back. I say far future cause you wouldn't want to pick say 5 seconds restoration timers cause that would be absurd. You should take say 1000 rather than 5. Which you couldn't in the original mod, cause of a bug, but I fixed that... well, it maxed out at 255.. but back to the spell selection, you are looking it as a static line, it's not. 2: And how many bards does the game have that uses your special spell editions... zero besides the player characters. So what's there to even note about the SCS AI ? You are not making sense with these. Edited May 28, 2020 by Jarno Mikkola Quote Link to comment
subtledoctor Posted May 28, 2020 Share Posted May 28, 2020 (edited) 1 hour ago, Jarno Mikkola said: so you want to be able to cast the Burning Hands spell one time during a battle. You memorize it, then after you cast that, you pause the game, go into your characters spellbook, and remove the memorization slot and you pick another spell No offense, but that sounds terrible. 1 hour ago, Jarno Mikkola said: And how many bards does the game have that uses your special spell editions... zero besides the player characters. So what's there to even note about the SCS AI The point was to muse about whether we could make Igi's system actually work, without having to remove all memorized spells starting with "B" mid-battle just because you want to cast a spell starting with "M." My bardic casting system converts your memorized spells into instances of innate abilities when you wake up in the morning. If we adapted it to create a different sysytem, which covers all spellcasting, then you could apply something like Igi's spell restoration using opcodes 172/171, which can work with a particular RES unlike the broken opcode 261. Then every time you cast a spell, that spell would be restored a certain amount of time later - not some other spell that has a different starting letter. Igi's spell restoration system would, some 15 years later, actually work as intended... but it could not work with enemy casters without MAJOR changes. All of their memorized spells would need to be switched out for innate clones, and then every instance of HaveSpell or similar triggers in their combat scripts would need to be changed to check for the innate clones. A ton of work, and I'm not even sure it would actually work... so for now at least, not worth even going down that road. Edited May 28, 2020 by subtledoctor Quote Link to comment
Jarno Mikkola Posted May 28, 2020 Share Posted May 28, 2020 (edited) 43 minutes ago, subtledoctor said: without having to remove all memorized spells starting with "B" mid-battle just because you want to cast a spell starting with "M." You wouldn't remove them, you would cast them the way you intended them to be casted... you want 3 magic missiles... you select that amount of slots... you then want to cast a burning hands, magic missiles and ray of enfeeblement... you go and remove the not yet restored spellslots and select the spells not in the previous list, and wait for them to return, and then go attack the next group. Like said, you are looking your spell list as a static line, it's not, nessasarily. 43 minutes ago, subtledoctor said: The point was to muse about No. Or you would have taken your own lead and go the other direction*, make your own bards specific spells have this contingency property, aka just them have that. So your bard becomes able to cast infinite spells as long as he has them selected, and the timer is shot enough, say 20 - 40 rounds, depending on the balance you want to implement. And that's not even much work, you can do it with an innate spell list and the previously given code of mine in the spoilers... *the reason for this is that you don't generally do a massive conversions just for sake of a massive conversions. Edited May 28, 2020 by Jarno Mikkola Quote Link to comment
subtledoctor Posted May 28, 2020 Share Posted May 28, 2020 I have lost myself in your words, but Boo thinks you are just ducky! Quote Link to comment
DavidW Posted May 28, 2020 Share Posted May 28, 2020 1 hour ago, subtledoctor said: ... but it could not work with enemy casters without MAJOR changes. Assuming you intend a refresh rate slow enough that you don't get a spell back during a battle, it doesn't really matter. The NPCs could go on using the original spells, while the player uses the clones. You'd have to pay a lot of attention to opcode 206/318/324 issues, but I guess you're used to that issue already. Quote Link to comment
subtledoctor Posted May 28, 2020 Share Posted May 28, 2020 My innates just use 146 to cast the original spells (why Keto just brought the Cowled Wuzards down on my head) , so it’s fine. (And why caster level and spell level work.) Quote Link to comment
Jarno Mikkola Posted May 29, 2020 Share Posted May 29, 2020 6 hours ago, subtledoctor said: My innates just use 146 to cast the original spells (why Keto just brought the Cowled Wuzards down on my head) , so it’s fine. (And why caster level and spell level work.) That makes this even easier than others, as you can then just attach the innate spell restoration to this custom spell rather than the common ones as those wouldn't restore these spells in any event. And no major changes needed. Quote Link to comment
subtledoctor Posted May 29, 2020 Share Posted May 29, 2020 19 minutes ago, Jarno Mikkola said: as you can then just attach the innate spell restoration to this custom spell ...was my original point. 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.