5E Product Walkthrough Playlist
Page 1 of 2 12 Last
  1. #1

    An old extension I made is being resurrected

    BUT... there is one problem! My extension no longer appears in my extension list at the campaign selection. Below is my extension.xml code:
    Code:
      
    <?xml version="1.0" encoding="iso-8859-1"?>
    <root version="3.0" >
        <properties>
        <name>*5E - Complete Offensive Package* </name>
        <version>0.04</version>
        <author>Lord Taser</author>
        <ruleset>
          <name>5E</name>
        </ruleset>
      </properties>
      
      <announcement text="Complete Offensive Package v0.04 for FGU V3.3.6A 5E ruleset." font="emotefont" icon="LT" />
      
      <base>
      
    	<!-- Modified Files -->
    	<includefile source="campaign/record_char_weapon.xml"/>
    	<includefile source="campaign/campaign_chars.xml"/>
    	
        <!-- Define Managers -->
        <script name="cop" file="scripts/effects.lua"/>
    	
        <!-- Define Images -->
        <icon name="LT" file="graphics/icons/Lord Taser.png"/>
    	
      </base>
      
    </root>
    Any help is greatly appreciated.
    Last edited by MyGivinOpinion; September 1st, 2021 at 03:38.
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

  2. #2
    We will need to see the complete extension in order to figure out what is wrong (i.e. .ext file or folder zipped up)

    Regards,
    JPG

  3. #3
    edited
    Attached Files Attached Files
    Last edited by MyGivinOpinion; September 1st, 2021 at 20:39.
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

  4. #4
    That file is a renamed RAR file; not a renamed ZIP file. FG does not read RAR format.

    Make sure to create it using the ZIP format. (The Windows "Send To -> Compressed File" right click option will do that, and that's what I use.)

    Regards,
    JPG

  5. #5
    I've uninstalled WinRAR. That fixed the issue.

    The original issue that caused me to stop was an OOB error, and I'm guessing that is still what is causing my issues. The extension works as intended for the GM only, and only half works for the player. When the extension goes to clear a threat range indicator, it gives the following error for the player to the console:
    Attachment 48977
    Compared to the GM side:
    Attachment 48978
    and for the code:
    Code:
    function onInit()
    	user = User.getUsername(); --assigns user login name currently useless
    	OOBManager.registerOOBMsgHandler(OOB_MSGTYPE_MELEE, onMelee);
    	OOBManager.registerOOBMsgHandler(OOB_MSGTYPE_REACH, onReach);
    	OOBManager.registerOOBMsgHandler(OOB_MSGTYPE_CLEAR, clearReach);
    end
    
    function customOOBHandler(msgOOB, funct)
    		Comm.deliverOOBMessage(msgOOB, funct);
    end
    
    function getCharID(CharID)
    	charNode = CharID; --assigns charsheet.id-#####
    	PCName = DB.getValue(charNode,"name"); --assigns the PC Name
    end
    
    --sorts weapon properties and handles property triggers.
    function propertySorter(aWeaponProps)
    	Debug.console("userName:: ", user); --userName
    	Debug.console("charNode:: ", charNode); --charsheet.id-*****
    	Debug.console("PCName:: ", PCName); --PCName
    	Debug.console("aWeaponProps:: ", aWeaponProps); --{ #1 = s'*******', #2 = s'*******', etc... } weapon properties returned from record_char_weapon.xml
    	for index, value in ipairs(aWeaponProps) do
    		--Debug.console(value); --prints the individual properties listed in aWeaponProps
    		if value == "reach" then
    			CTVerification(); --grab CT info and assign variables
    			msgOOB.type = OOB_MSGTYPE_REACH;
    			customOOBHandler(msgOOB, "");
    			onReach(); --function that applies changes to threat range indicator
    		else
    			CTVerification();
    			msgOOB.type = OOB_MSGTYPE_MELEE;
    			customOOBHandler(msgOOB, "");
    			onMelee();
    		end
    	end
    
    end
    
    
    
    --Tracks down the Token by comparing charsheet.id-##### in both the combattracker and charsheet DB's
    function CTVerification()
    local idNodes = CombatManager.getCombatantNodes(); --{ s'id-*****' = databasenode = {combattracker.list.id-***** }, s'id-*****' = databasenode = {combattracker.list.id-***** }}
    	Debug.console(idNodes);
    	for i, v in pairs(idNodes) do --for-loop to break up the idNodes into single scannable tables
    		local CTName = DB.getValue(v, "name");
    		
    		if PCName == CTName then
    			Debug.console("CTName:: ", CTName);
    			CTLID = v; --assigns CTLID the list id-##### if the Names on the list and character sheet match
    			Debug.console("CTLID:: ", CTLID);
    			msgOOB.tokenpath = CTLID;
    			
    		else
    		
    		end
    	end
    	
    end
    
    --Applies COP Threat Range Effect to normal melee attack(currently handles ranged attacks by default)
    function onMelee()
    	local nDU = GameSystem.getDistanceUnitsPerGrid();
    	local nSpace = math.ceil(DB.getValue(CTLID, "space", nDU) / nDU);
        local nHalfSpace = nSpace / 2;
    	local nReach = math.ceil(DB.getValue(CTLID, "reach", nDU) / nDU) + nHalfSpace;
    	local tokenpath = msgOOB.tokenpath;
    	tokenCT = CombatManager.getTokenFromCT(tokenpath);
    	Debug.console("tokenCT:: ", tokenCT); --displays tokeninstance data
    	tokenCT.removeAllUnderlays();
        tokenCT.addUnderlay(nReach, "4fB22222", "");
    end
    Last edited by MyGivinOpinion; September 1st, 2021 at 21:25. Reason: Clarification
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

  6. #6
    Your best bet is to work backwards through each function and output the parameters being passed in. It seems like somewhere that your variables aren't set the way you expect.

    For example, you are using "nodeWin" in your getCharID function, but that variable is not defined anywhere so will always be nil.

    Regards,
    JPG

  7. #7
    *deleted*
    Last edited by MyGivinOpinion; September 1st, 2021 at 21:40. Reason: duplicate message
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

  8. #8
    Thanks for pointing that out, something I forgot to delete before posting the code. It's not meant for this code. Do I need a User.isHost() check? And if so, how and/or where would I implement it? It also seems that the players can't access info from the CT such as token instance information. I believe this is mainly where my OOB statement should go, but I am not sure as to how it is used. I've reviewed the ref doc, and talked to others more familiar with it.
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

  9. #9
    So I have had tremendous success with programming my extension, but in my haste I forgot to change my map grid back to square. Coding wise this makes little difference for the underlay, but is there a way to alter the shape of a square underlay so that it is rounded like on the hex grid? I only discovered this feature yesterday and really hope to make full use of it.
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

  10. #10
    So i went forward and broke my program, had to rewind to a previous version. Discovery of problem relating to FGU not detecting current User's token. No error messages are being thrown so I know the code itself is solid. I just need to figure out a way to keep track of who is mousing over what character sheet and tell the appropriate token to update. Anyone have any ideas on where to start looking? Attached is my current code. (Please use Hex grid as this is the unintended best grid setting for the extension.)

    COP.ext
    FG License: Unity Ultimate License
    Timezone: -5 EST/EDT

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
  •  
DICE PACKS BUNDLE

Log in

Log in