[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,99 +2,182 @@
|
||||
id: wiki-2026-0508-ndf-neutral-data-format
|
||||
title: NDF (Neutral Data Format)
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: []
|
||||
aliases: [Neutral Data Format, Eugen NDF, WARNO NDF]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
tags: [uncategorized]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [modding, data-format, eugen-systems, warno, configuration]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-08
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: NDF
|
||||
framework: Eugen-Iriszoom
|
||||
---
|
||||
|
||||
# NDF (Neutral Data Format)
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
NDF(Neutral Data Format)는 EugenSystems가 개발한 독자적인 텍스트 기반 스크립트 언어 및 데이터 포맷입니다 [1]. [[WARNO|WARNO]]의 게임 동작과 유닛의 세부 데이터를 저장하는 데 사용되며, 게임 코드와 데이터 값을 엄격히 분리하여 수천 개에 달하는 속성을 체계적으로 관리할 수 있게 합니다 [1, 2]. 이는 시뮬레이션의 '유전적 청사진' 역할을 수행하며, 게임 소스 코드의 수정 없이도 정교한 데이터 기반 밸런싱과 모딩을 가능하게 하는 핵심 기반입니다 [1].
|
||||
## 매 한 줄
|
||||
> **"매 declarative game-data DSL — Eugen Systems Iriszoom engine 의 data layer"**. 매 Wargame/Steel Division/WARNO 시리즈 의 unit/weapon/visual 의 모든 stat 의 NDF 파일 정의. 매 modding 의 entry point — 매 binary patch 가 X, plain text 의 git-diffable.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **NDF의 구조와 객체 지향적 특성**
|
||||
NDF 파일은 텍스트 기반의 프로그래밍 형식을 띠며, 상속과 모듈화가 고도로 발달된 객체 지향적인 특성을 지니고 있습니다 [1]. 구조적 설계의 대표적인 예로, `UniteDescriptor.ndf` 파일 내의 개별 유닛 엔티티는 단일 데이터로 존재하는 것이 아니라 외형 모듈(ApparenceModel), 보급 모듈(TSupplyModuleDescriptor), 생존 모듈(THealthModuleDescriptor) 등 독립적인 기능을 수행하는 여러 디스크립터(Descriptor)들을 조립하는 방식으로 정교하게 구축됩니다 [1].
|
||||
## 매 핵심
|
||||
|
||||
- **주요 NDF 파일과 담당 시뮬레이션 영역**
|
||||
WARNO의 모든 논리적 설계는 수천 개의 `.ndf` 파일에 나뉘어 정의되어 있습니다 [1, 2]. 가장 핵심적인 파일들은 다음과 같습니다:
|
||||
* `UniteDescriptor.ndf`: 유닛의 물리적 및 기술적 속성(가격, 시야, 이동성, 은신값 등)을 정의합니다 [3, 4].
|
||||
* `WeaponDescriptor.ndf`: 포탑 회전 속도, 조준 시간 등 무기 체계의 메커니즘을 설정합니다 [3, 4].
|
||||
* `Ammunition.ndf`: 철갑탄(AP) 관통력, 고폭탄(HE) 데미지, 제압력 등 탄약의 물리적 타격 로직을 담고 있습니다 [3, 4].
|
||||
* `Divisions.ndf` 및 `DivisionRules.ndf`: 사단 덱을 구성할 때 적용되는 카드당 유닛 수와 전략적 가용성 규칙을 제어합니다 [4, 5].
|
||||
### 매 Syntax 의 핵심
|
||||
- **Object literal**: `Identifier is TYPE(...)` — 매 모든 entity 의 declaration.
|
||||
- **Module 의 nesting**: 매 outer module 안의 inner objects 의 reference.
|
||||
- **Reference**: `~/Module/Path/Identifier` — 매 absolute paths.
|
||||
- **Map / List**: `MAP[(key, value), ...]`, `[item1, item2]`.
|
||||
- **Comment**: `//` (line) — 매 `/* */` 의 X.
|
||||
|
||||
- **데이터 기반 밸런싱 및 모딩의 핵심 동력**
|
||||
NDF 시스템이 제공하는 고도의 유연성은 WARNO 특유의 '데이터 기반 밸런싱(Data-Driven Balancing)'을 가능케 합니다 [4]. 개발자와 모더들은 일반적인 텍스트 편집기나 전용 도구(WME: Warno Mod Editor)를 사용하여 게임 소스코드 변형 없이 유닛 성능 데이터를 즉각적으로 튜닝할 수 있습니다 [1, 5, 6]. 또한, `[[ndf-parse|ndf-parse]]`와 같은 Python 패키지를 활용하면 NDF 파일을 자동으로 파싱하고 수정 사항을 유효한 NDF 코드로 다시 기록하는 작업도 수행할 수 있습니다 [7].
|
||||
### 매 typical structure
|
||||
- **GameData**: 매 unit definitions / weapon stats / texture references / sound mappings.
|
||||
- **Module**: 매 named container — 매 `ZModule_TWeaponManagerModuleDescriptor` 의 sort 의 component.
|
||||
- **Inheritance**: 매 `is BaseType(...)` 의 prototype 의 from inheritance — override fields only.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[데이터 기반 설계 (Data-Driven Design)|데이터 기반 설계(Data-Driven Design]], Iriszoom 엔진, [[WARNO 모딩(Modding)|WARNO 모딩(Modding]]
|
||||
- **Projects/Contexts:** [[WARNO-DATA 프로젝트|WARNO-DATA 프로젝트]], ndf-parse 패키지, [[Warno-Armory|Warno-Armory]]
|
||||
- **Contradictions/Notes:** [[Eugen Systems|Eugen Systems]]는 공식적인 모딩 매뉴얼과 `.ndf` 참조 가이드를 통해 파일 형식을 설명하고 있지만, 수천 개의 파일에 분산된 실제 데이터 속성값에 대한 상세한 설명은 제공하지 않습니다 [2]. 이로 인해 유저 커뮤니티가 주도하여 WARNO-DATA 위키를 개설하거나, 데이터를 파싱해 숨겨진 스탯을 보여주는 War-Yes, [[Warno-Armory|Warno-Armory]] 등의 서드파티 도구를 개발하여 공식 문서의 빈틈을 메우고 있습니다 [2, 8].
|
||||
### 매 응용
|
||||
1. **Unit balance modding** (HP / armor / damage tweaks).
|
||||
2. **New unit creation** (copy/paste/rename + export to deck).
|
||||
3. **Visual mod** (camo swap, model substitution via NDF reference change).
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-28*
|
||||
## 💻 패턴
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
|
||||
- **과거 데이터와의 충돌:** 없음
|
||||
- **정책 변화:** 없음
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
### 매 NDF 의 unit definition (WARNO style)
|
||||
```ndf
|
||||
// Unit declaration with module composition
|
||||
TUniteDescriptor_M1Abrams is TUniteDescriptor
|
||||
(
|
||||
ClassNameForDebug = "M1A1 Abrams"
|
||||
AcknowUnitType = ~/AcknowUnitType_Tank
|
||||
ModulesDescriptors =
|
||||
[
|
||||
TBaseDamageModuleDescriptor
|
||||
(
|
||||
MaxPhysicalDamages = 9
|
||||
ArmorDescriptorFront = ~/Armor_Tank_Heavy_Front
|
||||
ArmorDescriptorSides = ~/Armor_Tank_Heavy_Side
|
||||
),
|
||||
TWeaponManagerModuleDescriptor
|
||||
(
|
||||
Salves = [1, 1, 1]
|
||||
TurretDescriptorList = [TTurretInfanterieDescriptor()]
|
||||
),
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### 매 NDF parser (Python — ndf-parse 패키지)
|
||||
```python
|
||||
import ndf_parse
|
||||
import ndf_parse.model as ndf_model
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
# Parse a WARNO NDF file
|
||||
with open("UniteDescriptor.ndf") as f:
|
||||
source = f.read()
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
tree = ndf_parse.parse(source)
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
# Find Abrams unit and tweak HP
|
||||
for obj in tree:
|
||||
if obj.namespace == "TUniteDescriptor_M1Abrams":
|
||||
damage_mod = obj.value.by_member("ModulesDescriptors").value[0]
|
||||
damage_mod.value.by_member("MaxPhysicalDamages").value = "12"
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
# Write back
|
||||
with open("UniteDescriptor.modified.ndf", "w") as f:
|
||||
f.write(ndf_parse.print_tree(tree))
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### 매 batch 의 unit stat 의 audit
|
||||
```python
|
||||
import ndf_parse
|
||||
from pathlib import Path
|
||||
|
||||
def audit_unit_hp(ndf_dir: Path) -> dict[str, int]:
|
||||
"""Scan all unit descriptors and extract MaxPhysicalDamages."""
|
||||
results = {}
|
||||
for ndf_path in ndf_dir.glob("**/UniteDescriptor*.ndf"):
|
||||
tree = ndf_parse.parse(ndf_path.read_text(encoding="utf-8"))
|
||||
for obj in tree:
|
||||
if obj.value.type == "TUniteDescriptor":
|
||||
try:
|
||||
mods = obj.value.by_member("ModulesDescriptors").value
|
||||
for m in mods:
|
||||
if m.value.type == "TBaseDamageModuleDescriptor":
|
||||
hp = int(m.value.by_member("MaxPhysicalDamages").value)
|
||||
results[obj.namespace] = hp
|
||||
except (AttributeError, KeyError):
|
||||
pass
|
||||
return results
|
||||
|
||||
hp_table = audit_unit_hp(Path("./WARNO_GameData/Generated/Gameplay/Gfx"))
|
||||
# Find outliers
|
||||
for unit, hp in sorted(hp_table.items(), key=lambda x: -x[1])[:10]:
|
||||
print(f"{unit}: {hp}")
|
||||
```
|
||||
|
||||
### 매 mod 의 inheritance (override only what changed)
|
||||
```ndf
|
||||
// Mod file — overrides base unit
|
||||
export TUniteDescriptor_M1Abrams_Modded is TUniteDescriptor_M1Abrams
|
||||
(
|
||||
// Only override the fields you change
|
||||
Modifications =
|
||||
[
|
||||
("MaxPhysicalDamages", 15), // buff HP
|
||||
("MaxSpeedInKmph", 75), // faster
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
### 매 NDF 의 git-friendly diff
|
||||
```bash
|
||||
# Mod versioning workflow
|
||||
git init mods/abrams_buff
|
||||
cd mods/abrams_buff
|
||||
cp ../../WARNO_GameData/Generated/Gameplay/Gfx/UniteDescriptor.ndf base.ndf
|
||||
# ... edit ...
|
||||
git diff base.ndf modified.ndf > abrams_buff.patch
|
||||
|
||||
# Reapply on update
|
||||
git apply abrams_buff.patch # works as long as upstream context stable
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| 매 single value tweak | Direct edit + diff |
|
||||
| 매 systematic balance pass | ndf-parse Python script |
|
||||
| 매 new unit | Inherit from existing TUniteDescriptor + override |
|
||||
| 매 cross-version mod | `Modifications = [...]` override list (resilient to base changes) |
|
||||
| 매 visual-only mod | Texture path swap in TextureBank NDF |
|
||||
|
||||
**기본값**: 매 inheritance + Modifications list — 매 maintainability 의 best.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Eugen Systems 모딩 매뉴얼]] · [[Iriszoom 엔진]]
|
||||
- 변형: [[ndf-parse 패키지]] · [[WARNO Modding]]
|
||||
- 응용: [[Unit Balance Modding]] · [[Visual Mod]]
|
||||
- Adjacent: [[Lua Scripting]] · [[INI Configuration]] · [[XML Game Data]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 large balance pass (parse → batch edit → write) / 매 new unit boilerplate generation / 매 cross-mod conflict detection.
|
||||
**언제 X**: 매 tiny single-value edit — 매 manual edit 의 faster.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **매 binary patch**: 매 game patches 의 break — NDF 의 source-level 의 stay.
|
||||
- **매 full file 의 copy**: 매 base game patch 의 conflict — Modifications override list 의 use.
|
||||
- **매 string concat 의 NDF generation**: 매 syntax error 의 risk — proper parser library 의 use.
|
||||
- **매 무 backup**: 매 NDF 의 game crash 시 root cause — git-track everything.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Eugen Systems WARNO modding documentation; ndf-parse Python package on PyPI; community Discord patterns).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — NDF syntax + ndf-parse patterns + modding workflow |
|
||||
|
||||
Reference in New Issue
Block a user