Add townies system with occasional helpers#2129
Conversation
|
Play this branch at https://play.threadbare.game/branches/endlessm/townies-system/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
0948ae6 to
1c98b25
Compare
|
This is implementation for an idea that @wjt and I had this morning: a townie helps you with the most difficult part of the Stealth level, by fixing a bridge that opens a shortcut. Here is one Video: recording.webm |
|
Update: I added 6 townies to quests now: In musician quest:
In void quest:
Useful game states to try: |
0b22abd to
075be85
Compare
0a22e2e to
10d41d1
Compare
|
I rebased this and adapted it to the flawless new game state! Here are the new game states "snapshots" I took for testing this: I´'m now polishing this to put it for review. |
4877509 to
cb1f206
Compare
Persist the type of help, matching one of the magical threads, and a character seed for the visual features of the character. Add methods to obtain and consume the help.
The NONE type is needed in the enum to better identify no state, when consuming the help. The colors will be used in the HUD as background to indicate the type of help.
By setting an unique name to this node. This will be used to show the head in the HUD.
If not, when randomizing multiple characters at the same time, they all end up moving in sync. This is the case of the retelling townies in Fray's End.
This dialogue will be displayed when interacting with the eternal loom, before the threads offering.
Listen to the global state for doing so. If there is helper state, instantiate the face of the character according to its seed, and set the background color to the type of help.
The RetellingManager coordinates the retelling with the EternalLoom, to avoid cluttering that node. It does so by listening to signals and calling a method.
Node that will be used to make characters become helpers in levels, for consuming the help obtained during the retelling at the eternal loom. There is no actual implementation, this help could be spent in imaginative ways and is left to the level creators. A default dialogue is provided as example.
Change the interaction of the eternal loom when the player is ready to offer the threads. Now if the quest has retelling dialogue, display it. A retelling may result in the player obtaining help, that can be used later in the game. After the retelling, or if no retelling happened, trigger the incorporating threads cutscene and let the corresponding elder congratulate the player. Remove the sokoban puzzles, which are going to be repurposed. More cleanup on this later.
The dialogue lines should be considered placeholders.
Add the following helpers: - 1_music_puzzle: Memory helper that triggers a dialogue saying "Lore lore lore" as placeholder. - 2_ink_combat: Spirit helper that fills the hard to reach inkwell. - 3_stealth_level: Imagination helper that fixes the bridge.
Add the following helpers: - 1_void_quest: Memory helper that displays a placeholder dialogue. - 1_void_quest: Spirit helper that slows down the enemy. - 2_grappling_hook: Imagination helper that makes needles appear in the optional loop.
|
This is now finally ready for review! Things left out of this change:
Also there is a small bug in the walking animations, when the character that gets closer to the player leaves the loom. |
Void quest: Add helpers
Add the following helpers:
Musician quest: Add helpers
Add the following helpers:
Musician and Void quests: Add retelling dialogue
The dialogue lines should be considered placeholders.
Sokobans: Remove project setting to skip the sokobans
Sokobans cleanup: Remove incorporating threads state
Frays End, Eternal Loom: Add retelling and remove sokobans
Change the interaction of the eternal loom when the player is ready to offer the
threads. Now if the quest has retelling dialogue, display it. A retelling may
result in the player obtaining help, that can be used later in the game.
After the retelling, or if no retelling happened, trigger the incorporating
threads cutscene and let the corresponding elder congratulate the player.
Remove the sokoban puzzles, which are going to be repurposed. More cleanup on
this later.
Add HelperCharacter
Node that will be used to make characters become helpers in levels, for
consuming the help obtained during the retelling at the eternal loom. There is
no actual implementation, this help could be spent in imaginative ways and is
left to the level creators. A default dialogue is provided as example.
Add RetellingManager and RetellingTownie
The RetellingManager coordinates the retelling with the EternalLoom, to avoid
cluttering that node. It does so by listening to signals and calling a method.
StoryQuestProgress: Add helper character face to HUD
Listen to the global state for doing so. If there is helper state, instantiate
the face of the character according to its seed, and set the background color to
the type of help.
Quest: Add optional retelling dialogue to the resource
This dialogue will be displayed when interacting with the eternal loom, before
the threads offering.
CharacterRandomizer: Vary the animation when randomizing
If not, when randomizing multiple characters at the same time, they all end up
moving in sync. This is the case of the retelling townies in Fray's End.
CharacterRandomizer: Allow accessing the head sprite.
By setting an unique name to this node. This will be used to show the head in
the HUD.
InventoryItem: Add NONE type and color constants
The NONE type is needed in the enum to better identify no state, when consuming
the help.
The colors will be used in the HUD as background to indicate the type of help.
Add global state for helper characters
Persist the type of help, matching one of the magical threads, and a character
seed for the visual features of the character.
Add methods to obtain and consume the help.
Resolve #2119