FF5 “Mix” (ちょうごう)

Version 2.00 (5/25/2013)
Script Download

This script is based on the Chemist job class command “Mix” from Final Fantasy 5. Mix allows the user to mix any items from the party’s inventory for a variety of effects in battle.

All item combination formulae must be defined in the customization module.

Changelog

  • v2.00
    • You can now mix any amount of items together.
    • You can now create mix formulae for any number of items.
    • Combination search algorithm changed.
    • The <mix> tag has changed.
    • Script call ‘get_mix_id_result’ has changed. (5/25/2013)
  • v1.03
    • Added developer utility script calls. (8/04/2012)
  • v1.02 :
    • Compatibility: “YEA-BattleCommandList” support added.
    • Compatibility: “YEA-BattleEngine” support added.
    • Fixed issues related to Attack Times+.
    • Unused mix items are now properly returned after battle.
    • Unused mix items are now properly returned when an actor dies.
    • Unused mix items are now properly returned when switching actors.
    • Console window now outputs when items are returned to inventory.
    • Game_Actor#prior_command is no longer aliased.
    • Comments added/changed.
    • Efficiency update. (8/03/2012)
  • v1.01
    • Compatibility: Mix window properly resized for “YEA-BattleEngine”
    • Fixed crashes when using items normally.
    • Efficiency update with console output. (8/03/2012)
  • v1.00
    • Initial release. (8/03/2012)

Usage Notes

The targeting Scope of the result item will stay intact when made through mixed items. If the result item requires a player-selected target, the player can do so.

Spelling is very important with this script. Because of the high potential for user-errors to occur in regards with spelling errors, I’ve provided the option to have messages appear in the Playtest console window whenever certain errors or spelling mistakes associated with this script are encountered.

Item ID combinations will always take precedence over Mix Type combinations if the selected mix items have a potential result in both.

If DEBUG_INFO is true, you will sometimes be informed in the console window whenever mix items are returned to the party’s inventory. Please report to me when items are supposed to be returned to you but are not with information on how to reproduce it.

Notetags

Note: Some tags are given shorter tags for typing convenience. You only need to use one <tag> from a given group for a notebox. Use common sense.

The following Notetag is for Skills only:

<mix>
<mix: n>

This tag turns the skill into a Mix skill, where n is the maximum number of items the actor can mix together. When a Mix skill is selected in battle, a window with all possible mixable items will appear. The player will not know what item is produced until the item is actually used. Mix skills do not have any special effect outside of battle. If n is not included with the tag, the default maximum item selection is 2.

The following Notetags are for Items only:

<mixtype: type>

This tag defines an item’s Mix Type where type is any type name you defined in MIX_TYPES in the customization module WITHOUT the colon. For more information about Mix Types, see the comments in the Mix Type Formulae section in the customization module. If the type in the tag is not found in MIX_TYPES, a message in the console will tell you.

<unmixable>
<no mix>

This tag will flag the item as unmixable. Items with this tag will not appear in the Mix window.

Script Calls

The following script calls are meant to be used in “Script…” event commands found under Tab 3 when creating a new event command.

output_mix_formulae(:id)
output_mix_formulae(:type)

This script call will output all possible Mix ID formulae or Mix Type formulae to the console window.

get_mix_id_result(id, id, id…)

Get the Item ID result of any given Item IDs where id is Item ID numbers from your database. You can list any number of ID numbers separated by commas as you like. If a result cannot be found with the given ID number arguments, it will return 0. This script call is meant to be used in the “Script” box within “Control Variable” event commands.

FAQ

I received the Syntax Error “unexpected tLBRACK, expecting ‘}’. How do I fix it?

This means you forgot the comma after the result_item_id number.

How do I stop the debug messages from appearing in the console window?

Set DEBUG_INFO to false in the customization module.

Compatibility

Due to the nature of this script, script incompatibilities with other scripts is likely and expected. Please do not ask if [insert script here] is compatible with this script. You can test it yourself.

Custom battle systems are very likely to have issues with this script especially ones that are not turn-based like the default battle system.

If you run into incompatibilities, please report them to me with a link to the script and I will try to make it compatible.

This script aliases the following default VXA methods:

  • DataManager#load_normal_database
  • DataManager#load_battle_test_database
  • DataManager#load_database
  • Game_Action#clear
  • Game_Actor#initialize
  • Game_Actor#use_item
  • Game_Actor#consume_item
  • Game_Actor#on_turn_end
  • Game_Actor#clear_actions
  • Game_Actor#item_conditions_met
  • Scene_Battle#on_skill_ok
  • Scene_Battle#on_enemy_ok
  • Scene_Battle#on_enemy_cancel
  • Scene_Battle#on_actor_ok
  • Scene_Battle#on_actor_cancel
  • Scene_Battle#start_actor_command_selection
There are no default method overwrites.
This script has built-in compatibility with the following scripts:

Requests for compatibility with other scripts are welcome.

Terms and Conditions

Please do not repost this script elsewhere without permission.

Free for non-commercial use. For commercial use, contact me first.

Newest versions of this script can be found at https://mrbubblewand.wordpress.com/

16 Responses to FF5 “Mix” (ちょうごう)

  1. Pingback: RGSS3: FF5 “Mix” (ちょうごう) « Bubble Blog

  2. McTricky says:

    Has a incompatibility with Yanfly’s Ace Battle Engine: http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine

    Even with the notetag set, when using the Mix skill, it just treats like a normal skill.

    Also there was a bug when using it the Ace Battle Engine where it would crash when I tried to use an item normally in battle whilst one of my party members were KO’d.

  3. Mr. Bubble says:

    v1.1 is now up. It fixes crashes related to normal item use.

    McTricky, I tested it with YEA – Battle Engine and the Mix skill works properly in battle. I’ve resized the Mix Items window to be consistent with the rest of the windows in ABE though. It is likely another script you are using. Please determine which script it actually is.

  4. McTricky says:

    Strange, because it worked fine with all my other scripts when ABE WASN’T in. But the second I put ABE in, it just doesn’t work. I’ll try and pin point the exact script that’s causing the problem.

  5. Mr. Bubble says:

    Make sure the Mix script is below ABE in the script edtior.

  6. McTricky says:

    Okay, now I see the problem. It was strange because it worked in my blank project that had the same script data as my game project but it work in my blank one and not in my actual game project.

    Turned out that it only works when the Mix skill is selected from the actual Skill window. I have Yanfly’s Battle Command List script: http://yanflychannel.wordpress.com/rmvxa/battle-scripts/battle-command-list/

    With it, I had the “Mix” skill placed in the Command window, and when it’s selected from the Command window, it treats it like a normal skill (i.e item selection doesn’t show up).

    • Joe says:

      I’m having an issue with using yanfly’s battle command script, when I have Mix as a command it just chooses an item as normal, it doesn’t let me mix. I do have it below the battle command script and I’ve tried it both my current project and a clean game with no scripts other than these two. Mix works fine from the skill window though.

  7. McTricky says:

    And I did have it below ABE to begin with. In fact, it was at the very bottom. xD

  8. Mr. Bubble says:

    Updated to v1.2. Let me know of any errors.

  9. Pingback: Site News: Pastebin Double Pastes « Bubble Blog

  10. Pingback: RGSS3: New and Updated Generic Gauge Patches « Bubble Blog

  11. This script is amazing. The first that ever worked for me.
    I’m trying to edit it to make a FFV-style dualcast script over this one… no luck so far lol

  12. CP says:

    Just FYI, someone found a compatibility issue between my battle engine and your mix script. I went ahead and fixed up the issue with this snippet here: http://pastebin.com/93aFETxu

    Really nice script! Hadn’t seen this one yet.

  13. ARK X says:

    Where do I place the script call? Is it a common event that is referenced by the skill command?

  14. pokeprof says:

    With item combos that are not explicitly defined, i keep getting the error message “line 594: NameError occurred undefined local variable or method ‘id’ for #”
    any advice to what might be causing this?

  15. Eric Adamo says:

    I’m getting the same error as pokeprof when not Mixing using exact Item IDs.

Leave a Reply here. (Due to a recent increase in comment spam bots, new comments will be moderated unless you have at least one approved comment in the past.)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s