Reference guide for PKO (Pirates King Online) game client source code. Use this skill when you need to understand: (1) Game 3D file format specifications (.lgo, .lmo, .lws, .lac files), (2) How the game engine uses character, mesh, animation, or map data, (3) Verify if current import/export code correctly handles game file structures, (4) Understand bone/skeleton hierarchies, texture mapping, or animation systems, (5) Debug or validate any aspect of the file conversion between PKO formats and glTF.
This skill provides guidance for referencing the PKO game client source code located in client-src/ (symlink to /mnt/i/Work/Client2019). The source code contains the authoritative implementation of how the game engine loads and uses 3D models, animations, textures, and other game assets.
Reference the client source code when:
.lgo, .lmo, .lws, .lac, or other game filessrc-tauri/src/character/ correctly handles game dataThe client source is organized into three main directories:
client-src/Engine/sdk/)Core 3D engine implementation with low-level file loading and rendering:
include/: Header files defining data structures and APIs
MPCharacter.h: Character loading, bone system, pose/animation APIMPMap.h, MPMapData.h: Map loading and terrainMPModelEff.h: Model effects and renderinglwModel.h, lwModelObject.h: Core model data structureslwAnimCtrl.h, lwAnimKeySetPRS.h: Animation control and keyframe systemslwSysCharacter.h: Character system implementationsrc/: Implementation files (.cpp)
MPCharacter.cpp: Character loading logiclwModel.cpp: Model file parsinglwAnimCtrl.cpp, lwAnimKeySetPRS.cpp: Animation implementationMPMapData.cpp: Map data structuresclient-src/Client/src/)Game client implementation with higher-level game logic:
Character.cpp, Character.h: Game character class (extends CharacterModel)CharacterModel.cpp, CharacterModel.h: Character model management, part loading, item attachment
Actor.cpp, Actor.h: Base actor class for game entitiesclient-src/Common/)Shared utilities and data structures used by both engine and client.
Characters are loaded with:
LW_MAX_SUBSKIN_NUM separate mesh parts (head, body, legs, etc.)See MPCharacter.h:38-52 for MPChaLoadInfo structure.
Characters have 16+ predefined link points for attaching items/effects:
dummy_0 through dummy_15: Attachment points (head, hands, chest, feet, etc.)CharacterModel.h:46-66Most game files follow this pattern:
MPCharacter::Load(), lwModel::Load())character/, model/, animation/ folders)When you need to reference the client source:
Identify the Question: What specific aspect do you need to understand?
.cpp files.h) for structure definitionsFind Relevant Files:
MPCharacter.h/.cpp, CharacterModel.h/.cpplwAnimCtrl.h/.cpp, lwAnimKeySetPRS.h/.cpplwModel.h/.cpp, lwModelObject.h/.cppMPMap.h/.cpp, MPMapData.cppRead the Implementation:
Use Read tool to examine the relevant source files
Focus on structure definitions, file loading functions, and data processing
Cross-Reference with Current Code:
src-tauri/src/character/Document Findings: When you discover important details, consider noting them for future reference
MPCharacter::LoadBone())MPCharacter::InitBone() and LoadBone() in MPCharacter.cppsrc-tauri/src/character/model.rs bone parsinglwAnimCtrl.h for animation control structureslwAnimKeySetPRS.h for keyframe data (Position, Rotation, Scale)PlayPose() functionssrc-tauri/src/character/animation.rs handles animation data correctlyCharacterModel.h:46-66 for link point definitionsAttachItem() functions.h): They define structures and APIs without implementation details.cpp): Shows actual data processing and file formatsLW_MAX_SUBSKIN_NUM, LINK_ID_HEAD define important limitsfread(), fopen(), byte-by-byte parsing to understand file structuresUser asks: "How are character bones stored in the .lgo file?"
Response:
client-src/Engine/sdk/src/MPCharacter.cpp focusing on LoadBone() functionsrc-tauri/src/character/model.rs bone parsingUser asks: "What does the link_item_id field mean in character files?"
Response:
client-src/Engine/sdk/include/MPCharacter.h for lwSceneItemLinkInfo structureclient-src/Client/src/CharacterModel.h for link point definitionslink_item_id is used in attachment functionsFor detailed code exploration, see:
下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer