Add scripts to make a pruned “StoryQuest Kit” bundle - #2576
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
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.) |
|
The point of committing the pruned build to Git is:
|
3a78d37 to
3aba2ab
Compare
92f0a6d to
d9bf30a
Compare
|
Just tried out the new StoryQuest Kit and it worked really well with Backstitch. I was able to create all my own files for an SQ using the "create SQ from template" script and there were no hiccups or delays in syncing those changes or any of the small changes I made afterwards in my testing. |
| [node name="Elders" type="Node2D" parent="OnTheGround" unique_id=452918502] | ||
| y_sort_enabled = true | ||
|
|
||
| [node name="SQ" type="Node2D" parent="OnTheGround/Elders" unique_id=2119212521] |
There was a problem hiding this comment.
Adding 2 more elders to that first island makes it more confusing. Maybe I need to redesign the level more. I am tempted though to keep it as-is and then iterate in a subsequent PR
| func rm_rf(path: String) -> void: | ||
| # You can only delete empty folders, so using DirAccess.remove() means | ||
| # traversing the whole folder tree and deleting each leaf before its parent | ||
| # folder. But you can trash a non-empty folder in a single step! | ||
| var global_path := ProjectSettings.globalize_path(path) | ||
| var ret := OS.move_to_trash(global_path) | ||
| if ret != OK: | ||
| push_error("Failed to trash ", global_path, ": ", error_string(ret)) |
There was a problem hiding this comment.
Could also do this in the shell script, might be easier...
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 Dev
Archipelago.
In Dev Archipelago, add the Template Elder so that the NO_EDIT template
can be accessed. Add the StoryQuest Elder too, because otherwise the
team's SQ can't be played once completed or abandoned without erasing
the game state, but remove him in normal versions. Add an alternative
broken version of the bridge back to Fray's End which blocks access to
that teleporter. Reconfigure that teleporter to point to the home scene
rather than explicitly to Fray's End so that if it is reached it is a
no-op.
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|uid://cufkthb25mpxy)' \
':!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; that's why Fray's
End's uid is in the command above.)
Creating the bundle is implemented with 2-3 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.
3. A GitHub Actions workflow which drives the shell script and uploads
the artifact.
I couldn't resist calling the script StoryQuest Construction Kit
Construction Kit (SQCKCK for short) but this is a placeholder name!
Resolves #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 Dev
Archipelago.
In Dev Archipelago, add the Template Elder so that the NO_EDIT template
can be accessed. Add the StoryQuest Elder too, because otherwise the
team's SQ can't be played once completed or abandoned without erasing
the game state, but remove him in normal versions. Add an alternative
broken version of the bridge back to Fray's End which blocks access to
that teleporter. Reconfigure that teleporter to point to the home scene
rather than explicitly to Fray's End so that if it is reached it is a
no-op.
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:
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.tresresources. However there are (as faras 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; that's why Fray's
End's uid is in the command above.)
Creating the bundle is implemented with 2-3 scripts:
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).
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.
A GitHub Actions workflow which drives the shell script and uploads
the artifact.
I couldn't resist calling the script StoryQuest Construction Kit
Construction Kit (SQCKCK for short) but this is a placeholder name!
Resolves #2563