Incompatible Size & Position Properties in Ren’Py

Incompatible Size & Position Properties in Ren’Py

There are a few places here and there where I’ve mentioned that some size and position properties are incompatible with other properties in Ren’Py, often because one property is shorthand for setting multiple properties.

Here is a table of all those conflicts. You don’t have to read it through from start to finish, but I hope it will be good reference material if you’re ever wondering why Ren’Py complains about using certain properties together, or if you’re having trouble positioning and sizing screen elements.

Difficulty Level: Beginner

This article is intended largely as a reference after you’ve read Ren’Py Position Properties – Pos and Anchor, Ren’Py Position Properties – align, xycenter, and offset, Ren’Py Size Properties – xysize, maximum, and minimum, and Ren’Py Size Properties – fill, fit, size_group, and area.

Property NameConflictsExplanation
posxpos, ypos

align, xalign, yalign

xcenter, ycenter, xycenter

area
pos sets both xpos and ypos, so it can’t be used alongside them.

The next set of conflicting properties all set one or both of the pos properties along with the anchor property. They can’t both set the same thing, so only one of these properties will be what the actual pos value is.

area sets pos and xysize, so again, it can’t be used in combination with a pos property.
xpospos

xalign, xcenter, xycenter

area
pos sets xpos and ypos in one property, so it can’t be used alongside them

The next set of conflicting properties all set the xpos properties along with the anchor property. They can’t both set the same thing, so only one of these properties will be what the actual xpos value is.

area sets pos and xysize, so again, it can’t be used in combination with a pos property.
ypospos

yalign

ycenter, xycenter

area
pos sets xpos and ypos in one property, so it can’t be used alongside them

The next set of conflicting properties all set the ypos properties along with the anchor property. They can’t both set the same thing, so only one of these properties will be what the actual ypos value is.

area sets pos and xysize, so again, it can’t be used in combination with a pos property.
anchorxanchor, yanchor

align, xalign, yalign,

xcenter, ycenter, xycenter
anchor sets both xanchor and yanchor, so you can’t also use the individual xanchor and yanchor properties

For the other properties, it’s the same as pos; the conflicting xycenter and align properties set the anchor point of the image along with setting its pos, so only one of them can be actively applied at a time.
xanchoranchor

align, xalign

xcenter, xycenter
anchor sets both xanchor and yanchor, so you can’t also use the individual xanchor and property

For the other properties, it’s the same as xpos; the conflicting properties set the anchor point of the image along with setting its pos, so only one of them can be actively applied at a time.
yanchoranchor

align, yalign

ycenter, xycenter
anchor sets both xanchor and yanchor, so you can’t also use the individual yanchor and property

For the other properties, it’s the same as ypos; the conflicting properties set the anchor point of the image along with setting its pos, so only one of them can be actively applied at a time.
alignxalign, yalign

pos, xpos, ypos

anchor, xanchor, yanchor

xycenter, xcenter, ycenter

area
align lets you set a value for xalign and yalign, so it is incompatible with those individual properties.align sets both pos and anchor to the same value, so it’s incompatible with both those properties.

xycenter sets the anchor and pos of the element, and since align also sets the anchor and pos, they are incompatible.

area sets the pos of the element, and since align also sets the pos, they are incompatible.
xalignalign

pos, xpos

anchor, xanchor

xycenter, xcenter

area
align lets you set a value for xalign and yalign, so it is incompatible with those individual properties.xalign sets both xpos and xanchor to the same value, so it’s incompatible with both those properties, and pos and anchor which also set the xpos and xanchor values respectively.

xycenter sets the anchor and pos of the element, and since xalign also sets the xanchor and xpos, they are incompatible.

area sets the pos of the element, and since xalign also sets the xpos, they are incompatible.
yalignalign

pos, ypos, anchor, yanchor

xycenter, ycenter
area
align lets you set a value for xalign and yalign, so it is incompatible with those individual properties.yalign sets both ypos and yanchor to the same value, so it’s incompatible with both those properties, and pos and anchor which also set the ypos and yanchor values respectively.

xycenter sets the anchor and pos of the element, and since yalign also sets the yanchor and ypos, they are incompatible.

area sets the pos of the element, and since xalign also sets the xpos, they are incompatible.
xycenterxcenter, ycenter

pos, xpos, ypos

anchor, xanchor, yanchor

align, xalign, yalign

area
xycenter allows you to set both xcenter and ycenter in one property, so it can’t be used in combination with the individual properties.

xycenter sets both pos to the given value and the anchor to the center, so it’s incompatible with both those properties.

align sets the anchor and pos of the element, and since xycenter also sets the anchor and pos, they are incompatible.

area sets the pos of the element, and since xycenter also sets the pos, they are incompatible.
xcenterxycenter

pos, xpos

anchor, xanchor

align, xalign

area
xycenter allows you to set both xcenter and ycenter in one property, so it can’t be used in combination with the individual properties.

xcenter sets both xpos to the given value and xanchor to 0.5, so it’s incompatible with both those properties.

align sets the anchor and pos of the element, and since xcenter also sets the xanchor and xpos, they are incompatible.

area sets the pos of the element, and since xcenter also sets the xpos, they are incompatible.
ycenterxycenter

pos, ypos

anchor, yanchor

align, yalign

area
xycenter allows you to set both xcenter and ycenter in one property, so it can’t be used in combination with the individual properties.

ycenter sets both ypos to the given value and yanchor to 0.5, so it’s incompatible with both those properties.

align sets the anchor and pos of the element, and since ycenter also sets the yanchor and ypos, they are incompatible.

area sets the pos of the element, and since ycenter also sets the xpos, they are incompatible.
offset, xoffset, yoffsetN/Aoffset properties are compatible with all other mentioned properties.
xysizexsize, ysize

maximum, xmaximum, ymaximum

minimum, xminimum, yminimum

area

xfit, yfit, xfill, yfill, fit_first
xysize sets both the xsize and the ysize properties, so it is incompatible with them.

Setting xysize sets the maximum and minimum properties to the same value. Ergo, you can’t use both of them at the same time.

As with pos, area sets both pos and xysize, so you can’t use xysize with area.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
xsizexysize

maximum, xmaximum

minimum, xminimum

area

xfit, xfill, fit_first
xysize sets both the xsize and the ysize properties, so it is incompatible with them.

Setting xsize sets the xmaximum and xminimum properties to the same value. Ergo, you can’t use both of them at the same time.
As with pos, area sets both pos and xysize, so you can’t use xsize with area.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
ysizexysize

maximum, ymaximum

minimum, yminimum

area

yfit, yfill, fit_first
xysize sets both the xsize and the ysize properties, so it is incompatible with them.

Setting ysize sets the ymaximum and yminimum properties to the same value. Ergo, you can’t use both of them at the same time.
As with pos, area sets both pos and xysize, so you can’t use ysize with area.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
minimumxminimum, yminimum

xysize, xsize, ysize

area

xfit, yfit, xfill, yfill, fit_first
minimum sets both xminimum and yminimum, so it’s incompatible with those properties.

xysize sets minimum and maximum to the same value, so they are incompatible.

area sets xysize, which as mentioned, sets both the minimum and maximum to that value.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
xminimumminimum

xysize, xsize

area

xfit, xfill, fit_first
minimum sets both xminimum and yminimum, so it’s incompatible with those properties.

xysize and xsize set xminimum and xmaximum to the same value, so they are incompatible.

area sets xysize, which as mentioned, sets both the minimum and maximum to that value.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
yminimumminimum

xysize, ysize

area

yfit, yfill, fit_first
minimum sets both xminimum and yminimum, so it’s incompatible with those properties.

xysize and ysize set yminimum and ymaximum to the same value, so they are incompatible.

area sets xysize, which as mentioned, sets both the minimum and maximum to that value.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
maximumxmaximum, ymaximum

xysize, xsize, ysize

area

xfit, yfit, xfill, yfill, fit_first
maximum sets both xmaximum and ymaximum, so it’s incompatible with those properties.

xysize sets minimum and maximum to the same value, so they are incompatible.

area sets xysize, which as mentioned, sets both the minimum and maximum to that value.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
xmaximummaximum

xysize, xsize

area

xfit, xfill, fit_first
maximum sets both xmaximum and ymaximum, so it’s incompatible with those properties.

xysize sets xminimum and xmaximum to the same value, so they are incompatible.

area sets xysize, which as mentioned, sets both the minimum and maximum to that value.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
ymaximummaximum

xysize, ysize

area

yfit, yfill, fit_first
maximum sets both xmaximum and ymaximum, so it’s incompatible with those properties.

xysize sets yminimum and ymaximum to the same value, so they are incompatible.

area sets xysize, which as mentioned, sets both the minimum and maximum to that value.

fit and fill properties are incompatible with anything that sets size, as they also set the size.
xfillxmaximum, xminimum, xsize

xfit, fit_first

area
xfill sets the width of the displayable, so it’s incompatible with any other properties attempting to set the width.
yfillymaximum, yminimum, ysize

yfit, fit_first

area
yfill sets the height of the displayable, so it’s incompatible with any other properties attempting to set the height.
xfitxmaximum, xminimum, xsize

xfill, fit_first

area
xfit sets the width of the displayable, so it’s incompatible with any other properties attempting to set the width.
yfitymaximum, yminimum, ysize

yfill, fit_first

area
yfit sets the height of the displayable, so it’s incompatible with any other properties attempting to set the height.
areapos, xpos, ypos

align, xalign, yalign

xycenter, xcenter, ycenter

xysize, xsize, ysize

minimum, xminimum, yminimum

maximum, xmaximum, ymaximum

xfill, yfill, xfit, yfit, fit_first
area sets both xysize and pos, so it’s incompatible with any other properties that set those values or control size.
size_groupxfit, yfit, xfill, yfill, fit_firstsize_group is incompatible with the fit and fill properties because those properties can only apply to fixed containers, and size_group can only apply to frames, windows, labels, buttons, and textbuttons.

Note that while you can apply size properties like xminimum and ysize to a container with a size_group, it may not always affect the other containers with the same size_group in intuitive ways. Make sure you’re saving and testing your changes often!

Conclusion

And that’s all for this article! I hope this is a useful source to return to if you’re having trouble with error messages like “properties xalign and xpos conflict with each other” and aren’t sure why. In the next tutorial, we’ll start looking at frame, which lets you add backgrounds and padding to your containers. Find it here: Ren’Py Screen Language Basics – Frames

You might also be interested in my tool release from last week, which makes it simple to add blinking to character sprites! Find it on itch.io:

Leave a Reply