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. Script works perfectly just like all the others just one question though. I looked through the Synthesis script and couldn’t find a Variable linked to your synthesis level. Is there a way to make a Variable that would be matched to your synthesis level. I could really use this in my game. Any help on the matter would be much appreciated and thank you in advance!

  2. Having a problem where my ingredients are being shown where my items should be in the synthesis window. I get an error on line 549 when I try and click on the ingredient. I am sure I used the right tags. Just to show.

    My potion

    Item 101

    Any ideas on what this could be?

    • Apparently wordpress didnt like my comment.

      My Potion
      synth_item: 101, 103, 104
      synth_level: 1
      synth_req_item: 39
      synth_shop: 11

      With the arrow brackets

      Item 101
      synth_quality: 11
      synth_family: string

      • Okay guys, I needed to read the tutorial better. synth_req_items is the items that get consumed to make the item not an item in inventory. Got it.

  3. Hello! First of all I have to say I love your Alchemy system. It’s fabulous. I am however experiencing an issue when I try to include learning a skill as one of the traits. I’ll attach a link to a screenshot showing what’s happening. Basically instead of it showing up as “Teaches the skill Fire” or whatever, it’s coming up as “Teaches Learn # and then it errors out. Please help! =)

    Here is the screenshot: http://tinypic.com/r/2v2k2fm/5

    Thanks in advance!

  4. PainfullTears

    Hi there getting the error, whenever a synthesis should execute:

    “Script ‘Kread-EX Alchemic Synthesis’ line 1080: Float DomainError occured.

    Infinity”

    No idea why

    Greetings PainfullTears

  5. Hi I was wondering if there was a script call for leveling up and leveling down your synthesis level.

    The scenario would be someone takes over an area and a reward would be an increase a synthesis level. Later the enemy would take over the area and he would lose a level.

    Also is there a way to put they type of synthesis by ability.

    An example would be one is smithing, another is alchemy and they all have their own prerequisite levels?

  6. I get an error with line 752 every time I synthesize. Something about the family, and nil.

  7. She scorched the ramp at an underwear fashion show,
    thanks to the Brazil butt lift workout program under Leandro Carvalho.
    You must make sure you’re ingesting a balanced vegetarian diet filled with various macro- and micro-nutrients essential for your body
    needs. Nothing at all intense, no “War Manual of Sun Tze”, absolutely no email or anything that involves
    you to think or strategize.

  8. Hi whenever i menu screen i encounter an error with line 166
    It says Script ‘Alchemy’ line 166: NoMethodError occured
    undefined method ‘[]’ for nil:Nilclass

  9. MrNinjacat

    I’m getting a perplexing error. Synthesizing items where the ingredients only have a total of four traits max to use works fine. If there’s more than 4 potential traits to be added to the synthesized items it works as long as I leave the fourth trait slot on the synthesized item empty. I have found however that adding in a parameter trait into that fourth slot is acceptable to the program. The error it’s feeding out to me says:

    Script ‘Traits_Namer’ line 483: NoMethodError occurred
    undefined method ‘code’ for nil:NilClass

    From my understanding of the code that means that trait code 21 is passing through fine while none of the other traits are working. The part I don’t get is why is it only the 4th slot and only if there are excess potential traits.

    For example:
    weapon x synthesis:
    Potential traits: atk*110, accuracy + 5%, Evasion + 5%, Attack state poison 50%
    No matter the order I add these four traits in I can synthesize it fine.

    now I add an item that changes the potential traits to
    Potential traits: atk*110, accuracy+5%, Evasion+5%, Attack State Poison 50%, Crit chance +5%
    Now unless I put atk*110 in the fourth trait slot or I leave the fourth trait slot empty, I end up with the error listed above. So say I put them in this order: atk*110,hit+5%,eva+5% as soon as I put one of the two left over traits in that slot the error pops up.

    While I wait to hear back from you I’ll continue to try and figure it out myself. Oh and I haven’t mucked with any of the coding from either the traits namer or the synthesis. Thanks in advance.

    • MrNinjacat

      So I set it up the same way inside your demo to see if it was just a problem with my game and, to my dismay, I got the same error. So I guess this is an actual bug. I’ll continue to try and figure it out while I wait to hear from you. Thanks again.

  10. Mrsaternzoom

    Hi I have a problem when I try to make one of my wepons it says there is a problem with line 654 wich says “(0…itm.synthesis_reqs.size).each do |i|”. Can anyone tell me whats wrong?

  11. Is there any way to use the notetags (e.g. <synth_weapon: x) in a script call?

  12. Is there a way to split the recipies and call only the ones for weapons on ona script call
    and only items in the other one?

  13. I’m getting an error with families. I have an item that requires the use of a Red Gem (Family: Gems), I can use any other item from the Gem family but only if I have a Red Gem in my inventory. How can I get it to where I can use any Gem without needing the Red Gem in my inventory

  14. Hey I got a bunch of problems, I can not synthesize my weapon, even when I got the ingredients and when I try to synthesize Armor (Runes) the Game crashes.
    Could you have a look?

    http://www.mediafire.com/download/d44mz6k5zrw6paj/Project1.rar

  15. There is a bug!! when you synthesis some itens like for example:
    Iron ore = 3 ore
    i have 6 ore, i synthesis 3 ore to get iron ore, when i will synthesis the last 3 ores and i cancel i get back my 6 ores! and i still having the iron ore!!

    fix this problem plz

  16. Pandemonium

    Hi Kread-Ex! I was wondering if there is a way with this script to make certain ingredients exact (eg, you need a precise berry, not just any item in the berry family), and I was also wondering if there is any way to make one item fall into more than one family at a time? (Eg a berry could be both a berry and a plant)? Thanks for any help you can give! Your script is fantastic!

    • Am trying to figure this out too. I like the versatility you’ve built in but I want to make simple recipes and don’t really even want to use traits for items.

    • Count me as a third vote for these suggestions. Without being able to specify specific items for a given synthesis, a lot of recipes end up looking the same unless you’re terribly specific with item families. I’m finding it more difficult to explain why I think items should be able to be in multiple families, but I think it comes down to letting the player do interesting things with synthesis; without items possessing multiple families, it’s always ‘this’ herb or ‘that’ herb, and you can’t use that interesting quality on that tomato instead.

      Actually, best example I can come up with? Without multiple families, I don’t think you can effectively make supplements work.

  17. Howdy! Quick question that’s entirely off topic. Do you know how to
    make your site mobile friendly? My web site looks weird when browsing from
    my iphone. I’m trying to find a theme or plugin that might be
    able to resolve this problem. If you have any recommendations, please
    share. With thanks!

  18. I need a very similar shop. Only… much simpler. I just need to be able to craft weapons. That’s it. No alchemic level or anything spiffy like that. Any one able to help me simplify this script or know of one out theRe?

  19. I have created a weapon and appears 10 units of it, why? I only want to create one. What can be the error?

  20. I’m sure that this has been answered already and I’m terribly sorry if it has been either here or on another forum, but I’m having a simple problem with making an item. It seems that whenever I create an item, all items of that same kind in my inventory completely copy the traits of the new one I just made. It’s like this.

    1 : Make a potion with +5% hp
    2 : Make a potion with 10% mp

    3 : Both potions now have 10% mp instead of having two separate potions with different effects.

    • Chaos_Kitsune29

      it’s because when you add traits to an item you are adding those traits to ALL items with that id.

      despite how jarring this seems, it’s actually how alchemy works in most of the Atelier/Mana Khemia games I’ve played.

      haven’t a clue how you’d fix that though.

  21. UltraDragonDude@aol.com

    Incredible script. Thank you! Just a quick question: Is there a way to see the traits on a synthesized item? If I have a character with a bunch of synthesized armors, etc., I’d like to be able to check in the menu which traits (HP+10, Poison +2, etc.) he has applying to him at any given time. This would also help in terms of figuring out which synthesized item to equip. Thanks.

  22. Lance Toma

    This seems like a great script, and I think you did an excellent job with it, but I just have one problem. Whenever I put in all the proper scripts and run the game, everything seems fine. However, when I attempt to open the menu, I get this error.
    “Script ‘Synthesis Shop Totori’ line 166: NoMethodError occurred.

    undefined `[]’ for nil:NilCalss”
    I’m not the greatest with specific scripting, so I have no idea what this means or how to fix it. Does anyone know how I can solve this error? Thank you in advance!

  23. Well …I get nasty bug when i try to craft my weapon. Everything seems ok until i get this error immediately after craft has been successful. Error is “Script ‘Crafting System’ line 460: NoMethodError occurred. undefine method ‘synthesis family’ for “. With items this script works very well. Line what it tells me always that this is wrong is this “next unless itm.synthesis_family == family”. It seems like it don`t get properly items indexes or something (I assume).

    • # Game_CustomEquip:0xaeb0f28 – this is missing error line part.

    • Well… i found a solution…. especially when to include that part that i managed to compile together your script and Individual Script. Now works both. I just needed to comment out one class in Individual code to let work perfectly with both scripts…. Not bad.

  24. Dragonfly89

    Is there a chance to play a SE when the item is crafted?

  25. FreezeKirby

    Hello, Kread-Ex!

    Fantastic Script, it works fine-except, there is only one thing I’d really love to do.

    I would really, really like, for the Alchemic Materials, to yield the possibility to give some traits I have already customized in the Traits Namer, namely those.

    Those traits, I had defined them hoping they’d work on Alchemic Materials-but since they are Items, it did not work! It works only for Equipment, and I realized it a bit too late. Is there anything you can do to allow Alchemic Materials to yield any Parameter-buffing trait, and to pass those to the crafted item if the player chooses to?

Leave a comment