Chrono Engine (fix unwanted enemies engaging in battle)

Sanjha36

Villager
Member
Joined
Jul 16, 2019
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
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:
  1. Create a Variable in the editor called "Enemy Aggro"
  2. 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.
    Screenshot 2019-08-08 11.36.32.png Screenshot 2019-08-08 11.36.41.png
  3. 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.
    Screenshot 2019-08-08 11.35.33.png
  4. 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).
Screenshot 2019-08-08 11.35.21.png

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:
  1. 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.
  2. 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).
  3. 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!
    Screenshot 2019-08-08 11.38.00.png Screenshot 2019-08-08 12.37.02.png
  4. 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.
    Screenshot 2019-08-08 12.20.03.png

For the Events:
  1. 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).
  2. 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.
  3. 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
  4. 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.
    Screenshot 2019-08-08 11.40.27.png Screenshot 2019-08-08 11.40.30.png Screenshot 2019-08-08 11.40.35.png Screenshot 2019-08-08 11.40.38.png
  5. 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!)
  6. 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
    Screenshot 2019-08-08 11.40.55.png
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!!
 

Attachments

Last edited:

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,386
Reaction score
4,779
First Language
English
Primarily Uses
RMVXA
Hi @Sanjha36! Sorry this thread took a while to review for approval. As a "workaround" tutorial for Mog's plugin, it's a bit unique, but I can definitely see the need for it. :)

Because the tutorial is complex, and implements concepts the designer may not be familiar with, I strongly suggest adding screenshots of the Event Pages (for one event), the Common Event (for one group), and an example of a map "painted" with Region IDs for enemies on the screen. You can add these images in-line with the steps where the player is doing these things. Please go ahead and do this if you can, as I feel it will make your presentation a lot more clear, and help everyone use your workaround.

Additionally, with your permission, I would like to improve the formatting for you to make your post a bit more pleasing to the eyes (for example, I can bold text and well-formatted bullet points). Is it okay if I do this for you?
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,386
Reaction score
4,779
First Language
English
Primarily Uses
RMVXA
@Sanjha36 Since you didn't respond, I boldly went ahead and cleaned up your tutorial for readability and clarity, and I'll approve the tutorial now. I think it's much clearer now, but you have the right to change anything that you don't like back if you feel it confuses the meaning.

If you see this, I urge you to add screenshots of the Event Pages, etc., into your tutorial - this will make it so much easier for anyone following your tutorial to "get it right".
 

Sanjha36

Villager
Member
Joined
Jul 16, 2019
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
Sorry for the late response! Was on a vacation. Thanks so much for the edits! I'll add screenshots tomorrow. My hope is that whoever is using Mog's Chrono Engine plug-in will see this, and help give suggestions for the issue as well. When I tried for several hours, looking through here and on Reddit, I didn't find anything that really dealt with the problem I was having, so wanted to give back to the community and save someone the hours of work I spent tweaking and testing XD (thankfully learned some awesome stuff along the way =D)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Don't mind me, just installing a fog machine. :LZSwink:


I can't stop looping this BGM while at work since I began to play PSO2. It just too good for mood booster.
How to post a picture there in the status feed?
So I was at the grocery store trying to reach for some small garbage bags on the top shelf way in the back. Instead of going all the way downstairs to find someone to help me I grabbed a broom and pulled it down. Putting the broom back I said, "Thank you for your service".
S.O.S.--10:16pm......two toddlers still awake....send help...

Forum statistics

Threads
100,423
Messages
975,694
Members
132,080
Latest member
Garycomehome
Top