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

[转载发布] Eli Self Variables - Set self variables to events and use it anywhere!

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    4 天前
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4585

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2 小时前 | 显示全部楼层 |阅读模式



    Author: Hakuen Studio


    Introduction

    Keeping track of a lot of different variables can let you more sensitive to making a mistake. That's why self variables come in handy!
    It works like self switches, but you can use numbers instead of just true/false(ON/OFF). And just use one variable in a lot of events!

    Features

    • Add self variables to events.
    • These self variables are persistent across the map.
    • Can use plugin command to change the self variable of other events/maps.
    • Integration with the default event commands!
    • Work on the conditions tab of an event page.

    Detailed tutorial on steam


    Steam Community :: Guide :: Native Self Variables (MV & MV)

    This guide will teach you how to use the Self Variable plugin from Hakuen Studio. The main difference of this self variable plugin to the others, is that this one is totally integrated with the event

                                            steamcommunity.com                               




    How to use
    SpoilerAfter installing the plugin, the only thing you need to do is name a game variable like this:
    SV: your variable name here.




    It must start with "SV:" (It is case sensitive, so set the SV upper case).

    Now, you have three ways to manipulate the self variable values:

    ♦ Script Calls ♦

    ● Getting self variable values:

    • Current event -> this.selfVariableValue(varId) OR this.getSv(varId)
    • Other events/map -> $gameVariables.selfValue([mapId, eventId, varId])
    ● Changing self variable values:

    • Current event -> this.setSelfVariableValue(varId, value) OR this.setSv(varId, value)
    • Other events/maps -> $gameVariables.setSelfValue([mapId, eventId, varId], value)
    ♦ Plugin Command(MZ only) ♦

    You can change the self variables value using the plugin command.




    NOTE¹: If you want to show the value of a self variable in a text like \v[id], you will need the Eli Escape Codes, where you set up an escape code of your choice to get their values. By default is \sv[id].




    How to use the super integration feature
    SpoilerThe super integration is a feature that lets you operate the self variables using the default event commands. In another word, using the editor.

    ♦ Default event command ♦

    Self Variables are stored just like Self Switches. This means, that they mix Map Id, Event Id, and Variable Id to build a key that will hold the value of the self variable.

    • MapId, EventId, VarId = value
    So, if Event Id 6 of Map Id 114 has a Self Variable Id 2 with a value of 345, the game will save this like that:

    • 114, 6, 2 = 345
    So, with that in mind, if the variable has the "SV:" tag on their name, any event command that let you use a variable, will operate the self variable instead of the default game variable(Control Variable, Conditional Branch, etc.).

    To do that, they will need a Variable Id, Map Id, and Event Id to access a Self Variable value.
    The Var Id will get from the event command itself, by the user.
    The Map Id and Event Id will be automatically got by the plugin and combined to find the value of a self variable.

    But if in case you want to check the value of a self variable of another event? Or even in another map?

    Then you must set a variable id into the Target Variables located on the plugin parameter.



    These Target Variables will let you change the Event Id and Map Id that was being set automatically when you use the event commands.

    You just need to change their values to something above 0 and they will set a Target Map Id and Event Id.
    Set their value to 0 if you want to restore the normal behavior.
    * They also must be set as Self Variables.




    They will work on any event command that uses variables!




    Terms of Use
    Update Log


    Hakuen Studio Self Variables for RPG Maker MZ by Hakuen Studio

    Fully integrated Self Variables with the default event commands!

                                            hakuenstudio.itch.io                               






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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-16 12:54 , Processed in 0.142245 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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