Skip to content

Import / Export

Belongs to: Developer · Related: Commands

QI supports importing items from MMOItems / NeigeItems, as well as packing content into .qipack for export / import.

🧭 Want the full migration steps + field mapping reference table + dry-run interpretation? See Import / Export Hands-on Manual.


1. Import External Items

Place MMOItems / NeigeItems item configs into the plugins/QinhItems/imports/ directory, then import them with a command.

CommandPurpose
/qi importsShow number of import files
/qi imports listList import files
/qi imports runExecute import
/qi imports dry-runPreview (does not actually import)
/qi migrateMigrate legacy item sources (with validation)
/qi migrate dry-runPreview migration

Supported Formats

FormatImported Content
mmoitemsbase.*, stats, ability, permission, required-level, required-class, perm-effects
neigeitemssections, FancyDrop, actions, actions_file, data
genericFallback for unknown formats

MMOItems Attribute Mapping

  • Core attributes → base values: attack-damagebase_attack_damage, max-healthbase_health, defensebase_defense.
  • Normal attributes: attack-speed, magic-damage, armor-penetration, max-mana, mana-regeneration.
  • Ratio attributes (÷100): critical-strike-chancecritical_rate, dodge-rating, block-rating, lifesteal.

MMOItems Skill Mapping (ability → trigger)

MMOItemsQI Trigger
attack / on_hiton_damage
damaged / when_hiton_hit
right_click / left_click / shift_*same name
sneakshift_toggle
kill_entityon_kill
shoot_bowbow_shoot
shoot_tridenttrident_throw
death / logindeath / join

Restriction Mapping

MMOItemsQI
required-level: Nlevel:N
required-class: A,Bclass:A,B (delegated to QinhItemUseCheckEvent)
permission: Xpermission:X

API

kotlin
QinhItemImportService.importAll(dryRun = false): ImportReport
QinhItemImportService.migrateLegacySources(dryRun): ImportReport
QinhItemImportService.importFiles(files, dryRun): ImportReport

ImportReport contains: number of scanned files, import count, imported IDs, per-format counts, mapped fields, generated sections / affixes, warnings / errors.


2. Content Packs (.qipack)

Pack the current QI content (sections / affixes / layer snapshots referenced by items) into a single file, for easy cross-server distribution.

CommandPurpose
/qi packsShow number of pack files and directory
/qi packs listList pack files
/qi packs exportExport all content to a file
/qi packs importImport (= apply / sync)
/qi packs syncSync (refresh + export)
/qi packs applyApply (= sync)
/qi packs guiOpen the content pack editing GUI

Export

kotlin
QinhItemPackExportService.exportAll(targetFileName = "qinhitems-pack.yml"): PackExportReport

Export structure: metadata (counts, IDs, per-format distribution, schema version) + sections + affixes + layerSnapshots + each item's section_ids / affix_ids / layer_summary.

Import

kotlin
QinhItemPackImportService.importFile(file): PackImportReport

Import validates whether the declared count matches the actually loaded count (structureMismatch / mismatchSummary); when metadata is missing, it falls back to computing from node keys.


3. Import Artifact Conversion

kotlin
QinhItemImportArtifacts.toSection(id, mappingResult): QinhSection
QinhItemImportArtifacts.toAffix(id, mappingResult): QinhAffix

Convert the import mapping result into sections / affixes, and register them into the layer system.


Next Steps