---
title: "Installing a pack into a card"
description: "What happens when a Yumina pack goes into a card: new ids, variables with the same name, the interface folder, situations, removal and updates."
---

# Installing a Pack into a Card

Installing adds the pack's parts to the card. It never overwrites the card's own entries, variables, behaviors or interface. Write a pack with these rules in mind.

## Where to Install From

| Where | What it records |
|-------|-----------------|
| **Resource market** button in the canvas toolbar (next to **Add**), tabs **Hub** and **My Library**: press **Install** on a pack. Folded into the canvas, the same list lets you drag a pack onto the board, the player's screen or a situation | The pack it came from: its pictures are copied, and the card is offered new versions |
| **⋮ → Import Bundle**, tabs **From File**, **From Library**, **From Hub** | The content only: no picture copies, no update offers |

Use the Resource market for anything you or others will keep updating.

## The Install Dialog

Before anything goes in, the installer sees what the pack brings and chooses:

- **What goes in**: lore (entries), behaviors and audio can each be left out. The pack's variables always come along, since the other parts use them.
- **Variables with the same name**: see below.
- **Visual layer**, when the pack has an interface: **Keep both screens**, **Replace the current screen**, or **Leave its screen out**.
- **Have the assistant fit it to this card**, for interface packs: the assistant rewrites hard-coded names and text for this card, using the installer's credits. Off means the pack goes in exactly as written.
- **Settings**, when the pack has a [settings form](/pack-spec/format#settings-form-settings): a second step, which can also be done later.

## What Happens to Each Part

| Part | On install |
|------|-----------|
| Entries | New ids. Placed at the top of the card's lists. Openings (`role: "greeting"`) become extra openings of the card |
| Variables | Keep their ids, unless the card has one with the same name (see below). An id the card already has is shared, not added twice |
| Behaviors | New ids. Every variable, entry, behavior and situation they point at is rewritten to the installed ids. Placed after the card's own |
| Situations | New ids. Their activation conditions follow the variable ids |
| Entry folders | New ids, in the situation their entries are in |
| Audio tracks | New ids. References to a track's old id (in behaviors, entries or code) are not rewritten |
| Interface | Copied into its own folder; see below |
| Pictures (`@asset:`) | Copied into the installer's assets and relinked (Resource market installs only) |

Everything installed is colored with the pack's color in Studio and grouped in a frame named after the pack.

### Variables with the Same Name

When the card already has a variable whose name matches one of the pack's (ignoring case) under another id, the installer picks per variable:

- **Merge into one**: the pack uses the card's variable. The pack's behaviors, entries and interface code are pointed at the card's id.
- **Keep both**: the pack's variable is added under a new id and a new name (`Mood (1)` by default), and the pack's parts point at that.

When the ids match too, the variable is shared without asking.

### The Interface Folder

The pack's files go into `_bundles/<folder>/` in the card's interface. The folder name comes from the pack's name: lower case, every run of characters other than `a-z` and `0-9` becomes `-`, at most 32 characters, `bundle` when nothing is left (a name with no Latin letters), and `-2`, `-3` added when the folder is taken. The pack's entry file is renamed `index.tsx` inside it.

On the first install with an interface, the card's own entry file moves to `__user-root.tsx`, and `index.tsx` becomes a generated file that draws the card's screen with every installed pack on top. Do not edit the generated `index.tsx`; Yumina writes it again on each install and removal.

- **Keep both screens**: the pack is an overlay, or a button in the App dock when it exports `app`.
- **Replace the current screen**: the pack's default export becomes the whole screen. The card's own interface stays as a file, unused, and comes back when the pack is removed.
- **Leave its screen out**: no files are copied.

### Into a Situation

Dropping a pack onto a situation on the canvas installs it there: its entries and behaviors that had no situation of their own belong to that situation. Its variables stay the card's.

## Removing a Pack

The trash icon on the pack's frame takes out exactly what the install added: entries, variables, behaviors, audio tracks, folders, situations and the interface folder. A screen it replaced comes back. When the installer has edited the pack's parts since, Yumina warns first.

## New Versions

When the author publishes a new version, cards that installed the pack from the Resource market show an update button on its frame. Updating swaps in the new version under the same install, then puts back whatever the installer had changed in the old one (unless they choose the author's). Values from the settings form are always kept.
