Jeneeus's Alchemy System

● ARCHIVED · READ-ONLY
Started by Jeneeus Guruman 11 posts View original ↗
  1. Jeneeus's Alchemy System
    Version: 1.0.1
    By Jeneeus Guruman​
     
    Introduction

         This script allows to create items, weapons, and armors via using skills or items with a success rate based on the user's parameters, $game_variables, etc. It's very useful not just for alchemist characters, but also for blacksmith, or even anyone.
     
    Features

    • Creates an item, armor, or weapon.
    • Can provide a success rate on creating.
    • Usable only via skills or items outside the battle.
    Screenshots
     

    Spoiler
    If an actor doesn't have any items to craft, the skill is disabled.


    If an actor has any item to craft, the skill is enabled.

     
    If you lack at least 1 requirement, you cannot proceed to the crafting process.

     
    If you have enough items, crafting that item is now enabled.

     
    Crafting...

    Crafting successful.


    Crafting failed.


    You can set the level requirement of the items to make.


    So other items can be unlocked.


    Also works using items too as a trigger.
     
    How to Use

    Just insert the script above main (not the one below) and below other scripts (including other non-defaults). Only usable outside the battle, therefore, the occasion must be set to "only from the menu" or the skill/item won't work. When using an item creation SKILL, the scope must be set to "none" or the skill won't work. When using an item creation ITEM, the scope must be set to either "one ally" or "user" or the item won't work.
    Spoiler
    # Script Calls:## <alchemy># * Using the skill or item will activate item creation scene.## * Note: Place this notetag to the skill or item that opens the # alchemy scene.## <alche_ireq: type, id, amount># type: the type of item# 0 = Items ($data_items)# 1 = Weapons ($data_weapons)# 2 = Armors ($data_armors)# id: the id of an item/weapon/armor in the database# amount: the amount of the specified item needed to create this item# Notetag examples: # <alche_ireq: 0, 1, 2> => An item needs to have at least 2 "Potions"# in the inventory to create this item.## * Note: If you put more than 1 requirement, the item can be made if ALL of # the items is in the party's inventory.## <alche_areq: id># id: the actor that will able to exclusively create the item.## * Note: This notetag is optional. If this is not specified, all actors # that have the ability can create this item.## <alche_lreq: n># n: the required level to create this item. the item will not be shown # if the level is below the requirement.## * Note: This notetag is required or the item will not be shown.## <alche_greq: n># n: the required gold to create this item.## * Note: This notetag is optional. If this is not specified, no gold is# needed.## <success_rate: 'formula'># formula: The formula for calculating the creation success rate.# The formula is the same as the formula in skill damage except that # there is no target (which is supposed to be expressed as 'b').# Take note that the quotations (') are included to make it work.# Also multiple lines of one fourmula are allowed.# Notetag examples: # <alche_success>: 'a.level + a.luk / 10'> # => If the user's level is 50 having 300 LUK, the success rate will have# 80% chance to make this item, provided that the maximum success rate is 100.# <alche_success: '100'> # => The item has 100% chance to create this, provided that the maximum success rate is 100.## * Note: This notetag is required. To display the decimal parts, put #.0# (if it is a whole number) or variable.to_f (if it is a variable). # For example, <success_rate: 'a.level.to_f + a.luk.to_f / 10.0'>
     
    Demo
     
    Alchemy
     
    Script

    Alchemy
     
    Known Bugs
    • Problems with item usage when using the script. (FIXED)
     
    FAQs

    Q: I want to use the script through talking to an NPC or through game menu directly. How can I do that?
    A: Unfortunately, no. There are many other scripts that allows you to do that actually. Just search around. :)
     
    Q: How can I use/put/modify the success rate formula?
    A: You will place the success rate just the same as putting the damage formula in the skills/items. Take note that there are no targets (which is supposed to be expressed as 'b'). You can even put a fix amount.
     
    Q: I want to disable the success rate and making it never fail. How can I do that?
    A: Do either putting the success rate equal to the maximum success rate or make both the base and max success rates equal.
     
    Q: I want to make it compatible with <insert other script/s here>. There's an error when combined with <insert other script/s here>.
    A: I will try to see the problem about the compatibility issue if the script is not that complicated.

    Author's Notes

    • This script is free to use commercially or not. Unlike my other scripts, crediting me using this script is a must, commercially or not.
  2. OOOOoooohhh yeah bay-bay! I looooove it when something gives me inspiration, and that's what you and your script did! Love it!
  3. Q: I want to use the script through talking to an NPC or through game menu directly. How can I do that?


    A: Unfortunately, no. There are many other scripts that allows you to do that actually. Just search around. :)
    This is not true... Since your alchemy scene is still a scene, they can still call it from an NPC or the game menu...
  4. Actually found some errors when I got the fever and got fixed. I'll upload it the fixed version after I double check the demo and script.

    EDIT: The demo and script are now fixed.

    Engr. Adiktuzmiko said:
    This is not true... Since your alchemy scene is still a scene, they can still call it from an NPC or the game menu...
    You can actually call it directly but it will cause errors since the success rate NEEDS to get the user, itself.
  5. we could feed it a user... with a simple edit in case you cannot set it thru simple script calls...
  6. Engr. Adiktuzmiko said:
    we could feed it a user... with a simple edit in case you cannot set it thru simple script calls...
    Dang it! I completely forgot about script calls. I'll edit it again to make sure it will now works even on NPC or maybe directly to the game menu. Thanks for the reminder. :D
  7. Making it available for use even without a definite actor (or a forced actor, especially if it's a game that only has a single actor) could increase it's uses.

    Like for example, if we can feed it an imaginary actor, then we can make an alchemy system where different NPCs have different success rates. Assuming we don't want it based on the party.  :)
  8. Hey, please I need help. When I go into combat, the script reports an error.

    def alche_any?
    items = []
    $data_items.each do |i|
    next if i == nil
    if i.alche_lreq <= level && i.alche_lreq > 0
    items.push(i)
    end
    end
    !items.empty?
    end
    end

    The program says that the error is in "level".
  9. A screenshot of the actual error message might be helpful. I am assuming that what you have typed out is not the error message.
  10. Kes said:
    A screenshot of the actual error message might be helpful. I am assuming that what you have typed out is not the error message.

    The mistake is this. I had the same error with this script. Please someone help.
  11. Change line 274 to class Game_Actor < Game_Battler