Skip to content

Add scripts to make a pruned “StoryQuest Kit” bundle#2576

Draft
wjt wants to merge 2 commits into
mainfrom
wjt/sqckck
Draft

Add scripts to make a pruned “StoryQuest Kit” bundle#2576
wjt wants to merge 2 commits into
mainfrom
wjt/sqckck

Conversation

@wjt

@wjt wjt commented Jul 21, 2026

Copy link
Copy Markdown
Member

Rather than having Core: Threadbare participants start from a fork of
the entire repo, we want to try giving participants a stripped-down copy
of the project - specifically with all LoreQuests and other StoryQuests
removed. The goals are manifold:

  • Reduce the cognitive burden of navigating a large project.

  • Reduce the need to take special steps to deep link to a StoryQuest for
    testing: the team's StoryQuest should be launched from the title
    screen.

  • Reduce the number and size of the files in the project, saving
    electrons and helping with performance in Backstitch.

  • Move us towards a model where rather than expecting that all
    storyquests will be merged upstream (requiring learners to take
    special care to only modify files in their folder, increasing
    complexity; and hitting human scalability cliffs in the form of there
    only being two full-time maintainers of the game reviewing StoryQuest
    submissions) we instead treat them more as stand-alone games. For the
    ones we choose to merge upstream, we can do the necessary work to
    confine them to their own folder at that point; and you could imagine
    adding a way to launch a separately-downloaded .pck for a StoryQuest.

As well as removing the lore_quests and story_quests folders, we also
have to remove the world_map folder (i.e. Fray's End and connected
scenes) because these scenes now link directly to LoreQuests.

I also decided to remove the non-CC0 Tiny Swords free pack, which we
have special permission to redistribute but which is not used outside of
one StoryQuest. This significantly reduces the number of files in the
project, which is helpful for Backstitch.

Having removed these files, we adjust the project settings so that the
quest launched from the title screen is the NO_EDIT template, and the
scene to return to when a quest is completed or abandoned is the title
screen. When we have Dev Island/Archipelago, we will change the latter
to that.

One approach would be to have learners modify the NO_EDIT template
in-place, in which case we would want to rename all those files and
delete the bootstrap tool. For now I just updated the StoryQuest
bootstrap tool to change the initial quest to the newly-duplicated one.

I checked for references into these folders from elsewhere in the game
as follows:

git grep -E \
    '(lore_quests|story_quests|world_map|tiny-swords-non-cc0)' \
    ':!scenes/quests/lore_quests' \
    ':!scenes/quests/story_quests' \
    ':!scenes/world_map' \
    ':!assets/third_party/tiny-swords-non-cc0'

In a perfect world there would be no output from this command. There are
some lingering references: for example, the elders' dialogue references
the paths to various quest.tres resources. However there are (as far
as I can tell) no references that will cause a scene or resource to fail
to load. (This command is imperfect because, for example, teleporters
refer to other scenes by their UID stored as a string.)

Creating the bundle is implemented with two scripts:

  1. A GDScript script which deletes files and adjusts project settings,
    which is most easily done using Godot's own APIs (and reuses some
    preexisting logic).
  2. A shell script which drives the GDScript script, then does some
    additional stuff (downloading the backstitch launcher, running Git
    commands) which is more easily accomplished in shell.

I couldn't resist calling the script StoryQuest Construction Kit
Construction Kit (SQCKCK for short) but this is a placeholder name!

Still to do: a GitHub Actions workflow to run this.

Helps #2563

wjt added 2 commits July 21, 2026 14:27
- Remove references to StoryQuests from the Storybook scene. We need to
  keep the storybook in the StoryQuest kit - we will use it in Dev
  Island - but these two quests will not be present in that bundle.

- Move music puzzle music to that puzzle's `components/` folder. This
  music is specific to the puzzle solution in this scene. This removes 5
  files totalling about 1 MB from the StoryQuest kit bundle.

- Move combat music resource to `assets/` folder. This is used in a
  number of scenes in the game, not just the quest it was previously
  stored in. In particular it is used in
  `scenes/game_elements/characters/enemies/mothsache/Mothsache_test_scene.tscn`,
  so that scene would be broken in a bundle where all lorequests have
  been deleted. Update REUSE.toml to mark this (and other tres files in
  `assets/`) as our work.

- quest_separator: Remove reference to lore_quest. The image here is
  just a placeholder. Use an image that will still be present in a
  bundle with all quests deleted.

- Move `ToggleableTileMapLayer` out of `world_map`. This is used in
  `scenes/game_elements/components/custom_hookable_objects_test.tscn`
  and
  `scenes/game_elements/components/custom_repellable_objects_test.tscn`,
  which we want to keep working in a pruned copy of the game with the
  `world_map` folder deleted. Also rename the script to match our
  `snake_case.gd` convention.

Helps #2563
Rather than having Core: Threadbare participants start from a fork of
the entire repo, we want to try giving participants a stripped-down copy
of the project - specifically with all LoreQuests and other StoryQuests
removed. The goals are manifold:

- Reduce the cognitive burden of navigating a large project.

- Reduce the need to take special steps to deep link to a StoryQuest for
  testing: the team's StoryQuest should be launched from the title
  screen.

- Reduce the number and size of the files in the project, saving
  electrons and helping with performance in Backstitch.

- Move us towards a model where rather than expecting that all
  storyquests will be merged upstream (requiring learners to take
  special care to only modify files in their folder, increasing
  complexity; and hitting human scalability cliffs in the form of there
  only being two full-time maintainers of the game reviewing StoryQuest
  submissions) we instead treat them more as stand-alone games. For the
  ones we choose to merge upstream, we can do the necessary work to
  confine them to their own folder at that point; and you could imagine
  adding a way to launch a separately-downloaded .pck for a StoryQuest.

As well as removing the lore_quests and story_quests folders, we also
have to remove the world_map folder (i.e. Fray's End and connected
scenes) because these scenes now link directly to LoreQuests.

I also decided to remove the non-CC0 Tiny Swords free pack, which we
have special permission to redistribute but which is not used outside of
one StoryQuest. This significantly reduces the number of files in the
project, which is helpful for Backstitch.

Having removed these files, we adjust the project settings so that the
quest launched from the title screen is the NO_EDIT template, and the
scene to return to when a quest is completed or abandoned is the title
screen. When we have Dev Island/Archipelago, we will change the latter
to that.

One approach would be to have learners modify the NO_EDIT template
in-place, in which case we would want to rename all those files and
delete the bootstrap tool. For now I just updated the StoryQuest
bootstrap tool to change the initial quest to the newly-duplicated one.

I checked for references into these folders from elsewhere in the game
as follows:

    git grep -E \
        '(lore_quests|story_quests|world_map|tiny-swords-non-cc0)' \
        ':!scenes/quests/lore_quests' \
        ':!scenes/quests/story_quests' \
        ':!scenes/world_map' \
        ':!assets/third_party/tiny-swords-non-cc0'

In a perfect world there would be no output from this command. There are
some lingering references: for example, the elders' dialogue references
the paths to various `quest.tres` resources. However there are (as far
as I can tell) no references that will cause a scene or resource to fail
to load. (This command is imperfect because, for example, teleporters
refer to other scenes by their UID stored as a string.)

Creating the bundle is implemented with two scripts:

1. A GDScript script which deletes files and adjusts project settings,
   which is most easily done using Godot's own APIs (and reuses some
   preexisting logic).
2. A shell script which drives the GDScript script, then does some
   additional stuff (downloading the backstitch launcher, running Git
   commands) which is more easily accomplished in shell.

I couldn't resist calling the script StoryQuest Construction Kit
Construction Kit (SQCKCK for short) but this is a placeholder name!

Still to do: a GitHub Actions workflow to run this.

Helps #2563
@wjt

wjt commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

@jgbourque Still a work in progress but please have a read of the description above then take a look at https://drive.google.com/file/d/1-6nJkNDaWB57XZlTyY2YZhawQKTvSNQ_/view?usp=sharing

@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/sqckck/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@wjt

wjt commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

The point of committing the pruned build to Git is:

  1. If we keep that commit somewhere, then if we do want to import a quest built from this kit into the upstream repo, it will be much easier to diff!
  2. I want to keep open the option of using Git to make a StoryQuest. What I have in mind is that our magic repo-forking script would not base the new repo off the upstream main branch but off a branch containing the latest storyquest kit. This new repo would be detached from endlessm/threadbare (implementation TBD) so would operate as its own separate universe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant