Commit Graph

119 Commits

Author SHA1 Message Date
Vaillant Jeremy d61a0ffcb0 Add developers/.gdignore; let Godot 4 canonicalise saved scenes
The developers/aurelien sandbox scenes still reference legacy non-LOD
mesh paths (sm_book.mesh, sm_candlestick.mesh, ...) that don't exist
anymore — the production scenes were migrated to *_lod0/1/2.mesh.
Godot's full-project file scanner reads every .tscn at editor open
and emits 'Cannot open file' errors for each broken ext_resource,
even for scenes that the game never loads.

Mark developers/ as out-of-scope for Godot's filesystem walker with
a .gdignore at its root. The .import / .uid sidecars Godot had
generated for files inside (CheckLightmap.exr.import,
CheckLightmap.gd.uid) are auto-removed by the editor since they are
now orphaned metadata — only the source files (.tscn, .gd, .exr,
.lmbake) remain. Re-enabling the sandbox later just means deleting
the .gdignore; Godot will regenerate the sidecars.

The other diffs in this commit are Godot 4 canonicalising whatever
.tscn / .tres files were touched in the editor session that ran the
LightmapGI bake attempt: ext_resource uid= attributes added, format
bumped 2 -> 3, property order normalised. No behavioural change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 22:24:19 +02:00
Vaillant Jeremy ca67fc6ec3 Convert all VisualShaders to plain Shaders; clean editor noise
Godot 4 emits two unavoidable warnings every time it reconstructs a
Godot-3-authored VisualShader graph: 'graph_offset property is
deprecated' (the editor's pan position, removed in 4.x) and
'connect_nodes_forced: Index p_from_port = 1 is out of bounds'
(node-graph ports that no longer line up). The compiled GLSL inside
each ShaderMaterial is correct; only the graph reconstruction is
broken.

scripts/devisualize_shaders.gd walks every .material, .tres, and
.mesh under res:// and replaces ShaderMaterial.shader from
VisualShader to a plain Shader carrying the same .code. 15 materials
converted (font outline, dissolve, color tints, book/candle/godet/
growler/parchment/rock-floor/stool/table). Godot now loads the
compiled shader directly with no graph reconstruction → both
warnings gone, rendering identical.

Also:
- scripts/resave_scenes.gd: load + re-save every .tscn so inline
  ArrayMesh sub-resources (notably WarCraft.tscn::17, the baked
  floor) move from Godot-3 PoolByteArray to Godot-4 PackedByteArray
  surface format. Silences 'Mesh uses old surface format'.
- scripts/find_visualshaders.gd: companion audit tool that lists
  every Resource still backed by a VisualShader. Useful if new
  legacy materials get added.
- Drop the now-orphan inline VisualShader / ShaderMaterial sub-
  resources (id 1..17) from Summary.tscn. The PanelWood lost its
  screen-blend tint material; a plain Panel renders fine and the
  effect can be re-authored as a hand-written shader if wanted.
- Add releases/.gdignore and tighten .gitignore so Godot stops
  warning 'Detected another project.godot at res://releases'. The
  releases/ directory has its own placeholder project.godot which
  Godot would otherwise flag at every editor open.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:42:28 +02:00
Vaillant Jeremy 81e6ceb003 Silence Godot 4 editor warnings (debugger)
Address every warning that surfaced in the running game's debugger:

- Drop deprecated 'graph_offset = Vector2(...)' lines from the three
  in-tree VisualShader resources (red.tres, green.tres,
  Summary.tscn). The property is editor-only graph pan, ignored at
  runtime but warns at load.
- Add android/.gdignore so Godot stops scanning the build template
  copies of red.tres/green.tres (which still had graph_offset). Tighten
  .gitignore to keep tracking the .gdignore marker only.
- Drop the broken 'nodes/fragment/connections = ...' line from the
  inline VisualShader in Summary.tscn — connections referenced
  out-of-bounds ports (e.g. port 1 on a 1-output node). The
  pre-compiled 'code = ...' string is kept so rendering is unaffected.
- Drop the orphaned 'ext_resource WarCraft.lmbake' from WarCraft.tscn:
  the LightmapGI node no longer references it but Godot still loaded
  the (Godot-3-format) blob from the ext_resource declaration alone,
  triggering '(p_data.size() % 4) != 0'.
- Animation tracks: SlideReset (Template.tscn), BorderAnim
  (Loading.tscn), and ObjectFindAll (ListObjects.tscn) each had a
  bezier track with empty PackedFloat32Array keys, which
  AnimationMixer rejects in Godot 4. Drop the empty x track in each
  (the y track held the actual motion).
- Re-save 57 .mesh files via scripts/migrate_misc.gd so the surface
  format is the current Godot 4 variant. sm_stackgold.mesh in
  particular triggered the deprecation warning every load.

GDScript: rename function parameters and locals that shadowed
Node.name / Node.value in:
- db/MScene.gd (set_lock, set_mesh, set_tick_reference, set_value)
- scripts/Setting.gd untouched (no shadow, false positive earlier)
- scenes/UI/choose_scenes/ChooseScene.gd (_load_scene, _build_path,
  _build_method)
- scenes/levels/Levels.gd (_create_animation_slide,
  _create_animation_warning, _add_animation_to_player,
  _create_button_info, _node_object_list)

lod plugin: Godot 4 added 'lod_bias' as a native property on
VisualInstance3D, which collided with the plugin's 'lod_bias' member
across all five lod_*.gd files. Rename to 'lod_distance_bias' so the
scripts parse again. Also drop Light3D.shadow_color writes in
lod_omni_light.gd and lod_spot_light.gd — that property was removed
in Godot 4, so the related shadow_value computation became dead code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:28:22 +02:00
Vaillant Jeremy 21176546eb Add dagger PBR textures, font import sidecars, migrate_shaders uid
- assets/props/dagger/dagger_Dagger_{BC,NM}.png + dagger_dagger_{E,ORM}.png:
  complete PBR texture set for the dagger prop.
- assets/fonts/MKX Title.ttf.import + kirsty/*.otf.import: Godot 4 import
  metadata sidecars for fonts whose source files were already tracked.
- scripts/migrate_shaders.gd.uid: UID sidecar missed in the previous
  migration commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:44:56 +02:00
Vaillant Jeremy 4d5db7bb61 Make Main, Settings, ChooseScene, and gameplay run in Godot 4.6
Catch-all commit for everything the --convert-3to4 tool missed during a
manual playtest of the game. All errors raised by clicking through Main
-> Puzzles -> level were fixed.

GDScript:
- PackedScene.instance() -> instantiate() (ChooseScene.gd)
- String(x) constructor doesn't exist -> str(x) (MBase, MScene,
  MLevel, Animation, Levels)
- 'x as int/String/bool' doesn't parse strings -> explicit
  int()/str()/bool(int()) (MScene, MLevel, MSetting)
- BaseButton.pressed (property) -> button_pressed; set_pressed() ->
  direct assignment (Settings.gd)
- AnimationPlayer.add_animation() removed -> go through
  AnimationLibrary (Levels.gd)
- PhysicsDirectSpaceState3D.intersect_ray(from, to, ...) ->
  PhysicsRayQueryParameters3D.create() (Levels.gd)
- @export with type-hint-in-comment ('# (String, ...)') -> explicit
  @export_enum (candle.gd)
- Get effective material with get_active_material() instead of
  get_surface_override_material(), with null guard (Levels.gd)
- get_node() -> get_node_or_null() so missing items from ahog.json
  (e.g. sm_super_dager in Home) don't crash (Levels.gd)

Scenes/resources:
- Remove 14 Tween nodes from WarCraft.tscn — Tween is no longer a
  Node in Godot 4. Rewrite Animation.start_dissolve to use
  create_tween().tween_method().
- Rename property material/N -> surface_material_override/N in every
  .tscn (10 files) — Godot 3 -> 4 rename that --convert-3to4 missed.
  Without this, MeshInstance3D.get_active_material(0) returned the
  glTF-imported StandardMaterial3D instead of the project's custom
  dissolve ShaderMaterial.

Shaders:
- One-shot scripts/migrate_shaders.gd walks every .material under
  assets/ and fixes Godot 3 -> 4 shader code in-place. Fixed 17
  materials: depth_draw_alpha_prepass -> depth_prepass_alpha,
  hint_color -> source_color, NORMALMAP -> NORMAL_MAP.

Result: Main, Settings, ChooseScene, and the WarCraft level all run
without script or shader errors. Remaining noise is non-blocking
(visual_shader graph in text_outline.material, baked lightmap binary
format from Godot 3, and empty animation tracks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:40:03 +02:00
Vaillant Jeremy 770434482d Fix Setting.gd Vector2/Window API, re-import all assets for Godot 4
- apply_resolution: Vector2 strings -> Vector2i(int, int); use
  Window.content_scale_size instead of removed
  Viewport.set_size_2d_override variants.
- Re-import 162 assets to Godot 4 format (.godot/imported/ now,
  .stex -> .ctex, FontFile, CompressedTexture2D, etc.).
- Add .uid sidecars Godot 4 generates next to every script.
- Ignore .godot/ cache and android/ template directories.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:26:10 +02:00
Vaillant Jeremy 01ea3af253 Run godot --convert-3to4 (automated conversion)
Apply Godot 4.6 automated conversion: renames Spatial.translate->position,
margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile,
onready->@onready, export()->@export, and many more.

127 files changed by the tool. Manual fixes still required for:
 - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.)
 - lod plugin (Spatial -> Node3D renames)
 - ResourceLoader.load_interactive removed -> load_threaded_request
 - OS.set_window_fullscreen removed -> DisplayServer
 - Viewport.set_size_override removed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:18:27 +02:00
darknight 1883355678 feature/connect-level-and-reset-btn (#77)
Co-authored-by: VAILLANT Jeremy <vaillant.jeremy@dev-crea.com>
Reviewed-on: Athena/game-source#77
Co-authored-by: darknight <vaillant.jeremy@dev-crea.com>
Co-committed-by: darknight <vaillant.jeremy@dev-crea.com>
2021-06-06 16:54:38 +02:00
stilobique-i7 04d41abc90 Update the Spyglass mesh, push textures and all lods 2021-05-27 22:59:53 +02:00
stilobique-i7 50a14a482f Fix fiole lightmap 2021-05-27 10:44:52 +02:00
stilobique-i7 c3eb95f872 Fix Warcraft scene and clean stool 2 props 2021-05-27 10:41:57 +02:00
stilobique-i7 b74ac4744d Clear bad method on Parchment script 2021-05-27 09:35:57 +02:00
stilobique-i7 385d0437ec Increase lightmap (table, book and candle) and fix UV2 fiole 2021-05-27 09:35:57 +02:00
stilobique-i7 d9bd8c5ec3 Parchment props, make an editable instance scene 2021-05-27 09:35:57 +02:00
stilobique-i7 a43be5179d Replace stool b with a LOD setup 2021-05-27 09:35:56 +02:00
stilobique-i7 721197ae1d Change table LOD default mesh 2021-05-27 09:35:56 +02:00
stilobique-i7 f61df80818 Replace candles meshes and candlestick 2021-05-27 09:35:56 +02:00
stilobique-i7 813e27c828 WIP Parchment, make an editor script and set value on Warcraft scene 2021-05-27 09:35:56 +02:00
stilobique-i7 f330135fa8 Replace growler mesh with a lod setup 2021-05-27 09:35:47 +02:00
stilobique-i7 c50f14a882 Props godet, make all LOD and update scene with this new object 2021-05-27 09:35:47 +02:00
stilobique-i7 69ea236583 Parchment, update mesh wood and paper, make a specific scene to control it ; and bake a new lightmap 2021-05-27 09:35:47 +02:00
stilobique-i7 f6a7e2e9ec Update rock floor, prepare all lod item but get only the last LOD meshes 2021-05-24 16:16:14 +02:00
stilobique-i7 5c9269f2e2 Make lightmap with table and clear book scene items 2021-05-24 15:26:30 +02:00
stilobique-i7 a79a2ef687 Set a new table mesh with LOD 2021-05-24 13:26:03 +02:00
stilobique-i7 c71cfe0efe Fix parchment paper material 2021-05-24 12:57:32 +02:00
stilobique-i7 f1bc2aa6d2 Fix fiole default value 2021-05-23 22:22:25 +02:00
stilobique-i7 3bf46d7e8e Clear old book mesh 2021-05-23 15:38:21 +02:00
stilobique-i7 96ba39ae91 Replace old book mesh with LOD system on warcraft scene 2021-05-23 15:28:08 +02:00
stilobique-i7 7b2e9ebcc4 Updat ebook meshes and textures 2021-05-23 14:27:31 +02:00
stilobique-i7 06b1bd38dc Fole material, fix value to default value 2021-05-23 13:33:08 +02:00
stilobique-i7 6bb67a488c Fix default column material and lightmap 2021-05-23 12:25:48 +02:00
stilobique-i7 12ba465f50 Reimport spyglass 2021-05-18 12:10:46 +02:00
stilobique-i7 86d82145d6 Fix lightmap size and material default 2021-05-18 12:10:45 +02:00
stilobique-i7 dd44fe97d3 Remove fucking Spyglass case error 2021-05-18 12:09:36 +02:00
stilobique-surface 98ee4249c5 Fix material default to HO item 2021-05-18 12:09:34 +02:00
stilobique-surface 58eb0624d2 Update HO props with a lightmap setup 2021-05-18 12:09:33 +02:00
stilobique-surface 24500ac039 Reduce polycount about the Rock Floor mesh 2021-05-18 12:09:33 +02:00
VAILLANT Jeremy 367ee388da Fix list object 2021-05-15 20:40:16 +02:00
VAILLANT Jeremy 890931faa8 Link back button to quit code main menu 2021-05-15 17:17:12 +02:00
stilobique-surface 9cb97f9d41 Push again, and again !! And AGAIN !!!! (spoon spyglass) 2021-05-15 16:31:10 +02:00
Vaillant Jeremy c0e83803e9 Fix spyglass path 2021-05-15 12:55:38 +02:00
Vaillant Jeremy b4fe5828ea Remove test scene 2021-05-15 12:14:13 +02:00
VAILLANT Jeremy ccb942246c Update lightmap and tweak item HO objects 2021-05-15 00:56:53 +02:00
VAILLANT Jeremy 384b1245b9 Fix all material, mesh and lightmap site ; disable light and set the basic fire light 2021-05-14 23:28:46 +02:00
stilobique-surface 332ccf95e7 Fix lightmap uv on candle d and candle top 2021-05-14 23:22:08 +02:00
VAILLANT Jeremy c1a1665d5a Apply light 2021-05-14 22:39:09 +02:00
VAILLANT Jeremy b810e857ce Duplicate material coin/apple 2021-05-14 22:23:57 +02:00
VAILLANT Jeremy 29472acac6 Fix path spyglass 2021-05-14 22:23:32 +02:00
stilobique-surface 7825436628 Fix parchment paper lightmap and make a new baking 2021-05-13 23:49:53 +02:00
stilobique-surface 30ed3e41ab Update Warcraft scene props placement, and update building set
(cherry picked from commit a7ab52406857035daf5cae03380d18293e4fa87b)
2021-05-13 22:54:02 +02:00