DICE PACKS BUNDLE
  1. #1

    Manual effect deletion (5e)

    Hi guys, hoping someone has a quick answer for me on this one.

    Does anybody know which function is called when you delete an effect in the CT by using the delete button on the RHS of the CT, and is it the same function that is called when you use right click to delete an effect ?

    I've been through the coreRPG and 5E EffectManager scripts and inserted debugs where I think it should call, but to no avail. Any help would be appreciated.

    Cheers Steve.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    It's nothing special in particular for effects - it'll all be related to standard window deletion within a windowlist.

    The windowlist in question uses the list_ctsection_effect (GM) or list_clientct_effect (player) template in CoreRPG (in ct\template_ct.xml) and these have script files of ct/scripts/ct_effectlist.lua and ct/scripts/clientct_effectlist.lua, respectively. In those script files is a deleteChild function, that is ran from the onMenuSelection event handler in ct/scripts/ct_effect.lua and deletes the node from that. Using the delete buttons just does a standard delete of the effect window in the windowlist, which deletes the relevant child record.

    So, nothing special - just standard deletion of a child record in a windowlist.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Thanks Trenloe,
    I'll go and have a poke in those files.

    Cheers, Steve.

  4. #4
    OK,call me stupid.
    I've found the code for the manual deletes with the onMennuSelection handler, but I'm struggling to locate the code for the actual delete button in the CT.
    I'm assuming that's hiding somewhere in the template_ct.xml ?

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by Stv View Post
    I've found the code for the manual deletes with the onMennuSelection handler, but I'm struggling to locate the code for the actual delete button in the CT.
    I'm assuming that's hiding somewhere in the template_ct.xml ?
    The button template is button_clientct_effect_idelete which is based on button_idelete.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  6. #6
    Thanks Trenloe, found that
    One more question...
    If I wish to then add or change functionality to the effect delete button in the CT, would the best way to do that to create a new template to replace the button_idelete template in the template_ct.xml file ?

    Cheers, Steve.

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    "button_idelete" is used in a lot of places, so changing that isn't good practice. Only replace/change the template specific to the GUI element that you're changing. In this case "button_clientct_effect_idelete ".
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #8
    Awesome, thanks again Trenloe.

    Cheers, Steve.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in