In-Game Entity Synthesis System Design and Implementation: From Data Modeling to Engineering Practice

    This article presents a practical architecture for an in-game entity synthesis system, covering entity modeling, configurable recipes, DAG-based validation, separation of elemental affinities from synthesis and combat, and versioned operations. It explains how to handle entities that are both craftable products and reusable materials while keeping the system maintainable, auditable, and easy to evolve.

    In-Game Entity Synthesis System Design and Implementation: From Data Modeling to Engineering Practice

    1. Starting from “Silky-style” entities: what does a synthesis system need to solve?

    Many role-playing games contain entities that can be synthesized from lower-level materials through multiple recipes, while also serving as materials in higher-level synthesis chains. Consider a female household-spirit character from a well-known series: across different titles, the same entity may act as a low-level craftable product, a combat unit with elemental weaknesses, and a material for later synthesis.

    At first glance, this looks like a small gameplay feature. In practice, it imposes substantial requirements on data structures and engineering implementation. A well-designed synthesis system must answer several questions at the same time:

    • How should entities be modeled? The same entity can differ greatly across titles, game modes, and forms. How can these variations be abstracted consistently?
    • How should recipes be configured? The number of synthesis recipes is large and frequently adjusted. How can recipes be configuration-driven, validated, and hot-updated?
    • How can materials and products be reused? The same entity can be both a product and a material. How can circular dependencies and a chaotic graph structure be avoided?
    • How should elemental affinities be expressed? How can weaknesses, resistances, absorption, and nullification be represented while keeping synthesis and combat decoupled?

    The following sections examine these concerns module by module.

    2. Entity data modeling: abstracting one entity with multiple forms

    2.1 Core entity table design

    A synthesis system is built on a unified entity definition table. Each entity should contain at least the following fields:

    • Unique identifier (ID): a globally unique anchor for cross-system references;
    • Arcana/category: the category axis to which the entity belongs, such as “Priestess,” “Fool,” or “Death” in a Tarot-based system. This is essentially an enum value;
    • Initial level: determines the base values used during synthesis and eligibility for recipe formulas;
    • Affinity set: combat affinities such as weakness, resistance, absorption, and nullification, represented as structured lists rather than natural-language descriptions.

    An illustrative configuration structure looks like this:

    1. {
    2. "id": 10001,
    3. "name": "household-spirit-type character",
    4. "arcana": "PRIESTESS",
    5. "level": 6,
    6. "resistances": {
    7. "weak": ["FIRE", "ELEC"],
    8. "resist": ["ICE"]
    9. },
    10. "skills": ["HEAL_SINGLE", "HEAL_ALL", "ICE_ATTACK"],
    11. "tags": ["SYNTH_PRODUCT", "SYNTH_MATERIAL"]
    12. }

    The tags field deserves special attention. Explicitly marking an entity as “craftable,” “usable as a material,” or “available through a shop” is more robust than hard-coding conditions in code. When operations teams need to change an entity to “limited-time acquisition” for a specific release, they only need to adjust the tags and acquisition-channel configuration. No business code needs to change.

    2.2 Handling differences across forms

    The same entity often behaves differently across titles or gameplay modes. In title A, it may be a level 6 synthesis product. In title B, it may have its own weaknesses and resistances. In title C, it may become part of another system with classes, freeze attributes, and three stats for HP, attack, and defense.

    A recommended approach is a two-layer structure: entity definition + form overlay:

    • The base layer records information that remains consistent across titles, such as name, archetype, and category;
    • Each form is an independent overlay configuration containing that form’s level, stats, skill list, and affinity relationships.

    This avoids stuffing every field into a single wide table, which leads to sparse and confusing data. It also turns the addition of a new title-specific form into a pure configuration task.

    3. Recipe configuration and graph management

    3.1 Binary synthesis as the base pattern

    Most synthesis systems use “two materials produce one product” as their base pattern. For example: “low-level initial mask × Hermit-type material → target product.” Recipe configuration is critical to the extensibility of the entire system. The following structure is recommended:

    1. {
    2. "recipe_id": "R_0001",
    3. "materials": [
    4. {"arcana": "FOOL", "level_range": [1, 1]},
    5. {"arcana": "HERMIT", "level_range": [4, 4]}
    6. ],
    7. "result_rule": "LEVEL_BASED_POOL"
    8. }

    There are two mainstream strategies for determining the result:

    1. Fixed mapping: a material combination uniquely determines the product. This makes player expectations clear and designer configuration intuitive.
    2. Level-pool rules: the categories and levels of the materials fall into a certain range, and a product is selected from the candidate pool for that range. This reduces configuration volume and enables emergent results, but requires more complex validation and prediction tools.

    In practice, a mature approach is to use level-pool rules as the primary mechanism, with a special-case override table as a supplement. The recipe system first checks the override table, such as a specific pair of materials producing a specific product. If an override matches, it returns that result. Otherwise, it falls back to the general rule. This preserves designers’ freedom while keeping configuration volume under control.

    3.2 The directed graph of materials and products

    Because entities are both products and materials, the entire synthesis system naturally forms a directed acyclic graph (DAG). Engineering implementation must guarantee the following:

    • Cycle validation: before any new recipe is stored, cycle detection must be run on the graph. If a cycle such as “A synthesizes B, and B participates in synthesizing A” appears, acquisition logic may fall into an infinite loop or create duplication vulnerabilities.
    • Reachability analysis: when designers add a new entity, tools should automatically answer whether the entity is reachable, meaning whether a valid synthesis path exists from the initial entities.
    • Shortest-path display: the player-facing “synthesis plan” feature is essentially a reverse search over this graph. In engineering terms, it can be implemented as a memoized breadth-first search that weights paths by material cost, such as level and rarity, and finds the optimal route.

    A common pitfall is reusing recipe tables across titles while forgetting that some entities do not exist in the new title, causing recipes to reference dangling IDs. Recipe validation must therefore include referential integrity checks and report errors during the build phase rather than at runtime.

    4. Elemental affinity system: decoupling from synthesis and combat

    Weaknesses, resistances, and other affinity relationships are essentially a two-dimensional “element × entity” matrix. There are three design recommendations:

    1. Store affinity data in a separate table rather than embedding it in the main entity table. This makes it easier for the combat system to load and hot-update independently.
    2. Let affinities affect combat only, not synthesis: the affinities of a synthesis product are determined by the product definition, not inherited from materials. If advanced gameplay genuinely requires materials to affect product attributes, explicit inheritance rules should be designed and annotated in configuration to avoid unexpected outcomes from implicit inheritance.
    3. Separate skills from affinities: the skill table, including healing, elemental attacks, buffs, and other skills, should be maintained independently, with entities referencing skills through ID lists. Skills such as “freeze elemental attack,” “single-target healing,” and “turn-based enhancement” should all be reusable atomic configurations.

    5. Operational requirements: region-limited content and version evolution

    Modern game entity systems must also handle dynamic operational requirements, such as adding limited appearances, limited plush or doll items, or seasonal acquisition channels for specific regions in a specific release. This requires the system to support the following:

    • Version number and effective interval: each configuration carries a minimum version number, and clients trim configuration according to version.
    • Region switches: content distribution is filtered by region, and the server enforces this during delivery.
    • Polymorphic acquisition channels: the same entity can be obtained through synthesis, shops, event exchanges, and other channels. Channel configuration is independent of entity definitions and is unified through an “acquisition entry” abstraction.

    The value of this mechanism is that live operations no longer require client releases; everything can be delivered through configuration. At the same time, the server can accurately audit how every entity is acquired, which helps monitor the in-game economy.

    6. Conclusion

    A seemingly simple gameplay design, in which a low-level character can be synthesized and also used as a material, requires engineering support across five areas: entity modeling, recipe configuration, graph validation, affinity decoupling, and versioned operations. The core principles can be summarized in three statements:

    • Configuration-driven: entities, recipes, affinities, and acquisition channels are all configuration-driven, while code implements only the rules engine.
    • Build-time validation: cycle detection, referential integrity, and reachability analysis are all moved forward into the build pipeline.
    • Layered decoupling: synthesis rules, combat affinities, and operational acquisition channels do not leak into one another and can evolve independently.

    Following these principles allows the system to remain clearly structured and steadily iterable even when synthesis recipes expand to thousands of entries and entities exist across multiple title-specific forms. During implementation, configuration-intensive systems like this have requirements for configuration storage, delivery, and gradual rollout. Mature cloud configuration services, monitoring, and alerting can reduce the cost of building these capabilities internally. For example, object storage can host configuration packages, message queues can broadcast changes, and logging services can audit synthesis behavior. This lets teams focus their effort on gameplay rules themselves.