with one click
asset-generator
游戏资产生成技能。调用外部 AI 服务生成 3D 模型、贴图、音效等资产, 并自动导入到 Godot 项目中。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
游戏资产生成技能。调用外部 AI 服务生成 3D 模型、贴图、音效等资产, 并自动导入到 Godot 项目中。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
当 Godot 代码中存在通过 get_node()、get_parent() 或直接引用产生的紧耦合依赖时使用。 检测耦合模式并将其转换为基于 Signal 的通信方式。组件变得独立、可测试且可复用。 在改进架构的同时精确保留原有行为。
当 Godot 代码中存在相互冲突的操作导致未定义行为时使用。检测同一属性在多处设置 (_ready、_process、代码+编辑器)、同一 Signal 多次连接、冲突的物理模式、 竞争的动画等问题。自动通过明确的所有权归属解决冲突。
用于创建带有自定义面板、停靠栏和工具的 Godot 编辑器插件。生成 plugin.cfg 配置、 EditorPlugin 脚本模板、自定义编辑器 UI 组件,并集成 ProjectSettings。按照 Godot 4.x 最佳实践创建完整的插件结构。
当 Godot 代码中存在硬编码的游戏数据(如 const 数组、字典或内嵌值)时使用。检测内联数据 如敌人属性、物品定义、关卡配置等。自动提取为 .tres Resource 文件,使数据在编辑器中 可见、易于修改,并支持数据驱动的设计。
当构建 Godot 功能时,代码使用 .new() 创建节点而非使用场景时触发。 检测 Timer.new()、Area2D.new()、Sprite2D.new() 等代码创建的对象。 自动生成 .tscn 场景文件,更新父脚本使用 @onready 引用,并创建可复用的组件库。
当 Godot 项目在编辑器(.tscn)和代码(.gd)之间存在位置冲突、相机跟随背景、 或运行时位置与编辑器预览不匹配时使用。编排所有 3 个位置同步子技能: sync-static-positions、sync-camera-positions 和 sync-parallax。 每个操作针对特定的位置冲突类型。
| name | asset-generator |
| description | 游戏资产生成技能。调用外部 AI 服务生成 3D 模型、贴图、音效等资产, 并自动导入到 Godot 项目中。 |
| version | 1.0.0 |
| dependencies | ["godot-core","file-manager","external-api"] |
| triggers | [{"pattern":"生成模型|生成贴图|生成材质|生成音乐|生成音效|生成角色|创建资产"}] |
| inputs | [{"name":"asset_type","type":"string","enum":["model_3d","texture","sprite","music","sfx","voice"],"required":true},{"name":"prompt","type":"string","required":true},{"name":"style","type":"string","required":false}] |
| outputs | [{"name":"asset_path","type":"string","description":"生成的资产在项目中的路径"},{"name":"manifest_entry","type":"object","description":"添加到 manifest.json 的条目"}] |
通过 AI 服务生成游戏资产,并自动导入 Godot 项目。
| 资产类型 | 首选服务 | 备选服务 | 输出格式 |
|---|---|---|---|
| 3D 模型 | Meshy.ai | Tripo3D | .glb |
| 贴图 | Stable Diffusion | Leonardo.ai | .png |
| 精灵图 | Stable Diffusion | - | .png |
| 背景音乐 | Suno | - | .ogg |
| 音效 | - | - | .wav |
| 语音 | ElevenLabs | - | .ogg |
用户提示 → AI 生成 → 下载 GLB → 导入 Godot → 更新清单
{style} {character_type} character, game-ready model, T-pose,
low-poly ({poly_count} triangles), clean topology,
{texture_style} texture, full body
示例:
cartoon fantasy knight character, game-ready model, T-pose,
low-poly (5000 triangles), clean topology,
hand-painted texture, full body
{item_name}, game prop, {style} style,
{poly_count} polygons, centered, {material_description}
示例:
medieval sword, game prop, stylized fantasy style,
2000 polygons, centered, metallic blade with leather-wrapped handle
{environment_object}, game asset, modular,
{style} style, optimized for games, {additional_details}
{
"import_options": {
"generate_collisions": false,
"generate_lightmap_uv": false,
"create_shadow_mesh": true,
"scale": 1.0,
"offset": [0, 0, 0],
"import_animations": true
}
}
seamless tileable {material} texture, top-down view,
high detail, 4k resolution, pbr ready, {additional_details}
示例:
seamless tileable stone floor texture, top-down view,
high detail, 4k resolution, pbr ready, medieval dungeon style
{character} sprite, {view} view, {style} style,
transparent background, game asset, {size} pixels
示例:
pixel art knight sprite, side view, 16-bit style,
transparent background, game asset, 64x64 pixels
game UI icon, {item_name}, flat design style,
{color_scheme} colors, transparent background, {size}x{size}
2D game tileset, {theme} theme, {tile_size}x{tile_size} tiles,
{count} variations, top-down view, seamless edges
| 用途 | 推荐尺寸 | 说明 |
|---|---|---|
| 角色精灵 | 64x64, 128x128 | 2D 游戏角色 |
| UI 图标 | 32x32, 64x64 | 物品、技能图标 |
| 贴图 | 512x512, 1024x1024 | 3D 模型贴图 |
| 背景 | 1920x1080 | UI 背景 |
| Tileset | 16x16, 32x32 per tile | 地图瓦片 |
{
"import_options": {
"compress_mode": "lossless",
"mipmaps": true,
"filter": true,
"repeat": "enabled",
"size_limit": 0
}
}
{genre} {mood} music, {tempo} bpm, {instruments},
game soundtrack, {duration} seconds, loop-ready
场景音乐示例:
| 场景 | 提示词 |
|---|---|
| 主菜单 | orchestral epic theme, moderate tempo, strings and brass, game soundtrack, 90 seconds, loop-ready |
| 探索 | ambient atmospheric music, slow, piano and synth pads, mysterious mood, 120 seconds, seamless loop |
| 战斗 | intense action music, fast 140bpm, drums and orchestra, battle theme, 60 seconds, loopable |
| Boss 战 | epic boss battle music, dramatic, choir and orchestra, intense and climactic, 90 seconds |
| 胜利 | triumphant victory fanfare, uplifting, brass and strings, short 15 seconds |
音效通常需要组合或后处理,建议:
常用音效类型:
interface VoiceConfig {
character_name: string;
voice_id: string; // ElevenLabs voice ID
personality: string; // "wise old man" | "young hero" | "villain"
emotion: string; // "neutral" | "angry" | "sad" | "happy"
}
// 批量生成对话
interface DialogueLine {
id: string;
text: string;
emotion?: string;
}
{
"music_import": {
"loop": true,
"bpm": 120,
"beat_count": 0
},
"sfx_import": {
"loop": false
}
}
{
"version": "1.0.0",
"last_updated": "2026-04-16T10:30:00Z",
"assets": {
"models": [],
"textures": [],
"audio": {
"music": [],
"sfx": [],
"voice": []
}
}
}
{
"id": "model_player_knight",
"name": "Player Knight",
"type": "model_3d",
"path": "res://assets/models/characters/player_knight.glb",
"source": {
"service": "meshy.ai",
"prompt": "cartoon fantasy knight character...",
"generation_date": "2026-04-16T10:30:00Z",
"task_id": "task_abc123"
},
"metadata": {
"poly_count": 5000,
"has_animations": true,
"animations": ["idle", "walk", "run", "attack"],
"materials": ["body", "armor", "weapon"]
},
"tags": ["player", "character", "knight", "humanoid"]
}
func add_asset_to_manifest(asset_info: Dictionary) -> bool:
var manifest_path = "res://assets/manifest.json"
var manifest = load_json(manifest_path)
if manifest == null:
manifest = {
"version": "1.0.0",
"last_updated": "",
"assets": {
"models": [],
"textures": [],
"audio": {"music": [], "sfx": [], "voice": []}
}
}
# 根据类型添加到对应数组
var asset_type = asset_info.get("type", "")
match asset_type:
"model_3d":
manifest.assets.models.append(asset_info)
"texture", "sprite":
manifest.assets.textures.append(asset_info)
"music":
manifest.assets.audio.music.append(asset_info)
"sfx":
manifest.assets.audio.sfx.append(asset_info)
"voice":
manifest.assets.audio.voice.append(asset_info)
manifest.last_updated = Time.get_datetime_string_from_system()
return save_json(manifest_path, manifest)
{
"batch_generate": {
"characters": [
{
"id": "player",
"prompt_template": "cartoon {class} character",
"variants": ["knight", "mage", "archer"]
}
],
"items": [
{
"category": "weapons",
"items": ["sword", "staff", "bow"],
"style": "fantasy medieval"
}
]
}
}
async function batchGenerate(config: BatchConfig): Promise<BatchResult[]> {
const results: BatchResult[] = [];
for (const item of config.items) {
// 控制并发,避免 API 限制
await delay(1000);
const result = await generateAsset(item);
results.push(result);
// 更新进度
console.log(`Generated ${results.length}/${config.items.length}`);
}
return results;
}