Thread: Manual effect deletion (5e)
-
January 21st, 2021, 15:41 #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.
-
January 21st, 2021, 16:08 #2
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!
-
January 21st, 2021, 16:40 #3
Thanks Trenloe,
I'll go and have a poke in those files.
Cheers, Steve.
-
January 21st, 2021, 17:44 #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 ?
-
January 21st, 2021, 17:52 #5Private 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!
-
January 21st, 2021, 19:10 #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.
-
January 21st, 2021, 19:27 #7
"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!
-
January 21st, 2021, 19:30 #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