5E Product Walkthrough Playlist
Page 6 of 8 First ... 45678 Last
  1. #51
    Given your natural assumption, I'll look at adding a simple numerical indexing option as well (such that table[1] and table[2] are equivalent to table["x"] and table["y"]) in a future version.

    Regards,
    JPG

  2. #52
    Quote Originally Posted by Moon Wizard View Post
    If you are passing numerical values, they must be of the form of a Lua table with "x" and "y" indexes pointing to the X,Y values you want to measure to/from.

    Regards,
    JPG
    That’s what it looked like from your original post, but when I had tried that I got the same result. I went back, and I had misread: I was using uppercase X and Y as the table indexes.

    Thank you! Sorted now, and these new APIs are really useful.

  3. #53
    I am experimenting with the token distance functions.
    I noticed that half grid cells are rounded up.
    E.g. if one grid cell is 1m than 1 and a half cell distance is calculated as 2m.
    Is this intended?
    And can I change it to get 1.5m?

    It would be alos nice, I one could give a flag to getDistanceBetween to return raw distances.
    Screenshot 2021-03-15 073937.png
    Last edited by Weltenbrand; March 15th, 2021 at 07:39.

  4. #54
    If you convert the map record to use raw distances (or the ruleset in general); then the raw results will be returned. (i.e. the image will return whatever is being used for the distance calculation specifically.)

    Regards,
    JPG

  5. #55
    Ok, how do I set the ruleset to use raw distance by default?
    And can I disallow the GM to changes this?

  6. #56
    Quote Originally Posted by Weltenbrand View Post
    Ok, how do I set the ruleset to use raw distance by default?
    And can I disallow the GM to changes this?
    Grid is defined in map tools, it has the grid distances and a check box for raw distances - if that is what you are talking about. A GM has full control of everything so they can copy/edit whatever they want if they have a mind to change it.

  7. #57
    Quote Originally Posted by Moon Wizard View Post
    If you convert the map record to use raw distances (or the ruleset in general); then the raw results will be returned.
    I was referring to this.

    Where it can be set in the image interface is clear.

    People are bad at reading manuals, therefore I would like at least set raw as default.

  8. #58
    Quote Originally Posted by Moon Wizard View Post
    If you convert the map record to use raw distances (or the ruleset in general); then the raw results will be returned. (i.e. the image will return whatever is being used for the distance calculation specifically.)

    Regards,
    JPG
    Is there an new API for the raw distance flag? Apologize if I missed that somewhere. Checked confluence and couldn't find what I was looking for.
    ---
    Fantasy Grounds AD&D Content Bundle (All The AD&D Content)
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums.

  9. #59
    For rulesets, the following tag will set the raw distance calculation as the default:
    <distance>
    <diagmult>*</diagmult>
    </distance>

    For API interactions, the following call will set the current map to raw distance calculation:
    imagecontrol.setDistanceDiagMult("*");

    There is no way to "block" GMs from changing to what they want using the image control panel. This is by design, and you should not subvert the GM from changing to what they want for their own games.

    Regards,
    JPG

  10. #60
    Quote Originally Posted by Moon Wizard View Post
    For rulesets, the following tag will set the raw distance calculation as the default:
    <distance>
    <diagmult>*</diagmult>
    </distance>

    For API interactions, the following call will set the current map to raw distance calculation:
    imagecontrol.setDistanceDiagMult("*");

    There is no way to "block" GMs from changing to what they want using the image control panel. This is by design, and you should not subvert the GM from changing to what they want for their own games.

    Regards,
    JPG
    Thanks for the details. The <distance></distance> bit goes in the base.xml I presume? Does it need to reside in a specific section or it's own under root? I attempted the latter and it didn't seem to work for me.
    ---
    Fantasy Grounds AD&D Content Bundle (All The AD&D Content)
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums.

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
  •  
FG Spreadshirt Swag

Log in

Log in