An open API service indexing awesome lists of open source software.

https://github.com/jieice/proceduralnpc

Complete procedural horror NPC system for Godot 4.x
https://github.com/jieice/proceduralnpc

game-assets game-development gdscript godot godot-engine godot4 horror-game indie-game jumpscare npc open-source procedural-generation

Last synced: 3 months ago
JSON representation

Complete procedural horror NPC system for Godot 4.x

Awesome Lists containing this project

README

          

# ProceduralNPC v4.0 🎮👻

[![Godot Engine](https://img.shields.io/badge/Godot-4.x-blue.svg)](https://godotengine.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Version](https://img.shields.io/badge/Version-4.0-green.svg)](CHANGELOG.md)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/yourusername/ProceduralNPC/pulls)

**完全程序化的恐怖NPC生成系统 | Complete Procedural Horror NPC System**

一个为Godot 4.x设计的商业级程序化NPC生成器,无需任何3D建模软件,纯代码生成!

*A commercial-quality procedural NPC generator for Godot 4.x - No 3D modeling software required, pure code!*

---

## 📸 截图展示 | Screenshots

![Cover](Screenshots/cover.png)
*封面展示 | Cover Image*

![Jumpscare Demo](Screenshots/jumpscare_demo.png)
*跳脸效果演示 | Jumpscare Effect Demo*

![Editor Preview](Screenshots/editor_preview.png)
*编辑器实时预览 | Real-time Editor Preview*

---

## ✨ 核心特性 | Core Features

| 功能 | 说明 |
|------|------|
| 🎨 **100%程序化** | 无需Blender,纯代码生成3D模型 |
| 👔 **服装系统** | 夹克、裤子、鞋子,实时调色 |
| 😱 **真跳脸模式** | 无视方向,直接瞬移到摄像机前 |
| 🎛️ **实时编辑器预览** | 所见即所得,Inspector改参数立即生效 |
| 🔧 **防倾斜系统** | 自动旋转矫正,不再歪脖子 |
| 🔴 **红光聚光灯** | 可调节位置/旋转,恐怖氛围拉满 |
| 🔊 **内置音频系统** | 拖拽式AudioStream,无需AudioManager |
| 📦 **零依赖** | 完全独立,复制即用 |
| 💼 **商用友好** | MIT License,免费商用 |

---

## 🚀 5分钟快速开始 | Quick Start

### 📥 安装 | Installation

**方法1:下载Release**
```bash
# 1. 下载最新Release ZIP
# 2. 解压到你的Godot项目
# 3. 复制 Scripts/ProceduralNPC.gd 到你的项目
```

**方法2:Git Clone**
```bash
git clone https://github.com/yourusername/ProceduralNPC.git
```

详细安装步骤见 → [INSTALL.md](INSTALL.md)

---

### 💻 使用示例 | Usage Example

```gdscript
# 1️⃣ 创建NPC节点
var npc = preload("res://Scripts/ProceduralNPC.gd").new()
add_child(npc)

# 2️⃣ 自定义外观(可选)
npc.npc_style = ProceduralNPC.NPCStyle.HORROR
npc.enable_clothing = true
npc.jacket_color = Color(0.1, 0.1, 0.2) # 深蓝色夹克

# 3️⃣ 触发跳脸!
npc.trigger_jumpscare(player) # 就这么简单!

# 4️⃣ 高级用法:风格转换
npc.switch_to_horror_style(2.0) # 2秒渐变为恐怖风格
```

**完整文档:**
- 📖 [English Documentation](Documentation/README.md)
- 📖 [中文文档](Documentation/README_CN.md)

---

## 📦 包含内容 | What's Included

```
ProceduralNPC_Release/
├── Scripts/
│ └── ProceduralNPC.gd # 主脚本 (1900+行)
├── Documentation/
│ ├── README.md # 英文完整文档
│ └── README_CN.md # 中文完整文档
├── Assets/
│ ├── jumpscare_scream.mp3 # 示例尖叫音效
│ └── jumpscare_hit.mp3 # 示例撞击音效
├── Examples/ # 示例场景(即将添加)
├── INSTALL.md # 安装指南
├── CHANGELOG.md # 更新日志
└── LICENSE # MIT许可证
```

---

## 🎯 适用场景 | Perfect For

✅ 恐怖游戏开发
✅ 独立游戏项目
✅ 快速原型设计
✅ 学习程序化生成
✅ Game Jam开发
✅ 叙事型游戏
✅ 追逐序列场景

---

## 🔧 技术规格 | Technical Specs

- **代码量:** 1900+ 行优化的GDScript
- **参数数量:** 60+ 可调参数
- **视觉风格:** NORMAL | HORROR | LOW_POLY
- **Godot版本:** 4.0+
- **依赖:** 无
- **Linter错误:** 0
- **许可证:** MIT

---

## 📖 完整功能清单 | Full Feature List

点击展开 60+ 功能列表

### 程序化生成
- ✅ 头部、躯干、四肢完全程序化
- ✅ 精细面部特征(眼睛、鼻子、嘴巴、耳朵)
- ✅ 手指和关节细节
- ✅ 多风格支持

### 服装系统 ⭐
- ✅ 夹克(可调颜色)
- ✅ 裤子(可调颜色)
- ✅ 鞋子(可调颜色)
- ✅ 单独开关
- ✅ 实时编辑器预览

### 跳脸系统 ⭐
- ✅ 真跳脸 - 无视方向瞬移到摄像机前
- ✅ 头部精准对齐摄像机
- ✅ 90度手部抓取动画
- ✅ 尖叫动画(逼真张嘴)
- ✅ 红色聚光灯(从脖子发出)
- ✅ 可调节聚光灯位置/旋转
- ✅ 实时聚光灯预览
- ✅ 内置音频系统(AudioStreamPlayer3D)
- ✅ 拖拽式AudioStream文件
- ✅ 音频开关

### 旋转锁定系统 ⭐
- ✅ 防止前后倾斜(锁定X轴)
- ✅ 防止左右倾斜(锁定Z轴)
- ✅ 手动调试模式
- ✅ 编辑器+运行时生效
- ✅ 修复动画冲突

### 编辑器增强
- ✅ 所有参数实时预览
- ✅ 服装颜色即时更新
- ✅ 可视化聚光灯调整
- ✅ `@tool` 脚本支持

### 恐怖效果
- ✅ 高级Shader(可选)
- ✅ 漂浮效果
- ✅ 抽搐效果
- ✅ 身体扭曲
- ✅ 眼睛闪烁
- ✅ 幽灵透明

### 其他特性
- ✅ 自动碰撞生成
- ✅ 边缘光照
- ✅ 呼吸动画
- ✅ 微妙抖动
- ✅ 完整文档

---

## 💡 常见问题 | FAQ

Q: NPC会倾斜怎么办?

确保 `Lock Rotation X` 和 `Lock Rotation Z` 被勾选(默认开启),NPC会自动矫正。

Q: 跳脸只转身不瞬移?

确保 `Jumpscare Always Teleport = true`(默认开启),这样无论距离都会瞬移。

Q: 看不到聚光灯?

勾选 `Jumpscare Spotlight Preview`,在编辑器中立即看到红光。

Q: 服装颜色改了不更新?

v4.0已修复,现在即时更新。如仍有问题,取消勾选后重新勾选 `Enable Clothing`。

Q: 可以用于商业游戏吗?

可以!MIT License,免费商用,无需署名(但我们会很感激!)。

---

## 🤝 贡献指南 | Contributing

欢迎贡献!🎉

1. Fork 本仓库
2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
3. 提交你的更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启一个Pull Request

**贡献方向:**
- 🐛 Bug修复
- ✨ 新功能
- 📖 文档改进
- 🌍 多语言翻译
- 🎨 示例场景

---

## 📜 许可证 | License

本项目采用 **MIT License** - 查看 [LICENSE](LICENSE) 文件了解详情。

**简单来说:**
- ✅ 商业使用
- ✅ 修改
- ✅ 分发
- ✅ 私人使用
- ❌ 责任
- ❌ 保证

---

## 💖 支持项目 | Support

如果这个项目对你有帮助:

- ⭐ **Star** 本仓库
- 🍴 **Fork** 并分享给朋友
- 💬 在 [Discussions](../../discussions) 分享你的使用心得
- 🐛 在 [Issues](../../issues) 报告Bug
- 💰 [itch.io打赏](https://yourusername.itch.io/proceduralnpc)
- ☕ [Ko-fi赞助](https://ko-fi.com/yourusername)

---

## 🔗 相关链接 | Links

- 🎮 [itch.io下载页面](https://yourusername.itch.io/proceduralnpc)
- 📖 [完整文档](Documentation/README.md)
- 📝 [更新日志](CHANGELOG.md)
- 🛠️ [安装指南](INSTALL.md)
- 💬 [讨论区](../../discussions)
- 🐛 [问题追踪](../../issues)

---

## 🙏 致谢 | Credits

**作者:** [Jieice](https://github.com/yourusername)

**特别感谢:**
- Godot Engine 开发者
- 恐怖游戏开发社区
- 所有用户和贡献者

---

## 📊 版本历史 | Version History

详见 [CHANGELOG.md](CHANGELOG.md)

**当前版本:v4.0 (2025-10-08)** - 完整版 ⭐

---

## 🆘 获取帮助 | Get Help

- 📖 查看 [Documentation](Documentation/README.md)
- 💬 在 [Discussions](../../discussions) 提问
- 🐛 在 [Issues](../../issues) 报告Bug
- 📧 邮件:your-email@example.com

---

**准备好创作你的恐怖游戏了吗?**

**Ready to create your horror game?**

[⬇️ 下载 Download](../../releases) | [📖 文档 Docs](Documentation/README.md) | [💬 讨论 Discuss](../../discussions)

---

Made with ❤️ by [Jieice](https://github.com/yourusername) for the Godot community

**如果这个项目帮助了你,请给个⭐Star!**

**If this project helps you, please give it a ⭐Star!**