Skip to content

The Sprite Database window

Some actors are born, arrive or grow up while the game runs, and they have no picture yet. The Sprite Database keeps the portraits Intrigues hands out to them. This window files the sprites in categories, tags them, and shows how many portraits fit each kind of actor.

  • You have a folder of portraits and want the game to pick them by gender, culture and age.
  • An actor got no portrait, or the wrong one.

Open Tools > MrW > Intrigues > Sprite Database. The window is titled Sprite Database. The first time it opens at 1000 by 640 pixels in the middle of the editor.

The header has a database field (hover text The database whose sprites are shown.) and a pill such as 12 sprites · 2 categories. Two tabs follow: Sprites and Coverage (How many portraits fit each kind of actor). The status line reads Drop sprites or folders here to add them. Double-click a sprite to find its file.

The Sprites tab has three columns:

Column Holds
Left CATEGORIES with a + button and All Sprites. A SHOW group with All, No tags (n), Missing files (n) and Same name (n); only the filters with something to show appear. TAGS, grouped as Gender, Age groups, Cultures and Other tags.
Middle A search field (Search names, tags, categories), the count, a thumbnail size slider, Add Folder…, filter chips and the grid of sprites.
Right The details of the selected sprites. With none selected, the Overview.

Drop sprites or a folder from the Project window on the grid, on an empty window, or on a category. Or click Add Folder… and pick a folder inside the project’s Assets folder. An Add card opens above the grid. The Category is the one you are viewing, or Portraits; New category… asks for a name. Leave Read tags from file names on and click Add n Sprites. Return confirms and Escape cancels.

Words that start with a dash in a file name become tags: -m, -f, -dead, -all, an age group of Home ▸ Settings, a culture name. The README’s example: north-m-varag-adult-5923.png is filed as Male, Varag, adult. An image that is not imported as a Sprite is left out; set its Texture Type to Sprite.

To undo, use Undo in Unity’s Edit menu. Every edit is one step.

Select sprites. In TAGS on the right, click a tag to remove it from all, or click a partial tag (marked 2/3) to add it to all. Type in Add a tag, press Enter, or click a suggestion. READS AS says how the game reads the selection. Read Tags from File Name adds the words of the file name, Move to… changes the category, and Remove takes the sprites out of the database. The image files stay in the project.

Right-click a tag in the left column for Add to Selected Sprites, Rename Everywhere… and Remove Everywhere…. A rename to a tag that exists asks first (Merge Tags).

Open Coverage. Rows are cultures and No culture, columns are age groups, and each cell reads M 3 or F 2, the number of portraits that fit. M – means none fits, and such an actor keeps the portrait they have. Click a number to see those portraits on the Sprites tab, under the chip Fits: culture · age · gender.

With nothing selected, the right column shows counts, PROBLEMS (Remove Them for missing files, Show for sprites without tags or with a shared name), AUTOMATION (what Home ▸ Settings says, with Open Settings), USE IN CODE and HOW A PORTRAIT IS CHOSEN. USE IN CODE lists IM.PickLook(actor), actor.RefreshLook() and IM.PickSprite("Category", "Tag"), each with a Copy button.

Action Input
Select one, a range, or add one Click, Shift and click, Cmd or Ctrl and click
Select all shown Cmd or Ctrl plus A
Clear the selection Escape
Move, or extend with Shift Left, Right, Up, Down
Remove the selection Delete or Backspace
Find the file in the Project Return, or double-click
Move to a category Drag the tiles onto a category row
Rename a category Double-click it, or right-click > Rename; Remove… is in the same menu

Right-click a tile for Add Tag, Read Tags from File Name, Move to, Show in Project, Show in Actors Page and Remove from Sprite Database.

Two switches on Home ▸ Settings decide whether portraits are given automatically: Give actors without a look one that fits and Replace looks an actor has outgrown. See Every setting and Actors: Looks. Every sprite loads with the database, so the README advises importing portraits at 256 to 512 pixels.

Message What to do
No database is open. Pick one above. Pick a database in the header field.
Play mode: you can look around, but changes are off until you stop. Stop Play mode to edit.
n sprites point at image files that no longer exist. Click Remove Them.
Nothing to add: the image is not imported as a Sprite. Set its Texture Type to Sprite. Change the import setting, then add it again.
Pick a folder inside this project’s Assets folder. Choose another folder.