Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Help with sequencers/contingencies

The user and all related content has been deleted.

Comments

  • [Deleted User][Deleted User] Posts: 0
    edited January 2019
    The user and all related content has been deleted.

  • kjeronkjeron Member Posts: 2,151
    edited January 2019
    If you want to avoid decrementing memorized spells, you would need to change these lines in UI menu:
    mageScreen:SequenceSpell( bookSpells[currentBookSpell].resref, bookSpells[currentBookSpell].masterResref )
    to
    mageScreen:SequenceSpell( bookSpells[currentBookSpell].resref, 'DEFAULT' )
    There are multiple instances of the first line.

  • kjeronkjeron Member Posts: 2,151
    edited January 2019
    Hmm, actually, I can't even get this to work with the fighter/sorcerer.  I copied spwi420d.spl to d5w4420d.spl, and spwi420p.spl to d5w4420p.spl... I can create a sequencer ability in my innates bar, but when I use it nothing happens, the loaded spells don't fire
    Just to check, you did rename the resource in their activation effect to match your own?

  • The user and all related content has been deleted.

  • kjeronkjeron Member Posts: 2,151
    If this is intended as a replacement feature for all sequencer/contingency spells, it just takes some REPLACE_TEXTUALLY patches.  I cannot currently show you in the forums, as using backslashes breaks the current post formatting.

    If it's only intended for these specific sequencer/contingency spells, you will need to filter it with an lua function.  You would still use the REPLACE_TEXTUALLY, but replace 'DEFAULT' with the function call.

    function filterMasterBookResRef()
    	if type(actionMasterBookSpell[contingencyResRef]) == 'function' then
    		actionMasterBookSpell(contingencyResRef)
    	else
    		return bookSpells[currentBookSpell].masterResref
    	end
    end
    function filterMasterBottomResRef()
    	if type(actionMasterBottomSpell[contingencyResRef]) == 'function' then
    		actionMasterBottomSpell(contingencyResRef)
    	else
    		return bottomSpells[currentBottomSpell].masterResref
    	end
    end
    actionMasterBookResRef = {}  -- Append this to BGEE.lua
    actionMasterBottomResRef = {}  -- Append this to BGEE.lua
    actionMasterBookResRef['d5w4420'] = function () return 'DEFAULT' end  -- repeat for each
    actionMasterBottomResRef['d5w4420'] = function () return 'DEFAULT' end  -- repeat for each
    This way others will be able to opt-in, define their own, or continue to use the existing functionality. Aside from the two lines specifying BGEE.lua, the rest would go in an M_*.lua file.

  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.

  • OlvynChuruOlvynChuru Member Posts: 2,472
    REPLACE_TEXTUALLY does have a problem with square brackets. Do \[ and\].

  • The user and all related content has been deleted.

  • kjeronkjeron Member Posts: 2,151
    REPLACE_TEXTUALLY does have a problem with square brackets. Do \[ and\].
    Huh.  Good to know.  And, for future reference and in case anyone reaches this thread from some search or other: REPLACE_TEXTUALLY needs the backslashes in the text to be replaced, but it should not have backslashes in the new text you are inserting in its place. 
    This is because REPLACE_TEXTUALLY uses regexp by default.

Sign In or Register to comment.