Starfinder Playlist
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    getActor(sActorType, varActor) - deprecation notice - what is it telling me?

    I came across this while tracing code into CoreRPG - what is this telling me?
    1. The method is deprecated? (normally what I assume a "DEPRECATED" in front means.
    2. The sName member should no longer be accessed?
    3. ?

    -- DEPRECATED v3.3.6 - .sName actor member no longer used
    function getActor(sActorType, varActor)

  2. #2
    Yes, the .sName variable should no longer be used. There is an ActorManager.getDisplayName(rActor) function to be used to get the actor's display name. I will be removing at some point in the near future; and people left using it in their systems will run into errors.

    Also, getActor is being deprecated next month, and ActorManager.resolveActor(node) will be used instead. See this thread:
    https://www.fantasygrounds.com/forum...uleset-Updates

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    Yes, the .sName variable should no longer be used. There is an ActorManager.getDisplayName(rActor) function to be used to get the actor's display name. I will be removing at some point in the near future; and people left using it in their systems will run into errors.

    Also, getActor is being deprecated next month, and ActorManager.resolveActor(node) will be used instead. See this thread:
    https://www.fantasygrounds.com/forum...uleset-Updates

    Regards,
    JPG
    Ok I did a quick search on .sName and got multiple hits in CoreRPG and 5E and several of my extensions that get dice rolls back for rSource. So... I think I need some clarification on this particular statement about the .sName variable no longer being used. Especially as I don't know where what I'm receiving is coming from and have done what CoreRPG and 5E do currently. Scary statement that was.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  4. #4
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Quote Originally Posted by Moon Wizard View Post
    Yes, the .sName variable should no longer be used. There is an ActorManager.getDisplayName(rActor) function to be used to get the actor's display name. I will be removing at some point in the near future; and people left using it in their systems will run into errors.

    Also, getActor is being deprecated next month, and ActorManager.resolveActor(node) will be used instead. See this thread:
    https://www.fantasygrounds.com/forum...uleset-Updates

    Regards,
    JPG

    Thanks for the heads up - I found getActor in 10 places in my code. All of them extracted from MoreCore code that I borrowed. I'll take care of it on my end and when I update after your changes, I should be good.

  5. #5
    @SilentRuin,

    .sName is used in several places in CoreRPG as a generic variable within a table. I'm talking about specific usage for actor records, which have been previously removed from CoreRPG, 5E and others that I maintain. The only current reference is the one that creates it to prevent other rulesets from breaking. However, since it requires a fair bit of lookup code to look up the name, it doesn't make sense to look up the name unless you actually need it for your use of the actor record.

    Regards,
    JPG

  6. #6
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Yup that makes total sense - decouples the two actions and increases granularity.

    If you need sName, he listed a method to get it - just need to make a separate call.

  7. #7

  8. #8
    Quote Originally Posted by Moon Wizard View Post
    @SilentRuin,

    .sName is used in several places in CoreRPG as a generic variable within a table. I'm talking about specific usage for actor records, which have been previously removed from CoreRPG, 5E and others that I maintain. The only current reference is the one that creates it to prevent other rulesets from breaking. However, since it requires a fair bit of lookup code to look up the name, it doesn't make sense to look up the name unless you actually need it for your use of the actor record.

    Regards,
    JPG
    Whew! Thank goodness! Well when you are about to do it - make sure there is a BIG GIANT WARNING - so I know to retest the old extensions, just in case.
    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
  •  
FG Spreadshirt Swag

Log in

Log in