1
Skin-Creation-Workflow
adtpdn edited this page 2026-07-01 15:41:26 +08:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Skin Creation Workflow

How to author a new character skin and register it in the in-game shop.

1. Create the Skin Material

Use the in-editor tool to build a color-maskable 3D material for a new character skin.

  • Open the Skin Shader Generator: res://scenes/tools/skin_shader_generator.tscn
  • Run the scene (F6).
  • Import your base albedo and mask textures.
  • Use the UI to visualize UV overlays and adjust color channels (Red, Green, Blue, Alpha masks).
  • Export the configured material as a .tres file into assets/materials/skins/.

2. Add the Skin to the Shop

Update the game's catalog. The editor tool rewrites both the local script and the server-side module in one click.

  • Open the Skin Catalog Editor: res://scenes/tools/skin_catalog_editor.tscn
  • Press F6 (or Right-click → Run Current Scene).
  • Click " New Skin" and fill in:
    • ID
    • Name
    • Category
    • Price (Gold / Stars)
    • The .tres material path exported in step 1.
  • Click "💾 Save & Generate". This rewrites:
    • res://scripts/managers/skin_manager.gd (local catalog)
    • res://server/nakama/tekton_admin.js (server-side shop logic)

Flow

flowchart TD
    subgraph phase1 [Skin Material Creation]
        A[Albedo & Mask Textures] --> B{Skin Shader Generator}
        B -->|Export| C[material.tres]
    end

    subgraph phase2 [Catalog Definition]
        C --> D{Skin Catalog Editor}
        D -->|Save & Generate| E[tekton_admin.js]
        D -->|Save & Generate| F[skin_manager.gd]
    end

    subgraph phase3 [Shop Backend]
        E -->|SSH & nano| G[VPS: ~/tekton_admin.js]
        G -->|docker cp| H[Nakama Container]
        H -->|Restart| I[Live Shop Logic Sync]
    end

    subgraph phase4 [Asset Delivery]
        C --> J[Git Push]
        F --> J
        J -->|CI/CD| K[patch.pck]
        K -->|Auto Download| L[Player Client Assets]
    end

After step 2, follow the Nakama Deployment page to sync the backend, then the Patch Release Workflow page to ship the assets.