The Sprite Database window
What this page is for
Section titled “What this page is for”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.
When you come here
Section titled “When you come here”- 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.
What you see
Section titled “What you see”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. |
Do it, step by step
Section titled “Do it, step by step”Add portraits
Section titled “Add portraits”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.
Tag and file sprites
Section titled “Tag and file sprites”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).
Find a gap
Section titled “Find a gap”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.
Read the Overview
Section titled “Read the Overview”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.
Keys and mouse on the grid
Section titled “Keys and mouse on the grid”| Action | Input |
|---|---|
| Select one, a range, or add one | Click, ShiftShift and click, Cmd or CtrlCmdCtrl and click |
| Select all shown | Cmd or Ctrl plus ACmdCtrlA |
| Clear the selection | EscapeEscape |
| Move, or extend with Shift | LeftLeft, RightRight, UpUp, DownDown |
| Remove the selection | DeleteDelete or BackspaceBackspace |
| Find the file in the Project | ReturnReturn, 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.
How it connects
Section titled “How it connects”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.
Mistakes and messages
Section titled “Mistakes and messages”| 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. |