Polyphase Addons
Addons are content packs that add assets, scripts, and functionality to your existing projects. Unlike templates (which create new projects), addons merge their contents into a project you're already working on.
Using Addons
Opening the Addons Window
Open the Addons window via File > Addons... or the toolbar.
Browsing Addons
- Open the Addons window
- The Browse Addons tab shows all available addons from your configured repositories
- Use the search bar to filter by name
- Click tag buttons to filter by category
- Each addon card shows:
- Thumbnail preview
- Name and author
- Download or "Installed" status
- View More button for details
Installing an Addon
- Find the addon you want in the Browse tab
- Click Download on the addon card, or click View More and then Download
- The addon will be downloaded and its contents merged into your current project
- Assets and scripts from the addon are copied to your project's folders
Managing Installed Addons
- Go to the Installed tab
- View all addons installed in your current project
- Click Update if a newer version is available
- Click Uninstall to remove an addon (note: files already in your project may remain)
Adding Repositories
- Go to the Repositories tab
- Click + Add Repo
- Enter a GitHub URL that hosts addons
- Click Add
- The repository's addons will appear in your Browse tab
Creating Addons
Addons have the same structure as templates, but are designed to be merged into existing projects rather than creating new ones.
Addon Structure
my-addon/
package.json # Required: Addon metadata
thumbnail.png # Optional: Preview image (recommended 256x256)
Assets/ # Assets to add to the project
Textures/
Materials/
Prefabs/
...
Scripts/ # Scripts to add to the project
MyFeature.lua
...
package.json Format
Create a package.json file in your addon's root directory:
{
"name": "Particle Effects Pack",
"author": "Your Name",
"description": "A collection of 50+ particle effects for explosions, magic, weather, and more.",
"url": "https://github.com/yourname/particle-effects",
"version": "1.0.0",
"updated": "2024-01-15",
"tags": ["effects", "particles", "visual", "2D", "3D"]
}
Fields
| Field | Required | Description |
|---|---|---|
name |
Yes | Display name shown in the addon browser |
author |
Yes | Your name or organization |
description |
Yes | What this addon provides |
url |
No | Link to the addon's repository or webpage |
version |
Yes | Semantic version (e.g., "1.0.0") |
updated |
Yes | Last update date (YYYY-MM-DD format) |
tags |
No | Array of tags for filtering |
Key Differences from Templates
| Aspect | Templates | Addons |
|---|---|---|
| Purpose | Create new projects | Add to existing projects |
| Project files | Includes .octp | No .octp file |
| Installation | Copies all files | Merges, skips existing files |
| Use case | Starting points | Feature packs, asset collections |
What Gets Installed
When a user installs your addon:
- Assets/ folder contents are copied to the project's Assets folder
- Scripts/ folder contents are copied to the project's Scripts folder
- Files that already exist are NOT overwritten (prevents accidental data loss)
- package.json and thumbnail.png are NOT copied (metadata only)
- No .octp or .ini files should be included (they would be skipped anyway)
thumbnail.png
Include a thumbnail.png image:
- Recommended size: 256x256 pixels
- Format: PNG with transparency supported
- Shows in the addon browser grid
Creating Addon Repositories
A repository is a GitHub repo that lists multiple addons. This allows you to share a collection of addons from a single URL.
Repository Structure
my-addon-repo/ (repository root)
package.json # Required: Lists all addons
particle-effects/ # Addon 1
package.json
thumbnail.png
Assets/
Scripts/
ui-kit/ # Addon 2
package.json
thumbnail.png
Assets/
Scripts/
audio-manager/ # Addon 3
package.json
thumbnail.png
Assets/
Scripts/
Repository package.json
The root package.json lists all available addons:
{
"name": "My Addon Collection",
"addons": [
"particle-effects",
"ui-kit",
"audio-manager"
]
}
Each addon name in the addons array must match a subdirectory name in the repository.
How It Works
When a user adds your repository URL:
- The editor fetches the root
package.json - It reads the
addonsarray to discover available addons - For each addon, it fetches that addon's
package.jsonfor metadata - All addons appear in the user's Browse tab
Distributing Addons
Single Addon via GitHub
- Create a GitHub repository for your addon
- Ensure
package.jsonis in the repository root - Share the URL (users add it as a repository with one addon)
Addon Collection via GitHub
- Create a GitHub repository with the structure shown above
- Include a root
package.jsonlisting all addon directories - Share the repository URL
- Users get access to all your addons from one repository
Example Repository URLs
- Single addon:
https://github.com/yourname/particle-effects - Addon collection:
https://github.com/yourname/polyphase-addons
Addon Storage
Cache Location
Downloaded addons are cached in:
- Windows:
%APPDATA%/PolyphaseEditor/AddonCache/ - Linux:
~/.config/PolyphaseEditor/AddonCache/
Installed Addon Tracking
Each project tracks its installed addons in:
{ProjectDir}/Settings/installed_addons.json
This file records: - Which addons are installed - What version was installed - When they were installed - Source repository URL
Example: Simple Asset Pack
package.json:
{
"name": "Fantasy UI Elements",
"author": "Polyphase Team",
"description": "A collection of medieval/fantasy themed UI elements including buttons, frames, icons, and fonts.",
"version": "1.0.0",
"updated": "2024-01-15",
"tags": ["UI", "fantasy", "medieval", "2D"]
}
Directory structure:
fantasy-ui/
package.json
thumbnail.png
Assets/
Textures/
UI/
btn_normal.png
btn_hover.png
btn_pressed.png
frame_gold.png
frame_silver.png
icons/
sword.png
shield.png
potion.png
Fonts/
medieval.ttf
Example: Script Addon
package.json:
{
"name": "Save System",
"author": "Polyphase Team",
"description": "A flexible save/load system supporting multiple save slots, auto-save, and cloud sync hooks.",
"url": "https://github.com/polyphase-engine/addon-save-system",
"version": "2.0.0",
"updated": "2024-03-20",
"tags": ["utility", "save", "persistence"]
}
Directory structure:
save-system/
package.json
thumbnail.png
README.md
Scripts/
SaveSystem/
SaveManager.lua
SaveSlot.lua
Serializer.lua
CloudSync.lua
Example: Full Addon Repository
Root package.json:
{
"name": "Official Polyphase Addons",
"addons": [
"particle-effects",
"ui-kit",
"save-system",
"audio-manager",
"dialogue-system"
]
}
Repository structure:
polyphase-official-addons/
package.json
README.md
particle-effects/
package.json
thumbnail.png
Assets/
Scripts/
ui-kit/
package.json
thumbnail.png
Assets/
save-system/
package.json
thumbnail.png
Scripts/
audio-manager/
package.json
thumbnail.png
Scripts/
dialogue-system/
package.json
thumbnail.png
Assets/
Scripts/
Best Practices
For Addon Creators
- Avoid conflicts - Use unique prefixes for your assets and scripts (e.g.,
MyAddon_PlayerController.lua) - Document dependencies - If your addon requires other addons, mention it in the description
- Include a README - Explain how to use your addon's features
- Version properly - Use semantic versioning and update the version when making changes
- Test in fresh projects - Ensure your addon works when merged into various project types
For Repository Maintainers
- Organize by category - Group related addons together
- Keep descriptions accurate - Help users find what they need
- Update regularly - Remove broken addons, update versions
- Use clear naming - Addon directory names become their IDs
For Users
- Review before installing - Check what files an addon will add
- Backup your project - Before installing large addons
- Check for updates - Newer versions may have bug fixes
- Report issues - Help addon creators improve their work