Cross-module Integration
The Item module is a shared source for equipment, materials, consumables, and display items. Other modules can reference EmakiItem ids through CoreLib item sources. The recommended shorthand format is emakiitem-item_id.
Common integration points
| Scenario | Recommended approach |
|---|---|
| Recipe material | Reference the EmakiItem id in item_sources. |
| Equipment base | Store attributes, components, set data, triggers, and PDC in the item definition. |
| Skill consumable | Check item source in skill conditions or actions. |
| Gem or strengthen material | Use stable ids instead of display name or lore matching. |
Forge example
yaml
materials:
- item_sources:
- "emakiitem-shadow_ingot"
amount: 3
capacity_cost: 5Gem example
Gem definitions use item_sources to identify gem items:
yaml
id: "ruby_t1"
display_name: "<red>Ruby I</red>"
gem_type: "attack"
item_sources:
- "emakiitem-ruby_t1"
socket_compatibility:
- "attack"
- "universal"Socket item definitions use match.item_sources to decide which equipment can have sockets:
yaml
match:
item_sources:
- "emakiitem-shadow_blade"
slot_groups:
- "weapon"Strengthen example
yaml
stars:
1:
materials:
- item_sources:
- "emakiitem-strengthen_stone"
amount: 1Use PDC as the real data layer and lore as presentation only. This prevents language, color, or external lore changes from breaking gameplay logic.