MOG_ChronoEngine Adjustments

This is great! Your video has also inspired me to dig into Chrono Engine a bit more. I think I wrote a few lines where it gets the actor/enemy's prior speed, change to a quicker moving speed for the attack, and then return to normal after a return back to position. (I'll have to wait until I'm at a computer to post the lines of code I used).

I am actually using the Half Move plugin with success instead of Altimit Movement; it's plenty for me and half tiles aren't bad at all - I just have to adjust my move routes.

One issue I am running into is trying to use animations for states or even overlays since most of those are for SV battlers. I can load the icons that are above the players and enemies but have had no success in getting an animated overlay like they have in SV battles or even animations from plugins VE or Yanfly. If you have any insight on that. I'm all ears.

Thanks!
that's tweaks are awesome, i hope someone fix the visual glitch on battle moviment. but u already have made amazing things.
Hello everyone. An old lurker here that just started fooling around with Chrono Engine myself. Now please keep in mind I'd be considered a beginner around here compared to others when it comes to Java knowledge but I may have figured out a work around for the lack of walking animations for follower/party members when moving to attack and figured I'd share for anyone else that may be interested. I know it's a fairly old thread at this point but the topic I'm addressing is so specific I figured instead of starting a new topic I'd just add this here. Apologies to the mods in advanced.

First and foremost, I'm working off his modified versions of MOG's and Restart's following the plugin ordered pictured in this very thread. As far as I can tell the additions I've made should not cause any errors as the Wait pose itself is pretty self contained. All we are doing here is is telling the function we just really want to do one of two things pretty much. We either want to stand in our combat pose or we are moving so we want to actually show the dash pose while that happens.

Inside MOG_CharPoses.js you are going to want to search out this section of code and modify it with what I have highlighted.
Spoiler: Code
First.PNG
The above is checking to see if we are currently in the wait pose. I noticed IsMoving is in there but I didnt see IsDashing.

Now my understanding is that Flintx's changes the state of a battler to dashing inside ChronoEngine.js whenever they move. We account for that with !this.IsDashing() to make sure it's added to the list of poses that are not the wait pose itself. This may be unnecessary as a whole but not being familiar with all the ins and outs of the other plugins I wanted to add it just to be on the safe side.

Next we're just going to move down to the next section and make the highlighted edits in the following picture

Spoiler: Code 2
Second.PNG

Here we are just checking to see if the battler is on the move and giving a new condition to set the dash pose if they are. Originally, I tried to call .isDashing but saw no change. Looking back through the code (i'm not 100 percent on this because I still haven't peeked too much into ChronoEngine too much) but it appears that isDashing(), as far as this plugin is concerned, is a return that operates solely on whether the pose already loaded is the dash pose. In light of this and figuring this would be a safer method anyhow I simply checked for if we are in motion or not. If we are, we need to display the dash pose, if not we default back to the wait pose.
Afterwards, save it and give it a try. Party members should dash while moving to attack now.
I hope this helps anyone that was in need of it.

Again, this shouldn't break anything over all as it is self contained to the Wait Pose Function itself. If I run into anything though and fix it I'll share it on the forum or in this thread if it is still open at that time.

Cheers!

Back with a couple of corrections to other parts of the code I ran into later and a small addition to the weak pose checking for states as well.

I'll get the weak pose out of the way since it needs one small fix and the state check will go here as well.

Spoiler: Weak Pose Code
1713521924031.png

Find the "Is Weak Pose" function inside MOG_CharPoses.js(the modified one from Flintx) and adapt it to how I have here. var weakStates = [] is where you will put your state ID's at to determine whether the weak pose will flag off them. I haven't thoroughly tested it yet but I don't think the addition will trigger any mismatched posing. If it I run into anything odd though and fix it I'll of course update this thread.

If you made a change from my prior post about the wait post then to be consistent we need to update the weak pose as well. It suffers from the same issue as the wait pose did but it's a quick fix.

Spoiler: Weak Pose Fix
1713522326630.png

Right underneath the section we were in is now where we need to add the conditional check for if the player is moving here. Same as what we did with the wait pose in my prior post. Except this time we are just slapping weak pose in the face and letting it know it's brother, wait, is ahead of the curve.

Next for a strange error I ran into with my setup and may not hold true for everyone's project. That said, if you are experiencing the issue I'm about to describe this fix should help you.

The issue at the time was when the party leader dies in chrono mode the rest of the party would no longer perform a stepping animation on anything other than movement sprites. Attacks, waiting, etc poses no longer performed stepping. It took me a bit with this one to find what plugin in this puzzle was actually responsible but I finally managed to track the function down and add a fix that thus far seems to work... kind of. I'll explain after the fix.

Spoiler: stepAnime = false??? bugfix?
1713522979417.png

This particular fix is inside the FlintX Custom-CrossEngine.js. I added in this._stepAnime = true; to attempt to rectify the issue. So here is the catch, if you want to call it that. While it does work and returns the sprite step animations back on it does so at a strange pace... what I mean by that is say the leader dies and immediately after this happens you just do nothing. Just stare at the screen. you'll see the party members animations freeze signaling the appearance of the bug I mentioned. However after a few frames pass they will begin animating again. Now let's say the party leader stays down cause no one likes that guy anyway, after certain actions that momentary hiccup in animation will reappear but correct itself again due that line added. I'm assuming here that function is getting rechecked pretty often and the offending function is as well before it and I just have no idea at this point which it is. Maybe the core issue is coming from one of the engines update phases but I'm not entirely sure. If anyone with more knowledge on this would like to add some info or point me in the right direction to fix it completely it'd be appreciated but I will continue to poke and prod a bit myself to see if I can find where the little bugger is hiding.

That said it's really not all that noticeable when it does happen, especially if a lot is already going on onscreen, so it's not the end of the world or anything aesthetically in my opinion. However... it's there, lurking... waiting.

Anyhow, have fun everyone!

EDIT: A quick update as I've tested that odd behavior more I mentioned above and it seems to only happen whenever a party member is not the focus of an action by an enemy or when they are not acting themselves. That is the behavior observed now with this._stepAnime = true included in the code. So this leads me to believe that party members other than the leader lose the focus of the battle engine unless specifically being acted upon or acting.

EDIT 2:
Alright so I believe I've nailed this issue down to some extent at least. If you are having this issue as I am we need to look back inside FlintX Custom-CrossEngine.js again.
Spoiler: Party leader dead stops stepping animations for party members fix
1713530555826.png
This is my altered update Animation function within that plugin.

I started focusing on the update portions of the different plugins and seems like this particular function overwrites the original contained within Mog's Chrono engine. It seems the primary change here that was made by Restart I think was changing the original's isActing to isPosing. Not knowing what all either of these is tied to quite yet I tried to poke as little at it as possible by accounting for either or as they should only be an active state when taking an action of some sort, I think anyway. I know isPosing is definitely used for that purpose but I'm not sure if there is more that it encompasses other than one function of note in the code that is a literal Jojo reference lol. Hats off to whoever did that one, it caught me off guard and gave me a good chuckle.

Anyway in all instances I did check it seemed to be used for specifically actions. So its safe to assume that I can check for it OR isActing to determine whether the battler is doing something with his time or sitting in place like the lay about I know he is. If we know he's just sitting there we tell him you could at least breath some. That's important... Thus stepAnime = true gets set here now. If they are acting it'll just follow the original lines of the function. I'll check up on it more when I have more time and if he's still sitting there holding his breath when I'm not looking I'll try and figure out why and post an update if I manage to make headway on the issue.

Take care all!

UPDATE: So i've been looking around at different areas of chrono engine, in particular, how eventID's are handled within the code for my own purposes. I just want to log some observations here for anyone interested and show a possible usage for access eventIDs of a skill or action's target. All throughout mog's code the eventID tied to an "enemy" is never really directly referenced. Most of the time he passes them around as arguments but mostly indirectly within the tool system he created. At first my goal was focused on using the 'target' object to find the relevant data. As a matter of fact this was just a battle of finding the correct object that held target data that ALSO held the object that holds the event data tied to the target. Did some debug probing at different places in the code during the different 'Phases' of chrono mode. My purpose was specific for this so I settled on the "prepare move totarget" function after confirming that target is an event and exists. In chrono mode, specifically, enemies are instances of Game_Event. The 'target' object is retrieved from the makeTargetsCN function which is where the target is determined in the context of the action being taken. That said, eventId() will properly return the ID of the corresponding event that is tied to the enemy when the event is represented with the target object.

Spoiler: Example usage
1713719267360.png

Here is the way I'm using it. I probed the target object at this point to see what it contains as probing it during the selection phase was difficult to say the least as targets are being shuffled around and pushed into arrays and such. It revealed that within this function I can now access the target object directly and retrieve the eventid. The rest is represented in my comments. i store the id in variable 43 for ease of use in the editor. my check for switch 110 is just for the purposes of common events that I'm using 43 in and thus not relevant to the actual process of extracting the id.



Anyway, just some observations for anyone that wants or may need it. Above is a video demonstrating what my intentions were. I used the eventID of the target of the skill being pulled here and used switch 110 to flip on common event that controls camera and perspective manipulation so I can focus the camera at the target of spells. The logic for handling actor's as target is handled elsewhere and the rest of the camera movement are prior additions I've already made to the engine in different places. Most of the action is handled by common events but those common events are called by switches I nested through different parts of the chrono engine code. Also to address a few things that might be of question to someone; about 90 percent of the sprite work is my own creations. There are few stand ins until I get around to finishing out more of characters, monsters, tilesets etc. anything not made by me can be credited to finalbossblues (fantastic artist btw) or of course the default graphics and mog as I based a lot of my UI creations around the limits of his HUD plugin. this is just my debug map so its not meant to be appealing aesthetically, in fact it's going to get far more chaotic over time lol. Anyhow, that's my two cents for the day.

Take care all.
All throughout mog's code the eventID tied to an "enemy" is never really directly referenced.
I must be missing something, but are you referring to this?
JavaScript:
$gameMap.enemiesF()
This code should work in the same way $gameTroop.members() work in the vanilla engine.

To grab the event ID, use:
JavaScript:
$gameMap.enemiesF()[0].eventId()

To get the specific enemy in the database being used, you could do:
JavaScript:
$gameMap.enemiesF()[0]._user.battler

And their ID in the database:
JavaScript:
$gameMap.enemiesF()[0]._user.battler.enemyId()

Edit: one more thing - when I attack an enemy, in my skill event Sword Attack, I use this to extract the event ID from the target selected to receive my attack (in the event commands):
JavaScript:
this.target().eventId()
Interesting tech demo with the Ultra Mode 7 and ChronoEngine. I had trouble getting those two to work together last I tried, even though Restart said he added support in CrossEngine. Good to know it's possible at least.
I must be missing something, but are you referring to this?
JavaScript:
$gameMap.enemiesF()
This code should work in the same way $gameTroop.members() work in the vanilla engine.

To grab the event ID, use:
JavaScript:
$gameMap.enemiesF()[0].eventId()
I see what I overlooked then. I kept seeing the instances of enemiesF() and considered pursuing it many times but it looks like I missed the overall context of it. I appreciate you clarifying that for me. I'm pretty green when it comes to anything code related and figured I'd dip my toes in the fire, in a manner of speaking, with this engine since it has a lot of potential if some more functionalities were added to it. So if I'm understanding how this would work correctly I would use it as my target after iterating through the array to make sure I've got the right enemy I want the ID for?

Interesting tech demo with the Ultra Mode 7 and ChronoEngine. I had trouble getting those two to work together last I tried, even though Restart said he added support in CrossEngine. Good to know it's possible at least.
so far they haven't given me any issues but I doubt I've reached the limits of what either can do quite yet so I'm awaiting the moment it reaches out and gives me a good slap

I must be missing something, but are you referring to this?
JavaScript:
$gameMap.enemiesF()
This code should work in the same way $gameTroop.members() work in the vanilla engine.

To grab the event ID, use:
JavaScript:
$gameMap.enemiesF()[0].eventId()

To get the specific enemy in the database being used, you could do:
JavaScript:
$gameMap.enemiesF()[0]._user.battler

And their ID in the database:
JavaScript:
$gameMap.enemiesF()[0]._user.battler.enemyId()

Edit: one more thing - when I attack an enemy, in my skill event Sword Attack, I use this to extract the event ID from the target selected to receive my attack (in the event commands):
JavaScript:
this.target().eventId()
thanks for this 🙂 this simplifies how I'll approach this more than likely now and is starting to make this all make more sense. Little info like this goes a long way for me being new to the concepts I'm having to learn. It definitely makes the things I wasn't sure about seem a lot more obvious lol. I want to say I tried something similar to this at one point but I'm sure now that i was making a wrong call at the time.
thanks for this 🙂 this simplifies how I'll approach this more than likely now and is starting to make this all make more sense. Little info like this goes a long way for me being new to the concepts I'm having to learn. It definitely makes the things I wasn't sure about seem a lot more obvious lol. I want to say I tried something similar to this at one point but I'm sure now that i was making a wrong call at the time.
Love what you are doing and way to go with the mode 7!
Appreciate the compliment. The learning to code is a step I need to take even if sprite work is what I enjoy the most lol. Hopefully I pick up on all this as smoothly as possible. Right now my big focus has been learning different ways to inspect objects in console to try and help point me in the right directions since I'm taking the round about way of learning from a system I didnt create myself.
Sometimes I think about making a Chrono Engine thread (or maybe just use this thread) because I have a pile of ChronoEngine scripts I wrote.
Sometimes I think about making a Chrono Engine thread (or maybe just use this thread) because I have a pile of ChronoEngine scripts I wrote.
I imagine once I get in the swing of things I'll be right there with ya lol. On the subject of a dedicated thread, I'm almost positive it'd be appreciated as much as I have seen threads of Chrono related questions running about. I've fooled with various rpg makers over the years and different people's custom systems as well and I'll say the chrono engine seems like the more difficult system to work with and learn but imo seems to have a lot of potential at the end of the day. A centralized thread would help with learning and exchange of information I'd imagine. If you ever do just dump all my stuff there if you'd think it'd be helpful and give me a heads up on the new thread. I'd be interested to see anything anyone else has come up with for the engine as well.
All right, I'll make a thread this week. It would be a lot of links to my old posts because most of it I've already posted here just scattered around in different threads. Some scripts also require CrossEngine.
All right, I'll make a thread this week. It would be a lot of links to my old posts because most of it I've already posted here just scattered around in different threads. Some scripts also require CrossEngine.
Nice - would love to see what you have been working with! I'm still in the prototype phase so I may go back and do a complete overhaul of what I have so that it fits/feels better with what I currently want.
Nice - would love to see what you have been working with! I'm still in the prototype phase so I may go back and do a complete overhaul of what I have so that it fits/feels better with what I currently want.
It's stuff like patches for Yanfly compatibility, adding a chance to block incoming attacks, spawn dropped items on map on enemy death, make status effects work in ABS mode, patches to the hookshot and boomerang, etc.
I was actually wondering about yanfly stuff in general in regards to chrono engine. While once I get more confident in my ability to create codebases completely from scratch this necessarily wouldn't be an issue, as ideally I'd just make my own system to equal the functionality I desired. However, one script in particular I'm interested in compatibility wise is the buffs and states core. Do you have any experience with both Chrono Engine and Buffs and States core together, Aqua? Was curious how horribly mismatched they may be or if they play well enough with each other that patching is a feasible approach
Buffs and states core works in ChronoEngine but needs this overwrite
Code:
//Yanfly Buffs States Core ChronoEngine Fix
Yanfly.BSC.Game_Action_executeDamage = Game_Action.prototype.executeDamageCN;
Game_Action.prototype.executeDamageCN = function(target, value) {
    value = this.onPreDamageStateEffects(target, value);
    value = this.onReactStateEffects(target, value);
    Yanfly.BSC.Game_Action_executeDamage.call(this, target, value);
    value = this.onRespondStateEffects(target, value);
    value = this.onPostDamageStateEffects(target, value);
};
Buffs and states core works in ChronoEngine but needs this overwrite
Code:
//Yanfly Buffs States Core ChronoEngine Fix
Yanfly.BSC.Game_Action_executeDamage = Game_Action.prototype.executeDamageCN;
Game_Action.prototype.executeDamageCN = function(target, value) {
    value = this.onPreDamageStateEffects(target, value);
    value = this.onReactStateEffects(target, value);
    Yanfly.BSC.Game_Action_executeDamage.call(this, target, value);
    value = this.onRespondStateEffects(target, value);
    value = this.onPostDamageStateEffects(target, value);
};
Roger, that's good to hear then. Appreciate you sharing the patch 🙂 I'll import buffs and states core then pretty soon and apply your fix to it and give it a whirl. that'll save me a a good bit of time. There's not enough of it in the day between RL, learning js, and trying to finish enough graphical assests to get a ball rolling as it were lol.

EDIT: Quick update, I imported buffs and states core and applied the fix but ran into another issue with these modified versions of chrono engine. Specifically the weak pose breaking. It cause the weak pose to activate outside of combat and when moving to starting positions before the unsheathing weapons phase when under the effect of the state. Added two checks to keep this from happening.
Spoiler: Quick fix
1713741969669.png
Ok yeah, I've only tested in ABS mode since that's what I use. There may be additional things you'd have to add for Chrono Mode.
Ok yeah, I've only tested in ABS mode since that's what I use. There may be additional things you'd have to add for Chrono Mode.
out of curiosity did buffs and states core throw a fit about the counters on the state icons for you when using it in ABS mode? I forget what error it threw at me but i think whatever was handling colors for the counters was returning undefined or something. Cutting off the counters works for chrono mode and allows mog's battle hud to take the wheel. May take a look at it tomorrow if time permits. Was also thinking about seeing if I could get mog's collapse effects and chrono engine to play nice with each other at some point down the road. I really need to start getting some more sprite work done.
I've never tried using counters in ABS and no one has asked me for it, so I don't know.
Love what you are doing and way to go with the mode 7!

Oh yea, this is the way I'm handling what we discussed bass at the moment. my switch for the camera focus logic still is nested in the code for that phase in chrono engine however I went with your method suggestion to grab the enemy ID and wrapped it in a check just in case an enemy ever uses the same skill on the actor so it doesn't throw any errors. Much appreciation to both you and Aqua for sharing knowledge with me. Every little bit helps. Not really an important post in regards to Chrono Engine just wanted to express gratitude, especially after just popping up out of the ether like I did lol.

JavaScript:
if (this.target() && this.target().eventId) {
    var targetEventId = this.target().eventId();
     if (!this.target().isActor) {
        $gameVariables.setValue(43, targetEventId);
    }
} else {
    console.log("S110check: Target is not an event.");
}
EDIT: Disregard the console log reporting s110check. Just realized I haven't made a change in that to reflect what I repurposed 110 to actually do. it threw me for a loop just now when I saw it pop in console lol. Clarifying this just in case as I could see this confusing someone if they try to throw it in context of what I describe below which completely serves a seperate purpose from this codeblock.

And just to drop off an idea for how I am structuring the common events for anyone who is interested I figured I'd drop a screen cap of a common event I threw together for the victory phase this morning that focus the camera and does some Umode7 stuff as well on a random party member during the victory phase. It's called by switch 110 from inside chrono engine when victory phase executes. the common event is set to autorun.

Spoiler: Victory Camera Focus Common
1713803571360.png
1713803621638.png
1713803674526.png
... and it continues on in this fashion for all actors and then turns the switch off at the end. In this case for me its switch 110.
The CAM follower is a modification I made to Galv's Cam.

Spoiler: Galv Cam mod
1713803814191.png
this assumes you have the follower's index in the party already stored in variable 42 at the time you want to focus the camera on them as that variable will be your target/focus argument passed to the plugin. In the context of the victory common event we are already doing that via script commands at the beginning.

Original thread: https://forums.rpgmakerweb.com/threads/mog_chronoengine-adjustments.137635/