DICE PACKS BUNDLE
Page 2 of 3 First 123 Last
  1. #11

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    608
    I made some code tweaks to the swade ruleset. Here's how it now works for me.

    This is the standard foot chase. Note that I set distance multiplier to 5. It calculates range correctly on the target arrows and in the attack rolls.
    foot-1.jpg

    Here's the same foot chase with the same distance multiplier but cards spread out like a dogfight.
    foot-2.jpg

    Here's the same foot chase and distance with cards spaced with one grid between. Notice how the ranges and distances calculate correctly.
    I don't know why you'd set it up like this, but my change supports it. You could put 3, 4, 5, 10 spaces between the cards and it calculates correctly.
    foot-3.jpg

    Drawing arrows on the board measures the same.
    foot-arrow.jpg
    Last edited by Mike Serfass; March 6th, 2023 at 04:02.

  2. #12

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    608
    Here are my code changes with a dogfight.

    First, a dogfight set with distance multiplier 5.
    dogfight-5.jpg

    Here it is set at 50.
    dogfight-50.jpg

    Everything calculates correctly. No fractions, no decimals, no divide by 3.
    This is how it should work.

    I'll test my changes a bit more then share them with Moon Wizard.
    If the decision is to not implement this change, I'll turn my code into an extension.

  3. #13
    Nice work!

  4. #14
    Quote Originally Posted by Mike Serfass View Post

    Here it is set at 50.
    dogfight-50.jpg

    Everything calculates correctly. No fractions, no decimals, no divide by 3.
    This is how it should work.
    Yes is how everyone wants it to work. This is better. A lot better.

    With the last fix. The current chase system now works as intended when it was first introduced. It works but everyone hates the solution with a passion. Divide by 3 and enter fraction into distance multiplier is a terrible solution. It is possible to dodge errors by not putting in a fraction but that puts a burden on the GM. Who now has to check every ranged weapon for range compatibility.

    Counting by proper chase card increments is a feature that is long over due.
    Ultimate License holder.
    Over 10 years on Fantasy Grounds !

  5. #15

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    608
    Here are the code changes I made, in case anyone wants to test it.
    I included code comments and a variation on the function that figures out chase card spacing.
    These changes are based on the test channel code as of March 5 but work in the live channel SWADE ruleset as well.

    Here's the synopsis:
    In scripts/manager_token2.lua, in getTokenDistance method added at line 344
    local divisor = ImageManagerSW.calculateChaseCardDivisor(ctrlImage )
    edited line 345 to
    local nDistance = (ImageManagerSW.measureChaseVector(ctrlImage, nVectorX, nVectorY) * ctrlImage.getDistanceBaseUnits()) / divisor

    In scripts/manager_image_sw.lua, added
    function calculateChaseCardDivisor(ctrlImage)
    There are two of these; a simple one (commented out) and a much more dynamic one.
    The dynamic version accounts for cards being re-spaced, re-ordered, changed between foot chase and dogfight, adding and removing cards, spacing cards from 1 up to 5, etc.

    In campaign/scripts/image_record.lua, in onMeasurePointer method, added at line 27
    local divisor = ImageManagerSW.calculateChaseCardDivisor(self)
    and updated line 28 to
    return ((nGridUnits * nBaseUnits) / divisor) .. getDistanceSuffix()

    I attached a zip with the three lua files. You can replace these files in the test channel as well as in the live.

    @Moon Wizard: I hope these changes can make it into the SWADE rules. You'll grasp what I'm doing quickly and will likely have a more elegant reworking of this.
    Attached Files Attached Files

  6. #16

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    608

    SWADE Chase Updates

    So, just after posting this I got the update.
    Here are the edited lua files that now match what was released an hour ago.
    Attached Files Attached Files

  7. #17
    Thanks, Mike. I'll take a look when I get some time to digest.

    Regards,
    JPG

  8. #18
    Doswelk's Avatar
    Join Date
    Jul 2005
    Location
    Surrey, UK
    Posts
    2,684
    I have not noticed these issues (actually I may have done and forgot, I'm getting old), in fact I ran a chase last night and had no problems, BUT I long ago came to the conclusion my setup seems to be different to ANYONE else (I have to delete forge .dat files of SWPF modules to allow my versions to work!)

    That said if I had the problem I'd be so annoyed, so well done guys for fixing it
    My players just defeated an army, had a dogfight with aliens, machine-gunned the zombies, stormed the tower, became Legendary and died heroically

    Yours are still on combat round 6

    Get Savage
    Ultimate License Holder.
    First GM to post a game for the original FG Con!

  9. #19
    Quote Originally Posted by Doswelk View Post
    I have not noticed these issues (actually I may have done and forgot, I'm getting old), in fact I ran a chase last night and had no problems, BUT I long ago came to the conclusion my setup seems to be different to ANYONE else (I have to delete forge .dat files of SWPF modules to allow my versions to work!)

    That said if I had the problem I'd be so annoyed, so well done guys for fixing it
    You probably do the divide by 3 automatically now hence you should definitely write the Stream Template formula as per Discord.

    https://discord.com/channels/2745828...31518574346250

  10. #20
    Doswelk's Avatar
    Join Date
    Jul 2005
    Location
    Surrey, UK
    Posts
    2,684
    What do you mean divide by 3?

    Not read this thread in detail as I do not have the problem and therefore have never needed to work out a work-around <confused>
    My players just defeated an army, had a dogfight with aliens, machine-gunned the zombies, stormed the tower, became Legendary and died heroically

    Yours are still on combat round 6

    Get Savage
    Ultimate License Holder.
    First GM to post a game for the original FG Con!

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
  •  
5E Character Create Playlist

Log in

Log in