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

[转载发布] EST - SAVE MAP EVENTS (My First Java Script Plugin)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8101

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    ■ Information      ╒══════════════════════════╛
    EST - Save Map Event
    Version: 1.6
    By Estriole
    File name: EST_Save_Map_Event.js

      ■ Changelog       ╒══════════════════════════╛
    Earlier changelog inside spoiler...

    Spoilerv1.0 2015.10.25           Initial Release
    v1.1 2015.10.28     - minor change in unerase method
    v1.2 2015.10.31     - add notetags for event you want the page to "reset" upon reentering the map...
                           give comment
                           <reinit_event>
                           so the event page will be reseted to prior activating the page when transfering to map.
                           if you create door manually without move route > this event > Through ON...
                           or with through on but also with through OFF... you need to add above comment tag.
                           if you use auto door... see below:

                         - add auto door event detection... (in editor right click quick event creation > door)
                         since it's tedious work to edit ALL your auto door...
                         i detect it like this:
                         if there's Event Command > Move Route > This Event > Through ON
                         AND
                         if there's NO Event Command > Move Route > This Event > Through OFF

                         i assume it's auto door event...

                         - although it's "RARE"... is there a scenario that event like above is NOT an autodoor event?
                         if yes... don't worry... you could add comment at the "RARE EVENT" page:
                         <not_auto_door>
                         and it won't reset the page.
    v1.3 2015.11.01     - fix crash when no event page met condition...
    v1.4 2015.11.02     - new method to delete saved event so it will reload the map next time entering the map
                           Plugin parameter format change. so it's okay to rename the .js files.
    v1.5 2015.12.02     - removed plugin parameter auto save. because of save file for browser limitation
                         is around 5.000 event...(5mb. 1b = 1event average) you need to pick which map you want to
                         auto save by giving map notetags <auto_save_event>
                         it will tag the map event to save it's event. also... there will be update in
                         EST - CLONE EVENT to NOT save the map event if the map not tagged with that notetags.
                         so we can clone / add event in every map. but if we want it to have permanent changes...
                         the notetags required in the map note.



    v1.6 2015.12.06     - ability to tag event note / tag event page comment with <temporary_event>
                         to make it deleted when reenter map.

    ■ Introduction     ╒══════════════════════════╛
    This plugin can make us save the map events so  it won't be reloaded
    from database when entering new map. it will use saved event instead

    ■ Features         ╒══════════════════════════╛
    - save map events
    - not reload event at map enter but use saved event
    - option to reset event page prior entering the map

    ■ Plugin Download ╒══════════════════════════╛
    Dropbox



                                            www.dropbox.com                               



    (update the dead dropbox link)
    warning: this plugin created using earlier MV version. this might not work in updated MV.
    you can ask other scripter to create compatibility patch since i already retired.
    i only update the link for people who want to make the patch.

    (All Build And Decor share the same demo)
    Demo
    Dropbox



                                            www.dropbox.com                               



    (update the dead dropbox link)
    warning: this plugin created using earlier MV version. this might not work in updated MV.
    you can ask other scripter to create compatibility patch since i already retired.
    i only update the link for people who want to make the patch.

    ■ How to use       ╒══════════════════════════╛
    Spoiler1) Saving map events to memory
    Plugin Command:

        save_cur_map   or Script Call:

      $gameMap.save_cur_map() (also in case you want to use this from other plugin)

    IF you have event which change it's graphic (example Door)
    and you need to revert the changes back when doing transfer...
    add this COMMENT in the door event page

    <reinit_event> warning it won't reinit self switch!!!. this just change the page to state prior
    activating the page...

    if you use AUTO DOOR (in editor > right click > quick event creation > Door)
    i include some automatic detection. and you don't have to add any comment tags.
    the detection work like this:

                            if there's Event Command > Move Route > This Event > Through ON
    AND
    if there's NO Event Command > Move Route > This Event > Through OFF
    i assume it's auto door event...               
    Click to expand...

    although it's "RARE"... is there a scenario that event like above is NOT an autodoor event?
    if yes... don't worry... you could add comment at the "RARE EVENT" page:

    <not_auto_door> and it won't reset the page.

    2) Deleting map events from memory (it will reload map event from editor next time reenter map)
    self switch is left as it is though... so if any changes on self switch will be remain there.
    if you don't want this behavior use number 3) method below

    Plugin Command:

      delete_cur_map   or Script Call:

        $gameMap.delete_cur_map() 3) RESETING map events to editor (all self switch also will be set to false)
    Plugin Command:

        reset_cur_map   or Script Call:

        $gameMap.reset_cur_map() 4) AUTO SAVING map event... WARNING... don't save too many map with many events if you make
    browser game. since there's 5mb size limitation (around 5000 event).
    so if you want to autosave in a certain map. add this in map note

    <auto_save_event> this note will also automatically save map events when there's a change using
    EST Clone Transform Delete Event.


    5) to make event temporary. (will be deleted at entering the map. useful for spawned event you
    want to not stay the next time you reenter the map). add this in either event note or event page comment

    <temporary_event>




    ■ Dependencies     ╒══════════════════════════╛
    none

    ■ Compatibility    ╒══════════════════════════╛
    I'm new in JS... and MV is new engine... so i cannot say for sure.
    but it should be compatible with most things. this even compatible with
    Hudell - Custom Event

    ■ Parameters       ╒══════════════════════════╛
    None

    Credit and Thanks
    - Estriole


    ■ Author's Notes   ╒══════════════════════════╛
    This is part of the EST - DECOR AND BUILD SERIES.


    EST - SAVE MAP EVENTS

    EST - CLONE TRANSFORM DELETE EVENT

    EST - EVENT GRAPHIC SHIFT

    EST - EVENT SIZE AND TRIGGER

    EST - BUILD AND DECOR EX

    EST - REGIONMAPLOADER


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 12:56 , Processed in 0.089430 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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