Narrat Docs
Search…
Add XP
The add_xp function in narrat increases the xp of the player in a specified skill
The add_xp function in narrat increases the xp of the player in a specified skill
Syntax: add_xp [skillId] [xp]
See the skills system guide to know more
Example:
1
skillCheckChoice:
2
choice:
3
"Should we try jumping over a fence?"
4
roll aSkillCheck agility 70 "Try jumping!" hideAfterRoll:
5
success:
6
"You graciously jump over a fence, hair blowing in the wind, and land in a heroic pose that would be used in a movie trailer."
7
talk inner idle "Woo I did it!!!"
8
add_xp agility 5
9
failure:
10
"You try jumping over the fence, but not high enough. You stab your toe against the fence and fall head first into a puddle of mud. It's also in the background of a tiktok a passerby was filming now."
11
talk inner idle "Ouch!"
Copied!
In this example, the player gains agility XP because they succeeded at jumping over the fence.
Copy link