Skip to content

2.0.0

Choose a tag to compare

@chrisdugne chrisdugne released this 11 Sep 06:48
· 56 commits to main since this release

Fox installs as a standard Godot addon

Fox used to be consumed through a committed fox -> ../fox/fox symlink exposing
res://fox/. That link always followed the working tree of this repository, so
every game rode main: no game could pin a version, and a regression pushed
here reached all of them at once.

The runtime now lives in addons/fox, exactly where gdUnit4, godotsteam and
every other Godot addon live, and plugin.cfg carries the version. A game can
finally pin the Fox it builds against.

This is a breaking change. Every res://fox/... path a game holds becomes
res://addons/fox/....

Installing

Two mounts are documented in docs/install.md. For development, a symlink that
keeps following this repository:

mkdir -p addons
ln -s ../../fox/addons/fox addons/fox

For a pinned install, a copy of the addon folder at a given version:

git clone --depth 1 --branch v2.0.0 git@github.com:uralys/fox.git /tmp/fox-2.0.0
cp -R /tmp/fox-2.0.0/addons/fox your-game/addons/fox

Upgrading a pinned install is a delete and a copy.

The plugin declares the autoloads

Enabling the plugin in Project > Project Settings > Plugins writes G, DEBUG
and Gesture into the game's project.godot. The manual [autoload] block the
install guide used to ask for is gone.

An autoload the game already declares is skipped, and never removed when the
plugin is disabled: the override pattern (a G extending
res://addons/fox/core/globals.gd) keeps working, whatever the order of
operations.

Registering them was not free. add_autoload_singleton() compiles a script
before it registers the global name, and core/globals.gd addressed itself as
G, which does not exist yet at that point: the compilation failed and the
editor dropped the entry. globals.gd now goes through self. Removal also
moved from _exit_tree() to _disable_plugin(), because the former fires on
editor shutdown and was wiping the autoloads on every quit.

Migrating a game

  1. Replace the mount: remove the fox symlink, add addons/fox.
  2. Rewrite res://fox/ to res://addons/fox/ across project.godot, scripts,
    .tscn and .tres files.
  3. Add res://addons/fox/plugin.cfg to [editor_plugins].
  4. Run Godot --headless --path . --import twice. The first pass reports
    missing res://fox/... resources while the stale uid cache of .godot is
    rebuilt; the second pass is clean.

The CLI accepts both layouts during the transition: it probes
addons/fox/default.config.json first and falls back to the legacy
fox/default.config.json, so a game that has not migrated yet still works.

faraday-corridors is migrated and green: headless import and boot exit 0 with
no script error, and its level editor harness passes 117 checks.

changelog

No pull request was merged into this release: the work landed straight on
main.

No issue was closed by this release.

Full changelog: v1.21.0...v2.0.0