Page 1 of 2 12 Last
  1. #1
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,966
    Blog Entries
    4

    Bug with Desktop Map

    Found an issue with the Desktop Map feature.

    When using a map as the desktop it seems to ignore custom pointer settings and use the defaults instead. Switching back out of Desktop Map mode makes the custom pointers available again.
    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.

  2. #2
    Where are you defining the custom pointers?

    There are now two different image control templates; and they will both need to match.

    Regards,
    JPG

  3. #3
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,966
    Blog Entries
    4
    I think they are being set in
    <imagecontrol name="image">
    I'll double check when I get home but I'm pretty sure that's right.
    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. #4
    Make sure that you are redefining the "image_record_step" template instead of overriding directly in the "image" window class.

    Regards,
    JPG

  5. #5
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,966
    Blog Entries
    4
    This is the file my ruleset uses to set up the custom pointers:
    Code:
    <root>
    	<windowclass name="imagewindow" merge="join">
    		<sheetdata>
    			<imagecontrol name="image">
    				<default snap="off" drawingsize="500,500" snaphex="vertexandcenter" gridtype="hexrow" />
    				<pointertypes>
    					<arrow>
    						<icon>pointer</icon>
    						<label>Draw Arrow</label>
    					</arrow>
    					<circle>
    						<icon>pointer_circle</icon>
    						<label>Draw Circle</label>
    					</circle>
    					<cone>
    						<icon>pointer_cone</icon>
    						<label>Draw Cone</label>
    					</cone>
    					<custom name="TrianglePointer">
    						<icon>pointer_cone</icon>
    						<label>Draw Triangle</label>
    					</custom>
    					<custom name="HexPointer">
    						<icon>pointer_circle</icon>
    						<label>Draw Hex</label>
    					</custom>
    				</pointertypes>
    				<script>
    					function onBuildCustomPointer(nStartXCoord,nStartYCoord,nEndXCoord,nEndYCoord,sPointerType)
    						local aShapeCurves, aDistLabelPosition, bDrawArrow = CustomPointer.onBuildCustomPointer(nStartXCoord,nStartYCoord,nEndXCoord,nEndYCoord,sPointerType);
    						return aShapeCurves,aDistLabelPosition,bDrawArrow;
    					end
    				</script>
    			</imagecontrol>
    		</sheetdata>
    	</windowclass>
    </root>
    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.

  6. #6
    It looks like you’re actually adding a second image control over the top of the one provided by CoreRPG. Because your merge definition does not use the same control/template name within the imagewindow class definition, it actually creates a new control.

    You should go back and just replace the template I mentioned, instead of overriding the imagewindow class at all.

    Regards,
    JPG

  7. #7
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,966
    Blog Entries
    4
    So something like..
    Code:
    	<template name="image_record_step">
    		<imagecontrol name="image">
    			<indicators locked="image_locked" loading="image_loading" />
    			<default snap="off" drawingsize="500,500" snaphex="vertexandcenter" gridtype="hexrow" />
    			<pointertypes>
    				<arrow>
    					<icon>pointer</icon>
    					<label>Draw Arrow</label>
    				</arrow>
    				<circle>
    					<icon>pointer_circle</icon>
    					<label>Draw Circle</label>
    				</circle>
    				<cone>
    					<icon>pointer_cone</icon>
    					<label>Draw Cone</label>
    				</cone>
    				<custom name="TrianglePointer">
    					<icon>pointer_cone</icon>
    					<label>Draw Triangle</label>
    				</custom>
    				<custom name="HexPointer">
    					<icon>pointer_circle</icon>
    					<label>Draw Hex</label>
    				</custom>
    			</pointertypes>
    			<script file="campaign/scripts/image.lua" />
    			<script>
    				function onBuildCustomPointer(nStartXCoord,nStartYCoord,nEndXCoord,nEndYCoord,sPointerType)
    					local aShapeCurves, aDistLabelPosition, bDrawArrow = CustomPointer.onBuildCustomPointer(nStartXCoord,nStartYCoord,nEndXCoord,nEndYCoord,sPointerType);
    					return aShapeCurves,aDistLabelPosition,bDrawArrow;
    				end
    			</script>
    		</imagecontrol>
    	</template>
    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. #8
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,966
    Blog Entries
    4
    Yeah.. ok so that's not right.. broke all my custom pointers.

    Apparently including the default image script was a bad idea. The pointers work without it.. but snap to vertexandcenter does not sadly.
    Last edited by Blackfoot; February 22nd, 2019 at 01:43.
    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.

  9. #9
    Let me think a bit to think of the best way to do it. I think templates will be the answer; but I have a better idea of what you’re doing.

    JPG

  10. #10
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    3,966
    Blog Entries
    4
    You resolved my issue.. but am I going to have trouble somewhere else without inheriting that image script?

    The snap thing was working back before 3.2 I think.. but it hasn't worked in a long time... and I'm not sure it ever worked 'well'.
    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.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in