fantasy-statblocks icon indicating copy to clipboard operation
fantasy-statblocks copied to clipboard

[Bug] Favoring the Right side column

Open TheAussieTinker opened this issue 3 years ago • 4 comments

When the statblock renders it wraps by a text field rather than by text and this results in strange circumstances where there will be more text on the right column as apose to the left. This is demonstrated by the boilerplate statblock code from the documentation as well as the Mage monster:

Screen Shot 2022-07-19 at 11 59 27 am

Is it possible to make it favour the left side? even if it doesn't wrap text inside the text field I think it would look better to have it on the left side as per English standards.

Thanks!

TheAussieTinker avatar Jul 19 '22 02:07 TheAussieTinker

You're probably not still looking at this a month later, but it looks as if you might need to adjust the columnHeight property on the statblock from the default 600 - the reason it is uneven is because the first column is affected by it and the second one isn't (which to be fair, actually does seem to be a bug, and is the reason I was poking around the issues tab anyway)

mazjin avatar Aug 28 '22 20:08 mazjin

This is kinda-fixed in the latest release, but it now appears to favor the left side too much. The preferred behavior would be "if the statblock extends past the single-column height, attempt to make it two equal-sized columns". As-is, it seems to do something like "if a feature extends to make the column go past the base columnHeight, then keep everything that was in column 1 and add that feature in column 2", so you can have a very very short column 2 with a relatively long column 1.

Ideally, it should attempt to split the columns evenly even if that means reducing the height of column 1, but only if when it is a single-column entry it exceeds the maximum single-column height.

LangyMD avatar Sep 02 '22 19:09 LangyMD

It actually does try to split the columns evenly, but some of the blocks can’t be “split” (such as spells) in the current setup. I agree that the column logic could be improved further, though.

valentine195 avatar Sep 02 '22 20:09 valentine195

In the current build, if you add a bunch of Trait or Action items it doesn't even them out - it prefers to put them all in the left column until it reaches the column height for splitting into two, then starts putting new items on the right.

Here's an example:

image: [[Chuul.jpeg]]
name: Chuul
size: Large
type: Aberration
ac: 16 (natural armor)
hp: 93
hit_dice: 11d10 + 33
speed: 30 ft., swim 40 ft.
stats: [18, 10, 16, 5, 16, 10]
maneuver_dc: 15
damage_immunities: poison
condition_immunities: frightened, poisoned
senses: darkvision 60 ft., passive Perception 13
languages: understands Deep Speech but can't speak
cr: 5
xp: 1,800
traits:
 - name: Amphibious1
   desc: "The chuul can breathe air and water."
 - name: Amphibious2
   desc: "The chuul can breathe air and water."
 - name: Amphibious3
   desc: "The chuul can breathe air and water."
 - name: Amphibious4
   desc: "The chuul can breathe air and water."
 - name: Amphibious5
   desc: "The chuul can breathe air and water."
 - name: Amphibious6
   desc: "The chuul can breathe air and water."
 - name: Amphibious7
   desc: "The chuul can breathe air and water."
 - name: Amphibious8
   desc: "The chuul can breathe air and water."
 - name: Amphibious9
   desc: "The chuul can breathe air and water."

Amphibious9 is the only item in that stat block that appears in the right column.

LangyMD avatar Sep 02 '22 20:09 LangyMD