Skip to content

Customer Sprite Dimensions & Outline Specification ​

In Probably Stolen, customer portraits are rendered behind the shop window by StoreClientMono.Instance.image (SpriteRenderer). This section documents the geometry of the standard 288×211 customer canvas, top headroom alignment, and outer contour color conventions.

Customer Sprite Canvas Proportions


1. Standard Customer Sprite Geometry ​

Vanilla customer textures use a 288 × 211 canvas (100 PPU, pivot (0.5, 0.5), FilterMode.Point):

Metrictrailer_scav1 (Billy)serpico_scav (Scav)serpico_rev (Rev)Custom Sprite Standard (v_normal)
Total Canvas Size288 × 211288 × 211288 × 211288 × 211 (RGBA PNG)
Horizontal Range (x)83 .. 205 (width 123px)65 .. 222 (width 158px)65 .. 221 (width 157px)55 .. 232 (width 150 ~ 178px)
Vertical Range (y)57 .. 210 (height 154px)47 .. 210 (height 164px)51 .. 210 (height 160px)55 .. 210 (height 154 ~ 162px)
Top Transparent Margin57 px47 px51 px50 ~ 56 px
1px Outer Outline ColorDark charcoal-purpleDark charcoal-purpleDark charcoal-purpleRGB(36, 33, 43)

2. Canvas Alignment & Outline Normalization Script ​

The Python (Pillow + NumPy) script below scales a portrait to target_h = 156 (bottom-aligned at y = 210 with 55px top headroom) and applies the standard RGB(36, 33, 43) 1px outer contour:

python
from PIL import Image
import numpy as np

def normalize_portrait_to_vanilla_canvas(src_rgba_path, out_normal_path, target_h=156):
    raw = Image.open(src_rgba_path).convert("RGBA")
    arr = np.array(raw, dtype=np.int32)
    fg = arr[:, :, 3] > 128

    ys, xs = np.where(fg)
    crop = Image.fromarray(arr[ys.min():ys.max()+1, xs.min():xs.max()+1].astype(np.uint8), "RGBA")
    scale = target_h / crop.height
    target_w = int(round(crop.width * scale))
    resized = crop.resize((target_w, target_h), Image.NEAREST)

    canvas = Image.new("RGBA", (288, 211), (0, 0, 0, 0))
    ox = (288 - target_w) // 2
    oy = 211 - target_h
    canvas.paste(resized, (ox, oy), resized)

    c_arr = np.array(canvas, dtype=np.int32)
    c_fg = c_arr[:, :, 3] > 128
    c_arr[~c_fg] = [0, 0, 0, 0]
    c_arr[c_fg, 3] = 255

    pad = np.pad(c_fg, 1, mode="constant", constant_values=False)
    is_outer_contour = c_fg & (~(pad[:-2, 1:-1] & pad[2:, 1:-1] & pad[1:-1, :-2] & pad[1:-1, 2:]))
    is_outer_contour[210, :] = False

    c_arr[is_outer_contour, 0] = 36
    c_arr[is_outer_contour, 1] = 33
    c_arr[is_outer_contour, 2] = 43
    c_arr[is_outer_contour, 3] = 255

    Image.fromarray(c_arr.astype(np.uint8), "RGBA").save(out_normal_path)

Custom NPC Framework Documentation