Thread: Manual effect deletion (5e)
-
January 21st, 2021, 16:41 #1
- Join Date
- Apr 2017
- Location
- Scotland
- Posts
- 279
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, 17: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.
FG Con 16 – FG Online RPG Convention - Friday April 16th – Sunday 18th, 2021.
FG Con 17: October 15th – 17th, 2021.
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, 17:40 #3
- Join Date
- Apr 2017
- Location
- Scotland
- Posts
- 279
Thanks Trenloe,
I'll go and have a poke in those files.
Cheers, Steve.
-
January 21st, 2021, 18:44 #4
- Join Date
- Apr 2017
- Location
- Scotland
- Posts
- 279
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, 18:52 #5
FG Con 16 – FG Online RPG Convention - Friday April 16th – Sunday 18th, 2021.
FG Con 17: October 15th – 17th, 2021.
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, 20:10 #6
- Join Date
- Apr 2017
- Location
- Scotland
- Posts
- 279
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, 20: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 ".
FG Con 16 – FG Online RPG Convention - Friday April 16th – Sunday 18th, 2021.
FG Con 17: October 15th – 17th, 2021.
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, 20:30 #8
- Join Date
- Apr 2017
- Location
- Scotland
- Posts
- 279
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