Files
2nd/10_Wiki/Topics/Domain_Programming/Architecture/Modular-Weapon-Evolution-and-Skill-Trees.md
T
Antigravity Agent c24165b8bc refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:05:56 +09:00

205 lines
5.9 KiB
Markdown

---
id: wiki-2026-0508-modular-weapon-evolution-and-ski
title: Modular Weapon Evolution and Skill Trees
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Weapon Mods, Skill Tree Design, Build Diversity]
duplicate_of: none
source_trust_level: A
confidence_score: 0.85
verification_status: applied
tags: [game-design, progression, weapons, skill-trees]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: csharp
framework: unity-godot
---
# Modular Weapon Evolution and Skill Trees
## 매 한 줄
> **"매 weapon = base + slots; 매 build = path through tree"**. Borderlands / Path of Exile / Diablo IV 의 ARPG progression DNA. 2026 modern: data-driven mod system + procedural affix + branching tree 의 build diversity 의 driver.
## 매 핵심
### 매 component
- **Base weapon**: archetype (sword, bow, SMG) + base stats.
- **Mod slot**: socket (scope, mag, barrel) — typed, capacity-limited.
- **Affix**: procedural roll (+15% crit, leech, elemental).
- **Skill node**: tree position — passive bonus or active skill.
### 매 design axis
- **Power**: mod 의 raw stat boost.
- **Identity**: mod 의 playstyle change (full-auto → burst).
- **Trade-off**: pro/con — high damage / low fire rate.
- **Synergy**: 매 mod combo 의 emergent build.
### 매 응용
1. Looter shooter: random affix + slot mod.
2. ARPG: deep tree (200+ nodes) + gem socket.
3. Roguelike: per-run modular evolution.
## 💻 패턴
### Weapon ScriptableObject (Unity)
```csharp
[CreateAssetMenu(menuName = "Weapons/Base")]
public class WeaponBase : ScriptableObject
{
public string id;
public WeaponArchetype archetype;
public float baseDamage;
public float baseFireRate;
public List<ModSlot> slots; // Scope, Magazine, Barrel
}
public enum ModSlot { Scope, Magazine, Barrel, Stock, Underbarrel }
```
### Mod definition
```csharp
[CreateAssetMenu(menuName = "Weapons/Mod")]
public class WeaponMod : ScriptableObject
{
public string id;
public ModSlot slot;
public List<StatModifier> modifiers;
public List<TagAdd> tagsAdded; // "burst-fire", "ignite"
}
[Serializable]
public struct StatModifier
{
public StatType stat; // Damage, FireRate, Recoil
public OpType op; // Add, Mul, Override
public float value;
}
```
### Composed weapon instance
```csharp
public class WeaponInstance
{
public WeaponBase Base { get; }
public Dictionary<ModSlot, WeaponMod> Mods { get; } = new();
public List<Affix> Affixes { get; } = new(); // procedural rolls
public float Damage => ComputeStat(StatType.Damage);
float ComputeStat(StatType s)
{
float v = Base.GetBase(s);
var add = Mods.Values.SelectMany(m => m.modifiers)
.Concat(Affixes.SelectMany(a => a.modifiers))
.Where(m => m.stat == s);
foreach (var m in add.Where(m => m.op == OpType.Add)) v += m.value;
foreach (var m in add.Where(m => m.op == OpType.Mul)) v *= 1 + m.value;
return v;
}
}
```
### Procedural affix roll
```csharp
public static Affix RollAffix(int itemLevel, AffixPool pool)
{
var weighted = pool.entries.Where(e => e.minLevel <= itemLevel);
var pick = WeightedPick(weighted, e => e.weight);
float val = Mathf.Lerp(pick.minRoll, pick.maxRoll, Random.value);
return new Affix { stat = pick.stat, op = pick.op, value = val };
}
```
### Skill node graph
```csharp
public class SkillNode
{
public string id;
public Vector2 position;
public List<string> prerequisites;
public List<StatModifier> passiveBonus;
public ActiveSkill activeSkill; // null for passive nodes
public int cost = 1;
}
public class SkillTree
{
public Dictionary<string, SkillNode> nodes;
public HashSet<string> allocated = new();
public bool Allocate(string id, ref int points)
{
var n = nodes[id];
if (points < n.cost) return false;
if (!n.prerequisites.All(allocated.Contains)) return false;
allocated.Add(id);
points -= n.cost;
return true;
}
}
```
### Synergy detection
```csharp
public static List<string> DetectSynergies(WeaponInstance w, SkillTree t)
{
var tags = w.AllTags().Concat(t.AllocatedTags()).ToHashSet();
return SynergyDb.All
.Where(s => s.requiredTags.All(tags.Contains))
.Select(s => s.name)
.ToList();
}
```
### Respec system
```csharp
public void Respec(SkillTree t, ref int points)
{
points += t.allocated.Sum(id => t.nodes[id].cost);
t.allocated.Clear();
}
```
### Build serialization (share builds)
```csharp
public string Encode(SkillTree t) =>
Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Join(",", t.allocated)));
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Casual shooter | 3-5 slot mods, no affixes |
| Looter | Slots + procedural affixes (3-6) |
| Deep ARPG | Slots + affixes + 100+ skill tree |
| Roguelike | Drafted upgrades, run-scoped |
**기본값**: ScriptableObject base + slot mods + 3-tier affix + 50-node tree.
## 🔗 Graph
- 응용: [[Build-Diversity]]
- Adjacent: [[ECS]]
## 🤖 LLM 활용
**언제**: 매 affix table 의 generate, synergy combo 의 enumerate, balance simulation script.
**언제 X**: 매 power-fantasy feel, animation game-feel — designer/playtest judgment.
## ❌ 안티패턴
- **Power creep**: 매 new mod 의 strict upgrade. Old mods 의 dead.
- **Illusion of choice**: 100 tree nodes, 1 optimal path. Build diversity = 0.
- **Reroll fatigue**: 매 affix 의 100 reroll 의 required = grind, not gameplay.
- **No respec**: 매 mistake = restart character. 매 modern player 의 quit.
## 🧪 검증 / 중복
- Verified (Path of Exile dev manifestos, Borderlands 3 GDC talks, Last Epoch design notes 2025).
- 신뢰도 B+ (game-design subjective, but established patterns).
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — modular weapon + skill tree systems with Unity patterns |