PluginName: SDJB_EventUtility
Author: ShadowDragon
===
TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
ShadowDragon
ShadowDragonJB
Version + UPDATE'S
30-08-2024 Version 0.1.0 first release
===
WARNING ===
YOU ARE NOT ALLOWED TO REDISTRIBUTE OR SELL IT OR TAKE CODE FOR YOUR OWN.
DO NOT REMOVE THE HEADER.
if you know the
Trophy Room Tutorial it is nice and awesome, but it also use JS knowledge.
also using the same code over and over if the array is long, but what if you have similar way
for giving out items?
what if used for evented relation system?
or event guild system?
or gifted event to gain some points?
you gonna use it code lots of time, and an mistake can be made fast as well.
I made this plugin to use it for $gameVariables array to take control of that easier.
with a simple scriptline that works in MV and MZ.
so making an error won't be there and the list of checking on many parts aren't needed either.
so how does it works? (see spoiler)
Spoiler: Explanation
This plugin simplify the array variables like, points or trophies in a clean way.
Create a start up variable that looks like this:
control variables 1: script: [["Abby", 0],["Jennifer", 0],["Emily", 0],["Mick", 0],["Kevin", 0]]
or use a scriptcall: $gameVariables.setValue(1, [["Abby", 0],["Jennifer", 0],["Emily", 0],["Mick", 0],["Kevin", 0]])
Either way works.
After setting this up and running, you can use scriptcall to add points or remove points:
addPoints(id, name, value)
sample: addPoints(1, "Jennifer", 2)
This will adds 2 points to Jennifer
subPoints(id, name, value)
sample: subPoints(1, "Jennifer", 1)
This will remove 1 point to Jennifer.
To make it user friendly for checking in a conditional branch, use the scriptcall:
tempCheck(id, valueId, name)
A sample would be:
tempCheck(1, 2, "Jennifer")
This stores the value from Variable 1 inside variable 2 from Jennifer,
so you can do this inside the conditional branch:
if: script: $gameVariables.value(2) > 5
// do what happens if the value is bigger than 5
end (or use an else handler if they didn't reach it yet).
Download it if you make use of any system, (I leave the plugin here for now, as its a stand alone)
if you found it useful or recommendations, let me know.
本贴来自国际rpgmaker官方论坛作者:ShadowDragon处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/sdjb_eventutility.172503/