Skip to content

How can you make an ability re-add itself after using it (casting at will)?

[Deleted User][Deleted User] Posts: 207
edited January 2020 in General Modding
I'm playing through IWDEE for the first time, and I really like how some things are implemented as opposed to BG (and those beautiful visuals! seriously, get rid of BG's animations for fireball and cone of cold, use the ones in IWDEE!).

I loved how the paladin can detect evil *at will*. That's how it's supposed to be, unlike BG's system of just accumulating a lot of uses (which is capped at 50). I was wondering if any one of you could explain if you can easily do this for any spell using Nearinfinity, or is scripting required? I have many ideas about custom spells and importing these kinds of functionalities to BG, but I don't know what I need to know.
OlvynChuru

Comments

  • OlvynChuruOlvynChuru Member Posts: 3,075
    edited January 2020
    You can do this for any innate ability in NearInfinity; doing it for memorized spells might be trickier.

    Look at Paladin Detect Evil (SPCL109.SPL) in IWD:EE in NearInfinity. It has two "casting effects" which are triggered immediately when the paladin begins casting the ability.

    (Oops, these screenshots didn't come out too good, sorry.)
    avi3qa7eol71.png

    05bsinthqk74.png

    These effects cause the paladin to regain Detect Evil immediately after using it. If you want Paladin Detect Evil to be usable at will, you need to add those two effects to BG:EE's version of Paladin Detect Evil (SPCL212.SPL).
    Grammarsalad[Deleted User]
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited January 2020
    I have a function that allows you to change a spell to an innate (if necessary) and then make it infinite cast...

    ...er, looks like I never finished it. Right now, it only changes that spell to an innate, but casts by the spell menu. It also changes the spell level text to "cantrip", though you can make that whatever you want (including the spells original level). I am making it for my own purposes, but I can make a few changes so it'll be more user friendly. I'll try to find time tomorrow to finish it, shouldn't take long.

    In the mean time, this is what I have so far:


    https://github.com/UnearthedArcana/B_Spells/blob/master/B_Spells/lib/make_cantrip.tpa
    [Deleted User]
  • [Deleted User][Deleted User] Posts: 207
    edited January 2020
    OlvynChuru wrote: »
    These effects cause the paladin to regain Detect Evil immediately after using it. If you want Paladin Detect Evil to be usable at will, you need to add those two effects to BG:EE's version of Paladin Detect Evil (SPCL212.SPL).

    Thanks very much, that should work nicely. I suppose it's quite enough to make only innate spells work like that, since by definition if you have to memorize them, you cannot cast them at will.


    ...er, looks like I never finished it. Right now, it only changes that spell to an innate, but casts by the spell menu

    That is actually useful in and of itself, at least for now. Cleric/Thieves have an issue as of 2.5 (fixed in 2.6, whenever that comes) with innate abilities, as it seems the thieving button within the innate abilities button "eats" one innate spell slot, making an innate ability disappear once you get to a certain number of different innate abilities, until you make room for it by spending other abilities. I have in the past manually copied those innate abilities and made them castable from the spell menu in order to bypass the bug.
    Grammarsalad
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited January 2020
    OlvynChuru wrote: »
    ...
    ...er, looks like I never finished it. Right now, it only changes that spell to an innate, but casts by the spell menu

    That is actually useful in and of itself, at least for now. Cleric/Thieves have an issue as of 2.5 (fixed in 2.6, whenever that comes) with innate abilities, as it seems the thieving button within the innate abilities button "eats" one innate spell slot, making an innate ability disappear once you get to a certain number of different innate abilities, until you make room for it by spending other abilities. I have in the past manually copied those innate abilities and made them castable from the spell menu in order to bypass the bug.

    Oh...what a pita!

    Hmm, well, we could do something that makes an innate and a spell menu version, and then append any cleric/thief clabs with the spell-menu version. That'll take a little longer, but I have an idea of how to get it to work.

    In the mean time, I'll create a version, a 'mini-mod' if you will, that allows you to do it in a more manual way. I'll upload in an edited version of this post (hopefully, very soon--it all depends on whether I can finish it before my mother-in-law comes home and blasts Spanish Catholic television throughout the house--lol, very distracting!).

    Edit: Attached. Samples: the tp2 automatically changes spcl212 to an innate, infinite cast version of itself. It now casts using the innate window, but change type to 1 to make it cast in the casting menu.

    However, you can do a bit more with this. You could create an innate, infinite version of (e.g.) the wiz spell magic missile, but that would have the odd effect of giving that version to mages as an innate when they learn the spell (which actually could be cool, but I'll assume here you don't want to do that.) Instead, you can create a new version of the spell that is an infinitely castable innate that you could add to the clabs of certain casters, or perhaps a custom kit. In that case, I have a sample of what you would do (again, with spcl212) in the commented out section of the tp2. This is it with notes:
    ACTION_IF FILE_EXISTS_IN_GAME ~SPCL212.SPL~ BEGIN  //just in case...
     COPY_EXISTING ~SPCL212.SPL~ ~override/B_TEST.SPL~  //copied to a new spl name "B_TEST".  
      LPF MAKE_CANTRIP INT_VAR type = 1 STR_VAR level_text = Cantrip /* replaces spell lev text*/ spell_name = B_TEST END //spell_name MUST = your new spl name in order for this to work right.  
    END
    
    

    Let me know if you have any questions (using @Grammarsalad to 'summon' me) and enjoy!
    Post edited by Grammarsalad on
    [Deleted User]
Sign In or Register to comment.