Skip to content

SceneLink: Add a special case for "go home"#2569

Merged
wjt merged 1 commit into
mainfrom
wjt/scenelink-add-a-special-case-for-go-home
Jul 20, 2026
Merged

SceneLink: Add a special case for "go home"#2569
wjt merged 1 commit into
mainfrom
wjt/scenelink-add-a-special-case-for-go-home

Conversation

@wjt

@wjt wjt commented Jul 20, 2026

Copy link
Copy Markdown
Member

Previously, the last scene of every quest (and Sokoban trio) hardcoded
the path (or rather UID) to Fray's End.

I want to make a stripped-back version of the repo that does not contain
Fray's End or any StoryQuests or LoreQuests as a StoryQuest kit; yet the
last scene of the template quest hardcodes the UID to Fray's End. I want
to make it possible to change the scene that follows a quest being
completed without modifying every quest in the game.

Add a flag to SceneLink (represented with an enum with two values for
future extensibility and self-documentation reasons) which, if set,
means that the link points to the "home scene" configured in the project
settings rather than a specific path/UID.

Update the final scene of all quests, and all Sokoban trios, to use this
new flag rather than hardcoding the Fray's End UID, with one exception.
I kept the explicit reference to Fray's End in
scenes/quests/lore_quests/quest_000/6_grappling/tutorial_grappling.tscn
because it also sets a particular spawn point, and doing that doesn't
make sense with a generic "home scene" link.

Helps #2563

Comment on lines +11 to +17
enum Target {
## The scene specified in [member SceneLink.next_scene].
SPECIFIED_SCENE,
## The scene from [const ThreadbareProjectSettings.HOME_SCENE], typically
## Fray's End. Use this at the end of quests.
HOME_SCENE,
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugly names. Alternative names welcome.

Image Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was considering just a "go home" boolean to override the specific scene, but this is more future-proof, it covers potential new special cases. So 👍

Previously, the last scene of every quest (and Sokoban trio) hardcoded
the path (or rather UID) to Fray's End.

I want to make a stripped-back version of the repo that does not contain
Fray's End or any StoryQuests or LoreQuests as a StoryQuest kit; yet the
last scene of the template quest hardcodes the UID to Fray's End. I want
to make it possible to change the scene that follows a quest being
completed without modifying every quest in the game.

Add a flag to SceneLink (represented with an `enum` with two values for
future extensibility and self-documentation reasons) which, if set,
means that the link points to the "home scene" configured in the project
settings rather than a specific path/UID.

Update the final scene of all quests, and all Sokoban trios, to use this
new flag rather than hardcoding the Fray's End UID, with one exception.
I kept the explicit reference to Fray's End in
`scenes/quests/lore_quests/quest_000/6_grappling/tutorial_grappling.tscn`
because it also sets a particular spawn point, and doing that doesn't
make sense with a generic "home scene" link.

Helps #2563
@wjt
wjt force-pushed the wjt/scenelink-add-a-special-case-for-go-home branch from 9dd6e4d to 4fef79d Compare July 20, 2026 15:08
@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/scenelink-add-a-special-case-for-go-home/.

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

@manuq manuq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. The only caveat I see is that by using the home scene there is no way to specify the spawn point.

Image Image

In the description I read:

I kept the explicit reference to Fray's End in
scenes/quests/lore_quests/quest_000/6_grappling/tutorial_grappling.tscn
because it also sets a particular spawn point, and doing that doesn't
make sense with a generic "home scene" link.

Seems a conscious design decision, so 👍

@wjt

wjt commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Ah... Actually that's not entirely intentional, I thought it worked for the spawn points in Fray's End. But perhaps I should disable the spawn point property entirely in "go home" mode.

@wjt

wjt commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Works for me.

image

I think you were testing a version of this branch without #2567 - which fixed exactly that pre-existing problem of the spawn point path choices not getting listed for Cinematic.

@wjt
wjt merged commit e2d8a72 into main Jul 20, 2026
7 checks passed
@wjt
wjt deleted the wjt/scenelink-add-a-special-case-for-go-home branch July 20, 2026 18:40
@manuq

manuq commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Works for me.

image I think you were testing a version of this branch without #2567 - which fixed exactly that pre-existing problem of the spawn point path choices not getting listed for Cinematic.

That is great! Yes probably I did gh pr checkout too soon.

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.

2 participants