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

[制作教程] Chrono Engine (fix unwanted enemies engaging in battle)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 207 天

    连续签到: 1 天

    [LV.7]常住居民III

    3646

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 昨天 07:32 | 显示全部楼层 |阅读模式
    For anyone that's using Moghunter's Chrono Engine, and having trouble with unwanted behavior where all the enemies onscreen engage in the battle, I found a work-around! =D I tried to be as detailed as I could, but please let me know if you need any help! I know this is a long process, but it has to be done if you don't want random enemies flying across the screen!

    You will need 2 plugins from Yanfly:

    • Region restrictions
    • Region common events

    Set up:

    • Create a Variable in the editor called "Enemy Aggro"
    • Create 3 Switches in the editor for each Battle Group:

      • An "Enemy Aggro" switch - labeled "Enemy Aggro 1" for battle group 1, " Enemy Aggro 2" for battle group 2, etc.
      • An "Enemy Group Visible" switch - labeled "E Grp 1 Visible" , "E Grp 2 Visible", etc.
      • An "Enemy Group Transfer" switch - "E Grp 1 Transfer", "E Grp 2 Transfer", etc.
      Spoiler







    • Create a Common Event for each Battle Group - named "Enemy Aggro 1", "Enemy Aggro 2", etc.

      • Inside each common event, Turn the corresponding Enemy Aggro Switch on, and Set the Enemy Aggro Variable equal to the Enemy group/aggro number.
      Spoiler





    • Create a separate Common Event named "Enemy Aggro Reset" (I called mine "E aggro 0"), that turns OFF all the Enemy Aggro switches, and sets the Enemy Aggro variable back to 0. (This is used for the boundary around each enemy group region on the map).
    Spoiler






    Because Chrono Engine assigns the enemy to the event ID, once an enemy is 'activated' the event ID will forever cause that enemy to become active in a battle when visible on the screen. (Even if you use YEP_EventMorph to change the event, the event ID is the same, so the enemy will still be active in a battle on the screen. The image doesn't matter either!) Therefore, some additional setup is needed:

    • For each enemy event on the map, create a separate "Blank Enemy #" event. This will be used to switch places with the actual enemy event, in order to place it off of the visible screen.
    • Pick the Region numbers that you want to assign to the different battle groups. Also, choose a region that will call the common event "Enemy Aggro Reset" (I used region 1).
    • In the YEP_RegionEvents plugin's Parameters, set each enemy group region's "Common Event" to the ID of the corresponding Common Event for this enemy group.

      • Don't forget to go into the YEP_RegionRestrictions plugin and make all the regions passable!
      Spoiler







    • On the map, 'paint' the tiles for each enemy group with the corresponding region number.

      • Make sure that the region is bigger than the aggro range of the enemy group.
      • Also, make sure that the border of each region has your "enemy aggro 0" region placed, and that there isn't any way to diagonally 'miss' the region.
      Spoiler






    For the Events:

    • For the enemy events, name each event "E1", "E2", etc., up to the number of enemies on the map. The 1st page of each enemy event should not contain any eventing - simply choose its graphic (and movement pattern).
    • For the 2nd page of the enemy events, have the two Chrono Engine-related Comments with the enemy ID, and walk_nearby #. Set the Condition for the 2nd page to the "Enemy Aggro #" Switch that corresponds to the enemy group that you want to be active.
    • For the 3rd page of the enemy events, Set the Condition to the "Enemy Aggro" variable greater than or equal to this enemy group's number, plus one. (For example, if the enemy is in group #2, the variable must be >= 3). Make sure the Trigger for this page is set to "Parallel"!  For the eventing contents of this 3rd page:

      • Turn the Switch for "E Grp # Visible" for this enemy group ON
      • Set Event Location: Exchange this event with the "Blank enemy #" event you created above for this enemy
      • Turn the Switch "E Grp # Transfer" for this enemy group ON

    • For the 4th page of the enemy events, set the Condition to the "E Grp # Transfer" Switch for this enemy group is ON.  No eventing needs to be on this 4th page. Spoiler: Enemy Event Pages

    • For the 1st page on each corresponding Blank Enemy event that you created above, leave the first page blank, with no eventing and no enemy graphic (so that they aren't just hanging out visible on your map!)
    • For the 2nd page on each corresponding Blank Enemy event, set the Condition to the "E Grp # Visible" Switch for this enemy group. Make sure the Trigger for this page is set to "Parallel"! For the eventing contents of this 2nd page:

      • Start with a Conditional Branch: If enemy aggro = 0 (this is your enemy aggro variable).  Inside that conditional branch should be the following:


      • Set event location: Exchange this event with its corresponding "actual" enemy event called "E#" (such as "E1" or "E2")
      • Turn the "E Grp # Visible" Switch for this enemy group OFF
      • Turn the"E Grp # Transfer" Switch for this enemy group to OFF
      Spoiler






    Test it out, and make sure it does what you want it to!

    This is a bit of a process, but once you do it for a certain # of enemies on a map, use those as your "template" and just change the enemy graphics for the rest of the maps! Hope this helps someone!!


    本贴来自国际rpgmaker官方论坛作者:Sanjha36处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/chrono-engine-fix-unwanted-enemies-engaging-in-battle.111460/

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-10 02:06 , Processed in 0.107981 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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