FG Spreadshirt Swag
Page 2 of 2 First 12
  1. #11
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Blackfoot View Post
    Question: How does it work when you click on the Character in the Tracker to change who is currently active in the CT? I'm having trouble finding the code that makes this happen.
    I'm thinking that a call to this function might resolve my issue with a player who acts again immediately after his action finishes.
    The button is "button_ctentry_active" in ct_host.xml
    This is defined in template_ct.xml and uses the ct/scripts/ct_active.lua script file.
    In this file you have the onClickRelease() function:
    Code:
    function onClickRelease(button, x, y)
    	if (getValue() == 0) and User.isHost() then
    		CombatManager.requestActivation(window.getDatabaseNode(), true);
    	end
    	return true;
    end
    There you go - CombatManager.requestActivation() is the function you're looking for.
    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!

  2. #12
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Quote Originally Posted by Trenloe View Post
    There you go - CombatManager.requestActivation() is the function you're looking for.
    Thanks... I clearly wasn't looking at the right thing.
    This should help a lot.

    EDIT: This didn't end up working but I think I may have gotten it to work. My issue now is with the Bell ringing for the next player.
    Last edited by Blackfoot; January 21st, 2014 at 20:36.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  3. #13
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Yeah.. I'm pretty much back to the drawing board on this one.
    I tried saving a link to the node off and then calling requestActivation(node).. but it ends up displaying both characters and ringing the bells for both.. and ticking the timer on effects.. (although this is another issue I seem to have that needs tracking down)
    I'm guessing at this point I'm going to need to build my own nextActor function at this point to work around CombatManager... I wanted to avoid this but I don't see another way.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  4. #14
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Still slugging it out with this thing...
    I tried setting it up so that it would automatically shift the focus to the previous record in the tracker in situations where the problem occurred... but the problem there is that often, when the player follows himself, he is the first actor in the tracker. I am now considering setting up a 'dummy' actor in the tracker that would become the focus briefly in these situations. It does follow somewhat with my original design which involved setting up some sort of separation between the actors in the 'current' segment and the rest of the actors... I might want to set up a 'last actor in the segment' as well... the create some unique graphics to represent these dummies as bars.

    I set up 2 actors with 12 speeds one with a 100 DEX and the other with 0 DEX

    Wow... ok that seems to solve the problem.. now to make it pretty.
    Last edited by Blackfoot; January 22nd, 2014 at 19:26.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  5. #15
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    The first portion of CombatManager.requestActivation de-activates all entries in the combat tracker before activating the specific entry requested:
    Code:
    function requestActivation(nodeEntry, bSkipBell)
    	-- De-activate all other entries
    	for _, vChild in pairs(DB.getChildren(CT_LIST)) do
    		DB.setValue(vChild, "active", "number", 0);
    	end
    ...
    Although this is be ran by any call to CombatManager.requestActivation you may want to try running this at the end of the segment before doing any activation for the next segment/round?
    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. #16
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Quote Originally Posted by Trenloe View Post
    Although this is be ran by any call to CombatManager.requestActivation you may want to try running this at the end of the segment before doing any activation for the next segment/round?
    The way the tracker is working right now, segments are basically fluid running directly from one to the next with the sort handling the change... I do have a check that updates a Segment box at the bottom of the tracker but this happens in the middle of the 'CombatManager.nextActor' function so at that point the order of actors is already set. I am treating a 'Turn' as a 'Round' (in 3.5 terms) and the characters shuffle up and down the tracker several times each 'Round' depending on their speed. It's all working great just using the normal sort functions.. the only issue comes when you get to go twice in a row... then it skips your second action and moves right along to the next guy. The dummy bar solution works for this because the next guy at the end of each segment is always the bar... all I need to do is set up an automatic skip over for the dummy and I should be in good shape.. I think. (I hope)
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  7. #17
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Wow.. ok that was a LOT simpler solution than I was working toward.
    I added: DB.setValue(vChild, "active", "number", 0);
    just before calling nextActor or requestActivation... and it did the trick... now to remove all the extra Faction code I was adding for my bars
    Thanks Trenloe.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  8. #18
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Cool - glad it worked OK.
    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!

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
  •  
5E Product Walkthrough Playlist

Log in

Log in