gohud

내 프리셋 만들기 — 파일 하나

← 테마

테마 하나를 더하려면 원래 네 군데를 손으로 만져야 했다 — 생성기의 팔레트, 형태, 스킨, 프리셋 리소스. 이제 명령 한 줄이 그 자리를 다 놓아 준다.

python3 addons/gohud/tools/new_theme.py neon --from scifi_dark --title "Neon"
python3 addons/gohud/tools/make_theme.py neon      # 테마 .tres + 컨트롤 그림
godot --headless --path . --import                  # 새 그림을 한 번 임포트
GoUi.use_preset(&"neon")                             # 끝 — 선택기에도 저절로 뜬다

첫 줄이 themes/palettes/neon.jsonthemes/presets/neon.tres 를 만든다. JSON 에는 from 으로 물려받은 테마의 값이 전부 풀어 적혀 있어, 무엇을 바꿀 수 있는지가 그대로 목록이 된다. 지우면 부모 값이 쓰이고, 적으면 덮어쓴다. 프리셋은 themes/presets/ 폴더를 스캔하므로 레지스트리 코드를 고칠 일이 없다 — 프로젝트 설정의 드롭다운에도 바로 뜬다.

바꿀 수 있는 것 — 한 장

어디무엇어떻게
from물려받을 테마dark · light · scifi_dark · medieval_dark · … 또는 다른 JSON 테마. 적지 않은 키는 부모 값을 따르고, 순환 상속은 오류다
palette바탕·표면 3단·테두리·글자 3단·강조·상태색 4·스크림·그림자·막대 바탕"#RRGGBB" · 알파는 "#RRGGBB@0.35"
막대 채움 전용 원색 *_vivid글자색이 어두워져도 막대는 선명하게 — 없으면 생성기가 막대가 칙칙하다 고 알린다
가독성손으로 맞추지 않는다. 글자·테두리·강조색·강조 버튼 글자는 생성기가 기준을 넘을 때까지 민다 — 강조색 하나만 바꿔도 검사를 통과한다
shapekindflat(둥근) · cut(사선 모서리) · medieval(단조 프레임)
치수radius · radius_small · radius_large · gap · gap_small · gap_large · padding · button_height · button_padding[4] — 토큰까지 함께 바뀌어 패널과 위젯 계산이 어긋나지 않는다
cut 전용cut_ratio · cut_max · corners(diagonal|all) · glow · edge
medieval 전용material(0 철 · 1 가죽 · 2 양피지) · grain_alpha · ornament_scale · bevel_strength · fontstitle·subtitle·caption·body·button 역할별 애드온 내부 res:// 글꼴
skinbase — 코드가 직접 그리는 자리(조이스틱·슬롯·배지·코치마크 링·칩·구분선)의 계열default · scifi · medieval
dials — 그 자리의 숫자: 슬롯 테두리 두께·틴트, 배지 여백, 칩·알림 투명도, 조이스틱 링 두께·투명도, sci-fi 의 잘린 모서리·발광·조준 표식JSON 에 부모 값이 전부 풀어 적혀 있다. 생성기가 themes/skins/gohud_skin_<id>.tres 로 내려보낸다 — 스킨 코드를 안 만진다. 그림 자체를 바꿀 때만 --new-skin 으로 GoSkin 상속 틀를 만든다
icons아이콘 세트GoIconSet 리소스의 res:// 경로 — 적지 않으면 JSON 부모의 세트를 따른다
dark · title선택기 표시불리언 · 문자열

다이얼 — 전부

아래 표는 tools/make_site.py 가 스킨 스크립트의 @export 에서 직접 읽어 채운다 — 다이얼을 더하거나 기본값을 바꾸면 표도 따라온다. JSON 의 skin.dials 에 이 이름으로 적는다. 기본값이 14 인 다이얼은 정수, 10.0 인 다이얼은 실수다 — JSON 에 어느 쪽으로 적어도 생성기가 스크립트의 형에 맞춰 내려보낸다.

기본 스킨 GoSkin — 17

다이얼기본값
chip_fill_alpha0.16Opacity of the chip panel fill.
chip_edge_alpha0.45Opacity of the chip panel border.
alert_tint0.1How far the alert box panel is tinted toward the state color.
slot_tint_lit0.24How far a cooling-down quick-slot panel is tinted toward the accent color.
slot_tint_idle0.08How far an idle quick-slot panel is tinted toward the accent color.
slot_border_lit2Border width of a cooling-down quick slot (dp).
slot_border_idle1Border width of an idle quick slot (dp).
badge_pad_x5Horizontal inner padding of the badge (quantity·remaining time) panel (dp).
badge_pad_y1Vertical inner padding of the badge panel (dp).
badge_edge_alpha0.6Opacity of the badge panel border.
float_shadow_alpha0.45Opacity of the shadow under a floating card (coach mark·prompt card).
float_shadow_size14Blur of the floating card shadow (dp).
float_shadow_lift4How far the floating card shadow is pushed downward (dp).
float_glow_size10.0Glow distance (dp) when a panel that uses a glow instead of a shadow — the cut panels (sci-fi) — is floating.
joystick_base_alpha0.42Opacity of the joystick base circle.
joystick_ring_alpha0.45Opacity of the joystick ring.
joystick_ring_width2.0Width of the joystick ring (dp).

sci-fi 스킨 GoSkinSciFi — 10

다이얼기본값
cut_chip7.0Size of the chamfered corner on a chip panel (dp).
cut_skeleton5.0Size of the chamfered corner on a skeleton panel (dp).
cut_alert8.0Size of the chamfered corner on an alert panel (dp).
cut_segment8.0Size of the chamfered corner on a segmented control panel (dp).
cut_slot6.0Size of the chamfered corner on a quick slot panel (dp).
cut_disc_ratio0.24Chamfer on an avatar or disc = diameter × this ratio.
slot_glow_alpha0.45Opacity of the glow on a slot running a cooldown.
slot_glow_size6.0Reach of the glow on a slot running a cooldown (dp).
bracket_arm12.0Arm length of the coach mark reticle (dp).
bracket_thickness2.0Line thickness of the coach mark reticle (dp).

중세 스킨 GoSkinMedieval — 5

다이얼기본값
slot_radius4.0Corner radius of the quick slot's metal frame (dp).
leather_grain_alpha0.035Opacity of the leather grain texture on a quick slot.
ornament_scale1.0Scale of the metal ornament on a quick slot's corners. Menu frames are tuned through the palette's shape instead.
bevel_strength0.18Strength of the metal highlight along the top of a quick slot.
slot_rivets1Whether a quick slot shows rivets (0: none, 1: shown).

스킨을 상속한다(선택)

테마와 형태로 닿지 않는 자리 — 조이스틱의 육각, 슬롯 배지, 코치마크의 조준 표식 — 만 스킨이다. GoSkin 을 상속해 바꿀 메서드만 덮어쓰고, JSON 의 skin 에 그 리소스를 가리키면 된다. 색만 바꾸는 테마는 이 단계가 없다.

약속을 검사가 지킨다. tools/check_scaffold.sh 가 매번 임시 테마를 만들어 — 강조색을 바꾸고 반경을 4 로 — 생성·토큰 반영·가독성 검사 통과까지 확인하고 되돌린다. 처음 돌렸을 때 강조색 하나 바꾼 테마가 8쌍 미달이었다: 생성기가 글자색은 밀면서 강조색은 그대로 쓰고 있었다. 그래서 강조색과 그 위 글자도 이제 생성기가 민다.