Skip to main content
Corvus Connection

RPG: Add XP

Rpg
Action
Portent preview
Pro
rpg.addXpGrants experience to a joined viewer and applies any resulting level-ups (each level grants allocation points). Wire the amount into amount. Defaults to the triggering viewer; set userId to target a specific viewer. Safely no-ops when the viewer has not joined.Grants the wired XP to a viewer and applies level-ups; binds ok / newLevel / levelsGained / unspentPoints.
Engagement

Inputs

Name
Kind
Type
Flags
in
Exec
exec
multiplexed
amount
Data
System.Int64
None
  • Name
    in
    Kind
    Exec
    Type
    exec
    Flags
    multiplexed
  • Name
    amount
    Kind
    Data
    Type
    System.Int64
    Flags
    None

Outputs

Name
Kind
Type
Flags
out
Exec
exec
None
ok
Data
System.Boolean
multiplexed
newLevel
Data
System.Int32
multiplexed
levelsGained
Data
System.Int32
multiplexed
unspentPoints
Data
System.Int32
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    ok
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed
  • Name
    newLevel
    Kind
    Data
    Type
    System.Int32
    Flags
    multiplexed
  • Name
    levelsGained
    Kind
    Data
    Type
    System.Int32
    Flags
    multiplexed
  • Name
    unspentPoints
    Kind
    Data
    Type
    System.Int32
    Flags
    multiplexed

Parameters

Name
Type
Required
Default
Choices
userId
System.String
no
""
None
  • Name
    userId
    Type
    System.String
    Required
    no
    Default
    ""
    Choices
    None

Lowers to C#

var xp = await ctx.Rpg.Characters.AddXpAsync(userId, amount);