Skip to content

EmakiForge Overview

EmakiForge is a recipe-driven forging system that provides quality randomization, material contribution calculation, recipe compendium, runtime editor, and PDC attribute writing capabilities. Players combine equipment through blueprints and materials in the forging GUI, and the system generates the final product based on material contributions and quality modifiers.

Basic Information

PropertyValue
Module IDemaki-forge
Version3.3.0
Main Classemaki.jiuwu.craft.forge.EmakiForgePlugin
Root Command/emakiforge
Aliases/eforge, /ef
Hard DependenciesEmakiCoreLib
Soft DependenciesEmakiAttribute, PlaceholderAPI

Core Responsibilities

  • Recipe Forging — Execute the complete forging pipeline based on blueprints, materials, and recipes
  • Material Contribution — Handle material attribute contributions, capacity consumption, and quality modifiers
  • Quality System — Support quality pools, pity counters, material quality modifiers, and weighted randomization
  • Result Reconstruction — Build forge layer snapshots via ForgeLayerSnapshotBuilder, write to PDC, and reconstruct item display
  • GUI System — Provide forging GUI, recipe book GUI, and runtime resource editor
  • Hot-reload Editing — Support runtime editing of blueprints/, materials/, recipes/ with automatic backups
  • Item Refresh — Automatically refresh forge layers when item signatures change via ForgeItemRefreshService

Configuration Files

config.yml

yaml
# Config file version, do not modify manually
config_version: 3

# Language setting
language: zh_CN

# Release default data (recommended to set to false after first launch)
release_default_data: true

# ===== Quality System =====
quality:
  # Quality tier definitions, format: "name-weight-multiplier"
  # Higher weight = more likely to be drawn, multiplier affects final material contribution values
  tiers:
    - "粗糙-40-0.6"
    - "普通-30-1.0"
    - "精良-20-1.3"
    - "史诗-8-1.6"
    - "传说-2-2.0"

  # Default quality tier (used when quality cannot be determined)
  default_tier: "普通"

  # Pity system
  guarantee:
    # Enable pity counter
    enabled: true
    # Threshold for consecutive non-high-quality results, forces specified quality when reached
    count: 50
    # Quality name forced when pity triggers
    tier: "史诗"

  # Quality display on items
  item_meta:
    # Structured presentation configuration
    structured_presentation:
      name_contributions:
        quality_prefix:
          order: 0
          format: "{quality} "

# Number formatting
number_format: "#.##"

# Permission configuration
permission:
  # Whether to enable permission checks
  enabled: true

# Condition system
condition:
  # Global conditions (shared by all recipes)
  global: []

# History records
history:
  # Whether to record forging history to player data
  enabled: true
  # Maximum number of records to keep
  max_records: 100

Note

config_version is automatically managed by the plugin for configuration migration. Do not modify this value manually, as it may cause configurations to be overwritten or migration anomalies.

Quality Tier Format

Quality tiers are defined using the compact "name-weight-multiplier" format:

FieldDescriptionExample
NameDisplay name of the quality传说
WeightWeight for weighted randomization, higher = more likely2
MultiplierMaterial contribution multiplier, affects final attribute values2.0

File Directory Structure

plugins/EmakiForge/
├── config.yml              ← Main configuration file
├── lang/                   ← Language file directory
│   └── zh_CN.yml
├── gui/                    ← GUI configuration directory
│   ├── forge_gui.yml       ← Forging interface
│   ├── recipe_book.yml     ← Recipe book interface
│   └── editor_gui.yml      ← Editor interface
├── recipes/                ← Forging recipe directory (hot-reloadable)
│   └── example_sword.yml
├── blueprints/             ← Blueprint definition directory (hot-reloadable)
│   └── iron_sword.yml
├── materials/              ← Material definition directory (hot-reloadable)
│   └── common_materials.yml
├── playerdata/             ← Player data directory
│   └── <uuid>.yml
└── backups/                ← Editor auto-backup directory
    └── recipes/
        └── <timestamp>/

Tip

The recipes/, blueprints/, and materials/ directories support runtime hot-reload editing. When modified through the editor, the system automatically creates timestamped backups in the backups/ directory.

Key Services

ServiceDescription
ForgeServiceCore forging service, coordinates the entire forging pipeline
ForgeExecutionServiceForging execution service, handles actual forging logic
RecipeBookGuiServiceRecipe book GUI service
ForgeGuiServiceForging GUI service
EditorGuiServiceEditor GUI service
EditorGuiRendererEditor renderer
EditorPersistenceServiceEditor persistence service (validate → backup → write → reload)
ForgeLayerSnapshotBuilderForge layer snapshot builder, writes forging results to PDC
ForgeItemRefreshServiceItem refresh service, auto-refreshes forge layer on signature change

Released under the GPL-3.0 License