PDA

View Full Version : Range Finder for Large Tokens



Blackfoot
August 7th, 2014, 23:29
Was there ever any sort of resolution for this problem?
The range to a large token is always off by one. (more if the token is larger than large or if there are 2 large tokens)... couldn't you beat this issue by factoring the space increment into the range finder?

Blackfoot
August 7th, 2014, 23:41
I'm seeing this as a particular problem in HEX mode.. but it is also a problem in SQUARE mode if you change the size after the token is added to the map.

Callum
August 8th, 2014, 10:00
As an aside, what is the rule for calculating range to or from a Large creature in 3.5E/PFRPG? I'm asking because I don't believe there is one!

Blackfoot
August 8th, 2014, 10:57
Isn't it pretty obvious that when 1 large creature throws a rock at another large creature and there are 2 squares between them that they are 10' apart? If the creature moved 10' they would be adjacent. To hit them would require a throw that covers 15'.

Or in scaled HEX that they are 2 scale inches apart. To hit them would require a throw that covers 3".

Blackfoot
August 8th, 2014, 11:20
This actually seems to mostly work right with SQUAREs as long as the scale for the tokens is set BEFORE they are placed, if you set it after it screws up.
In HEX it screws up both ways.

Blackfoot
August 8th, 2014, 12:02
Looking at this harder... this seems to be an error in my Champions ruleset but not in the live PF version. I don't think I do anything with scaling.. so am I breaking something somewhere or is there a file that I need to pickup or tweak to make this work using the Core?

Hrm.. although it does the scaling ... the distances seem to be off for HEX in the live version as well.

Wait.. is it assuming that a 10' creature is occupying 3 hexes? It won't let you place on vertices so that doesn't really work.

Moon Wizard
August 9th, 2014, 07:50
There is no support for targeting distance calcs in hex grids for large tokens. Distances are purely center to center point.

When I was looking at large token support for distance calcs, hex grids quickly became complex because it is unclear what a "large" token means (ie depends on system). Is it 3 hexes? Is it 7 hexes? Is it something else? Are large tokens always circular? If 3 hexes, then vertex placement of tokens is required, and makes token/pointer placement much more finicky. Since it wasn't clear, I left distance calcs on hex grids as center to center only.

JPG

Blackfoot
August 9th, 2014, 15:01
Seems like vertex placement would be a good option. Placement in general is a bit buggy right now. Relaxing the placement restrictions would actually help. I agree that the 3 and 7 question is out there, I would allow for both since both are valid considering a '10 foot' and '15 foot' footprint. 1, 3, 7, 12, 19...

Moon Wizard
August 10th, 2014, 10:49
Vertex and center placement support is available already, but only center placement is used by default. In the ruleset XML, you can specify that vertex and center snapping be used.

JPG

Blackfoot
August 10th, 2014, 15:41
Vertex and center placement support is available already, but only center placement is used by default. In the ruleset XML, you can specify that vertex and center snapping be used.

JPGWhere do I find this setting?

Trenloe
August 10th, 2014, 17:47
Where do I find this setting?
See snaphex in the XML definition of an imagecontrol: http://www.fantasygrounds.com/refdoc/imagecontrol.xcp

Blackfoot
August 10th, 2014, 19:56
I can see that I need to add this code somewhere:
<default>
<snaphex>vertexandcenter</snaphex>
</default>... but I don't have any imagecontrols in my ruleset, those are all handled by CoreRPG (I think). Is there a way to change the default without losing all the future features of CoreRPG? Sorry, I'm really fumbling around in the dark on a lot of this stuff.

Trenloe
August 10th, 2014, 22:09
I can see that I need to add this code somewhere:
<default>
<snaphex>vertexandcenter</snaphex>
</default>... but I don't have any imagecontrols in my ruleset, those are all handled by CoreRPG (I think). Is there a way to change the default without losing all the future features of CoreRPG? Sorry, I'm really fumbling around in the dark on a lot of this stuff.
Use merge rules in your layered ruleset/extension. There are plenty of examples of this in the 3.5e ruleset - do a "find in files" for merge=. Some extra info on merge: http://www.fantasygrounds.com/modguide/templates.xcp and http://www.fantasygrounds.com/forums/showthread.php?19530-Ruleset-layering-summary&p=156885&viewfull=1#post156885

You could use the following in your ruleset/extension built on top of CoreRPG:

<windowclass name="imagewindow" merge="join">
<sheetdata>
<imagecontrol name="image">
<default>
<snaphex>vertexandcenter</snaphex>
</default>
</imagecontrol>
</sheetdata>
</windowclass>
Although this could result in a <snaphex> which might be set somewhere else taking over, so you may want to use "resetandadd" instead of "join" - but the above should work based off the standard CoreRPG imagewindow windowclass.

Blackfoot
August 11th, 2014, 05:30
Hrm. I can't seem to get it to work. merge="resetandadd" gives an error... merge="join" doesn't seem to do anything. (but doesn't give an error)
mergerule="resetandadd" causes it to freak out pretty well. :)

I added it to gameelements_hero.xml figuring this was a reasonable place for this sort of thing to go.. but not really sure where it is supposed to be.

Trenloe
August 11th, 2014, 06:33
Hrm. I can't seem to get it to work. merge="resetandadd" gives an error... merge="join" doesn't seem to do anything. (but doesn't give an error)
mergerule="resetandadd" causes it to freak out pretty well. :)

I added it to gameelements_hero.xml figuring this was a reasonable place for this sort of thing to go.. but not really sure where it is supposed to be.
Back to basics. Try it by adding the <snaphex> directly to the base XML in CoreRPG. This will let you know if <snaphex> works and how it behaves.

Blackfoot
August 11th, 2014, 06:55
I added this code to base.xml in CoreRPG and it didn't seem to do anything.. tokens still snap to center and not to the vertexes.

<windowclass name="imagewindow" merge="join">
<sheetdata>
<imagecontrol name="image">
<default>
<snaphex>vertexandcenter</snaphex>
</default>
</imagecontrol>
</sheetdata>
</windowclass>
Also tried the following with no better results.

<windowclass name="imagewindow" merge="join" mergerule="resetandadd">
<sheetdata>
<imagecontrol name="image">
<default>
<snaphex>vertexandcenter</snaphex>
</default>
</imagecontrol>
</sheetdata>
</windowclass>

Trenloe
August 11th, 2014, 13:10
Sorry, I wasn't clear. I meant adding it into the imagewindow windowclass in the campaign_images.xml file directly.

EDIT: Try the extension attached below.

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Fantasy%20Grounds/Hex%20Vertex%20Snap.JPG

Blackfoot
August 11th, 2014, 14:57
OK.. interestingly enough, I tried your extension in CoreRPG and it worked fine (as expected) but when I modified it (changed the ruleset name) so it would work with my ruleset it does not.
I guess this sorta explains why I've been having a heck of a time with this... but not really. I disabled all the code from my previous attempts and went with just the extension... nothing... hrm.

Moon Wizard
August 12th, 2014, 22:32
In your code, that code that Trenloe provided needs to be appended after the importruleset tag, or it will not be included.

You can also copy the whole "imagewindow" tag and override to simplify the merging.

Perhaps you could post a link to what you have (or to individuals like Trenloe/myself), and we could add the adjustment too.

Cheers,
JPG

Blackfoot
August 13th, 2014, 08:01
I literally took Trenloe's extension and changed the ruleset <name> tag from 'CoreRPG' to 'Champions CoreRPG' (the name of my Ruleset). Then loaded it up .. it saw the extension but it still didn't work.. despite it working just fine in CoreRPG. Is there something about the layered rulesets that makes extensions work funkily?

I then took the same code that is in the extension and pasted it into the very end of my 'base.xml' file.. (well after the importruleset tag).. and then I threw up my hands... I am beginning to think turning off snap to grid might be the best option.

Moon Wizard
August 13th, 2014, 08:51
If you send me a link to ruleset at [email protected], I will take a look after Gencon. Going to be traveling or working convention floor through Monday.

Cheers,
JPG

Blackfoot
August 23rd, 2014, 00:06
Gah. This is all messed up now.. I'm not even sure how anything changed.. it was working for like 20 minutes last week. Now the grid locations don't match up with the map. Oi. I 'think' I have all this stuff disabled and it's still screwing up.