PDA

View Full Version : Changing Cone Angles in Pointers



ShotGun Jolly
May 2nd, 2014, 16:37
(last question today)

Is there a quick and dirty way to change the cone angle when using a pointer? (somewhere in the coding?)

Everything thing I have been reading is telling me that it can not be done, but yet in Savage worlds, they have a different token angle(spray) then the Dark Heresy ruleset.
I am scouring the savage worlds ruleset XML files and I can not see where I can use an example to put it over into my own ruleset I am trying to make..

Anyways.. if there is no easy way to do it, then no biggie, but even if someone can point me to an XML file that I can look at to see if I can figure it out would be a good help too.

Trenloe
May 2nd, 2014, 16:48
In the Savage World ruleset these are built as custom pointers. Check out campaign\campaign_images in the <pointertypes> section where sw_cone, sw_sb, sw_mb and sw_lb are defined as custom pointertypes.

Then these are built in campaign\scripts\campaing_swimage.lua in the onBuildCustomPointer section, and there is also additional code throughout this LUA file to cater for the different pointer shapes (on PointerSnap, on MeasurePointer, etc.).

dulux_oz created a detailed thread on custom pointers here: https://www.fantasygrounds.com/forums/showthread.php?19253-Custom-Pointers-Coding-Toolkit-Over-Several-Posts

ShotGun Jolly
May 2nd, 2014, 16:52
I read that post that you are referring too, but it is well past my level of understanding.. I see the scripts and stuff, but I have no idea on where it has to go. But I will look at the examples you gave me, and see if I can put 2 and 2 together.

Thanks again.. at least now I know where I have to look.

Trenloe
May 2nd, 2014, 17:13
The <pointertypes> definitions need to go in the <imagecontrol> definition - these store the name of the custom pointer and the icon and tooltip to use to display in the right-click pointer menu within an image.

Then you need to define the shape of the custom pointer in the onBuildCustomPointer function.

In the CoreRPG ruleset, the <imagecontrol> is defined in the "imagewindow" windowclass in campaign\campaign_images.xml

You'd need to add the onBuildCustomPointer function to the campaign\scripts\image.lua file and build the custom pointer there. Perhaps post a question in the pointer thread mentioned above relating to the shape of the pointer you'd like to create - someone may give you the techie details you need.

Trenloe
May 2nd, 2014, 18:20
More information on what I was mentioning above is available here: https://www.fantasygrounds.com/forums/showthread.php?8971-2-2-0-Feature-Custom-Pointers

This elaborates on the 2 steps needed:

Modify the <imagecontrol> definition with <pointertype> to define the news pointers being used. Note that the normal default pointers will be removed when <pointertype> is used so you will need to add the ones you require back in - this is explained in the link above.
Define the shape of each custom pointer used in the onBuildCustomPointer function.