One statsheet is bigger than the other.

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

One statsheet is bigger than the other.

Post by PinkRose »

I'm stealing wantonly from other frameworks.
Can anyone tell me, where to start looking for why these two are different?
I see the difference is that one has an extra speed property, but I don't know if the error is from the scraping of the page or the statsheet layout or the properties.
I can attach macros or preferences or properties.
What should be my next step tracking this down?

Also, is there a way to limit the size of the statsheet display? You can do the portrait in preferences but I don't see an easy input box for the statsheet.
Attachments
MapTool_2019-08-14_09-48-15 (2).jpg
MapTool_2019-08-14_09-48-15 (2).jpg (389.87 KiB) Viewed 745 times
MapTool_2019-08-14_09-27-16 (3).jpg
MapTool_2019-08-14_09-27-16 (3).jpg (472.12 KiB) Viewed 745 times
I am a special snowflake!

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: One statsheet is bigger than the other.

Post by Full Bleed »

PinkRose wrote:
Wed Aug 14, 2019 4:23 pm
I'm stealing wantonly from other frameworks.
Can anyone tell me, where to start looking for why these two are different?
I see the difference is that one has an extra speed property, but I don't know if the error is from the scraping of the page or the statsheet layout or the properties.
I can attach macros or preferences or properties.
What should be my next step tracking this down?
The Speed property looks to have a whole bunch of spaces after it, extending the width of the wide statsheet. Trim those spaces off.
Also, is there a way to limit the size of the statsheet display? You can do the portrait in preferences but I don't see an easy input box for the statsheet.
You can't fix the size. It will be as wide as the widest property.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: One statsheet is bigger than the other.

Post by Merudo »

Full Bleed wrote:
Wed Aug 14, 2019 6:33 pm
PinkRose wrote:
Wed Aug 14, 2019 4:23 pm
I'm stealing wantonly from other frameworks.
Can anyone tell me, where to start looking for why these two are different?
I see the difference is that one has an extra speed property, but I don't know if the error is from the scraping of the page or the statsheet layout or the properties.
I can attach macros or preferences or properties.
What should be my next step tracking this down?
The Speed property looks to have a whole bunch of spaces after it, extending the width of the wide statsheet. Trim those spaces off.
You can't fix the size. It will be as wide as the widest property.
There's a bug where extra spaces appear.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: One statsheet is bigger than the other.

Post by PinkRose »

There are no spaces in Speed Property nor in the token property.
I believe it is a bug. I just don't know where it comes from to be able to help pin it down.
Merudo, do you know if this bug is reproducible? Have you seen it before?
I am a special snowflake!

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: One statsheet is bigger than the other.

Post by PinkRose »

After some experimentation as a bug, here's what I've learned.
The problem has to do with how many characters are in a property.
The more characters in a property, the more spaces after the property.
Make a Token Property list in the Campaign Property with just *HP
Make 3 identical tokens, give one 1 HP, one 11 HP, and one 111 HP.
Look at the space after each one. It expands based on each character.
I am a special snowflake!

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: One statsheet is bigger than the other.

Post by Merudo »

My guess is that it's a problem with SwingUtilities.computeStringWidth returning a bigger size than it should.

EDIT: I did more tests, the error depends on the character used.

I made two properties with very long names ("iiiii...." and "yyyy....") to illustrate the issue. Although both property names end up roughly the same length and have the same value (7), the statsheet displays them very differently when they are by themselves:

Image
  • First line shows the two properties have names roughly the same length.
  • Second line shows the "iiiiii" property name results in an extra blank space to its right.
  • Third line shows the "yyyy" property name results in not enough space for the property name, with some ys trailing off the box and the "7" character being drawn on top of the "y"s
The expected effect would be to have the size of the statsheet be the same for both properties.

Note: there is not a single space in either the property names or property values!

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: One statsheet is bigger than the other.

Post by Full Bleed »

What version of MT are you using? I'm not seeing this in 1.5.3 (nor did I see it in 1.4.0.5 or any of the 1.5 releases.) All of my statsheet properties right justify and are as wide as the value demands (or the screen allows in the case of really long values.)

frost giant stat sheet.jpg
frost giant stat sheet.jpg (100 KiB) Viewed 703 times

Perhaps you should share the affected campaign file so someone can take a look at it.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: One statsheet is bigger than the other.

Post by Merudo »

Sure! Check it out here: https://mega.nz/#!DRhnwAJD!6g-33BZaYMkQ ... jQkjXCGmA8

I'm using Maptool 1.5.3 on Windows 10.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: One statsheet is bigger than the other.

Post by PinkRose »

I'm using 1.5.3
And I'll use your terms, Merudo.
Try putting in different numbers of characters in the Values. That's where I found the error.
If I input 3 digits for the value of HP I get 6 spaces afterwards. But if I only have a single digit in the value, I have only 1 space after the value.

And Full Bleed, that's what I want my statsheets to look like. But they don't. But as I said, they aren't really mine to start with. I'm just trying to figure out how to fix it.
Maybe if I started with your campaign?
I am a special snowflake!

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: One statsheet is bigger than the other.

Post by Merudo »

Okay I think I figured it out.

The issue occurs when the scaling in Windows is not 100%.

In my case I use 125% scaling, which causes the weirdness I described. When I revert back to 100% scaling, everything looks good.

To change the scaling in Windows 10, go to Settings -> Display. You may have to restart your computer for the change to take effect.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: One statsheet is bigger than the other.

Post by PinkRose »

3840x2160
100%
Doesn't solve it.

And it's really really tiny.
I am a special snowflake!

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: One statsheet is bigger than the other.

Post by aliasmask »

There used to be a troubleshooting setting that resolved 4k monitors sizing issues. I'm not sure where you would put the java setting now though for the latest version.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: One statsheet is bigger than the other.

Post by Full Bleed »

Merudo wrote:
Thu Aug 15, 2019 3:15 am
Sure! Check it out here: https://mega.nz/#!DRhnwAJD!6g-33BZaYMkQ ... jQkjXCGmA8

I'm using Maptool 1.5.3 on Windows 10.
Unfortunately, like you've now noted, your problem isn't PinkRoses' problem...

PinkRose wrote:
Thu Aug 15, 2019 3:24 am
Try putting in different numbers of characters in the Values. That's where I found the error.
If I input 3 digits for the value of HP I get 6 spaces afterwards. But if I only have a single digit in the value, I have only 1 space after the value.
Yeah, that's strange... but without seeing your campaign it's impossible to identify what's going on. How are you inputting a property's values? By double-clicking on the token and using the properties tab?
And Full Bleed, that's what I want my statsheets to look like. But they don't. But as I said, they aren't really mine to start with. I'm just trying to figure out how to fix it.
Maybe if I started with your campaign?
My framework has never been built to be friendly to other users, has tons of house rules built in (it's built for Pathfinder with a lot of 1e throwback rules and flavor), isn't built to be modular, and I wouldn't be able to provide support for it. It would cause most people more problems than it solves.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: One statsheet is bigger than the other.

Post by Phergus »

@PinkRose - post the campaign properties (only the ones that are displayed on the statsheet) in a code block.

You might also post the actual contents of the Speed property for those two tokens.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: One statsheet is bigger than the other.

Post by PinkRose »

So, it is definitely due to scale of text on my PC.
I'm not sure all the steps, but when I checked today at 100% text resolution (itty, bitty is the technical term) everything is aligned as per Full Bleed's post.
When I change it back to anything else, recommended is 250%, I usually run at 200%, and then restart the PC, it goes back to wonky and misaligned.
I'm not sure if this is something we, I mean you, can or should fix.
I am a special snowflake!

Post Reply

Return to “MapTool”