리뉴얼
This commit is contained in:
69
분석도구/legacy/extract_skill_cancel_windows.py
Normal file
69
분석도구/legacy/extract_skill_cancel_windows.py
Normal file
@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
스킬 캔슬 윈도우 추출 스크립트
|
||||
|
||||
AnimMontage.json에서 ANS_SkillCancel_C 노티파이를 가진 몽타주를 찾아
|
||||
캔슬 가능 시간 구간을 추출합니다.
|
||||
|
||||
사용법:
|
||||
python extract_skill_cancel_windows.py <AnimMontage.json 경로>
|
||||
"""
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def extract_cancel_windows(json_path):
|
||||
"""AnimMontage.json에서 스킬 캔슬 윈도우 추출"""
|
||||
|
||||
with open(json_path, 'r', encoding='utf-8') as f:
|
||||
montages = json.load(f)
|
||||
|
||||
cancel_montages = []
|
||||
|
||||
for montage in montages:
|
||||
asset_name = montage.get('AssetName', '')
|
||||
|
||||
# ANS_SkillCancel_C 노티파이 찾기
|
||||
for notify in montage.get('AnimNotifies', []):
|
||||
if notify.get('NotifyStateClass') == 'ANS_SkillCancel_C':
|
||||
trigger_time = notify['TriggerTime']
|
||||
duration = notify['Duration']
|
||||
|
||||
cancel_montages.append({
|
||||
'montage': asset_name,
|
||||
'start': trigger_time,
|
||||
'end': trigger_time + duration,
|
||||
'duration': duration
|
||||
})
|
||||
|
||||
return cancel_montages
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print("사용법: python extract_skill_cancel_windows.py <AnimMontage.json 경로>")
|
||||
sys.exit(1)
|
||||
|
||||
json_path = Path(sys.argv[1])
|
||||
|
||||
if not json_path.exists():
|
||||
print(f"오류: 파일을 찾을 수 없습니다: {json_path}")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"분석 중: {json_path}")
|
||||
print("-" * 80)
|
||||
|
||||
cancel_windows = extract_cancel_windows(json_path)
|
||||
|
||||
print(f"\n총 {len(cancel_windows)}개의 스킬 캔슬 윈도우 발견\n")
|
||||
|
||||
for item in cancel_windows:
|
||||
print(f"{item['montage']}")
|
||||
print(f" 캔슬 구간: {item['start']:.3f}s ~ {item['end']:.3f}s (지속: {item['duration']:.3f}s)")
|
||||
print()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user