MV - MV + MZ : Make an Action Game! Chrono Engine Beginner Guide - On Map Tools and Battles!

● ARCHIVED · READ-ONLY
Started by AquaEcho 58 posts Page 1 of 3 View original ↗
  1. This is a beginner introductory guide. I also have another guide Advanced Features!

    What is Chrono Engine?
    Chrono Engine is a free, open-source suite of plugins used to make action games by adding on-map tools and battles for MV (and MZ compatible with FOSSIL (see MZ notes at bottom)). It can be confusing and overwhelming for beginners, especially since all the instructions are in Portuguese. This guide will simplify it.

    Chrono Engine has two modes: ABS (Action Battle System) and Chrono Mode.
    ABS mode allows you to make a game like 2D Zelda where you fight enemies on the map and use tools or weapons to solve puzzles.
    TutorialCommands2b.png

    Chrono Mode allows you to have a battle system like Chrono Trigger: an ATB or turn-based battle system on the map instead of cutting to the battle scene for battles.
    TutorialCommands1.png
    What else can I make in Chrono Engine?
    Chrono Engine can be used to make any game that has on-map battles. Think tower defense games, RTSes, top-down shooters, etc.

    Can I still use the regular battle scene as well as the on-map battles?
    Yes, the regular battle scene is still usable, so you can have both in your game. You could have different sections of the game use different systems, or just use Chrono Engine for the map tools while using the regular battle scene for battles.

    Can I use both the ABS and Chrono modes in the same game?
    Yes, it's toggleable with the plugin command chrono_mode : true or false

    Where do I get it?
    https://mogplugins.com/mv-chrono-engine/
    You can also get stock Chrono Engine as part of Cross Engine (basically Chrono Engine on steroids)


    Once downloaded, open the demo project. Go to Master_MV_23_1 > ChronoEngine> Game
    (Note: There is another demo project in the download showcasing the rest of Moghunter's plugins, which you can look at later to see if there's anything you want to use).

    You will want to play the demo first (press the green play button in the top right in the editor) to see all the features in action.
    1713978837583.png
    Chrono Mode will showcase a Chrono Trigger clone.
    ABS Mode (Stage 1) will showcase a Zelda clone with an emphasis on puzzles and some light combat.
    ABS Mode (Stage 2) will showcase a more action/battle-heavy ABS system with advanced features like combos and charged attacks.
    Plugin Commands (Debug) is simply a testing map to show what the different plugin commands do.

    Once you've played enough, go back to the project file.
    1713977737508.png
    This is the Tool Map. Even though it is a map, the player never goes to it. It is simply to store event templates for the tools, spells, and items the player uses on the active map. If you have used an event spawner plugin, this works much the same way. Whenever you use a tool, spell or item in game, its event is temporarily called from this template map and spawned on the active map the player is on, then unspawned when finished. After all, you only need an arrow, bomb or spell to show briefly after using it. Some of the events here are for ABS mode, some for Chrono Mode. Depending on the type of game you want to make, you only need some of them.

    Overview of all the tool events
    The first five events are non-ABS items.
    The next six events are the Zelda tools.
    The last four are the basic attacks of Ash and his party members in Chrono Mode. (However if you add the party members in ABS mode and switch the leader they'll use them there too.)

    Lines 3 and 4 are Chrono mode spells. Note it's possible to use these in ABS mode, but you will have to add the note ABS mode in the database note box for them to show up in the skill list.

    Line 6 is Chrono mode double and triple techs.

    The last two lines are ABS mode skills used by the player, enemy and bosses.

    Let's look at the tool event pages.
    1714007726174.png
    Each tool event will have a number of properties in its event page, like how long it takes to use it, how long it stays on the map, and what item/skill/weapon database entry to get its damage numbers/effects from. The tool willl also have a move route defining how the tool event moves, what sound it makes, etc when its spawned onto the current map. You can see this arrow just moves straight ahead. If there is no move route the tool may not move from the user's position and may not see it.

    You'll notice on every event on the tool map there is a comment for tool_item_id, tool_skill_id, or tool_weapon_id. That id refers to the database ID and allows that event to use its corresponding database stats. Likewise, the entry in the database will have a Tool Id : X note in the note section to link it back to its tool map event so that when you select that item/skill/weapon from a menu, it knows which tool event to spawn when you use it.

    The explanation of every comment can be found in the MOG_ChronoEngine plugin file.

    Translation of the Comments instructions from ChatGPT
    Translation
    tool_item_id : ITEM_ID
    - Defines damage based on the Item ID.

    tool_skill_id : SKILL_ID
    - Defines damage based on the Skill ID.

    tool_item_cost : ITEM_ID
    - Activates an item cost for the action. (*Bow and arrow)

    tool_duration : X
    - Definition of action duration.

    tool_pose_suffix : NAME
    - Definition of the suffix of the character image when using the action.

    tool_pose_duration : X
    - Definition of the duration of the action pose.

    tool_area : MODE
    - Definition of the type of action impact area.
    - square (Square)
    - front_square (Half of square)
    - rhombus (Rhombus)
    - front_rhombus (Half of rhombus)
    - line (Frontal Line)
    - wall (Lateral Line)
    - cross (Cross)

    tool_range : X
    - Definition of the collision area size of the action.

    tool_disable_collision
    - Disables event collision.

    tool_wait_collision : X
    - Defines a time to activate action collision.

    tool_disable_piercing
    - Disables piercing mode through the target.

    tool_damage_all
    - Causes damage to all targets, enemies, and allies.

    tool_position : MODE
    - Defines the initial position of the action.
    target - Target selection through cursor.
    user - User's position.
    move_to_target - Makes the character move to the target in Chrono mode.

    tool_multihit : LAG_TIME
    - Activates multi-hit mode, where X is the time between hits.

    tool_action_times : TIMES : LAG_TIME
    - Triggers the action X times.

    tool_chain_action : ACTION_ID
    - Activates an action after the character finishes the first action.

    tool_chain_action_hit : ACTION_ID
    - Activates an action when the first action hits the target.

    tool_three_directions
    - The action is activated in three directions.

    tool_four_directions
    - The action is activated in four directions.

    tool_all_directions
    - The action is activated in all directions.

    tool_knockback_duration : X
    - Time the target remains paralyzed after the hit.

    tool_ignore_shield
    - Collision ignores whether the target is using a shield.

    tool_shield_reflect
    - The action is reflected when the user is using a shield.

    tool_unique
    - The action is activated only once.

    tool_diagonal
    - Allows the action to be activated diagonally.

    tool_diagonal_angle
    - The sprite angle will be based on the event's direction.

    tool_user_animation_id : X
    - Defines an animation on the user when activating the action.

    tool_cast_animation_id : X
    - Defines an animation on the user during the action invocation phase.

    tool_shake
    - Makes the screen shake when hitting the target.

    tool_boomerang : X
    - Activates boomerang mode, where X is the action distance.

    tool_hookshot : X
    - Activates hookshot mode, where X is the action distance.

    tool_user_zoom_effect
    - Activates zoom animation when using the action. (Requires MOG_Character_Motion plugin)

    tool_ignore_knockback
    - Allows the action to hit the target regardless of the knockback state.

    tool_combo : ACTION_ID : COMMAND_TYPE
    - Activates the combo system for this action, where a different action will be activated each time the player presses the required button.
    - COMMAND TYPE - Command type.
    - 0 Weapon Command/Button
    - 1 Skill Command/Button
    - 2 Item Command/Button

    tool_charge_attack : ACTION_ID : CHARGE_TIME
    - Activates the charge system for this action, where the action will be activated when the player holds down the normal attack button (Weapon Command) for a certain CHARGE_TIME.

    Next let's look at the database. The tabs we're interested in are Skills, Items, Weapons, and Armors:
    1714010440643.png
    The database stores all the battle data for the items, skills, weapons and enemies. The icon is what will show in your inventory or skill list and the tool item HUD in ABS Mode, or when it's obtained from a treasure chest or enemy loot drop. The image on the tool's event on the tool map is what shows up when you use the tool on the active map.

    Adding your own tools/skills
    1714067366643.png
    To create a new tool or skill, the best way is to copy and paste the event of a similar existing tool on the tool map. Here I create a new skill on the tool map (in an empty water tile).

    I called the skill event Teleport and gave it the tool_skill_id : 5 as it was the first empty slot in the skill database. Then I copied some of the comment tags from the other self-cast magic spells since they were the most similar to what I wanted to do and tweaked the duration numbers so it wouldn't take long to cast. Then I put in an event command that will transfer the player to the starting map of ABS Mode 1 (where you get the sword). Make note of the event ID in the top left (70 here).
    1714066858567.png

    Next I create a new database entry for the skill under skills. In the notebox I type in Tool Id: 70 to link it back to the tool map event and put abs mode so it shows up for use in the ABS mode skill menu.
    1714067126212.png

    Finally, have a way to add the tool or skill to your actor in game. I like to make a treasure chest on the starting map to test it right away.
    1714077195299.png
    The change skill command will add it to the actor's list of selectable skills. The set_actor_skill command will make it his active skill and show it in the Tool HUD.

    1714077349674.png
    Now, in my playtest, I got the skill from the chest, it shows up in my skill list, and is set as my skill in the tool HUD at the bottom of the screen.

    How do tool collisions work (on non-enemy events)?
    1714080940535.png
    If you want events to react to tools, simply use collision_id comments on their event page. Anything below the collision_id comments will only happen if the event is hit with a tool with that corresponding event id from the tool map. In the case of this grass, it will only play the leaf flying animation and be erased if hit with the knife tool (6) or the crystal sword tool (51).

    How do enemies work?
    To designate an event as an enemy, you will need to put an enemy_id comment on its event page. This will link the event to an enemy's stats in the database. This slime has enemy_id : 5, so it would use that enemy database entry for its stats.
    1713998253392.png
    1713998446864.png

    Enemies in ABS Mode
    In ABS mode, there will also be a comment for event sensor. The number will designate how many tiles away the player has to be before the enemy reacts. If the player is within X tiles, that enemy's self switch turns on. By default this is self switch D, but you can change this in the plugin settings for MOG_EventSensor
    1713998718540.png

    The slime's first event page has Autonomous Movement> Move at random. However, when the player is within 3 tiles, it switches to the self switch D event page and its Autonomous Movement sequence changes
    1713998866161.png

    To make an enemy use an attack from the tool map put this.act(TOOLID) in its moveroute. This ghost will shoot fireballs (tool ID 53)
    1738715309653.png

    Let's look at the plugins.
    1713978510873.png

    Do I need all of these plugins to use Chrono Engine?
    No, the bulk of the code is in MOG_ChronoEngine, which is almost 12,000 lines long. Everything else is a smaller feature you may or may not need depending on what you want in your game. All of them are showcased in the demo project.

    NOTE: The order of the plugins matter! Keep the plugins in the order they are in the demo, or follow the order below! If you are using Cross Engine, follow the order in the plugins section in the first post of the Cross Engine thread.

    A quick rundown of every plugin:
    Plugins
    Anything that doesn't start with MOG is just an empty file used as a placeholder to organize the plugin list. They're all turned off because they do nothing and you can safely delete them if you'd like.

    MOG_TitleSplashScreen: Shows images before the title screen. It's used in the demo to show credits
    MOG_ActionName: Shows a banner at the top of the screen with the name of the action when you use it.
    MOG_BattleHUD: This is used in Chrono Mode
    MOG_BossHP: Creates a large HP bar for the boss
    MOG_ComboCounter: Shows combo count for attacks
    MOG_DmgPopupEffects: Makes the damage numbers rise or bounce. The damage numbers themselves are created by the main ChronoEngine plugin.
    MOG_CharacterMotion: Gives various effects to the map events, like breathing and floating.
    MOG_DizzyEffect:
    MOG_EventIndicators: Shows small text and icons above events.
    MOG_TreasurePopup: Shows small icons and item names whenever you open a treasure chest or pick up an item
    MOG_Weather_EX: Creates weather effects. It's used for the floating leaves in the demo.
    MOG_PickupThrow: Allows you to create throwable events. This is used for the bomb tool in the demo, but can also be used to make events throwable like the pots, bushes and chickens in Zelda
    MOG_ActorHud: Creates a HUD element showing the party leader's stats
    MOG_GoldHud: Creates a HUD element showing the amount of gold you have on the map
    MOG_CharPoses: Allows you to use different character spritesheets for idling, jumping, and dashing
    MOG_EventSensor: Turns on a self switch in an event if it is within X tiles of the player. This is used in the demo to trigger changes in enemy event behavior or start battles
    MOG_ChronoEngine: The meat of the project that contains all the code for on map battles and collisions
    MOG_ChronoATBHud: Creates the ATB gauge in Chrono Mode
    MOG_ChronoEnemyHP: Shows the enemy HP bar
    MOG_ChronoCT: Creates the stamina/charge bar system and display. Needs MOG_ActorHUD turned on to work
    MOG_ChronoToolHud: Creates the four tool icons you see at the bottom of the screen in the ABS mode demo

    How do I build on top of the Chrono Engine demo project?
    It's widely recommended to build a game on top of the Chrono Engine demo project since everything is already set up for you, but it can be added to an existing project with a little work.

    If you do use the demo project as a base, make sure to update the core RPG Maker Engine files to at least 1.6.2 as the demo comes with v1.5.0. A lot of other MV plugins are designed for v1.6.2 so if you don't update it other plugins may not work.
    1714010993950.png
    To update the core files, start a new project then copy that project's core files over to the Chrono Engine demo project at \Master_MV_23_1\ChronoEngine\js.

    How do I add Chrono Engine to my existing project?
    If you already have an existing project, the easiest way to add it is have your game and the Chrono Engine demo open in separate windows at the same time so you can easily copy and paste what you need from the demo project into your project.

    The two things you'll need to copy over is the tool map and the database entries of the skills, items, and weapons you want. The entire tool map can be copied over easily by selecting the tool map from the map list in the demo, right click>copy, then pasting it (Ctrl+V) into the map list in your project. From there you can easily delete any events you don't need.

    1714062132412.png
    You'll also need to update the Tool Map ID parameter in the MOG_ChronoEngine plugin to the map ID it is in your existing project.

    1714095330140.png
    Don't forget to update the images and animations in the tool events for your project. For example, the lantern tool uses animation 128 in the demo project. Animation 128 may not exist, or be something completely different in your project.

    Copying over the database entries may be more difficult if you already have existing items, skills, and weapons in your project. You can copy and paste entries from the demo project into the next available slots in your game's database, but you'll need to update what ids the tool map events are pointing to to match the item, skill and weapon ids in your project's database.

    Finally, you'll need to add the plugins to your project's plugin list. The only absolutely necessary one is MOG_ChronoEngine, but you probably want some of the other features in the demo project, so refer to the plugin list above to see which ones you need.


    NOTES for Chrono Engine in MZ:
    MOG_DmgPopupEffects will throw a this.digitWidth is not a function error. You can download a patched MZ version here
    1742325618526.png

    You may get an error after an attack is used "cannot read property length of undefined".
    1742325758867.png
    To fix it, go to the End Animation section in MOG_ChronoEngine plugin file, and add ? after the first this._animationSprites as seen below
    1742319089688.png
    So the line should read
    Code:
        if (this._animationSprites?.length > 0) {

    This guide is regularly updated!

    Want to do more with Chrono Engine? Check out the Advanced Features guide
  2. Congratulations on the initiative, this system is my favorite and exactly why I stayed at MV, it is always possible to learn something new.

    He's one of the Brazilian makers I like the most, years of expanding his ABS, it's a shame he didn't take it to MZ.
  3. Chrono Engine is extremely powerful and allows you to create a larger variety of games (Action RPGs, shooters, Tower Defense, RTS, etc) than the stock RPG Maker engines which is I want I wanted to create a guide to simplify it. While MOGHunter didn't update it, Restart did with his Cross Engine which added pixel movement and FOSSIL which allows you to use it in MZ.
  4. Could you explain a bit more about skill creation? Are there any requirements for them to work? I know you hook up the event in the tool map to the one In the database (for example if it were event 7 there hooked up to skill 17. It would be tool_skill_id : 17 and tool_Id_7) but are there any other requirements? Thank you
  5. The tool event page is what event is spawned onto the map when you use that skill or an enemy uses this.act(ID) in a move route. You can also call $gamePlayer.act(ID) in a script. All of those comments are properties of that event : how long it stays on the map, what character pose is called when someone uses it, its area of effect, etc. How many you need depends on what you want the skill to do. Its possible to have no comments and just make using that skill call a common event or something else.

    The database has data the skill needs like its damage formula, what animation is played when you use it, its icon in the skill menu, etc. You need to put abs mode in the notebox if you want it to show up in the skill menu.

    If you want to test if a skill "works" open the console log (press F8 or F12) and type in $gamePlayer.act(ID).1738815830759.png
  6. Make your own HUDs in Chrono Engine!
    I will be posting scripts here to use with SRD HUDMaker (MV) or SRD HUDMaker Ultra (MZ) (or if you have some other HUD plugin like Aerosys Gab Windows)

    1740511928294.jpeg

    To reference party members use:
    $gameParty.members()[x]
    where x is the position of the member in the party lineup, starting at 0. So the player would be $gameParty.members()[0]. You can also use $gameParty.leader() for the player
    1740512297749.png
    NOTE: The Player is always in the party so you can leave the condition blank. However, for other party members use the condition
    $gameParty.members()[X] so their HUD only shows when they are in the party.

    Actor HP:
    Current HP: $gameParty.members()[X].hp
    Max HP: $gameParty.members()[X].mhp
    current HP/max HP text:
    ${$gameParty.members()[X].hp}/${$gameParty.members()[X].mhp}

    Actor MP
    Current MP: $gameParty.members()[X].mp
    Max MP: $gameParty.members()[X].mmp
    current MP/max MP text:
    ${$gameParty.members()[X].mp}/${$gameParty.members()[X].mmp}

    If using MOG_ChronoCT (the stamina plugin)
    Current CT/Stamina: $gameParty.leader()._chrono.ct
    Max CT/Stamina: $gameParty.leader()._chrono.maxct

    To show the attack charge values
    Current charge: $gamePlayer.battler()._ras.charge.time
    Max charge: $gamePlayer.battler()._ras.charge.maxtime
    In-depth explanation on CT/Stamina bar here

    Actor State Icons:
    1740512828927.png

    You will need WAY_Core and WAY_EvalText for the icon to be a variable, and both plugins placed above the SRD plugins
    1740513001749.png
    Use TextEx element and the following in the Value Field:
    \\I[${$gameParty.members()[X].allIcons()[Y] || 0}]
    Replace X with the actor's position in the party lineup, starting at 0, and Y with which state you want to show, starting at 0. If you want to be able display more than one state icon (i.e. the battler is affected by more than one state) you will have to create a new HUD Element for the number of states you want to be able to display.


    Recreating MOG_ChronoToolHUD in SRD_HUDMaker

    1740522053280.jpeg

    Use the following codes to draw the ToolHUD icons:
    Item: \\I[${$dataItems[$gameParty.leader()._toolItemId].iconIndex}]
    Skill: \\I[${$dataSkills[$gameParty.leader()._toolSkillId].iconIndex}]
    Weapon: \\I[${$dataWeapons[$gameParty.leader()._equips[0]._itemId].iconIndex}]
    Shield: \\I[${$dataArmors[$gameParty.leader()._equips[1]._itemId].iconIndex}]

    End result using only SRD_HUDMaker and no MOG HUDs
    1740522658272.png
  7. I added a section for MZ fixes for Chrono Engine
  8. Is it possible to mix ABS and Chrono mode easily? For example, if I want to create map challenge in Zelda style and use the Chrono mode in battle?
    EDIT: I want to use the cross engine because of its compatibiliy
  9. Midona018 said:
    Is it possible to mix ABS and Chrono mode easily? For example, if I want to create map challenge in Zelda style and use the Chrono mode in battle?
    EDIT: I want to use the cross engine because of its compatibiliy
    Yes, you can switch between modes using a plugin command
  10. Midona018 said:
    Is it possible to mix ABS and Chrono mode easily? For example, if I want to create map challenge in Zelda style and use the Chrono mode in battle?
    EDIT: I want to use the cross engine because of its compatibiliy
    In vanilla Chrono Engine you can but Chrono mode doesn't fully work in Cross Engine because it messes up the party member movement during Chrono mode battles. If you just want the patches/bug fixes you can edit the Cross Engine file to delete everything but the bugfixes.
  11. Thanks!
  12. Any thoughts on what could be triggering an endless animation loop when preforming a tech in Chrono mode when using MZ?

    I've noticed it only occurs with
    Code:
    Show Animation: This Event, nameOfAnimation
    Not
    Code:
    Comment: tool_animation_id : #OfAnimation

    However, things like dual techs seem to need the Show Animation version unless one could work around it by calling multiple events.

    I've tried:
    Using it in both Crono and Cross Engine(using the MZ AltimitMovement) with the same results.

    Updating the animation javascript as found in this thread (though I had to switch const for var): https://forums.rpgmakerweb.com/index.php?threads/solved-help-with-chrono-engine-animations.176510/

    Overwriting the core scripts to the ones from 1.81b and using the 1.0.12 fossil.js as opposed to the newer one from Aesica designed for 1.9

    Thanks for your time!
  13. Crim_T said:
    Any thoughts on what could be triggering an endless animation loop when preforming a tech in Chrono mode when using MZ?

    I've noticed it only occurs with
    Code:
    Show Animation: This Event, nameOfAnimation
    Not
    Code:
    Comment: tool_animation_id : #OfAnimation

    However, things like dual techs seem to need the Show Animation version unless one could work around it by calling multiple events.
    I would ask in the Schala thread which is dedicated to Chrono mode in MZ. My MZ trial ran out so I can't test in MZ anymore.
    MZ - Schala Z System Progress Blog (MZ Port of Moghunter's Chrono Engine)
  14. Hope you don't mind, but I thought I'd post an update in this thread as you've already put together a fantastic guide for getting Chrono Engine to work in MZ and others may find this information useful.

    So after playing around with Chrono Engine in MZ a bit more, it looks like the animation bug that causes the engine to lock up and stutter is less a bug with animation and more to do with any built in RPG maker command that targets the spawned event from the Tool Map.

    I noticed this after realizing that the ice sword tech will get stuck after changing the spawned event's image to that of an ice crystal.

    Thankfully, this is actually pretty easy to work around, as Moghunter's built in script calls do actually work without locking things up.

    If the tech is a relatively simple event with just the "Show Animation: This Event, [nameOfAnimation]" in the script (after the notetags), you can replace it with a comment notetag of "tool_animation_id : [#OfAnimation]"

    If the event is more complicated with the scripting, in that you want the animations to appear at different times, then using the script calls from the help file will work.
    Specifically: "SUBJECT.requestAnimation(X)"

    Where SUBJECT is either "this.target()" or "this.toolEvent()" depending on how the script is written. "X" is of course the animation # as listed in the database.

    Let's use the ice sword tech as an example:
    There are 3 calls where this event targets itself that need to be replaced.
    Set Movement Route: This Event (Wait) Image: $Tool_Ice02(0)
    Set Movement Route: This Event (Wait) Image: None
    Show Animation: This Event, Ice Sword

    These should be replaced on a one to one basis by the following script calls:
    this.toolEvent().setCharacterName("$Tool_Ice02")
    this.toolEvent().setCharacterName("")
    this.toolEvent().requestAnimation(131)

    For another example, the skill Delta Force is interesting as it's the only included tech that makes use of (Wait) in the animation call:
    Show Animation: This Event, Delta Force 1 (Wait)
    Show Animation: This Event, Delta Force 2 (Wait)
    Show Animation: This Event, Delta Force 3 (Wait)

    Now as the SUBJECT.requestAnimation(X) does not wait, we need to look up the amount of frames in the database that each animation uses and then replace Show animation with right script call and add the built in "Wait" command for the correct amount of frames thereafter.
    this.target().requestAnimation(135)
    Wait: 45 frames

    this.target().requestAnimation(136)
    Wait: 45 frames

    this.target().requestAnimation(137)
    Wait: 45 frames

    At this point, the only included demo tech that isn't working as intended for me is the Plasma Wave. This makes use of the notetag: tool_angle_animation. Which is supposed to change the direction of the animation to the direction the user of the tech is facing. However, it isn't doing that and is just playing the animation as normal.
  15. You could ask @bass2yang to look at it if he has time since he solved the other animation issue.
  16. Crim_T said:
    Hope you don't mind, but I thought I'd post an update in this thread as you've already put together a fantastic guide for getting Chrono Engine to work in MZ and others may find this information useful.

    So after playing around with Chrono Engine in MZ a bit more, it looks like the animation bug that causes the engine to lock up and stutter is less a bug with animation and more to do with any built in RPG maker command that targets the spawned event from the Tool Map.

    I noticed this after realizing that the ice sword tech will get stuck after changing the spawned event's image to that of an ice crystal.

    Thankfully, this is actually pretty easy to work around, as Moghunter's built in script calls do actually work without locking things up.

    If the tech is a relatively simple event with just the "Show Animation: This Event, [nameOfAnimation]" in the script (after the notetags), you can replace it with a comment notetag of "tool_animation_id : [#OfAnimation]"

    If the event is more complicated with the scripting, in that you want the animations to appear at different times, then using the script calls from the help file will work.
    Specifically: "SUBJECT.requestAnimation(X)"

    Where SUBJECT is either "this.target()" or "this.toolEvent()" depending on how the script is written. "X" is of course the animation # as listed in the database.

    Let's use the ice sword tech as an example:
    There are 3 calls where this event targets itself that need to be replaced.
    Set Movement Route: This Event (Wait) Image: $Tool_Ice02(0)
    Set Movement Route: This Event (Wait) Image: None
    Show Animation: This Event, Ice Sword

    These should be replaced on a one to one basis by the following script calls:
    this.toolEvent().setCharacterName("$Tool_Ice02")
    this.toolEvent().setCharacterName("")
    this.toolEvent().requestAnimation(131)

    For another example, the skill Delta Force is interesting as it's the only included tech that makes use of (Wait) in the animation call:
    Show Animation: This Event, Delta Force 1 (Wait)
    Show Animation: This Event, Delta Force 2 (Wait)
    Show Animation: This Event, Delta Force 3 (Wait)

    Now as the SUBJECT.requestAnimation(X) does not wait, we need to look up the amount of frames in the database that each animation uses and then replace Show animation with right script call and add the built in "Wait" command for the correct amount of frames thereafter.
    this.target().requestAnimation(135)
    Wait: 45 frames

    this.target().requestAnimation(136)
    Wait: 30 frames

    this.target().requestAnimation(137)
    Wait: 30 frames

    At this point, the only included demo tech that isn't working as intended for me is the Plasma Wave. This makes use of the notetag: tool_angle_animation. Which is supposed to change the direction of the animation to the direction the user of the tech is facing. However, it isn't doing that and is just playing the animation as normal.
    When dealing with the wait mode, you can actually do:
    JavaScript:
    this.target().requestAnimation(135);
    this.setWaitMode('animation');
    This will wait for the animation to complete before proceeding to the next event command. You will need a separate script call for every request+waitmode set.

    The notetag tool_angle_animation sets the chrono animation property to true which is checked inside of Sprite_Animation and updated along with the update() function. I see in the MZ corescripts online that there is the fallback Sprite_AnimationMV for MV style animations. I'm guessing that this part is not updated/aliased properly.

    This would be my guess since I don't use MZ:
    JavaScript:
    var _mog_chrono_SprAnimeMV_update = Sprite_AnimationMV.prototype.update;
    Sprite_AnimationMV.prototype.update = function() {
        _mog_chrono_SprAnimeMV_update.call(this);
        if (this._target && this._target._character) {this.updateChronoAnimation(this._target)}
    };
    //==============================
    // * update Chrono Animation
    //==============================
    Sprite_AnimationMV.prototype.updateChronoAnimation = function(sprite) {
          var character = sprite._character;
          if (character._chrono.animation.directionMode) {
              if (character._direction === 2) {
                  this.y -= 32;
                 this.rotation = character._chrono.animation.rotationP[2];
              } else if (character._direction === 4) {
                 this.rotation = character._chrono.animation.rotationP[3];
                 this.y -= 32;
              } else if (character._direction === 6) {
                 this.rotation = character._chrono.animation.rotationP[1];
                 this.y -= 32;
              } else {
                 this.rotation = character._chrono.animation.rotationP[0];
              }
          };
          if (character._user.rotation[1] === 180) {
              this.y += sprite.patternHeight();
          } else if (character._user.rotation[1] === 90) {
              this.x += sprite.patternWidth() / 2;
              this.y += sprite.patternHeight() / 2;
          } else if (character._user.rotation[1] === 270) {
              this.x -= sprite.patternWidth() / 2;
              this.y += sprite.patternHeight() / 2;      
          };
    };
    Not sure how much more I can help in this area.

    Edit: one error, fixed (Sprite Animation MV alias.)
  17. @bass2yang Thanks for looking at this!

    Alas, switching to the:
    Code:
    this.target().requestAnimation(135);
    this.setWaitMode('animation');
    Doesn't seem to allow Delta Force to give damage during the animation, so for now I'll stick with the waiting on animation frames work around. I did also try a couple variations as well where I tried assigning this._character to the chrono animation before calling this.SetWaitMode('animation'), but didn't have much success. Then again, my knowledge of Javascript is pretty new at this point, so I could have been making any number of errors.

    I hadn't thought about the chrono animation referencing the wrong Sprite Animation, so that makes quite a bit of sense why it doesn't work. I did try your code in a plugin. It caused a
    Code:
    Range Error
    Maximum Stack Size Exceeded
    The debugger had the error at 11645 _mog_chrono_SprAnime_update.call(this);
  18. Crim_T said:
    @bass2yang Thanks for looking at this!

    Alas, switching to the:
    Code:
    this.target().requestAnimation(135);
    this.setWaitMode('animation');
    Doesn't seem to allow Delta Force to give damage during the animation, so for now I'll stick with the waiting on animation frames work around. I did also try a couple variations as well where I tried assigning this._character to the chrono animation before calling this.SetWaitMode('animation'), but didn't have much success. Then again, my knowledge of Javascript is pretty new at this point, so I could have been making any number of errors.

    I hadn't thought about the chrono animation referencing the wrong Sprite Animation, so that makes quite a bit of sense why it doesn't work. I did try your code in a plugin. It caused a
    Code:
    Range Error
    Maximum Stack Size Exceeded
    The debugger had the error at 11645 _mog_chrono_SprAnime_update.call(this);
    Sorry, updated the wrong one - edited the code above to include the proper alias.

    Also, it is this.setWaitMode('animation') not this.SetWaitMode('animation') which should behave exactly like the event command.
  19. bass2yang said:
    Sorry, updated the wrong one - edited the code above to include the proper alias.
    Thanks again for taking the time to look at this.

    That fixes the Range Error - Maximum Stack Size Exceeded. But the animation still doesn't rotate, so there must be some other reason hiding in the code.

    I imagine that it could probably be worked around with a script to determine character direction and separate animations for each direction in the tool event if it becomes an absolute must to have that type of technique, though.
    Also, it is this.setWaitMode('animation') not this.SetWaitMode('animation') which should behave exactly like the event command.

    Sorry, that was my mistake. I properly copied and pasted the full 2 lines of code directly into the event(replacing the animations calls as needed), but wrote it improperly when describing it in the paragraph. Alas, it still doesn't seem to work. Even if I create a new event on the field and switch the SUBJECT to this.actor(ID). The animation plays, but it doesn't wait for it to finish before it moves on to the next part of the script.

    When one considers that in this case FOSSIL is being used and that Chrono Engine is run on an RPG Maker it's not intended for, I'm thankful that there are so many amazing people on this site who have figured out modifications to the Javascript to both make it functional in MZ and better in MV. Thanks again.

    For me now, I think I'll start focusing on making the small game I imagined for this project.
    (Hopefully it stays small without too much feature creep)