5E Character Create Playlist
  1. #1

    You guys exhaust me - another bug in TEST

    I've spent more than 10+ hours chasing these down and getting you to fix them. I'm exhausted by it and no longer have the will to care any more.

    You have my code - you go figure it out. Combat group extension code:

    Code:
    -- function to set old_eyes and select token options
    function setOldEyesSelectToken(tokenCT, nodeCT)
    	if tokenCT.isActive() then
    		if Session.IsHost then
    			local nDU = GameSystem.getDistanceUnitsPerGrid();
    			local nSpace = math.ceil(DB.getValue(nodeCT, "space", nDU) / nDU);
    			if OptionsManager.isOption("OLD_EYES", "faction") then
    				-- Faction/space underlay
    				local sFaction = DB.getValue(nodeCT, "friendfoe", "");
    				if sFaction == "friend" then
    					tokenCT.addUnderlay(nSpace, "3F" .. ColorManager.COLOR_TOKEN_FACTION_FRIEND);
    				elseif sFaction == "foe" then
    					tokenCT.addUnderlay(nSpace, "3F" .. ColorManager.COLOR_TOKEN_FACTION_FOE);
    				elseif sFaction == "neutral" then
    					tokenCT.addUnderlay(nSpace, "3F" .. ColorManager.COLOR_TOKEN_FACTION_NEUTRAL);
    				else
    					tokenCT.addUnderlay(nSpace, "3F00FFFF");			
    				end
    			elseif not OptionsManager.isOption("OLD_EYES", "off") then
    				local sHexRBG = OptionsManager.getOption("OLD_EYES");
    				tokenCT.addUnderlay(nSpace, "3F" .. sHexRBG);
    			end
    		end
    		if OptionsManager.isOption("SELECT_OWNERS_TOKEN", "on") then
    			local sOwner = DB.getOwner(nodeCT);
    			-- if this has an owner sent request to select token - otherwise assume host controlling
    			if sOwner and sOwner ~= "" then
    				local msgOOB = {};
    				msgOOB.type = OOB_MSGTYPE_USERSELTOK;
    				msgOOB.sNodeCT = DB.getPath(nodeCT);
    				-- deliver message to the host for processing on it (can't do a lot of updates to DB from clients)
    				Comm.deliverOOBMessage(msgOOB, sOwner);
    				-- if this was a turn generated from host then it too must be updated on its select so vision/centering is triggered
    				if Session.IsHost then
    					-- make the selected item when active CT entry is set. 
    					local imageControl = ImageManager.getImageControl(tokenCT, false);
    					if imageControl then
    						imageControl.clearSelectedTokens();
    						imageControl.selectToken( tokenCT, true ) ;
    					end
    				end
    			else
    				-- make the selected item when active CT entry is set. 
    				local imageControl = ImageManager.getImageControl(tokenCT, false);
    				if imageControl then
    					imageControl.clearSelectedTokens();
    					imageControl.selectToken( tokenCT, true ) ;
    				end
    			end
    		end
    	end
    end
    No longer sets the active token underlay color.

    Screenshot_1.png

    So this shot has got me, and as they say in the recent season of "Only Murders in the Building" I've scrawled my death indicator next to where my extension fell...

    Screenshot_2.png
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  2. #2
    pindercarl's Avatar
    Join Date
    Jan 2015
    Posts
    1,035
    Blog Entries
    2
    Quote Originally Posted by SilentRuin View Post
    I've spent more than 10+ hours chasing these down and getting you to fix them. I'm exhausted by it and no longer have the will to care any more.

    You have my code - you go figure it out. Combat group extension code:

    Code:
    -- function to set old_eyes and select token options
    function setOldEyesSelectToken(tokenCT, nodeCT)
    	if tokenCT.isActive() then
    		if Session.IsHost then
    			local nDU = GameSystem.getDistanceUnitsPerGrid();
    			local nSpace = math.ceil(DB.getValue(nodeCT, "space", nDU) / nDU);
    			if OptionsManager.isOption("OLD_EYES", "faction") then
    				-- Faction/space underlay
    				local sFaction = DB.getValue(nodeCT, "friendfoe", "");
    				if sFaction == "friend" then
    					tokenCT.addUnderlay(nSpace, "3F" .. ColorManager.COLOR_TOKEN_FACTION_FRIEND);
    				elseif sFaction == "foe" then
    					tokenCT.addUnderlay(nSpace, "3F" .. ColorManager.COLOR_TOKEN_FACTION_FOE);
    				elseif sFaction == "neutral" then
    					tokenCT.addUnderlay(nSpace, "3F" .. ColorManager.COLOR_TOKEN_FACTION_NEUTRAL);
    				else
    					tokenCT.addUnderlay(nSpace, "3F00FFFF");			
    				end
    			elseif not OptionsManager.isOption("OLD_EYES", "off") then
    				local sHexRBG = OptionsManager.getOption("OLD_EYES");
    				tokenCT.addUnderlay(nSpace, "3F" .. sHexRBG);
    			end
    		end
    		if OptionsManager.isOption("SELECT_OWNERS_TOKEN", "on") then
    			local sOwner = DB.getOwner(nodeCT);
    			-- if this has an owner sent request to select token - otherwise assume host controlling
    			if sOwner and sOwner ~= "" then
    				local msgOOB = {};
    				msgOOB.type = OOB_MSGTYPE_USERSELTOK;
    				msgOOB.sNodeCT = DB.getPath(nodeCT);
    				-- deliver message to the host for processing on it (can't do a lot of updates to DB from clients)
    				Comm.deliverOOBMessage(msgOOB, sOwner);
    				-- if this was a turn generated from host then it too must be updated on its select so vision/centering is triggered
    				if Session.IsHost then
    					-- make the selected item when active CT entry is set. 
    					local imageControl = ImageManager.getImageControl(tokenCT, false);
    					if imageControl then
    						imageControl.clearSelectedTokens();
    						imageControl.selectToken( tokenCT, true ) ;
    					end
    				end
    			else
    				-- make the selected item when active CT entry is set. 
    				local imageControl = ImageManager.getImageControl(tokenCT, false);
    				if imageControl then
    					imageControl.clearSelectedTokens();
    					imageControl.selectToken( tokenCT, true ) ;
    				end
    			end
    		end
    	end
    end
    No longer sets the active token underlay color.

    Screenshot_1.png

    So this shot has got me, and as they say in the recent season of "Only Murders in the Building" I've scrawled my death indicator next to where my extension fell...

    Screenshot_2.png
    Checking in the Live build with your sample campaign, I don't see the underlay for the token active in the CT. The "Highlight token for Old Eyes (on turn)" option is set to magenta. Is there another button, knob, or switch that I need to set for the extension?

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (1 members and 2 guests)

  1. pindercarl

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
  •  
TALES of the VALIANT

Log in

Log in