v2 폐기하고 v3로 새출발
This commit is contained in:
110
legacy/분석도구/v2/archive/check_bp_vars.py
Normal file
110
legacy/분석도구/v2/archive/check_bp_vars.py
Normal file
@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Blueprint 변수 상세 조사"""
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
# Blueprint.json 로드
|
||||
bp_file = Path("D:/Work/WorldStalker/DS-전투분석_저장소/원본데이터/Blueprint.json")
|
||||
with open(bp_file, 'r', encoding='utf-8') as f:
|
||||
bp_data = json.load(f)
|
||||
|
||||
# DataTable.json 로드
|
||||
dt_file = Path("D:/Work/WorldStalker/DS-전투분석_저장소/원본데이터/DataTable.json")
|
||||
with open(dt_file, 'r', encoding='utf-8') as f:
|
||||
dt_data = json.load(f)
|
||||
|
||||
assets = bp_data.get('Assets', [])
|
||||
|
||||
# GA_Skill_Knight_Counter 찾기
|
||||
counter_bp = [a for a in assets if a.get('AssetName') == 'GA_Skill_Knight_Counter']
|
||||
|
||||
print("=" * 80)
|
||||
print("GA_Skill_Knight_Counter Blueprint 분석")
|
||||
print("=" * 80)
|
||||
|
||||
if counter_bp:
|
||||
bp = counter_bp[0]
|
||||
print(f"\nAssetName: {bp.get('AssetName')}")
|
||||
print(f"ParentClass: {bp.get('ParentClass')}")
|
||||
|
||||
vars = bp.get('Variables', [])
|
||||
print(f"\nTotal Variables: {len(vars)}")
|
||||
|
||||
# 숫자 타입 변수만
|
||||
numeric_types = ['Float', 'Int', 'Double', 'Byte', 'int', 'float', 'double']
|
||||
numeric_vars = []
|
||||
|
||||
for v in vars:
|
||||
var_type = str(v.get('VarType', ''))
|
||||
if any(t in var_type for t in numeric_types):
|
||||
numeric_vars.append(v)
|
||||
|
||||
print(f"\nNumeric Variables ({len(numeric_vars)}개):")
|
||||
for v in numeric_vars[:15]:
|
||||
print(f" {v.get('VarName')}: {v.get('DefaultValue')} (type: {v.get('VarType')})")
|
||||
|
||||
# 모든 변수 출력 (참고용)
|
||||
print(f"\nAll Variables:")
|
||||
for v in vars[:20]:
|
||||
print(f" {v.get('VarName')} ({v.get('VarType')}): {v.get('DefaultValue')}")
|
||||
else:
|
||||
print("GA_Skill_Knight_Counter를 찾을 수 없음!")
|
||||
|
||||
# DT_Skill에서 SK100202 정보
|
||||
print("\n" + "=" * 80)
|
||||
print("SK100202 DT_Skill 데이터")
|
||||
print("=" * 80)
|
||||
|
||||
dt_assets = dt_data.get('Assets', [])
|
||||
dt_skill = [a for a in dt_assets if a.get('AssetName') == 'DT_Skill'][0]
|
||||
rows = dt_skill.get('Rows', [])
|
||||
sk_row = [r for r in rows if r.get('RowName') == 'SK100202'][0]
|
||||
sk_data = sk_row.get('Data', {})
|
||||
|
||||
print(f"스킬 이름: {sk_data.get('name')}")
|
||||
print(f"Desc: {sk_data.get('desc')}")
|
||||
print(f"DescValues: {sk_data.get('descValues')}")
|
||||
|
||||
# desc에서 {0}, {1} 위치 찾기
|
||||
desc = sk_data.get('desc', '')
|
||||
desc_values = sk_data.get('descValues', [])
|
||||
|
||||
print(f"\n변수 매칭:")
|
||||
for i, value in enumerate(desc_values):
|
||||
print(f" {{{i}}} = {value}")
|
||||
|
||||
print(f"\n추론: Hilda 반격 스킬은")
|
||||
print(f" - {{{0}}}초 = {desc_values[0]}초 (반격 지속 시간)")
|
||||
print(f" - {{{1}}}% = {desc_values[1]}% (반격 피해 배율)")
|
||||
|
||||
# 다른 스킬도 조사
|
||||
print("\n" + "=" * 80)
|
||||
print("다른 스킬 Blueprint 변수 조사")
|
||||
print("=" * 80)
|
||||
|
||||
test_skills = [
|
||||
('SK100201', 'GA_Skill_Hilda_SwordStrike', '칼날 격돌'),
|
||||
('SK110205', 'GA_Skill_Urud_MultiShot_Quick', '다발 화살'),
|
||||
]
|
||||
|
||||
for skill_id, bp_name, skill_name in test_skills:
|
||||
print(f"\n=== {skill_name} ({skill_id}) ===")
|
||||
|
||||
# DT_Skill
|
||||
sk_row = [r for r in rows if r.get('RowName') == skill_id]
|
||||
if sk_row:
|
||||
sk_data = sk_row[0].get('Data', {})
|
||||
print(f"DescValues: {sk_data.get('descValues')}")
|
||||
|
||||
# Blueprint
|
||||
bp_match = [a for a in assets if a.get('AssetName') == bp_name]
|
||||
if bp_match:
|
||||
vars = bp_match[0].get('Variables', [])
|
||||
numeric_vars = [v for v in vars if any(t in str(v.get('VarType', '')) for t in numeric_types)]
|
||||
print(f"Blueprint 변수 총 {len(vars)}개, 숫자형 {len(numeric_vars)}개")
|
||||
if numeric_vars:
|
||||
print(" 숫자형 변수:")
|
||||
for v in numeric_vars[:5]:
|
||||
print(f" {v.get('VarName')}: {v.get('DefaultValue')}")
|
||||
else:
|
||||
print(f" Blueprint '{bp_name}' 없음")
|
||||
Reference in New Issue
Block a user