Description

Sets a parameter for each level

Usage

Parameters

  • name {String|Array}

    Parameter name

    if array : array with the parameter values for each level. The first element is always 0. Example:

    rpg.player.setParam("attack", [0, 622, 684, 746, 807, 869, 930, 992, 1053, 1115, 1176, 1238, 1299, 1361, 1422, 1484, 1545]);
    

    At Level 4, the player will have 807 points of attack

  • valueOneLevel {Integer}

    Value at the first level

  • valueMaxLevel {Integer}

    Value at the last level

  • curveType {String}

    Type Curve :

    • proportional : Parameter increases in a manner proportional

Returns

Array

Example

global.game_player.maxLevel = 16; // Limits the maximum level to 16 for this example
var param = global.game_player.setParam("attack", 622, 1545, "proportional");
console.log(param);

Displays :

[0, 622, 684, 746, 807, 869, 930, 992, 1053, 1115, 1176, 1238, 1299, 1361, 1422, 1484, 1545, 1545]

The first element is always 0

Discussion