Skip to content

Variant Rule - Spell Recharge

Dark_AnsemDark_Ansem Member Posts: 992
edited December 2014 in General Modding
I am tearing my hair off my head to make an Unearthed Arcana-like variant rule for this game: spell recharge.
the basis is to assign a recharge time to spell accordingly to spell slots, time that is determined in a semi-random way (min and max value from which choose, which I presume is calculated when necessary).
Anybody has an idea how to make it?

EDIT: as a clarification, http://www.d20srd.org/srd/variant/magic/rechargeMagic.htm

Comments

  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited December 2014
    This is doable, more or less. It does require you to alert every spell in the game however (though there may be a better way). Also, it would be much easier to not have the randomness, but you can do that as well.

    I can think of two ways to do it, one using effect 177, and the other using 146. Both of them would require a LOT of work. Adding randomness is doable for either method, but will add more work.

    The benefit of using 177 is that you can have different rates for different classes that cast the same spell. I see that sorcerers and bard s have faster recovery rates. You can do that with 177 but not 146. On the other hand 146 will be quicker and require less work as you don't need a separate effect for each class that casts the same spell. So let me know which route you want to take and we'll give it a try. If you could, please summon me by typing @Grammarsalad‌

    Edit: autocorrect, heh
  • Dark_AnsemDark_Ansem Member Posts: 992
    edited December 2014
    @Grammarsalad‌ many thanks :) I am away from the BG Pc so I am lacking the game itself to check, what's the difference between the effects?

    I'll return on January 8 for the actual test, but I'd still love to gather some knowledge now. or, if you want to give it a try by yourself, even better :smiley:
  • GrammarsaladGrammarsalad Member Posts: 2,582
    177 will apply an eff to a creature that has certain attributes (e.g. has a certain class, like mage or bard). You would need to use this if you wanted different classes to recharge at different rates (e.g. if sorcerers recharge faster than mages). This is probably the most balanced method but it requires more work (it actually might require a lot more work).

    It strikes me that the "other method" would be even easier as you probably would only need to use effect 261 on a delay.

    I can upload an example if each this weekend sometime (say charm person). You will need access to your game to see how they work in game(obviously :p). I will make the delay much, much shorter for the sorcerer so the difference well be obvious using the first method.

    One thing I want to emphasize is that no matter what you would need to make a change to every spell in the game that you wanted to recharge. this would take a while, to be sure! There may be a macro to help with this--I'm pretty sure there is one to add an effect to every spell--but that is complicated stuff that I couldn't walk you through
  • GrammarsaladGrammarsalad Member Posts: 2,582
    As for looking up effects to see what they do, look here:
    http://gibberlings3.net/iesdp/opcodes/bgee.htm
  • Dark_AnsemDark_Ansem Member Posts: 992
    @Grammarsalad‌ I was thinking more of something to attach to a Class Kit, but you say that's not possible?
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited December 2014

    @Grammarsalad‌ I was thinking more of something to attach to a Class Kit, but you say that's not possible?

    Well, you could do it like that, but you would still have to alter every spell in the game that the kit had access to..and you would have to mess with an existing kit as well to hijack it's usability flag. In this case you would definitely use 177 and have it only work for the kit.

    It's like changing usabilities. You can make, say, short swords usable by clerics, but you have to change all short swords, not all clerics (though this is relatively easy to automate)
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Wait, you may not need to mess with an existing kit to use its usability flag--i think this is handled completely by kit.ids...But you would definitely need to mess with every spell said kit had access to
  • Dark_AnsemDark_Ansem Member Posts: 992
    thank you for your effort @Grammarsalad‌ :)
    Developers, any input?
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Here it is. This is just a quick and dirty. To do this right, you should at least give a text notification that the spell has been recharged--you need weidu for that.

    Anyway, if you put the file in the folder titled "All-Delay 2 rounds" in your override folder, you will find that charm person will recharge for everybody after abotu 2 rounds. If you put the two files in folder titled "Sor-delay2, Mage-delay5" you should find that sorcerers recharge charm person after 2 rounds while mages (at least regular mage and probably wildmage) will recharge charm person after 5 rounds (i.e. as soon as the spell expires).
  • Dark_AnsemDark_Ansem Member Posts: 992
    oh this is brilliant! I will test it as soon as I am home with the BG PC :) many, many thanks!
  • GrammarsaladGrammarsalad Member Posts: 2,582

    oh this is brilliant! I will test it as soon as I am home with the BG PC :) many, many thanks!

    Glad to help buddy! Let me know if you want to take this further, and I'll show you how to give a text notification. Also, be sure to look at the files in near infinity or DLTCEP (I prefer DLTCEP for this kind of thing)
  • Dark_AnsemDark_Ansem Member Posts: 992
    I will try to get DLTCEP on this pc and open up the files. Near Infinity I like a lot, however :P
  • GrammarsaladGrammarsalad Member Posts: 2,582

    I will try to get DLTCEP on this pc and open up the files. Near Infinity I like a lot, however :P

    Near infinity is great, and so is DLTCEP. Each had their advantages. I use both (often simultaneously)
  • Dark_AnsemDark_Ansem Member Posts: 992
    I tried to give another go at this but apparently I am worse than before :disappointed:
  • lansounetlansounet Member Posts: 1,182
    edited August 2015
    A mod like this : http://www.shsforums.net/files/file/961-iispellsystemadjustments/ ?

    Not sure how it works on EEs but you have a base to work on.
  • Dark_AnsemDark_Ansem Member Posts: 992
    :astonished: not "like this", that's exactly it!

    I'll try to get in touch with the author... but if not what steps would be recommended for porting it?
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
  • Dark_AnsemDark_Ansem Member Posts: 992
    edited August 2015
    I think it's not allowed for latest patches, will try that anyway.

    @Dee or some other moderator, can this thread be moved to "General modding"? it does not apply to BG2-only anymore.
    Post edited by Dark_Ansem on
Sign In or Register to comment.