设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 120|回复: 0

[转载发布] Multiple Step counters

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9072

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58885
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68851

    灌水之王

    发表于 2026-7-27 09:05:47 | 显示全部楼层 |阅读模式
    multipleStepCounts v1.0
    Authored by: Tea's Jams


    Terms of Use:
    Free for commercial and non-commercial projects
    Editing allowed
    Re-posting allowed
    Credit Tea's Jams (optional)

    Introduction
    This plugin provides 10 extra step counters in addition to the game data step counter. Choose a variable to store your step count in the parameters and use the engines built in variable manipulation tools to reset or otherwise change each step count to your needs.

    Features
    - 10 additional step counters
    - each count can be manipulated using the usual eventing options, no plugin commands or script calls needed.

    Video Preview

    Spoiler
    https://www.youtube.com/embed/IdhFk0Q6W6Y





    How to Use
    -Assign the variables you would like to use for each step count.
    -Manipulate each step count through the variables tools in the game engine in your events.

    Script
                    Code:       
    1. /*:
    2. *
    3.   * @plugindesc MultipleStepCount v1.0 This plugin allows you to store and reset mutilple step counts with variables in the parameters
    4.   *
    5.   * @author TeasJams
    6.   *
    7.   * @param Step Counter 1
    8.   * @desc Set your desired variable
    9.   * @default 0
    10.   *
    11.   * @param Step Counter 2
    12.   * @desc Set your desired variable
    13.   * @default 0
    14.   *
    15.   * @param Step Counter 3
    16.   * @desc Set your desired variable
    17.   * @default 0
    18.   *
    19.   * @param Step Counter 4
    20.   * @desc Set your desired variable
    21.   * @default 0
    22.   *
    23.   * @param Step Counter 5
    24.   * @desc Set your desired variable
    25.   * @default 0
    26.   *
    27.   * @param Step Counter 6
    28.   * @desc Set your desired variable
    29.   * @default 0
    30.   *
    31.   * @param Step Counter 7
    32.   * @desc Set your desired variable
    33.   * @default 0
    34.   *
    35.   * @param Step Counter 8
    36.   * @desc Set your desired variable
    37.   * @default 0
    38.   *
    39.   * @param Step Counter 9
    40.   * @desc Set your desired variable
    41.   * @default 0
    42.   *
    43.   * @param Step Counter 10
    44.   * @desc Set your desired variable
    45.   * @default 0
    46.   *
    47.   * @help
    48.   *
    49.   * Assign each step count to a variable of your choice, you can manipulate the step count using variable event options in the engine.
    50.   */
    51.   (function(){
    52.       var parameters = PluginManager.parameters('MultipleStepCounter');
    53.       var stepCount1 = Number(parameters['Step Counter 1']);
    54.       var stepCount2 = Number(parameters['Step Counter 2']);
    55.       var stepCount3 = Number(parameters['Step Counter 3']);
    56.       var stepCount4 = Number(parameters['Step Counter 4']);
    57.       var stepCount5 = Number(parameters['Step Counter 5']);
    58.       var stepCount6 = Number(parameters['Step Counter 6']);
    59.       var stepCount7 = Number(parameters['Step Counter 7']);
    60.       var stepCount8 = Number(parameters['Step Counter 8']);
    61.       var stepCount9 = Number(parameters['Step Counter 9']);
    62.       var stepCount10 = Number(parameters['Step Counter 10']);
    63.       var Game_Party_prototype_intitialize = Game_Party.prototype.initialize;
    64.       Game_Party.prototype.initialize = function() {
    65.           Game_Party_prototype_intitialize.call(this);
    66.         Game_Unit.prototype.initialize.call(this);
    67.         this._steps1 = 0;
    68.         this._steps2 = 0;
    69.         this._steps3 = 0;
    70.         this._steps4 = 0;
    71.         this._steps5 = 0;
    72.         this._steps6 = 0;
    73.         this._steps7 = 0;
    74.         this._steps8 = 0;
    75.         this._steps9 = 0;
    76.         this._steps10 = 0;
    77.         this.initAllItems();
    78.     };
    79.     var Game_Party_prototype_increaseSteps = Game_Party.prototype.increaseSteps;
    80.     Game_Party.prototype.increaseSteps = function() {
    81.         Game_Party_prototype_increaseSteps.call(this);
    82.         this._steps1++;
    83.         this._steps2++;
    84.         this._steps3++;
    85.         this._steps4++;
    86.         this._steps5++;
    87.         this._steps6++;
    88.         this._steps7++;
    89.         this._steps8++;
    90.         this._steps9++;
    91.         this._steps10++;
    92.         var count1 = this._steps1;
    93.         var count2 = this._steps2;
    94.         var count3 = this._steps3;
    95.         var count4 = this._steps4;
    96.         var count5 = this._steps5;
    97.         var count6 = this._steps6;
    98.         var count7 = this._steps7;
    99.         var count8 = this._steps8;
    100.         var count9 = this._steps9;
    101.         var count10 = this._steps10;
    102.         $gameVariables.setValue(stepCount1, count1);
    103.         $gameVariables.setValue(stepCount2, count2);
    104.         $gameVariables.setValue(stepCount3, count3);
    105.         $gameVariables.setValue(stepCount4, count4);
    106.         $gameVariables.setValue(stepCount5, count5);
    107.         $gameVariables.setValue(stepCount6, count6);
    108.         $gameVariables.setValue(stepCount7, count7);
    109.         $gameVariables.setValue(stepCount8, count8);
    110.         $gameVariables.setValue(stepCount9, count9);
    111.         $gameVariables.setValue(stepCount10, count10);
    112.     };
    113. var Game_Variables_prototype_setValue = Game_Variables.prototype.setValue;
    114. Game_Variables.prototype.setValue = function(variableId, value) {
    115.     Game_Variables_prototype_setValue.call(this);
    116.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount1) {
    117.         if (typeof value === 'number') {
    118.             value = Math.floor(value);
    119.             $gameParty._steps1 = value;
    120.         }
    121.         this._data[variableId] = value;
    122.         this.onChange();
    123.     }
    124.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount2) {
    125.         if (typeof value === 'number') {
    126.             value = Math.floor(value);
    127.             $gameParty._steps2 = value;
    128.         }
    129.         this._data[variableId] = value;
    130.         this.onChange();
    131.     }
    132.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount3) {
    133.         if (typeof value === 'number') {
    134.             value = Math.floor(value);
    135.             $gameParty._steps3 = value;
    136.         }
    137.         this._data[variableId] = value;
    138.         this.onChange();
    139.     }
    140.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount4) {
    141.         if (typeof value === 'number') {
    142.             value = Math.floor(value);
    143.             $gameParty._steps4 = value;
    144.         }
    145.         this._data[variableId] = value;
    146.         this.onChange();
    147.     }
    148.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount5) {
    149.         if (typeof value === 'number') {
    150.             value = Math.floor(value);
    151.             $gameParty._steps5 = value;
    152.         }
    153.         this._data[variableId] = value;
    154.         this.onChange();
    155.     }
    156.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount6) {
    157.         if (typeof value === 'number') {
    158.             value = Math.floor(value);
    159.             $gameParty._steps6 = value;
    160.         }
    161.         this._data[variableId] = value;
    162.         this.onChange();
    163.     }
    164.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount7) {
    165.         if (typeof value === 'number') {
    166.             value = Math.floor(value);
    167.             $gameParty._steps7 = value;
    168.         }
    169.         this._data[variableId] = value;
    170.         this.onChange();
    171.     }
    172.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount8) {
    173.         if (typeof value === 'number') {
    174.             value = Math.floor(value);
    175.             $gameParty._steps8 = value;
    176.         }
    177.         this._data[variableId] = value;
    178.         this.onChange();
    179.     }
    180.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount9) {
    181.         if (typeof value === 'number') {
    182.             value = Math.floor(value);
    183.             $gameParty._steps9 = value;
    184.         }
    185.         this._data[variableId] = value;
    186.         this.onChange();
    187.     }
    188.     if (variableId > 0 && variableId < $dataSystem.variables.length && variableId == stepCount10) {
    189.         if (typeof value === 'number') {
    190.             value = Math.floor(value);
    191.             $gameParty._steps10 = value;
    192.         }
    193.         this._data[variableId] = value;
    194.         this.onChange();
    195.     }
    196. };
    197.   })();
    复制代码



    FAQ
    reserved for future questions:

    Q:
    A:

    Credit and Thanks
    - Tea's Jams
    - DriftwoodGaming.

    Author's Notes
    This is a very basic script, excuse the noob format please. This is the first plugin I've written, I hope someone can find some use from it, enjoy!


    本贴来自国际rpgmaker官方论坛作者:Tea++处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/multiple-step-counters.106214/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-22 07:52 , Processed in 0.106823 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表