设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
返回列表
+ 发新帖
查看: 225|回复: 0

[转载发布] WiggleLib - Variable Encounters & Random Encounter Formula

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    昨天 03:27
  • 签到天数: 222 天

    连续签到: 1 天

    [LV.7]常住居民III

    9102

    主题

    893

    回帖

    7万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-28 10:03:06 | 显示全部楼层 |阅读模式
    WiggleLib - Encounter Plugins
    Author: JumbocactuarX27 (aka Wiggle)


    *NOTE*
    These are old scripts and were for the early versions of RPG Maker MV. I have not tested them on more recent versions!


    Introduction
    In creating my first RPG Maker MV game, I found myself looking for a few specific plugins. Not able to find them, I decided to create them myself. Now I am happy to offer them for download and use by the greater RPG Maker community. In this post I'll introduce two seperate, but related, plugins: Variable Encounter and Random Encounter Formula.

    Features
    Random Encounter Formula

    This plugin allows you to customize the way that the number of steps until the next random encounter is triggered. By default, RPG Maker looks at the map's encoutnerStep property and does the following calculation:

    Math.randomInt(encounterStep) + Math.randomInt(encounterStep) + 1But with this plugin, you can have access to that encounterStep variable and change it to whatever you want. For example, if you wanted to have the encounter length be no less than half the encounter step but no more than 1.5 times the encounter step, you could change it to:

    Math.ceil(encounterStep / 2) + Math.randomInt(encounterStep)Variable Encounter

    With this plugin, you can use plugin commands to alter the weight or regionSet of a troop on a map, the available troops for a map, or even the encounter step, changing how often battles occur on a map!



    Using script or plugin commands with this plugin you can:


    • Add a troop to a map's encounter list
    • Remove a troop from a map's encounter list
    • Clear all troops from a map's encounter list
    • Set the regions a troop appears on in a map
    • Change the probability a given troop will appear on a map's random encounter
    • Change the encounterStep property for a given map.

    How to Use
    Install the plugins and turn them on. For the Random Encounter Formula, configure the formula you'd like by changing the Formula parameter. For the Variable Encounter plugin you can configure the Storage ID parameter which defines which game variable the encounter data will be stored in (this allows the changes in encounter lists to be persisted in the save file between play sessions). At this point you are ready to start using plugin commands.

    Below is the variable encounter plugin help text inside a spoiler. The random encounter formula plugin has no help text.
    Spoiler: Variable Encounter Help Text
                    Code:       


    Demo
    I don't have a demo that uses these plugins right now. I can put one together if there's demand.

    Download
    Both files are attached below.

    Known Issues
    I don't know of any bugs in this plugin, but if you find some report them here and I'll fix it.

    Important development considerations for the Variable Encounter plugin

    This can be found in the Variable Encounter help file as well with more information, but it's very important to consider this if you're getting really into using the plugin:

    If you try to perform an operation listed below on a map that your player has not visited yet, generally nothing will happen. You will not be able to modify their encounter list until the player has visited that map!However, there is a workaround for this. If you wish to modify a map's encounter list before it is visited by the player, you must use a script command to create empty map data for that map. The command for this is:                                 Code:       

    Terms of Use

    Please feel free to use these scripts commercially or non-commercially. If you use it commercially please credit me in your game's credits and let me know about your game's release! I'd love to link to it here.


    本贴来自国际rpgmaker官方论坛作者:JumbocactuarX27处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/wigglelib-variable-encounters-random-encounter-formula.49773/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x

    帖子地址: 

    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-10-22 06:33 , Processed in 0.088088 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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