5E Character Create Playlist
Page 1 of 2 12 Last
  1. #1

    Is there a trick to overriding CharacterListManager.onShortcutDrop?

    In current and past extensions I've had no problem overriding core things I need to add onto (but not actually mess with insides of).

    For example:

    Code:
    local saveonShortcutDrop = nil;
    
    function onInit()
            Debug.console(tostring(CharacterListManager.onShortcutDrop)); -- I see a hex value
    	saveonShortcutDrop = CharacterListManager.onShortcutDrop;
    	CharacterListManager.onShortcutDrop = onShortcutDrop;
            Debug.console(tostring(CharacterListManager.onShortcutDrop)); -- I see a different hex value
    end
    
    function onShortcutDrop(sIdentity, draginfo)
    	Debug.console("**** THIS IS MY STUFF *****");
    	-- call the original stuff first then call new stuff
    	local bReturn = saveonShortcutDrop(sIdentity, draginfo);
    end
    But for whatever reason doing this with CharacterListManager.onShortcutDrop in a test run where all I do is put out Debug.console print, it is not giving me any sign it is being called.

    I can see a stack dump of the original call being called

    [C]: in function 'openWindow'
    [string "desktop/scripts/manager_characterlist.lua"]:147: in function <[string "desktop/scripts/manager_characterlist.lua"]:137>
    (tail call): ?
    (tail call): ?

    But I see no sign that I am replacing it. I'm not in the stack - nor are my print statements showing. I can see the onInit() with hex values printed out so something is going on.

    Is there something different between this CoreRPG\desktop\scripts\manager_characterlist.lua function and other script functions I have no problems with?

    Note: I never include any of these in my extension file that I override as they are usually defined someplace else I end up getting access to.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  2. #2
    It's time to stop asking questions when you have to answer all your own. I've evidently hit a ceiling of knowledge here - or a lack of time for the right experts to instantly respond to my wants and needs

    Anyway, desktop is evidently weirder than the other managers. I did a look at all the functions it had (0 comments of course) and tried replacing the setting of CharacterListManager.onShortcutDrop - to registering it - which worked..

    Code:
    	saveonShortcutDrop = CharacterListManager.onShortcutDrop;
    	CharacterListManager.registerDropHandler("shortcut", onShortcutDrop);
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #3
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,242
    Blog Entries
    9
    You can always see who's available on Discord if you are looking for more timely help

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  4. #4
    Quote Originally Posted by LordEntrails View Post
    You can always see who's available on Discord if you are looking for more timely help
    Are there extension testers in there? If so - maybe so one day
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #5
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Quote Originally Posted by SilentRuin View Post
    It's time to stop asking questions when you have to answer all your own. I've evidently hit a ceiling of knowledge here - or a lack of time for the right experts to instantly respond to my wants and needs

    Anyway, desktop is evidently weirder than the other managers. I did a look at all the functions it had (0 comments of course) and tried replacing the setting of CharacterListManager.onShortcutDrop - to registering it - which worked..

    Code:
    	saveonShortcutDrop = CharacterListManager.onShortcutDrop;
    	CharacterListManager.registerDropHandler("shortcut", onShortcutDrop);
    For someone to reply with a suitable answer they would have to have some combination of the below:

    FG coding knowledge
    Time to try and understand what it is you are doing
    Some familiarity with the exact functions you are referring to
    Having read your thread in the first place

    There is only a handful of people messing around with the code at anyone time. They are generally busy working on their own projects. The questions are quite specific and may require someone to actually go and try and replicate what you are doing before they can see/think/work some solutions. They need time at that time, not later on after you have solved. They need to be willing to pull their head out of whatever problem they are working on to put their head in your rabbit hole. etc

    At a guess I would suggest that the above paragraph probably fits you also. I dont know, but its quite likely that you havent dont the above for other programming help posts either, or the volume of helps vs requests is skewed. Its just the nature of the beast.

    Sometimes just posting is enough of a rubber ducky to point you in the right direction.

    What would also be good is if you posted your actual solution too - in case others come across your same issue.

    I feel bad when I see programming help requests go unanswered but I also have no capacity to take on anything extra most of the time. I help if I might have some knowledge of the specifics that they are working on but I rarely have time to climb deep into someone elses rabbit hole.

  6. #6
    How are you trying to replace it and what are you trying to accomplish? As this is a global script it would need to be cloned and redefined in your extension.xml or base.xml file as CharacterListManager to run your changes in your new file.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  7. #7
    Quote Originally Posted by damned View Post
    For someone to reply with a suitable answer they would have to have some combination of the below:

    FG coding knowledge
    Time to try and understand what it is you are doing
    Some familiarity with the exact functions you are referring to
    Having read your thread in the first place

    There is only a handful of people messing around with the code at anyone time. They are generally busy working on their own projects. The questions are quite specific and may require someone to actually go and try and replicate what you are doing before they can see/think/work some solutions. They need time at that time, not later on after you have solved. They need to be willing to pull their head out of whatever problem they are working on to put their head in your rabbit hole. etc

    At a guess I would suggest that the above paragraph probably fits you also. I dont know, but its quite likely that you havent dont the above for other programming help posts either, or the volume of helps vs requests is skewed. Its just the nature of the beast.

    Sometimes just posting is enough of a rubber ducky to point you in the right direction.

    What would also be good is if you posted your actual solution too - in case others come across your same issue.

    I feel bad when I see programming help requests go unanswered but I also have no capacity to take on anything extra most of the time. I help if I might have some knowledge of the specifics that they are working on but I rarely have time to climb deep into someone elses rabbit hole.
    Understood completely. I credit anyone with finding bugs in an extension I have here by listing them with the bug fix - and I also have never NOT posted a solution to my many posts - which either someone has given me - I have more often found myself - etc. Not one. The only one's without answers to my questions via solutions are ones I have not found yet (one to my knowledge).

    So no worries - I understand the nature of this beast. My part in "support" is I do ask questions - and then I do post the answers - so some poor slob likely myself does not quest through keyword searches and come up empty - like me.

    In fact - the solution here is before your post (quoted by you in fact) - posted by me - and I suppose falls under the category "post first, read later" that you pointed out
    Last edited by SilentRuin; August 5th, 2020 at 17:13.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  8. #8
    Quote Originally Posted by superteddy57 View Post
    How are you trying to replace it and what are you trying to accomplish? As this is a global script it would need to be cloned and redefined in your extension.xml or base.xml file as CharacterListManager to run your changes in your new file.
    As per the earlier posts - solution was found by me - was posted - and is working.

    The gist is that while I can overwrite a function - if that function has been scooped up by another thread (and was registered) - it will never be found. Or so it seems. Anyway, look above for the solution.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  9. #9
    Great to hear, just wanted to try to help as it sounded like there was some more investigating to perform. Please don't get discouraged as this is all a learning process and may take many cracks at unlocking the functionality you are looking to have performed. We are working hard to make development work easier and more streamlined every day. So please keep picking at the code and asking questions. You are helping everyone reading your posts.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  10. #10
    Quote Originally Posted by superteddy57 View Post
    Great to hear, just wanted to try to help as it sounded like there was some more investigating to perform. Please don't get discouraged as this is all a learning process and may take many cracks at unlocking the functionality you are looking to have performed. We are working hard to make development work easier and more streamlined every day. So please keep picking at the code and asking questions. You are helping everyone reading your posts.
    Will do.

    Sorry if I've projected my frustrations, but this stupid extension has been going on 4 weeks already and I just "off the cuff" decided to add in full support for NPC's used by players (end turn, targeting, etc. which is not as easy as it sounds) causing yet another DB CT tag creation. Which then made me think do I need to be able to clear this? And other things which have 0 to do with the extension I'm working on.

    Which is my problem, if I let myself I will never finish seeking perfection in this thing.

    I'm going to have to just stop adding things I think are a "good idea". The problem is - running from host testing - or running as "your same username" testing - does not show all the issues until I get one of my players to test it. Then rewrite complete sections to overcome something ---- UGH.

    You get the picture of where frustration is coming in.

    Sorry if I projected it
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

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
  •  
STAR TREK 2d20

Log in

Log in