Thread: SWADE Chase Range
-
March 6th, 2023, 03:53 #11
- Join Date
- Sep 2020
- Location
- Ballston Lake, NY
- Posts
- 741
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.jpgLast edited by Mike Serfass; March 6th, 2023 at 04:02.
-
March 6th, 2023, 04:00 #12
- Join Date
- Sep 2020
- Location
- Ballston Lake, NY
- Posts
- 741
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.
-
March 6th, 2023, 06:14 #13
-
March 6th, 2023, 09:23 #14
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 !
-
March 8th, 2023, 01:22 #15
- Join Date
- Sep 2020
- Location
- Ballston Lake, NY
- Posts
- 741
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.
-
March 8th, 2023, 02:02 #16
- Join Date
- Sep 2020
- Location
- Ballston Lake, NY
- Posts
- 741
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.
-
March 8th, 2023, 06:37 #17
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 21,103
Thanks, Mike. I'll take a look when I get some time to digest.
Regards,
JPG
-
March 8th, 2023, 18:14 #18
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 itMy 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
First GM to post a game for the original FG Con!
-
March 8th, 2023, 18:21 #19
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...31518574346250Savage Rifts© on Fantasy Grounds Store
Ultimate Edition Fantasy Grounds - ONLY ON Linux
Twitch Channel
-
March 8th, 2023, 22:58 #20
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
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