Input Mapping
For the overall input model, see Player Input.
Player input is mapped in character data via a top-level [input] table.
player = true
[input]
w = "action(forward)"
a = "action(left)"
s = "action(backward)"
d = "action(right)"
u = "intent(use)"
t = "intent(attack)"
k = "intent(take)"
f = "spell(Fireball)"
Key names are matched case-insensitively.
Commands
Each entry value supports one of:
action(<type>)intent(<name>)spell(<template>)- bare action alias (
"forward","left","right","backward","strafe_left","strafe_right")
Action Types
forward
- 2D / Isometric: Move the player north.
- 2D Grid: Move the player one tile north with smooth interpolation.
- First-Person: Move the player forward in current facing direction.
- First-Person Grid: Move the player one tile forward in current facing direction with smooth interpolation.
left
- 2D / Isometric: Move the player west.
- 2D Grid: Move the player one tile west with smooth interpolation.
- First-Person: Rotate left.
- First-Person Grid: Rotate left by 90 degrees.
right
- 2D / Isometric: Move the player east.
- 2D Grid: Move the player one tile east with smooth interpolation.
- First-Person: Rotate right.
- First-Person Grid: Rotate right by 90 degrees.
backward
- 2D / Isometric: Move the player south.
- 2D Grid: Move the player one tile south with smooth interpolation.
- First-Person: Move backward in current facing direction.
- First-Person Grid: Move the player one tile backward in current facing direction with smooth interpolation.
strafe_left
- First-Person: Sidestep left without changing facing.
- First-Person Grid: Sidestep one tile left with smooth interpolation without changing facing.
strafe_right
- First-Person: Sidestep right without changing facing.
- First-Person Grid: Sidestep one tile right with smooth interpolation without changing facing.
How these actions are interpreted depends on the current runtime player input mode set by set_player_camera:
2d2d_gridisoiso_gridfirstpfirstp_grid
Intents
intent(<name>) sets the player intent (for example use, attack, take).
You can define optional runtime distance limits for clicked intents in the same
character data with a top-level [intent_distance] table:
[intent_distance]
default = 2
attack = 3
take = 1.5
Behavior:
- if
[intent_distance]is missing entirely, the engine usesdefault = 2 defaultapplies to all clicked intents unless overridden- a matching intent key such as
attackortakeoverridesdefault - if the clicked target is farther away, the engine blocks the intent before it
reaches scripts and sends
{system.too_far_away}
You can also define optional intent rules globally in Rules and override them
per character template:
[intents.use]
allowed = "true"
[intents.take]
allowed = "distance <= 1.5"
[intents.attack]
allowed = "target.ALIGNMENT < 0"
deny_message = "{system.cant_do_that}"
cooldown = 2
Behavior:
allowedis an expression evaluated before theintentevent is sentdeny_messageis sent ifallowedevaluates to falsecooldownblocks the specific intent for the given number of in-game minutes- per-character
[intents.<name>]in character data override the globalRulesentry for that intent
Supported variables currently include:
distancesubject.<ATTR>oractor.<ATTR>target.<ATTR>
For UI-driven intents, you can also use button widgets.
For how intents behave in 2D vs 3D and how they become intent events, see Player Input.
Spell Shortcuts
spell(<template>) selects a specific spell intent button by template name.
Example:
f = "spell(Fireball)"
This activates the button with:
intent = "spell"
spell = "Fireball"