Files
2nd/10_Wiki/Topics/Architecture/Modular-Weapon-Evolution-and-Skill-Trees.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +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 |