Jump to content

Tidloc's Alchemy Script

Recommended Posts

Tidloc's Alchemy Script v.2.3
by Tidloc

A easy to use and adjsutable alchemy script with the option to mix after recipe or only with ingredients, you may choose yourself.

- You may call this Scene by hitting a predefined key on the map or via the script command Tidloc.exe("Alchemy",:call), more detailed description within the comments at the beginning of my script.
- Everything you may want to adjust as non-scripter is within the first lines of my script in the module Tidloc.
- all recips, wheter you want them to be available as recipes themselves or only to be findable via mixing by incident with any ingredients will have to be entered into the scriptsection, which can be located anywhere, recommended directly under the script itself. Example for this scriptsection attached. Description how to use it is inserted in the example.
- no more suppot for the external file Tidloc.ini!

entering the Alchemist:


screen when using a recipe (not enough ressources):

when mixing with recipe (enough Ressources):

when mixing without a recipe:

when entering the shop and something is still in mixing without a recipe:

How to Use
place this script above main, but below any standart script and also below my Header. For the recipes you need tidloc.ini in your data folder of your game. No more support for the external file! you need the alchemy-recipes now in the script section, see section Script below.


Download this file for the alchemy script and this file for an example of how to setup some recipes in the scriptsection.
If you want to use it as a smith, download this file for the script and this file for the examples
(I use both in the same game with different recipes/blueprints, so it become handy this way ;) )
also, you need my Header.


Q: I found a bug or have a suggestion, how ca I contact you?

A: please look into my signature, there you'll always find the most recent contact information!

otherwise easy-to-use, when questions appear, they will be inserted here.

Credits and Thanks
- Tidloc ^_^

Autor's Notes
see the attached example tidloc.ini (uploaded here as tidloc.txt because somehow i'm neither allowed to upload ini-files nor rar-files... ó_Ò) for description, how Recipes may be looking like.



02/29/2012: 1.0.1: found some bugs, cleared them ^^ and Demo uploaded
03/03/2012: 1.0.2: uploaded screenshots and cleared some bugs that came with translating...
04/13/2012: 1.2: uploaded new Demo with actual versions of the script.
05/02/2012: 1.3: added blacksmith alteration.
05/27/2012: 1.4: Big update on compatibility
06/02/2012: 2.0: new release out! completely rewrote some party of the script, for details see my header, also header update needed!
07/10/2015: 2.1: some parts were completely redone, as the ini-hadling were quite poor and won't be supported any further. My improvement in coding let to a better solution of how to enter the data easily.(second script with examples)
07/13/2015: 2.2: fixed compatibility issues with my custom equipment and the scene is now left when a task is assigned. Also updated the HTML to 1.3 to be able to check wheter a game variable i above or below a certain value.
07/18/2015: 2.2.1: moved scripthandling from game_temp to game_system.
07/23/2015: updated the demo

08/01/2015: 2.2.2: implemented using of Enemydata/Itemdata/... in the header thread
08/19/2015: 2.2.3: implemtend to get items back after failure toggleable for each recipe
06/04/2017: 2.3: made the scripts compatible to my custom equipment and trigger an additional command when the item gets created via alchemist/blacksmith (requires the according data-scripts, available on my header page)

04/29/2018: updated contact information

Edited by Tidloc

Share this post

Link to post
Share on other sites

err... maybe you accidentally didn't copy my whole scripts?

I just tried copy-pasting only this and my header int a new test-project and it works... Also see my Demo...

If it doesn't work, tell me via PM and I will look, how I can help you! =))

Share this post

Link to post
Share on other sites

You have to comment out an end on line 645


there is no end commented on line 645... o_Ö

the one on 651 is commented because the if on 619 is too (not yet completely implemented) ;)

Share this post

Link to post
Share on other sites

I know a good addition for this script. Having a specific BGS playing while the alchemy window is open would be neat. Like a hammer hitting an anvil over and over or bubbling for either smithing or alchemy (I'm going to be using both, :D)

Share this post

Link to post
Share on other sites

I am getting an interesting error when I use your script. I created a button in the menu that calls on your script and does load it successfully and I can browse around the menu. However when I get the weapon I need in my inventory and the iron ore that I need to craft it, I get this error as soon as the script launches



Script 'Tidloc's Blacksmith' line 679: NoMethodError occured.

undefined method 'key_item?' for #<RPG::Weapon:0x818cab0>


Here is a copy of the ini file I made in the data folder too just incase you need it



#  Easy-Item crafting script												   #
#	   changeable over .ini-files											 #
#				   by Tidloc												  #
#  Feel free to use it in your own RPG-Maker game.							 #
#  But please give me credits for this hell of work 					    #
#	  easy changeable structure:											  #
#   [ingame-recipe or scematic-id]											 #
#   _Name = *whatever*														 #
#   _Outcome = *0=item, 1=weapon,2=armor*									  #
#   _Result = *ingame-id of outcome*										   #
#   _Prop = *percentage of successful outcome*								 #
#   _Cost = *moneycost of itemcreation*									    #
#   _Time = *required time for itemcreation in seconds*					    #
#   _Res1....4 = *ingame-id of ressource*,*same as outcome*,*amount needed*    #
#   _ID = *if scematic only works on one smith enter his id here*			  #
#   [end]																	  #
#   recipe-id 0 is special:												    #
#	 use it for unplanned smithery with no outcome as booby prize.		    #
#	 if you would like no booby priye at all simply don't use this id.	    #
#   use recipe-ids with leading 'n' if no recipe/scematic can be found ingame  #
#   be coutious to not use any doubled, or else only the first will be		 #
#   used by the script!													    #
#   this order is not neccessarily needed, but i would suggest to keep		 #
#   it, as i think this is the best to work with. besides entering res3	    #
#   without entering res2 for example would end up in res3 not be needed too.  #
#   You may leave any res or the Prop *then 100* or the cost *then 0* or the   #
#   Time *then 0* out.														 #
#   in this script I enabled up to four different ressources to may be		 #
#   needed. unneeded Ressources don't have to be written, but when just	    #
#   fill in 0 to ID and/or amount and it won't appear ingame.				  #
#   To use my programmed phase-system, just write a 'p' in front of		    #
#   the required phases: p1=1 phase, p2=2 phasese... p10=10 phases...		  #
#   special smith IDs should only be used with no-scematic-recipes or else	 #
#   people will wonder why different recipes won't work, or you simply		 #
#   write a hint into the item description ;-)								 #
#   If any questions appear feel free to contact me!						   #
#											    tidloc@gmx.at				 #
#											    149436915 (ICQ)			   #
_Name    = Reinforced Old Sword
_Outcome = 1
_Result  = 62
_Prop  = 90
_Time    = 8
_Res1    = 61,1,1
_Res2    = 19,0,1


as I am aware, Resource 1 is a weapon, #61, and I need 1 of it and Resource 2 is item #19 and I need 1.


So yup lol, :P

Share this post

Link to post
Share on other sites

Just a quick note: in the tidloc.ini file that contains all of the recipe data, do not use unusual characters such as Ü etc... as this causes the script to crash (personal experience).


Other than that, this is an excellent script, I especially like that all of the data is stored in a glorified txt file (ini files are easily edited with wordpad or better yet notepad++).


With over 450 recipes in my game using notebox tags was not an option. The massive data set can be manipulated in Excel output to Notepad++ and converted to .ini very quickly.

Share this post

Link to post
Share on other sites

I know a good addition for this script. Having a specific BGS playing while the alchemy window is open would be neat. Like a hammer hitting an anvil over and over or bubbling for either smithing or alchemy (I'm going to be using both, :D)

Pretty sure you can do that with simple event commands 'Play BGS' when you open it and then 'Fadeout BGS 3' when you close it. If I'm unmistaken its run by script calls or a common event.

Share this post

Link to post
Share on other sites

Hi, your script has been working smoothly in my game up until I tried to do mixing without a recipe. Using a recipe works great, but "mix without recipe" will not even allow me to select an item.

I have the script set up to be called as a command on my menu, so it's a ready option any time during gameplay rather than through talking to an NPC like you are using it in your demo. I'd really like to do a quest where my character has to synthesize something without a recipe (by guessing) but I'm lost on why it won't work. Do you, or anyone else reading, think you might be able to help?

Share this post

Link to post
Share on other sites

At this stage I can only recommend trying it in the demo he offered, and see if the behaviour occurs there as well, if it does it is no longer your fault. At that stage it is up to him to fix it.


If it does not occur in the demo the same way it did in your project, it could be an incompatibility between scripts, and if it works fine in the demo, you will need to state the list of scripts you are using that might effect items in anyway.

Share this post

Link to post
Share on other sites

I've wrestled out a few issues now, like I can select items and begin to mix them. I can successfully mix something for an unknown recipe that I have previously specified in tidloc.ini, which is great! But if I mix randomly the game crashes. I suspected this was because I left out the booby prize which was ash- I wasn't wanting my player's items to get wasted from a booby prize like ash but once I put it in everything worked smoothly!


I'll just have to warn my players not to waste their items if they wanna play around with alchemy! Lol thanks for the help everyone.



Update 8/8/2012: Has anyone noticed a small bug in the "mixing without recipe" option where it will eat up two of your items even if you only mix with one? You would have to be far enough in the gameplay for your character to have several items I believe. It's hard to explain, but say I have 1 egg and 2 apples, and my recipe calls for 1 egg and 1 apple. I mix 1 apple and 1 egg so the alchemy is successful, but now I have no more apples when I should still have 1 left! I've noticed that if I use the same recipe but with 3 apples starting out, I will only have 1 apple left by the time the alchemy is successful. So I'm guessing that the alchemy will take two items when you have more than 1 and less than 3. I'm not using any other custom scripts than this- so I'm wondering what's happening with the math behind the scenes. This never happens when I mix with a recipe, only when I mix without a recipe.

Edited by Megumi

Share this post

Link to post
Share on other sites

Nice to see your interest in my script ^_^


Yes, the thing about the booby prize... already spotted this, don't know the reason yet, somehow the translation from RGSS 1 didn't work that smoothly as I thought... Have to take a look into this, on my to-do-list, but hardly any spare-time next to my work lately. >__>


and interesting bug you noticed... didn't happen to me yet. o_O

but wouldn't be the first bug I encounter only appearing under special circumstances. I'll also look into this! ^__^

Share this post

Link to post
Share on other sites

Uh, I just installed your header, dismantle, blacksmithing, and alchemy scripts, as well as the ini file.  Now I can't save games.  How do I fix this?

Share this post

Link to post
Share on other sites

Yeah it's completely removed the save function and has load instead.  So change line 57 to true.  Gotcha.




THANK YOU!  That fixed it.  -line 58 by the way-


now ... uh.. I'm new to scripting.  Only had this program a little over a week now...

on my first project...


I plugged the scripts in... what do I need to do to use them, because I can't seem to find instructions on how to use them.... and I feel like I'm being obtuse or blonde or something.

Edited by Notsalony

Share this post

Link to post
Share on other sites

Don't worry, you're not being obtuse OR blonde.


Also, it was on line 58? He must've updated again without telling me... there are so many version updates for Tidloc's Scripts (mostly my fault, lol) that it's just getting a bit confusing.


Anyways, most of the scripts will have instructions right above their module. But Alchemy is a bit different in that it uses ini files to make recipes. It's a bit complicated, but useful once you figure it out. You should have a Tidloc.ini file in your Data folder that should have some instructions in it.

Share this post

Link to post
Share on other sites

Yeah, I had to hunt for the txt and turn it into an ini to get into my game at all.  I'm up to that.  I saw the recipies inside it.  Basicaly deside on my basic elements, and what they result in and then make the list there?


Do I have to make any note tags on any characters, items, skills, or weapons?  Because I know with fomar's codes I seem to spend HOURS adding note tags. 

Share this post

Link to post
Share on other sites

I haven't personally used the Alchemy script for anything yet (still working on the main story campaign before implementing gameplay systems such as crafting), so I'm not sure. But I don't think so.


But yea, I think that's the gist of it.

Share this post

Link to post
Share on other sites

Okay.  That doesn't sound nearly as daunting as I feared it would be.


See I've got the story line for mine mapped out for 4 ends of game so far.  And I have about 1/8th of my character's done.  And I'm almost done with one of my nations.  I just wish I could find some scripts for seasons, different weather settings, maybe something that slowly rained leaves or something for fall.  And a handful of other things.  I troll this site for codes that do the things I'm looking for while I work out the items and the quests along with the story line.  And I learned my lesson to play test all the scripts before going too far in.  I had 4 of Fomar's codes loaded and it nuked a lot of my functions, I had to remove all the scripts and field test each one I added till I id'ed the ones that didn't play nice with the others.  I'm betting I just had something in the wrong place is all that's wrong.  But eh.  Slow going but it's been fun so far.


I just wish I could have gotten the leveling items code to work for me.




What do I put on the character / job class, to allow it to use the alchemy/blacksmithing/dismantle.


Edit two


I went and downloaded the demo so I could look at the codes in action.  I'm starting to understand how to in put the dismantlement codes, but I was wondering what do you do if you want say a potion to dismantle into 3 parts?


I see the script call you have to put into an alchemist to get him to preform alchemy.  I'm curious, if you set up an ability to run that script call, could it allow you to have a playable alchemist character?


I could use some input on how to put in the runes as well.  I haven't found anything explaining that or the village building function.

Edited by Notsalony

Share this post

Link to post
Share on other sites


  • to make a special character to use him for smithing/alchemy/dismantle... I'd suggest to add a skill for it.

    to do that do the following:

    creat a new common event with a script call with: Tidloc_Dismantle.call (for the dismantle scene e.g.)

    create a skill

    available only in menu (at least I'd suggest that)

    add "On Use Effect", "Other" tab, common event and choose the one created.

    now add this skill to the character who shall be able to use it... vóila! xD

  • hmm, i thought that would be clear ...

    if the second item should dismantle into two items use the following:

        Result1	= 0,261,1
        Result2	= 0,251,1
  • well, the runes will be uniquly to my game, I will publish the script after my game is finished, sorry...

    for the town building... well... not much process on that and far away from being able to be published... much goes wrong in this script atm...

Share this post

Link to post
Share on other sites



I install your header and this alchemy script but got this error.


line 3105 NoMethodError occured.

undefined method 'Scan' for Tidloc::Alchemy:Module


The header and the alchemy script are the only two custom scripts running in the rpg maker vx ace. I have no coding experience and don't even know how to start troubleshooting this.

I hope that you can take some time to help me sort this out.

Share this post

Link to post
Share on other sites

that's because you need to setup the recipes (download the example file, add it to the scripts and alter it so your recipes are in)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

Top ArrowTop Arrow Highlighted