it should work with any locale but I'm not 100% sure (in Italy we use "," as decimal separator)
Anyway, I'm trying to take a screenshot of my whole base using the takescreenshot function and I decided to share what I figured.
I took 3 pictures
position = 0,0 - resolution = 1024, 1024 -> picture 1
position = 32,0 - resolution = 1024,1024 -> picture 2
position = 16,0 - resolution = 2048,1024 -> picture 3
I can put picture 1 and picture 2 adjacent (or "stitch" them) and they'll match perfectly (*) on the borders. the result is the same of picture 3.
what I figured is that seems that every "unit" of "position" parameter at zoom 1 is equivalent to 32 pixels
so if position is expressed in tiles, and we consider that a chunk is made of 32 tiles we have that a single chunk is exactly 32*32 = 1024 pixels (each side)
note: when you pause game a grid appears: if you watch carefully you'll see that every 32 columns the border is thicker.
pressing F4 then selecting "always" tab and "show detailed info" and "show tile grid" you can see "position" value (displayed as "cursor")
Code: Select all
|<--1024->|<--1024->|
-16 0 16 32 48
+----+----+----+----+ -16
|picture 1|picture 2|
| * | * + 0
| (0,0) | (32,0) |
+---------+---------+ 16
|<-------2048------>|
-16 0 16 32 48
+----+----+----+----+ -16
| picture 3 |
| * + 0
| (16,0) |
+---------+---------+ 16
edit:
so what it can be useful for?
As I said, I want to take screenshot of my complete base.
So I activated "detailed info" (F4 - "always" - "detailed info" or F5 - but this shows too many info for me...)
Code: Select all
I moved to TopLeft (TL) angle of my base and wrote down coordinates (TLx = 4 TLy=-16)
I moved to BottomRight (BR) angle and did the same (BRx = 240 BRy = 310)
zoomLevel (ZL) = 1
image width = W = BRx - TLx = 240 - 4 = 236
image height = H = BRy - TLy = 310 - (-16) = 326
Image Center X = ICx = TLx + W/2 = 4 + (236/2) = 4 + 118 = 122
Image Center Y = ICy = TLy + H/2 = (-16) + (326/2) = (-16) + 163 = 147
# of pixel on X = Px = W * ZL * 32 = 236 * 32 * 1 = 7552
# of pixel on Y = Py = H * ZL * 32 = 326 * 32 * 1 = 10432
Code: Select all
game.takescreenshot{zoom=ZL, position={ICx,ICy},resolution={x=PX,y=Py}}
Code: Select all
game.takescreenshot{zoom=1, position={122,147},resolution={x=7552,y=10432}}
Since it was a very big file (127 MB) I scaled it by 4 (ZL = 0.25) and I called
Code: Select all
game.takescreenshot{zoom=0.25, position={122,147},resolution={x=1952,y=2608}}