Craft a Goal Planner import string
craft_import_stringGenerate a RuneLite Goal Planner import code from structured goals. Preview the goal list, then confirm to receive paste-ready code.
Instructions
Build a RuneLite Goal Planner import code from a structured goal spec — either ONE section (goals[], GPSHARE1 wire, imports on every plugin build) or MULTIPLE sections at once (sections[], GPSHARE2 wire, including default-plan targeting with reuse-dedup). By DEFAULT (no confirm) it returns a rendering of the goal list as it will appear — section header, each goal with its type/target, prerequisites nested as a guide tree, and per-goal tracking badges — plus warnings, and NO code. Show that to the user so they can adjust the goals; re-run for an updated preview. Only once they confirm it matches their intent, call again with the same goals and confirm:true to receive the paste-ready code. Supports simple goals and complex prerequisite trees (wire via id + requires/orRequires). CRAFTING CONVENTIONS: (1) Keep sections FLAT — never invent parent/summary CUSTOM goals (e.g. an "X log complete" goal requiring the items) unless the user explicitly asks for that structure; a list of items is just the item goals. (2) Prefer typed goals over CUSTOM with a narrative name — account-shaped goals ("maintain quest cape", "reach elite combat achievements", "2100 total level") should be type ACCOUNT with the PHRASE as name: the resolver implies the metric AND milestone, and the goal displays the canonical metric name. Only pass an explicit accountMetric constant when you need a custom display name — usually you don't.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "section" = import as a new named section; "goals" = loose goals (land in a "Shared goals" section). Ignored when sections[] is used. | |
| sectionName | No | Name for the new section (mode "section"). | |
| sectionColorRgb | No | Section colour 0xRRGGBB; -1 = default. | |
| sharedBy | No | Attribution shown in the import prompt. | |
| goals | No | Single-section form: the goals to encode (GPSHARE1 wire — every plugin build imports it). Relations are wired by id via requires/orRequires. | |
| sections | No | Multi-section form: several sections in ONE code (GPSHARE2 wire — recipients need a recent plugin build). Each entry imports as its own section; an entry with targetDefault:true lands in the recipient's Default plan with reuse-dedup. Goals may require goals in OTHER sections by their explicit id (emitted as cross-section edges). Use this OR goals, not both. | |
| confirm | No | Omit/false to get a preview ONLY (no code). Set true to emit the import code after the user confirms the preview. |