Skip to content

EmakiForge

EmakiForge runs the forging flow. Players place target equipment, blueprints, and materials; the module checks recipe requirements, capacity, and conditions, then modifies the target item or creates a new result.

Module facts

ItemValue
Module version4.6.0
Main command/emakiforge
Aliases/eforge, /ef
Hard dependencyEmakiCoreLib
Soft dependencyEmakiAttribute, EmakiItem, PlaceholderAPI
Main permissionsemakiforge.use, emakiforge.book, emakiforge.reload, emakiforge.debug, emakiforge.admin

Core concepts

ConceptDescription
BlueprintControls whether a player can use a forging recipe.
MaterialResources the player adds to influence success, quality, or final attributes.
RecipeDefines input requirements, capacity, conditions, results, and actions.
CapacityLimits the sum of capacity_cost across inserted materials.
QualityDeterministic weighted outcome tier, optionally with pity.
Recipe bookGUI used to inspect available recipes.

Default runtime folder

text
plugins/EmakiForge/
├── config.yml
├── recipes/
│   └── example_recipe.yml
├── gui/
│   ├── forge_gui.yml
│   └── recipe_book.yml
├── lang/
│   ├── zh_CN.yml
│   └── en_US.yml
└── data/

Start with recipes/. That folder defines forging inputs, capacity, conditions, results, and actions. data/ is maintained by PlayerDataStore and holds one <uuid>.yml per player with craft counters and pity counters. The bundled example script is released by CoreLib to plugins/EmakiCoreLib/scripts/examples/forge_success.js.

Pages

PageContent
CommandsForging, recipe book, reload, list, and debug commands.
RecipesInputs, blueprints, results, actions, and recipe matching.
MaterialsMaterial contribution, capacity, quality modifiers, and effect writes.
QualityQuality pools, pity, item metadata, and deterministic logic.
Forge HistoryPlayer forging data, autosave, and troubleshooting.
GUIForge UI and recipe book templates.
AuditForge audit data and material signature on result items.
PlaceholdersPlaceholderAPI output.
CoreLib ActionsRefresh actions registered by Forge.
APIThe EmakiForgeApi static facade.
EventsForgeStartEvent, ForgeCompletedEvent.
JavaScriptForge chance rules and result hooks.

Typical forging flow

  1. Open the forge GUI with /ef forge.
  2. Place a blueprint in the blueprint slots; Forge matches the recipe by blueprint item source.
  3. Place materials in the required and optional material slots.
  4. Check recipe, condition, capacity, and material count.
  5. Click the confirm slot to run actions.pre.
  6. Resolve deterministic quality and pity from the player, recipe, and material fingerprint.
  7. Create the primary item from result.success.outputs and attach the forge layer snapshot.
  8. Run result.success.actionsactions.success → quality actions; on failure run actions.failure.
  9. The CoreLib item assembly service rebuilds the item presentation.
  10. With EmakiAttribute installed, ea_attribute material effects are written to the structured PDC attribute layer.

Relation with Attribute

Forge can run basic forging without Attribute. The ea_attribute material effect requires EmakiAttribute: attributes are written through the EmakiAttribute authoritative API into a structured PDC layer, so the numbers participate in real combat calculation instead of only appearing in lore.

When EmakiAttribute is absent, Forge takes a no-op path: forging still completes, it simply does not write attribute payloads, and no error is raised.

JavaScript access

CoreLib JavaScript scripts can query Forge through emaki.module("forge"). The current public API exposes readiness and identity probes only; actual forging still runs through recipes, GUI, and action flows.

js
function main(ctx) {
  if (emaki.module("forge").available() && emaki.module("forge").ready()) {
    emaki.logger.info("Forge API version=" + emaki.module("forge").apiVersion());
  }
  return true;
}