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

[转载发布] TAA_EventTemplates (v1.0.0)

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

    连续签到: 2 天

    [LV.7]常住居民III

    4594

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    TAA_EventTemplates - v1.0.0
    Created by taaspider

    Terms of Use
    Any plugins developed by taaspider are free for use for both commercial and  noncommercial RPG Maker games, unless specified otherwise. Just remember to credit "taaspider".

    Redistribution of parts or the whole of taaspider plugins is forbidden (which also includes reposting), unless it comes from the official website (linked within the post). You are allowed to edit and change the plugin code for your own use, but you're definitely not  allowed to sell or reuse any part of the code as your own. Although not required to use my plugins, a free copy of your game would be nice!


    Introduction
    Replicating frequent event through your game can be quite time consuming, specially if you find yourself in need of updating all of them. Be it a visual encounter, a chest, an item or NPC, this kind of work can become quite time consuming, but reflecting in little to no progress in a project.

    TAA_EventTemplates brings two important features:

    • The ability to set an event to automatically copy another (which serves as a template), so that if you ever need to change that chest behavior you can just alter the template. Wherever that template is referenced will be automatically updated the next time you start your game;
    • The ability to transform an event into a template. This feature lets you organize your events with less pages and care for your game's progress in a more organized way. Or even change how an event from another map behaves completely without being limited to switchs and variables.
    How to Use

    You can download the plugin here.

    You can also test the plugin using my sample demo project. It was built with MV, but you can open it with MZ as well (just open the game.rmmzproject file and you're good to go).

    Spoiler: Instructions
    Everything is based on event templates. The first thing you need to do is create a few maps to serve as a template sheet. You can create any number of maps you want, and even give them names, which you can later use to load your event templates!

    On each of your map templates, create and organize the events you need. As with maps, events can be given a name, which can be used to reference it later. Just make sure that the combination of "Map Name" and "Event Name" are unique, otherwise we may run into trouble later. Then open the Plugin Manager and fill the only plugin parameters displayed with the map IDs from your template maps.

    After that, just use note tags and plugin commands to reference one of your templates.

    Be careful though: transforming an event into another do not alter the self switches states. So if the event's self switch A is on, for example, transforming it into another event won't change that. The event ID and Name are also not changed (so you can still reference them in move route commands, for example).

    Also, event transformations are automatically saved and load any time the event is loaded again. That means that going out and back from the current map won't reset the transformation. The only way to do that is through explicit plugin commands.

    WARNING: Map and event names cannot contain either the , or > symbols. If you're an MV user, I'd advise against creating names containing blank spaces, as that will make them unreachable through plugin commands.
    If you're using MZ blank spaces are not a problem (, and > are still a no no though).
    Spoiler: Event Note Tags
    Setting a note tag in an event will cause it to automatically transform into the referenced template the first time it is loaded (as long as the map and event keys provided exists within our templates).

    The basic note tag is as follows:
    <TAA_EVT: mapKey,eventKey >​
    mapKey can be either the map template ID or its name. The same applies to eventKey (event ID or event name). Keep in mind that if you choose to reference them by name their name is case sensitive and the combination of both must be unique for this to work properly.

    Remember: self switch states won't change when an event is transformed. When talking about note tags, that means that an event will always load with all self switches turned off, at least initially. But what if, for some reason, we want it to turn one of them on by default?
    That can also be done with note tags:
    <TAA_EVT: mapKey, eventKey, sw:abcd>​
    sw:abcd means that all four self switches will be turned on by default. If you don't want all, but just one of them to be turned on, just list it and not the others. For example:
    <TAA_EVT: map1,event1,sw:A>​
    here we're loading event1 from map1 with self switch A already on.
    <TAA_EVT: map1,event1,sw:cd>​
    and here we're loading the same event, but with switches C and D turned on.
    Spoiler: Script Calls
    $gameSystem.getMapIdByName(mapName)
    If the given mapName corresponds to an existing map, returns its ID. Otherwise returns 0.​

    $gameSystem.hasEventTemplateData(mapId, eventId)
    Returns true if the given map and event IDs (no names allowed) have a saved transformation registered. Otherwise false.​

    $gameSystem.deleteEventTemplatesData(mapId, eventId)
    If the given Ids have saved transformations they are deleted. That means the next time this event is loaded it will be reset to its original form.​

    $gameSystem.transformLocalEvent(eventId, mapKey, eventKey, noHistory)
    Transforms the event referenced by eventId (ID only, name not allowed) from the current map into the template referenced by mapKey and eventKey (names are allowed for this two). noHistory determines if the change must be saved in the event's records, allowing you to undo the transformation later. If false the transformation WILL BE remembered, if true it won't.​

    $gameSystem.transformRemoteEvent(mapId, eventID, mapKey, eventKey, noHistory)
    Works in a very similar way to transformLocalEvent, only now it's applied to events from another map (that's why in this case you need to specify the mapId).​

    $gameSystem.rollbackLocalEvent(eventId, n)
    Undo n transformations for the event referenced by eventId (no name allowed). If no records of previous forms are found, the command is ignored.​

    $gameSystem.rollbackRemoteEvent(mapId, eventId, n)
    Same as rollbackLocalEvent, only for another maps.​

    $gameSystem.resetLocalEvent(eventId)
    Ignores any saved data for the event eventId loacted in the current map and restores it to its original form.​

    $gameSystem.resetRemoteEvent(mapId, eventId)
    Same as resetLocalEvent, only for events loacted in another maps.​

    Spoiler: PLUGIN COMMANDS
    Transform Local Event
    Triggers a transformation for an event located in the current map.​

    Transform Remote Event
    Triggers a transformation for an event in a specific map (not the current one).​

    Rollback Local Event
    Undo any number of transformations for an event located in the current map.​

    Rollback Remote Event
    Undo any number of transformations for an event in a specific map (not the current one).​

    Reset Local Event
    Resets an event in the current map to its original form.​

    Reset Remote Event
    Resets an event in any specific map to its original form.​

    Spoiler: Change log

    • Version 1.0.0:

      • Public release. No changes from beta;

    • Version 0.9.0:

      • Beta release;



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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-16 14:26 , Processed in 0.127212 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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