Alchemic Synthesis ~GO GO TOTORI!~

Mimi_Totori

This is a complete synthesis system heavily inspired from the Atelier series developed by GUST and especially from Atelier Totori.

Features

  • Ability to create objects based on recipes.
  • Ability to switch an ingredient for another of the same family.
  • Ability to set traits to ingredients and put them on the final item.
  • Alchemic level, experience and synthesis difficulty.
  • More advanced trait management (add-on).
  • Synthesis Shop (add-on).

What’s the difference between v2 and v1?
Aside from the EXP gain, nothing visible. The code has been completely overhauled and the trait management heavily simplified (the difficult version still exists as an add-on). Basically, it’s a pure code enhancement and lots of bug fixes.

This script requires the Traits Namer!

Download!
Demo!
Note: Demo made with the JP version of Ace. If it doesn’t work with the English version, copy a Game.rvproj2 file from your version and replace the one in the demo.

If for some reason you preferred the old version, here it is (unsupported now).

Instructions
First, you need a recipe. Recipes are key items and use notetags to indicate the range of possible synthesis:
<synth_item: number, number> # For usable items
<synth_weapon: number, number> # For weapons
<synth_armor: number, number> # For armors

Recipe Example

This recipe allows to create the weapon number 10.

Now, you need to enter several parameters, such as the synthesis difficulty level and the required ingredients. The syntax is as following, using the item’s notebox.
The synthesis level is compared to the party’s alchemy level and will determine the synthesis success rate.
<synth_level: number>
<synth_req_item: number, number> # The required usable items
<synth_req_weapon: number, number> # The required weapons
<synth_req_armor: number, number> # The required armors

Weapon Example

Level 3 synthesis, requires items number 5 and 6.

Let’s create the ingredients now. Each of them will have a family, a quality and traits. The quality will determine the number of synthesis points necessary to pick traits and put them on the final item. As for the family, every component can be swapped with another component of the same family, with different quality and different traits.
The syntax:
<synth_quality: number>
<synth_family: string>

The traits are defined exactly like they are used on regular items. However, it is possible to “lock” traits to prevent them to appear in the trait selection menu – so they never leave their item.
<synth_locks: x> # Lock the trait number x on the item.

Each trait has a cost. Set it with a notetag, in the same order as the traits appear in the database.
<synth_costs: x, y,>

Let’s see how it works in-game. To call the synthesis scene, use a call script event command with this:
SceneManager.call(Scene_Alchemy)
Alternatively, you can use Yanfly’s Ace Menu Engine and add the Synthesis option.
Choose the weapon tab and see the Black Key.

In-game Example 1

The maximum number of traits and ingredients is 4.


In-game Example 2

Selected ingredients go in the Cauldron.

Now be careful. We’re going to use a Holy Crystal. Look attentively at the trait and remember it for later.

In-game Example 4

Introducing the trait selection…

In-game Example 5

Huh? Where is HP Recovery XL? We did use a Holy Crystal didn’t we?
Well, yes. It’s just that this was a usable-only trait – only available on consumable items. Inversely, certain traits are only available for equipment.
Let’s finish the synthesis and test the new weapon!

In-game Example 6

Ernest can equip swords, so let's give him the Black Key.

Finished!

Et voilà! Ernest can show off his new skills!

Alchemic Level and EXP curve
In the config module you can alter as you like the EXP and synthesis level curves.
SYNTH_LEVEL_FORMULA = "100 * @synthesis_level"
SYNTH_EXP_FORMULA = "20 * creation_level / @synthesis_level

About Kread-EX

I code. And try to make games.

Posted on 08/12/2011, in RGSS3, RPG Maker VX Ace and tagged , . Bookmark the permalink. 295 Comments.

  1. Here, it’s fixed. Jesus, people, the sense of entitlement with some of you…

  2. I am in love, good job!

  3. Mitchell Becker

    You said you updated the script to fix it for items of the same type containing different properties? I synthesized two different Love Staffs, one that granted Heal 3, and one that didn’t. Yet whatever synthesis I performed last effected them both. Since I performed last the Synthesis with Heal 3 applied, it affected both Love Staffs, so the character could use Heal 3 with either staff equipped.

    • That’s not what I said no. I fixed it for ingredients of the same family. What you are experiencing is the normal behavior of the engine: when you modify an item, copies of the item are also modified. Changing this behavior requires a completely different script (like Fomar’s Individual Equipment).

      Currently, Alchemic Synthesis doesn’t support Individual Equipment (unlike Runic Enchantment) and a new “version” of a synthesis overwrites the old, like in the PS2 Atelier games and Mana-Khemia.

      • Mitchell Becker

        In your fix, you indeed can choose items of the same family.
        In that sense, you can add a requirement of multiples of the same item–

        meaning you need 2 wendel silvers.
        However, there is only enough room to list 4 ingredient requirements, and there is no way to scroll down. I don’t mean to bug you. It’s just something I noticed.

        • Mitchell Becker

          No, wait, you can’t have more than 4 requirements. It won’t allow you to select more than 4. My fault.

  4. @kread: can you make a YEA add-on to show item’s traits in item menu and equip menu?
    it is getting hard to remember what traits and skill items had after making multiple synthesis.

    • I don’t do menu-related scripts unless it’s commission work.

      • I see… It would have been better to have a window showing the traits for the selected items… maybe some other time.

        • @xeinzero: you can still see the traits that you used for created item, you just need to open the synthesize menu and select the item that you’ve created..
          try it out..

          @Kread-EX: can i make certain created item (not ingredient) have limited traits to insert to?
          and thanks for the great script XD

  5. If you attempt to synthesize and after selecting traits decide to cancel out, you’ll not only not create the item (obviously) but also lose the ingredients. Is there a way to fix this?

  6. Got an odd bug when I attempted to use synthesis combining both weapons and designated “Materials”.
    Script KRX-AlchemicSynthesis line 752: ArgumentError occurred. comparison of Fixnum with nil failed.

    • I need more info in order to reproduce the error. As is, it looks like you forgot to set traits costs but I’m not sure.

      • Yeah, no trait costs. Of course, you didn’t exactly explain what they’re for in the description above, and I’m not skilled enough of a coder to figure out the purpose. I figured the trait costs were just optional.

  7. (Since the reply chain kind of got killed)
    So far the Tactics Ogre System seems to be exactly what I want. Thank you for giving me what google could not.

  8. Not too sure why there isn’t an option to use only specific items for alchemy.
    For example, i could make a Dark blade, require iron of metal family, and dark matter of dark family.
    But i can still make it from other ingredients, such as bronze and dark wing.
    Its really annoying and i hopping there is a way to remove this feature

  9. This is a fantastic script. I was wondering if there was a way to have items created to have their own ID or not replace each other.
    What I mean is, when I craft, lets say a Fire Sword, and give it traits and then I craft another Fire Sword, but with different traits, the last one crafted, it’s traits are now used for all Fire Sword’s.
    Is there a way where each Fire Sword will keep its own traits?

    • I will add this eventually. It’ll be an add-on though because it’s a serious piece of work.

      • Wow, amazingly fast reply.
        Back on topic. That’s great news to hear. I imagined it probably wouldn’t be easy, and I honestly can’t wait for that add-on. This script has everything I wanted, except what I just asked about.
        Thanks for the reply to the matter, and have a good day :)!

  10. Hi Kread-EX. Faced a 752 script problem but I don’t know how to fix. I can’t code. I want to use a low level weapon to make high level weapon. So this is how I set the note tags.

    High Level Weapon (W033)

    Low Level Weapon (W031)

    Item (101)

    Item (102)

    I don’t know why but I keep getting 752 script error. I’ve tried changing a few things here and there but nothing seems to work.

    The funny thing is that I can Synthesis other things like make Items by combining items.

  11. Hi Kread-EX. Faced a 752 script problem but I don’t know how to fix. I can’t code. I want to use a low level weapon to make high level weapon. So this is how I set the note tags.

    High Level Weapon (W033)
    synth_req_item: 102,101
    synth_req_weapon: 31
    synth_level: 2

    Low Level Weapon (W031)
    synth_family: AquaForce Bow
    synth_costs: 1,1
    synth_quality: 100

    Item (101)
    synth_family: Empty Gun Handle
    synth_quality: 100
    synth_costs: 1,1

    Item (102)
    synth_family: Bow Strings
    synth_quality: 100
    synth_costs: 1,1

    I don’t know why but I keep getting 752 script error. I’ve tried changing a few things here and there but nothing seems to work.

    The funny thing is that I can Synthesis other things like make Items by combining items.

    Didn’t realise the note tags were taken out by the system. Sorry for reposting

  12. Hey Kread. Tell me,is there a way to require a certain actor in party for Synthesis to be available? Like, one of my characters is a blacksmith,and I’d like synthesis to be used only when he’s in party.

    • There’s no built-in function for that. A workaround would be to not include the synthesis option in the menu and just make the character in question call the scene when needed.

      • Well,Thanks anyway. I’ll try and learn to do that…

        • I just remembered: Yanfly’s Ace Menu Engine can disable commands with switches. You could set a switch as a condition for the command and use a Parallel process event to turn the switch on or off depending of your party composition.

  13. Hello Kread, I am facing a problem, i hope you can help me. Im a newbie sometimes and can barely code, but im very interested in your script. I have installed both Traits Namer and Synth scripts and included notetags in Recipe (item), ingredients (item) and weapons. they are as follows:

    Recipe: Sword Falcion (Key Item, never usable in combat)

    Ingredient 1 (item, id:18)

    Ingredient 2 (item, id:19)

    Falcion (Weapon)

    This is the only set of items that I have set up to try it out (the rest of items and weapons remain standard, no notetags at all). However, when moving the character in testing or trying to open the menu, i get the following error:

    Script “Alchemy/Synth Kread Ex” line 166: NoMethodError occurred.
    undefined method ‘[]’ for nil:NilClass

    Trying to understand the error, I think but not sure that the problem seem to happen when the game “cheks” the traits on the items on the party? but there are none yet, not even had the chance to create any on the test saved game.

    Thank you in advance for your help and sorry for the newbie question

    • Sorry, here is the right set up I have:

      Recipe: Sword Falcion (Key Item, never usable in combat)

      Ingredient 1 (item, id:18)
      synth_quality: 1
      synth_family: item
      synth_costs: 1, 1

      Ingredient 2 (item, id:19)
      synth_quality: 1
      synth_family: item
      synth_costs: 1, 2,

      Falcion (Weapon)
      synth_level: 2
      synth_req_item: 18, 19

      • Are you sure the number of synth_costs is equal to the number of traits on the item?

        • Well, for ingredient 1 I have added just a effect buff: Def 5 Turns and for Ingredient 2 I have added the effect 100 poison. Allow me to link a couple of screenshots showing it:

          Thank you for your help 🙂

          • Sorry i forgot, Its not Buff Def 5 efect, its ceguera, or blindness for Ingredient 1 >.<

            • Ohhhh nevermind I figured it out, you were completely right, stock numbers were wrong, In front of my nose -.-U. Thanks again and wondrous scripts my friend!

  14. Mike Cirka

    Is there any way that I could make synthesizing items cost gold as well as materials? That
    way I could create a shop where you sythesize items. I know there’s already a shop addon,
    but that requires that the player has already made the items themselves.

  15. Hi I keep getting the error:

    Script ‘Alchemic Synthesis’ line 549: NoMethodError occured.
    unidentified method ‘synthesis_family’ for nil:NilClass

    i tagged the items like how it says to, but I stull dont understand what synthesis points are.
    Thanks =)

    • Synthesis points is the total “currency” you get after the synthesis to spend on traits.

      Judging by the error message, you probably forgot to set a family for the ingredients.

  16. I am having a problem. I am using yanfly engine ace.
    whenever I try to add an elemental resist to an armor in synthesis, I get an error.

    traits namer line 393 argument error.
    Invalid value for integer(): “Earth”

    it doesn’t matter the element or value I put to it.

  17. When I craft the same item many times with different Traits, then all the items get the traits from the last crafted item.

    Is there a way to use this script without the Traits?

    • No. This is normal behavior and changing it would require another script (like Fomar’s Individual Equipment) to be compatible with this one, which isn’t the case.

  18. Can the items required for the synthesis more than 1..?
    Like: Need 5 ore to Create 1 Weapon A or Need 10 Ore to Create Weapon B..?

  19. Hi Kread, i’m Flame, admin of an italian rpgmaker site. I whould share this script in the forum posting the code in a topic. I want to credit you and this page. Do i have your permission?

  20. Hey there!

    I’ve put a learn skill on a sword then when i Equip it I have it,

    but when i put another sword after that, the skill is still there..

    Is there a way to do that?

  21. I’m sorrry to bother but when I want to make a synthesis I have this error :

    Script : “Alchemic Synthesis” line 167: NoMethodError occured

    undefined method ‘[]’ for nil:NilClass

    and the line is :

    adds = $game_party.synthesis_traits[[object.class, object.id]]

    What can I do?

  22. Sorry this was already answered…
    Never mind.

  23. Very energetic blog, I loved that a lot. Will there be a part 2?

  1. Pingback: Game Making Drive Week 4 | Xeinzero: A Stranger In a Strange World

  2. Pingback: Systèmes d’artisanat (de craft) | Les trouvailles de Chaos17

Leave a Reply

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: