UI components
What this page is for
Section titled “What this page is for”These are the components you add to your own objects to build a screen without code. They are all in the Add Component menu under Intrigues > UI. For the words Subject, Value, List and Command, read Intrigues UI: the idea first.
Rules for all of them
Section titled “Rules for all of them”- A component is about the subject of the nearest Subject Source on its own object or above it. With none above it has no subject. That is fine for texts that read only
{player}or{world}, and for commands that act on the world, such as the clock or the language. - A set-up mistake shows a yellow box in the Inspector. In Play mode a line “Now shows” appears.
- Each Intrigues binder (Subject Source, the Bound components, Command Button, Subject Window, Intrigue Keys, Notice Receiver, Accomplice Toggle) is allowed once per object. Bound Text needs a TextMeshPro label on its object, Bound Image an Image, Command Button a Button, Bound Tooltip a Tooltip Trigger, Accomplice Toggle a Toggle.
Subject Source
Section titled “Subject Source”Says who or what this part of the screen is about. Put it on a panel; everything on it or below is about that subject.
From is one of: My player (follows a player switch); A fixed character (Actor Id); A fixed clan (Clan Id); A fixed family (Family Id); The selected thing (IntrigueUI.Selected); What a window opened; Set from code; A row of a list; Related to the subject above.
With Related, Relation is one of Clan, Family, Birth Family, Clan Head, Family Head, Spouse, Heir, Father, Mother, Conspirator, Target, Holder, Scheme, Role, Notice Actor, Notice Other, Culture. Culture leads to the culture of a character, clan or family, so a Bound Image with Kind = Icon shows its icon.
Events: On Changed, On Has Subject, On No Subject. Example: a button with its own Subject Source (Related, Clan Head) and a Command Button (Open) opens a clan’s head.
Bound Text
Section titled “Bound Text”Puts a live text into a TextMeshPro label.
- Mode: Text writes a text with tokens such as
{this.Name}. A button “{this…}” lists the members of the subject’s kind and warns about one that does not exist. Part shows one named Part of the subject; a part that does not fit the kind shows nothing. - List: for the part Count, the list to count. Empty means the list on this object or above.
- When Empty, Hide When Empty, and Hide Object (a whole object instead; not this one or a parent).
- Links: writes character names as links. Needs a Link Handler on the label.
The parts: Name, Full Name, Description, Title, Age, Clan Name, Family Name, Culture Name, Role Name, Member Count, Seats, Holder Names, Objective, Conspirator Name, Target Name, Accomplice Names, Reasons, Warnings, Success Chance, Discovery Risk, Value, Count, Text, Day, Flag Title, Flag Text, Flag Age, Flag Days Left, Category, Chance Tier, Attitude, Relation Term, Slot Title, Slot Day, Slot Play Time, Slot Status, Progress, Next Objective.
Bound Image
Section titled “Bound Image”Puts the picture of the subject into an Image. Kind: Portrait (a character’s; an Actor Portrait View on the same object works too), Icon (a clan’s banner, or a family, culture, role, policy, scheme or trait icon), or Thumbnail (the picture of a save slot, in a row of a Save Slots list; point filtered). Hide When Empty switches the image off while there is no picture; otherwise it keeps its scene sprite. Events: On Has Image, On No Image.
Bound State
Section titled “Bound State”Turns things on or off from a condition or a check: a “dead” stamp, a grey button, a “Nothing here yet” note.
- Mode: Condition reads a Condition text such as
this.Age >= 18. Check uses a ready-made Check. The default is Check. - List: for Is Empty and Is Not Empty. Empty means the list on this object or above.
- Invert. Show When True and Show When False switch objects. Enable When True switches buttons and other controls. Events: On True, On False.
Checks: Has Subject, Is Alive, Is Dead, Is My Player, Is Played (character); Is Vacant (court seat); Can Start, Is Known, Is Hidden (offered scheme); Is Paused (running scheme); Is Empty, Is Not Empty (list); Needs Answer, Is High Flag (flag); Takes Time (scheme); Can Load (save slot); Has Progress, Has Next (running scheme). A check that does not fit the subject is false. Example: a red “dead” stamp in Show When True, Check = Is Dead.
Bound List
Section titled “Bound List”Shows a live list as rows. You draw one row, the Row Template, and the list makes one copy per entry. List is one of:
| Group | Lists |
|---|---|
| People | Relatives, Clan Members, Family Members, All Actors, All Clans, All Families |
| Court | Court, Seat Holders (the living holders of a seat; put it in a row of a Court list) |
| Values | Policies, Traits, Variables, World Variables |
| Schemes | Schemes To Start, Scheme Offer Sections, Accomplice Candidates, Running Schemes, Accomplices, Scheme Log |
| Messages | Notices, Flags, Decision Log |
| Mind and realm | Subjects, Realm, Clan Relations, Clan Opinion Lines, Opinion Lines, Memories, Ties, Ambitions, Ambitions Offered, Succession, Chronicle |
| Saves | Save Slots |
Scheme Log is in the code but not in the guide: the log of the running scheme above, newest first. With nothing above, lists about a character are about your player. Save Slots needs no subject. A player sees only their own mind: memories, ties, ambitions and opinion lines are listed only when they are your player’s.
Options per kind:
- Relatives: Groups (Parent, Child, Spouse, Grandparent, Grandchild, Sibling, Nephew, Niece, Uncle, Aunt, Brother In Law, Sister In Law) and With Dead.
- Members: Role Id, Without Court Role, With Dead. Court: Also Vacant, With Dead.
- Variables, World Variables, All Actors, All Clans, All Families: Name Filter.
- Schemes To Start: Offer Rules (None is what the ready-made UI uses). Running Schemes: Also Helping (on by default). Accomplice Candidates: Include Played Characters.
- Notices: Notice Kinds, Notice About, Notice Seconds (6), Notice Max (5; 0 means 256), Newest First (on). Chronicle and Decision Log use Notice Max as their line limit (50 when 0). Seat Holders has With Dead; Succession has Role Id; a Schemes To Start list inside a section has Section All. Flags: Newest First, Hide Low Flags (this list only).
Layout: Row Fade In and Row Fade Out in seconds (0 means at once). A leaving row stays in place, takes no clicks and is not counted as a row. Max Rows (0 means all). Page Size (0 means one page; turn pages with Command Buttons). Rows Before More, More Object, More Text: the list shows that many rows, and the More Object shows “{count} more…” and a click shows the rest. Content is where rows go, Empty Object shows while there are no rows, Navigation is As the template has it, Vertical or Horizontal. The Row Template is a child object kept switched off, with a Subject Source (From = A row of a list) on its root. Events: On Changed, On Empty, On Not Empty.
Command Button
Section titled “Command Button”Makes a Unity Button do one thing. Command is one of: Open, Back, Close Screens, Select, Start Scheme, Pause, Resume, Toggle Pause, Faster, Slower, Set Speed, Change Language, Play As, Next Page, Previous Page, Open Screen, Open Flag, Dismiss Flag, Start With Accomplices, Save, Load, Delete Save, Autosave.
- Fields for a command: Speed (Paused, Slow, Normal, Fast, Fastest), Language Code (for example
en), Screen (the Screen name of a Subject Window), List (for the page commands). - Show Reason shows why a refused command is refused, as the tooltip (needs a Tooltip Trigger; on by default). Ask First with Yes Text and No Text asks a question first; tokens work in them.
- Open, Select, Start Scheme, Play As, Open Flag and Dismiss Flag act on the subject above. Dismiss Flag is refused for a flag that waits for an answer. Open Screen is refused with “There is no screen of that name.” while no enabled window has that name.
- The save commands act on a save slot: the row above, or the Slot Name; Save can write a new slot titled from the Name Field. They end later: On Working runs when the work was accepted. Only the host saves, loads and deletes. Use Ask First on Delete Save.
- Start With Accomplices has Played Characters May Help. Load has Load Scene (From Save, Current or Caller).
- Events: On Done, On Sent (sent to the host of a multiplayer game), On Refused (gets the reason). The button greys itself out while the command would be refused.
Bound Tooltip
Section titled “Bound Tooltip”Needs a Tooltip Trigger on the same object. It gives the trigger the subject above, so the trigger’s Header and Content can use {target...} tokens about it. For a clan, family or policy it reads only {player} and {world}. Example: Header {target.FullName}, Content {target.Age} years on a row of relatives.
Subject Window
Section titled “Subject Window”Shows a subject when somebody asks to open one: a button, a link, your code. You build the panel.
- Shows: Actor, Clan, Family or Scheme. Panel: a child object, never the object the component is on.
- Several: off, one window pointed at each new subject, with Back; on, one copy per subject, up to Max Windows (4 by default).
- Close Button, Back Button, Select On Open, Start Open (open at the start, about the player’s character, clan or family), Open At Pointer.
- Screen: a name for a screen that is not about “whoever was opened”, such as a settings page. With a name, the window answers only a request for that name, not case sensitive. Toggle then closes it when asked again.
Events: On Opened, On Closed, On Subject Changed. Put it on an object that stays on, never on its panel. If the panel has no Subject Source the window adds one. With no enabled window for a kind, an Open for that kind is refused.
Intrigue Keys
Section titled “Intrigue Keys”A list of “this key does that”: a Key, an Action and Also Do, an event for a sound that runs even when the action was refused. Actions: Open My Character, Open My Clan, Open My Family, Back, Close Screens, Toggle Pause, Faster, Slower, Open Screen. It reads keys through IntrigueInput and does nothing while a text input has focus.
Notice Receiver
Section titled “Notice Receiver”Runs things in the scene when something happens in the world. It has a list of Reactions: Kinds (empty means every kind, also each new day), About (Anyone, My player, The subject above), On Notice Text (gets the sentence, for a toast) and On Notice (for a sound). Example: Kinds = Died, About = My player, On Notice = play a bell.
Accomplice Toggle
Section titled “Accomplice Toggle”Goes on a Toggle in a row of an Accomplice Candidates list. It chooses that character as an accomplice for the offered scheme above. A Command Button with Start With Accomplices then starts the scheme with them.
Other components in the same menu
Section titled “Other components in the same menu”- Tooltip Trigger gives its object a tooltip, with a Header and a Content that take tokens. Tooltips decides which tooltip is on screen (0.2 seconds of delay by default) and lives on
Prefabs/Tooltip.prefab. Tooltip draws it. - Link Handler makes names in a label clickable and shows a tooltip about the character under the pointer.
- Pixel Canvas Scale keeps a pixel-art canvas at a whole-number scale: Logical Width and Height (960 by 540 by default), Requested Scale (0 is automatic), Pixel Perfect, Reference Pixels Per Unit, Layout Area.
- Dialogue Manager, Dialogue Stage, Dialogue Audio, Text Reveal and Choice Tooltip belong to dialogues and are not covered here.
Mistakes and messages
Section titled “Mistakes and messages”- A row whose texts show nothing: its Row Template needs a Subject Source with From = A row of a list on its root.
- A Command Button that stays grey: with a Tooltip Trigger it shows the reason.
- Two components writing one label: the Scene check in UI Setup reports it.
How it connects
Section titled “How it connects”- What you can write on a label covers the tokens and conditions.
- UI recipes puts the components together.
- The ready-made UI is built only from them.
- IntrigueUI from code is the same layer without components.