Skip to content

Player abilities#2032

Draft
manuq wants to merge 8 commits intomainfrom
player-abilities
Draft

Player abilities#2032
manuq wants to merge 8 commits intomainfrom
player-abilities

Conversation

@manuq
Copy link
Collaborator

@manuq manuq commented Mar 6, 2026

Resolve #1375

manuq added 8 commits March 6, 2026 14:27
Let them happen all at once without changing the actual modes for now.
Only leave the mode "defeating" to disable player interaction and
abilites (repel, grapple). This prevents refactoring the modes right
now.
This was introduced a while ago and left invisible. It has the shape of
StoryWeaver so it won't work when replacing the SpriteFrames in
StoryQuests.
This could be a const, or the "repel" string can be used directly.

This is only preparation for upcoming animations refactor.

Note: There are references in StoryQuest "After the Tremor" that
this change may break.
Rename the node that provides this ability to PlayerRepel. Adjust the
scripts accordingly.
And the Area2D nodes that had this script. In 2 scenes from Void quest.
Add a signal to the repel ability and use it to play the animation when
the property changes, instead of checking it constantly in _process().

Loop the repel animation in the script by adding a handler to the
animation finished signal, and remove the loop mode from the animation
itself.

Give a class name to PlayerRepel.
For keyboard + mouse: Use right click to repel.

For keyboard only: Use Z to repel and X to grapple. This is on the basis
that the player will use arrow keys for moving in this case.

Interact continues being Space in both setups.
To B in XBox. So it doesn't collide with A for interaction.
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Play this branch at https://play.threadbare.game/branches/endlessm/player-abilities.

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

@manuq
Copy link
Collaborator Author

manuq commented Mar 6, 2026

For now the draft ignores player modes at all (except for "defeating"), and makes the 2 abilities "repel" and "grapple" active all the time. Interact is not considered an ability.

recording.webm

I did a few changes in the input mapping. But I really welcome alternatives:

For keyboard + mouse:

  • WASD for moving
  • Shift for sprint
  • Space bar to interact
  • Mouse move for aiming
  • Left click to grapple
  • Right click to repel (new)

For just keyboard:

  • Arrows for moving + aiming
  • Shift for sprint
  • Z to grapple (new)
  • X to repel (new)
  • Space bar to interact

For joypad (let's say XBox):

  • Left stick or D-pad for moving
  • Right stick for aiming
  • LB for sprint
  • RT to grapple
  • B to repel (new)
  • A to interact

(While doing this I noticed that the Champ quest introduced input maps to the project).

What about the mouse cursor? Should it always be a crosshair except while interacting with dialogue or the game menu?

We should think about: How would this affect the lore quests and the StoryQuests? Some ideas:

  • "Repel" and "grapple" abilities should be part of the player progression and persisted in game state.
  • But StoryQuests should not obey the lore progression and Player instances in SQs.
  • Ideally each SQ has their own copy of player.tscn (like the existing NO_EDIT_projectile.tscn) and could even have their own custom abilities.

Some other changes needed:

  • Replace the existing player modes. Maybe think in new ones? For the sake of input handling, at least player defeated is a mode.
  • When the player goes through the grappling line, the PlayerHook takes control over the player walking. This is a bit hacky and could be refactored. Maybe another mode?
  • I noticed that PlayerRepel also handles player harm for projectiles. This should be rearranged.
  • A StoryQuest "After the Tremor" was using player scripts that I refactored here. Is probably broken.
  • The input hints will need to be updated.

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.

Revisit player modes

1 participant