Skip to content

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,368
    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 )<br>mageScreen:UnSequenceSpell( bottomSpells[currentBottomSpell].resref, bottomSpells[currentBottomSpell].masterResref )
    to
    mageScreen:SequenceSpell( bookSpells[currentBookSpell].resref, 'DEFAULT'&nbsp;)<br>mageScreen:UnSequenceSpell( bottomSpells[currentBottomSpell].resref, 'DEFAULT' )
    There are multiple instances of the first line.
  • kjeronkjeron Member Posts: 2,368
    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,368
    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.

    <div>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
    <span style="background-color: transparent; color: inherit; font-size: inherit; font-family: "lucida grande", "lucida sans unicode", tahoma, sans-serif;">actionMasterBookResRef = {}  -- Append this to BGEE.lua
    </span><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: "lucida grande", "lucida sans unicode", tahoma, sans-serif;">actionMasterBottomResRef = {}  -- Append this to BGEE.lua
    </span><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: "lucida grande", "lucida sans unicode", tahoma, sans-serif;">actionMasterBookResRef['d5w4420'] = function () return 'DEFAULT' end  -- repeat for each
    </span><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: "lucida grande", "lucida sans unicode", tahoma, sans-serif;">actionMasterBottomResRef['d5w4420'] = function () return 'DEFAULT' end  -- repeat for each</span></div>
    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: 3,079
    REPLACE_TEXTUALLY does have a problem with square brackets. Do \[ and\].
  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,368
    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.