设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
搜索附件  
同能RPG制作大师 › 附件中心 › 同能RM技术讨论区 › RPG Maker MV 讨论区 › WiggleLib - Variable Encounters & Random Encounter Formula: WiggleLib_RandomEncounterFormula.js

WiggleLib - Variable Encounters & Random Encounter Formula: WiggleLib_RandomEncounterFormula.js

 

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

幸运抽奖

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

立即查看

Loading...

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

GMT+8, 2026-10-4 06:12 , Processed in 0.102878 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部