Skip to content

Repository files navigation

OpenPF2Playground

Tabletop made of four arrows pointing toward the center of the table, with the tagline 'Just add story.'

Provides an Unreal Engine sample project for demonstrating how to use the OpenPF2 Role Playing Game (RPG) framework.

Compatibility

This project is compatible with Unreal Engine 5.3.

Current Status

This is a pre-alpha. Low-level framework code is in place but this is not yet a very fun/playable game. Still, there are several interesting pieces to look at, including:

  • How input gets bound to character abilities:
    • The bindings vary by character.
    • Default bindings can be specified on each character.
    • The player can remap which abilities are bound during play by bringing up the ability menu.
    • Bindings can be re-routed or filtered dynamically using "Ability Execution Filters". This is used to route "Attack 1" to either an attack or movement action during encounters.
  • How game mode transitions are handled.
  • How abilities get queued in encounter mode vs. executed immediately in exploration mode.
  • How turns are orchestrated by AI behaviors during encounters.
  • How the floating camera is handled (including its collision with the world relative to its tilt and zoom using a custom collision component for delegating collision checks).

If something you'd like to see is not in this sample, please check back often! More is being added every week.

Licensing

This is a free learning resource. If you intend to reproduce, repurpose, or re-use any portion of this project in your own, you can only do so in an Unreal-Engine-based project. See LICENSE.txt.

Key Bindings/Input Bindings

Outside Encounters ("Exploration" and "Downtime" Modes)

KeyboardMouseXBox ControllerAction
WLeft joystick (3) forwardWalk character forward
ALeft joystick (3) leftWalk character left
SLeft joystick (3) backwardWalk character backward
DLeft joystick (3) rightWalk character right
Move forwardRight joystick (1) forwardTilt camera down (turn character to look up)
Move leftRight joystick (1) leftTilt camera right (turn character to look left)
Move backwardRight joystick (1) backwardTilt camera up (turn character to look down)
Move rightRight joystick (1) rightTilt camera left (turn camera to look right)
1Left clickAUse/Move/Attack 1
2BAttack 2
3XAttack 3
4YAttack 4
QLeft bumper (5)Control previous character
ERight bumper (10)Control next character
SHIFTLeft trigger (6)Open/close ability dialog (hold to keep open)

Right joystick is designated '1'; D-pad is designated '2'; Left joystick is designated '3'; Left middle button is designated '4'; Left bumper is designated '5'; Left trigger is designated '6'; XBox button is designated '7'; Right middle button is designated '8'; Right trigger is designated '9'; Right bumper is designated '10'; 'A' is designated 'A'; 'B' is designated 'B'; 'X' is designated 'X'; and 'Y' is designated 'Y'

During Encounters ("Encounter" Mode)

KeyboardMouseXBox ControllerAction
Move forwardLeft joystick (3) forwardMove encounter cursor up in screen space
Move leftLeft joystick (3) leftMove encounter cursor left in screen space
Move backwardLeft joystick (3) backwardMove encounter cursor down in screen space
Move rightLeft joystick (3) rightTilt camera left (turn camera to look right)
WRight joystick (1) forwardFly camera forward
ARight joystick (1) leftFly camera left
SRight joystick (1) backwardFly camera backward
DRight joystick (1) rightFly camera right
ZD-Pad (2) rightZoom camera in on active character
CD-Pad (2) leftZoom camera out from active character
Mouse wheel upD-Pad (2) upTilt camera down and zoom in towards active character
Mouse wheel downD-Pad (2) downTilt camera up and zoom out from active character
1Left clickAUse/Move/Attack 1 (depending on target square)
2BAttack 2
3XAttack 3
4YAttack 4
QLeft bumper (5)Control previous character
ERight bumper (10)Control next character
SHIFTLeft trigger (6)Open/close ability dialog (hold to keep open)

Right joystick is designated '1'; D-pad is designated '2'; Left joystick is designated '3'; Left middle button is designated '4'; Left bumper is designated '5'; Left trigger is designated '6'; XBox button is designated '7'; Right middle button is designated '8'; Right trigger is designated '9'; Right bumper is designated '10'; 'A' is designated 'A'; 'B' is designated 'B'; 'X' is designated 'X'; and 'Y' is designated 'Y'

In Ability Dialog

KeyboardMouseXBox ControllerAction
Down arrow/S/DD-Pad (2) downSelect first ability/Move ability cursor/selection down in ability list
Up arrow/W/AD-Pad (2) upSelect last ability/Move ability cursor/selection up in ability list
2BBind ability to attack 2
3XBind ability to attack 3
4YBind ability to attack 4
QLeft bumper (5)Switch to bindings for previous character
ERight bumper (10)Switch to bindings for next character
SHIFTLeft trigger (6)Open/close ability dialog (hold to keep open; release to activate selected ability)

Right joystick is designated '1'; D-pad is designated '2'; Left joystick is designated '3'; Left middle button is designated '4'; Left bumper is designated '5'; Left trigger is designated '6'; XBox button is designated '7'; Right middle button is designated '8'; Right trigger is designated '9'; Right bumper is designated '10'; 'A' is designated 'A'; 'B' is designated 'B'; 'X' is designated 'X'; and 'Y' is designated 'Y'

About

Provides an Unreal Engine sample project for demonstrating how to use the (pre-alpha) OpenPF2 Role Playing Game (RPG) framework.

Topics

Resources

Stars

25 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages