设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 162|回复: 0

[转载发布] Neon Black Effect Boxes Compatibility with Recipes by Vlue

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-3 08:32:51 | 显示全部楼层 |阅读模式
    Spoiler: Recipes by Vlue
                    Code:       
    1. #Advanced Recipe Crafting v1.2
    2. #----------#
    3. #Features: Advanced Recipe crafting! Hold on tight!
    4. #
    5. #Usage:    Set up your recipes, learn recipes, make items! Yay!
    6. #       $crafting_category = :craft         - call before Scene, craft is category
    7. #       SceneManager.call(Scene_Crafting)   - opens the Crafting menu
    8. #       SceneManager.call(Scene_CraftingAll)- opens the category Crafting menu
    9. #       learn_recipe(id)                    - teaches that recipe
    10. #       forget_recipe(id)                   - forgets that recipe
    11. #
    12. #----------#
    13. #-- Script by: V.M of D.T
    14. #
    15. #- Questions or comments can be:
    16. #    given by email: sumptuaryspade@live.ca
    17. #    provided on facebook: http://www.facebook.com/DaimoniousTailsGames
    18. #   All my other scripts and projects can be found here: http://daimonioustails.weebly.com/
    19. #
    20. #- Free to use in any project with credit given, donations always welcome!
    21. module ADV_RECIPE
    22. #Whether or not crafted items use Weapon/Armor Randomization
    23.   USE_WA_RANDOMIZATION = false
    24. #The names of the categories for All Crafting Menu, use :All for all recipes
    25.   CATEGORIES = [:Alchemy,:Smithing,:Cooking,:Voodoo,:Tinkering]
    26.   DESCRIPTIONS = {
    27.     :Alchemy => "Mix herbs you find into powerful potions.",
    28.     :Smithing => "The ability to create various armors and weapons.",
    29.     :Cooking => "Used to process and improve raw food.",
    30.     :Voodoo => "Dangerous variants of alchemy and black magia.",
    31.     :Tinkering => "Convert non-metal materials into adventuring gear.",
    32.   }
    33. #The icons for categories, same order as above
    34.   CATEGORY_ICONS = [210,284,332,1,287]
    35. #The icon for player level
    36.   LEVEL_ICON = 117
    37. #Xp needed for crafting level, lvl is used for current level
    38.   XP_NEEDED_EQUATION = "100 * lvl"
    39. #Allow the crafting of multiple items
    40.   CRAFT_MULTIPLE = true
    41. #Allow or disallow menu access to the crafting scene
    42.   ENABLE_MENU_ACCESS = true
    43. #Disable crafting from menu (turning it into a recipe viewer)
    44.   DISABLE_MENU_CRAFT = true
    45. #Font Size of Detail window, smaller font size creates more room for materials
    46.   DETAIL_FONT_SIZE = 18
    47. #The following options disable the display of certain features. They still work
    48. # however if declared in recipes, so edit recipes accordingly.
    49. #Removes Gold Cost
    50.   DISABLE_GOLD_COST = true
    51. #Removes success rate
    52.   DISABLE_SUCCESS = true
    53. #Removes player level requirement
    54.   DISABLE_PLAYER_LEVEL = true
    55. #Removes crafting level requirement and gauge
    56.   DISABLE_CRAFT_LEVEL = true
    57. #Auto-learn all skills (can use forget_recipe to forget certain ones for later)
    58.   AUTO_LEARN_RECIPES = false
    59. #The fun (read: complicated) part!
    60. #Recipe symbols:
    61. #
    62. #The crafted item, type is 0 for item, 1 for weapon, 2 for armor
    63. # :result => [type,id,amount]
    64. #
    65. #The materials required, same style as result.
    66. # :materials => [ [type,id,amount,consumed?],[type,id,amount] ... ],
    67. #
    68. #  All the following are optional:
    69. # :gold_cost => amount          - amount of gold to craft, can be 0
    70. # :success => percent           - base percent chance of successful craft
    71. # :success_gain => percent      - percent gain on success per crafting level
    72. # :level => value               - Hero level required to craft
    73. # :craft_level => value         - Crafting level required to craft
    74. # :category => :category        - Crafting category (:Alchemy, :Tailor, etc)
    75. # :multiple => false            - disallows multiple crafts
    76. # :xp => amount                 - base Crafting xp gained per craft
    77. # :xp_deprac => amount          - Xp lost per crafting level
    78. # :pxp => amount                - Player xp gainer per craft
    79. # Formula for xp gained is as follows and is never negative:
    80. #  xp gain = xp - (current_level - recipe_level) * xp_deprac
    81. #Useful items: 30 =iron bar /9 =copper bar /57 =bandages /101 =amber /110 =oil /69 =wyrm leather
    82. #/147 =boar leather
    83. #
    84.   RECIPES = {
    85.   0 => { :result => [0,2,1],
    86.          :materials => [[0,1,3]],
    87.          :category => :Alchemy,},
    88.          #strong healing potion
    89.         
    90.   1 => { :result => [0,9,1],
    91.          :materials => [[0,8,2]],
    92.          :category => :Smithing,},
    93.          #copper bar
    94.         
    95.   2 => { :result => [0,152,1],
    96.          :materials => [[0,11,1]],
    97.          :category => :Cooking,},
    98.          #cooked boar steak
    99.   3 => { :result => [0,155,1],
    100.          :materials => [[0,11,1],[0,153,1],[0,3,1]],
    101.          :category => :Cooking,},
    102.          #fine boar meal
    103.   
    104.   4 => { :result => [0,158,1],
    105.          :materials => [[0,11,1]],
    106.          :category => :Cooking,},   
    107.          #boar sausage
    108.   5 => { :result => [0,128,1],
    109.          :materials => [[0,74,1],[0,73,1],[0,14,5]],
    110.          :category => :Cooking,},
    111.          #the Bomb
    112.         
    113.   6 => { :result => [0,48,1],
    114.          :materials => [[0,47,1]],
    115.          :category => :Alchemy,},
    116.          #poison grenade
    117.         
    118.   7 => { :result => [0,54,1],
    119.          :materials => [[0,2,2],[0,5,1]],
    120.          :category => :Alchemy,},
    121.          #advanced health potion
    122.         
    123.   8 => { :result => [0,80,1],
    124.          :materials => [[0,3,2], [0,212,2]],
    125.          :category => :Alchemy,},
    126.          #whore's oil
    127.         
    128.   9 => { :result => [0,157,1],
    129.          :materials => [[0,16,1]],
    130.          :category => :Cooking,},
    131.          #cooked fish
    132.         
    133. 10 => { :result => [0,156,1],
    134.          :materials => [[0,16,1],[0,153,1],[0,10,1]],
    135.          :category => :Cooking,},   
    136.          #fine fish meal
    137. 11 => { :result => [2,9,1],
    138.          :materials => [[0,9,1]],
    139.          :category => :Smithing,},
    140.          #copper helmet
    141.         
    142. 12 => { :result => [2,10,1],
    143.          :materials => [[0,9,2], [0,147,1]],
    144.          :category => :Smithing,},   
    145.          #copper armor
    146. 13 => { :result => [2,11,1],
    147.          :materials => [[0,9,1]],
    148.          :category => :Smithing,},   
    149.          #copper ring
    150. 14 => { :result => [0,129,1],
    151.          :materials => [[0,9,1]],
    152.          :category => :Smithing,},
    153.          #copper shuriken
    154.         
    155. 15 => { :result => [2,83,1],
    156.          :materials => [[0,178,1]],
    157.          :category => :Smithing,},
    158.          #frost copper helmet
    159.         
    160. 16 => { :result => [2,84,1],
    161.          :materials => [[0,178,2], [0,147,1]],
    162.          :category => :Smithing,},
    163.          #frost copper armor
    164.         
    165. 17 => { :result => [2,85,1],
    166.          :materials => [[0,178,1]],
    167.          :category => :Smithing,},
    168.          #frost copper bracelet
    169.         
    170. 18 => { :result => [0,178,1],
    171.          :materials => [[0,177,1]],
    172.          :category => :Smithing,},
    173.          #frost copper bar
    174. 19 => { :result => [1,84,1],
    175.          :materials => [[0,9,1]],
    176.          :category => :Smithing,},
    177.          #copper claws
    178.         
    179. 20 => { :result => [1,83,1],
    180.          :materials => [[0,178,1]],
    181.          :category => :Smithing,},
    182.          #frost copper claws
    183.         
    184. 21 => { :result => [0,123,2],
    185.          :materials => [[0,207,1],[0,336,1]],
    186.          :category => :Alchemy,},
    187.          #Frost Candy
    188. 22 => { :result => [1,67,1],
    189.          :materials => [[0,69,4]],
    190.          :category => :Tinkering,},
    191.          #adventurer's cloak
    192.         
    193. 23 => { :result => [0,189,1],
    194.          :materials => [[0,188,1]],
    195.          :category => :Cooking,},
    196.          #cooked scorpion meat
    197.         
    198. 24 => { :result => [0,191,1],
    199.          :materials => [[0,102,1]],
    200.          :category => :Cooking,},   
    201.          #cooked exotic meat
    202.         
    203.   25 => { :result => [0,30,1],
    204.          :materials => [[0,31,2]],
    205.          :category => :Smithing,},
    206.          #iron bar
    207.         
    208.    26 => { :result => [2,48,1],
    209.          :materials => [[0,9,3],[0,43,1]],
    210.          :craft_level => 7,
    211.          :category => :Smithing,},
    212.          #sapphire shield
    213.    27 => { :result => [2,49,1],
    214.          :materials => [[0,9,3],[0,42,1]],
    215.          :category => :Smithing,},
    216.          #jade shield
    217.    28 => { :result => [2,50,1],
    218.          :materials => [[0,9,3],[0,64,1]],
    219.          :category => :Smithing,},
    220.          #ruby shield
    221.         
    222.    29 => { :result => [2,47,1],
    223.          :materials => [[0,30,2]],
    224.          :category => :Smithing,},
    225.          #iron shield
    226.         
    227.     30 => { :result => [2,18,1],
    228.          :materials => [[0,30,2]],
    229.          :category => :Smithing,},
    230.          #iron helmet
    231.    
    232.      31 => { :result => [1,89,1],
    233.          :materials => [[0,30,1]],
    234.          :category => :Smithing,},
    235.          #iron axe
    236.         
    237.      32 => { :result => [0,196,1],
    238.          :materials => [[0,27,1]],
    239.          :category => :Cooking,},
    240.          #cooked wolf meat
    241.         
    242.      33 => { :result => [1,86,1],
    243.          :materials => [[1,87,1],[0,200,2]],
    244.          :category => :Smithing,},     
    245.          #frost swapping sword
    246.         
    247.       34 => { :result => [1,87,1],
    248.          :materials => [[1,86,1],[0,100,2]],
    249.          :category => :Smithing,},     
    250.          #fire swapping sword
    251.         
    252.       35 => { :result => [2,17,1],
    253.          :materials => [[0,30,3]],
    254.          :category => :Smithing,},
    255.          #iron cuirass
    256.         
    257.       36 => { :result => [2,92,1],
    258.          :materials => [[0,204,20]],
    259.          :category => :Smithing,},
    260.          #slime tunic
    261.       37 => { :result => [0,1,1],
    262.          :materials => [[0,3,2]],
    263.          :category => :Alchemy,},
    264.          #healing potion
    265.         
    266.         38 => { :result => [0,211,1],
    267.          :materials => [[0,207,2]],
    268.          :category => :Alchemy,},
    269.          #cold love     
    270.          
    271.         39 => { :result => [0,18,1],
    272.          :materials => [[0,212,2]],
    273.          :category => :Alchemy,},
    274.          #rising sun
    275.         
    276.         40 => { :result => [0,210,1],
    277.          :materials => [[0,209,1]],
    278.          :category => :Alchemy,},
    279.          #liquified dragonroot     
    280.         
    281.         41 => { :result => [0,106,1],
    282.          :materials => [[0,11,2],[0,153,1],[0,104,1], [0,15,1], [0,14,1]],
    283.          :category => :Cooking,},
    284.          #Hioni Special
    285.         
    286.          42 => { :result => [1,101,1],
    287.          :materials => [[1,2,1], [0,30,1]],
    288.          :category => :Smithing,},
    289.          #War Axe
    290.         
    291.          43 => { :result => [2,101,1],
    292.          :materials => [[2,1,2],[0,30,1]],
    293.          :category => :Smithing,},
    294.          #Armored Shirt
    295.          
    296.          52 => { :result => [0,6,1],
    297.          :materials => [[0,3,2]],
    298.          :category => :Alchemy,},
    299.          #antidote
    300.         
    301.          53 => { :result => [0,7,1],
    302.          :materials => [[0,3,1],[0,6,1]],
    303.          :category => :Alchemy,},
    304.          #advanced antidote
    305.          54 => { :result => [0,5,1],
    306.          :materials => [[0,209,1]],
    307.          :category => :Alchemy,},
    308.          #Lady's Touch   
    309.         
    310.         55 => { :result => [0,162,1],
    311.          :materials => [[0,21,1]],
    312.          :category => :Cooking,},
    313.          #Cooked Cow Meat     
    314.         
    315.       56 => { :result => [0,106,1],
    316.          :materials => [[0,250,2]],
    317.          :category => :Alchemy,},
    318.          #exotic fume potion
    319.         
    320.          
    321.        57 => { :result => [0,112,2],
    322.          :materials => [[0,3,1],[0,14,1], [0,209,1]],
    323.          :category => :Alchemy,},
    324.          #strength potion
    325.         
    326.        58 => { :result => [0,113,2],
    327.          :materials => [[0,11,1],[0,92,1], [0,73,1]],
    328.          :category => :Alchemy,},
    329.          #agility potion
    330.        59 => { :result => [0,114,2],
    331.          :materials => [[0,3,1],[0,25,1], [0,63,1]],
    332.          :category => :Alchemy,},
    333.          #defense potion   
    334.         
    335.        60 => { :result => [0,35,1],
    336.          :materials => [[0,207,1],[0,112,1]],
    337.          :category => :Alchemy,},
    338.          #blood-freezing potion   
    339.         
    340.        61 => { :result => [0,54,1],
    341.          :materials => [[0,5,1],[0,67,1]],
    342.          :category => :Alchemy,},
    343.          #advanced health potion            
    344.        62 => { :result => [0,116,1],
    345.          :materials => [[0,115,2]],
    346.          :category => :Alchemy,},
    347.          #Imperia's Glory   
    348.         
    349.         63 => { :result => [0,227,1],
    350.          :materials => [[0,226,2]],
    351.          :category => :Alchemy,},
    352.          #Alusida   
    353.         
    354.         64 => { :result => [0,35,1],
    355.          :materials => [[0,226,1],[0,115,1]],
    356.          :category => :Alchemy,},
    357.          #Tuflosi   
    358.         65 => { :result => [0,162,1],
    359.          :materials => [[0,21,1]],
    360.          :category => :Cooking,},
    361.          #Cooked Cow           
    362.         66 => { :result => [0,34,1],
    363.          :materials => [[0,44,2],[0,3,1], [0,207,1]],
    364.          :category => :Alchemy,},
    365.          #Potion of Rage                 
    366.         67 => { :result => [0,49,2],
    367.          :materials => [[0,3,2],[0,207,2], [0,212,3]],
    368.          :category => :Alchemy,},
    369.          #Tissa's Blood   
    370.         
    371.         68 => { :result => [0,235,2],
    372.          :materials => [[0,88,3], [0,153,1]],
    373.          :category => :Cooking,},
    374.          #Mushroom Soup   
    375.         
    376.          69 => { :result => [0,236,1],
    377.          :materials => [[0,88,1]],
    378.          :category => :Voodoo,},
    379.          #Sleeping Powder           
    380.         70 => { :result => [0,237,1],
    381.          :materials => [[0,88,2], [0,3,1]],
    382.          :category => :Alchemy,},
    383.          #Ertu Healing Potion   
    384.         71=> { :result => [0,70,1],
    385.          :materials => [[0,3,3]],
    386.          :category => :Alchemy,},
    387.          #healing slave
    388.         72=> { :result => [2,121,1],
    389.          :materials => [[0,30,5], [0,9,2], [0,42,1]],
    390.          :category => :Smithing,},
    391.          #jewel of Asari
    392.         73=> { :result => [0,142,1],
    393.          :materials => [[0,11,3], [0,153,2], [0,236,2]],
    394.          :category => :Cooking,},
    395.          #Chimera Bait
    396.         74=> { :result => [0,144,1],
    397.          :materials => [[0,10,1]],
    398.          :category => :Cooking,},
    399.          #roasted bread
    400.         
    401.         75 => { :result => [0,239,1],
    402.          :materials => [[0,238,1], [0,153,1]],
    403.          :category => :Cooking,},
    404.          #rat kebab
    405.         76 => { :result => [2,119,1],
    406.          :materials => [[0,124,5], [0,123,1], [0,30,2]],
    407.          :category => :Smithing,},
    408.          #White Skin
    409.         77 => { :result => [2,111,1],
    410.          :materials => [[0,78,1], [0,9,1], [0,30,1]],
    411.          :category => :Smithing,},
    412.          #Light Vest
    413.         
    414.         78 => { :result => [2,69,1],
    415.          :materials => [[0,78,2], [0,30,1], [0,202,1]],
    416.          :category => :Smithing,},
    417.          #Wolfbane
    418.         79 => { :result => [2,65,1],
    419.          :materials => [[0,124,2], [0,30,2]],
    420.          :category => :Smithing,},
    421.          #Snakeskin
    422.         80 => { :result => [2,64,1],
    423.          :materials => [[0,124,1], [0,30,3], [0,147,1]],
    424.          :category => :Smithing,},
    425.          #The Unbitten
    426.         
    427.         81 => { :result => [2,123,1],
    428.          :materials => [[0,101,1], [0,30,1], [0,124,1], [0,46,2]],
    429.          :category => :Smithing,},
    430.          #Security
    431.         
    432.         82 => { :result => [2,124,1],
    433.          :materials => [[0,9,1], [0,30,2], [0,124,1], [0,46,2]],
    434.          :category => :Smithing,},
    435.          #Desert Explorer      
    436.         
    437.         83 => { :result => [2,125,1],
    438.          :materials => [[0,9,2], [0,30,4], [0,124,1], [0,46,4]],
    439.          :category => :Smithing,},
    440.          #Desert Roamer   
    441.         
    442.         84 => { :result => [2,125,1],
    443.          :materials => [[0,43,1], [0,30,1], [0,46,2]],
    444.          :category => :Smithing,},
    445.          #Desert Star
    446.         85 => { :result => [0,243,1],
    447.          :materials => [[0,242,1], [0,153,1]],
    448.          :category => :Cooking,},
    449.          #Fried Snake
    450.         86 => { :result => [0,244,1],
    451.          :materials => [[0,243,2], [0,189,2], [0,153,1]],
    452.          :category => :Cooking,},
    453.          #Desert Buffet
    454.         
    455.         87 => { :result => [0,203,2],
    456.          :materials => [[0,30,1]],
    457.          :category => :Smithing,},
    458.          #Lockpicks
    459.         
    460.         88 => { :result => [2,128,1],
    461.          :materials => [[0,30,1], [0,46,1]],
    462.          :category => :Smithing,},
    463.          #Light Helmet
    464.         
    465.         89 => { :result => [0,249,2],
    466.          :materials => [[0,15,2], [0,92,2], [0,73,1]],
    467.          :category => :Cooking,},
    468.          #Varkhu Cocktail
    469.         
    470.         90 => { :result => [1,125,1],
    471.          :materials => [[1,3,1], [0,43,1], [0,42,1], [0,78,3]],
    472.          :category => :Smithing,},
    473.          #Expert's Pickaxe
    474.         91 => { :result => [0,256,2],
    475.          :materials => [[0,3,2], [0,238,1]],
    476.          :category => :Alchemy,},
    477.          #Elixir of the Cat         
    478.         
    479.         92 => { :result => [0,257,2],
    480.          :materials => [[0,3,1], [0,166,1], [0,204,1], [0,207,1]],
    481.          :category => :Alchemy,},
    482.          #Elixir of Ossification     
    483.         93 => { :result => [0,258,2],
    484.          :materials => [[0,1,1], [0,163,1], [0,238,2], [0,209,1]],
    485.          :category => :Alchemy,},
    486.          #Elixir of the Womb      
    487.         
    488.         94 => { :result => [0,259,2],
    489.          :materials => [[0,251,2], [0,85,1], [0,103,1]],
    490.          :category => :Alchemy,},
    491.          #Elixir of the Gentle Night     
    492.         
    493.         95 => { :result => [0,269,2],
    494.          :materials => [[0,212,2], [0,47,1], [0,153,1], [0,3,1]],
    495.          :category => :Alchemy,},
    496.          #Elixir of Liquid Relief   
    497.         96 => { :result => [0,261,2],
    498.          :materials => [[0,24,1], [0,67,1], [0,104,1], [0,163,1], [0,44,1]],
    499.          :category => :Alchemy,},
    500.          #Elixir of Pentacure   
    501.         
    502.         97 => { :result => [2,1,1],
    503.          :materials => [[0,154,2]],
    504.          :category => :Smithing,},
    505.          #Casual Cloth   
    506.         
    507.         98 => { :result => [2,27,1],
    508.          :materials => [[0,154,4]],
    509.          :category => :Smithing,},
    510.          #Silk Shirt   
    511.         
    512.         99 => { :result => [2,21,1],
    513.          :materials => [[0,154,4], [0,101,1], [0,124,2]],
    514.          :category => :Smithing,},
    515.          #White Cloak
    516.         
    517.         100=> { :result => [0,57,1],
    518.          :materials => [[0,154,1]],
    519.          :category => :Tinkering,},
    520.          #Bandage   
    521.         
    522.         101=> { :result => [2,134,1],
    523.          :materials => [[0,154,6], [0,209,1], [0,9,1]],
    524.          :category => :Smithing,},
    525.          #Web of Lies   
    526.         
    527.         102=> { :result => [1,127,1],
    528.          :materials => [[0,9,1], [0,30,1], [0,154,1], [0,101,1], [0,120,1]],
    529.          :category => :Smithing,},
    530.          #Stinger           
    531.         
    532.         103=> { :result => [0,131,2],
    533.          :materials => [[0,161,2], [0,3,2]],
    534.          :category => :Cooking,},
    535.          #Green Tea         
    536.         
    537.         104=> { :result => [0,132,2],
    538.          :materials => [[0,161,2], [0,212,2]],
    539.          :category => :Cooking,},
    540.          #Yellow Tea   
    541.         
    542.         105=> { :result => [0,45,1],
    543.          :materials => [[0,28,1]],
    544.          :category => :Cooking,},
    545.          #grilled fish
    546.         
    547.         106=> { :result => [0,278,4],
    548.          :materials => [[0,209,1], [0,3,1], [0,207,1], [0,67,1]],
    549.          :category => :Alchemy,},
    550.          #Morbus Gravis Cure
    551.         
    552.         107=> { :result => [1,135,1],
    553.          :materials => [[0,81,1], [0,41,1], [0,154,20]],
    554.          :category => :Voodoo,},
    555.          #Spider Staff
    556.         
    557.         108=> { :result => [0,284,1],
    558.          :materials => [[0,283,1], [0,153,1]],
    559.          :category => :Cooking,},
    560.          #cooked bear
    561.         
    562.         109=> { :result => [0,79,1],
    563.          :materials => [[0,182,1]],
    564.          :category => :Cooking,},
    565.          #boiled egg
    566.         
    567.         110=> { :result => [0,137,1],
    568.          :materials => [[0,182,2], [0,11,1], [0,153,1]],
    569.          :category => :Cooking,},
    570.          #omelette
    571.         
    572.         111=> { :result => [0,206,1],
    573.          :materials => [[0,182,1], [0,153,1]],
    574.          :category => :Cooking,},
    575.          #seasoned egg
    576.         
    577.         112=> { :result => [1,133,1],
    578.          :materials => [[1,14,1], [0,291,2], [0,57,1]],
    579.          :category => :Voodoo,},
    580.          #bone dagger
    581.         
    582.         113=> { :result => [2,139,1],
    583.          :materials => [[0,291,1]],
    584.          :category => :Voodoo,},
    585.          #bone earring
    586.         
    587.         114=> { :result => [2,140,1],
    588.          :materials => [[0,291,1], [0,3,3], [0,57,1], [0,286,1]],
    589.          :category => :Voodoo,},
    590.          #lucky bone
    591.         
    592.         115=> { :result => [2,141,1],
    593.          :materials => [[0,291,5], [0,264,1], [0,286,1]],
    594.          :category => :Voodoo,},
    595.          #skeletal feet
    596.         
    597.         116=> { :result => [2,145,1],
    598.          :materials => [[0,291,4], [0,57,1], [0,9,2]],
    599.          :category => :Voodoo,},
    600.          #bone shield
    601.         
    602.         117=> { :result => [2,146,1],
    603.          :materials => [[0,166,3], [0,81,1], [0,286,1]],
    604.          :category => :Voodoo,},
    605.          #skull helmet
    606.         
    607.         118=> { :result => [2,3,1],
    608.          :materials => [[0,286,3]],
    609.          :category => :Voodoo,},
    610.          #bloody tooth
    611.         
    612.         119=> { :result => [0,48,1],
    613.          :materials => [[0,47,3], [0,166,1]],
    614.          :category => :Voodoo,},
    615.          #poison grenade
    616.         
    617.         120=> { :result => [2,147,1],
    618.          :materials => [[0,264,4], [0,3,1]],
    619.          :category => :Voodoo,},
    620.          #rat gloves
    621.         
    622.         121=> { :result => [2,148,1],
    623.          :materials => [[0,264,15], [0,110,1]],
    624.          :category => :Voodoo,},
    625.          #rat vest
    626.         
    627.         122=> { :result => [2,129,1],
    628.          :materials => [[0,201,1], [0,81,1]],
    629.          :category => :Voodoo,},
    630.          #spellbook
    631.         
    632.          123=> { :result => [2,130,1],
    633.          :materials => [[0,201,1], [0,81,5]],
    634.          :category => :Voodoo,},
    635.          #grimmoire
    636.         
    637.         124=> { :result => [2,131,1],
    638.          :materials => [[0,166,1], [0,81,5]],
    639.          :category => :Voodoo,},
    640.          #skull of a fool
    641.         
    642.         125=> { :result => [2,133,1],
    643.          :materials => [[0,57,1], [0,154,2], [0,264,1], [0,3,2], [0,81,2]],
    644.          :category => :Voodoo,},
    645.          #Mosquito Linen
    646.         
    647.         126=> { :result => [2,149,1],
    648.          :materials => [[0,201,1], [0,81,3], [0,166,2], [0,204,1], [0,55,1], [0,264,1]],
    649.          :category => :Voodoo,},
    650.          #black grimmoire
    651.         
    652.         127=> { :result => [0,308,2],
    653.          :materials => [[0,307,6]],
    654.          :category => :Voodoo,},
    655.          #Minotaur Horn Dust
    656.         
    657.         128=> { :result => [1,30,1],
    658.          :materials => [[1,7,1], [0,178,1]],
    659.          :category => :Smithing,},
    660.          #Copper->Frostcopper Slingshot
    661.         
    662.         129=> { :result => [1,30,1],
    663.          :materials => [[0,178,2], [0,280,1]],
    664.          :category => :Smithing,},
    665.          #Frostcopper Slingshot
    666.         
    667.         130=> { :result => [1,7,1],
    668.          :materials => [[0,9,2], [0,280,1]],
    669.          :category => :Smithing,},
    670.          #Copper Slingshot
    671.         
    672.         131=> { :result => [0,185,1],
    673.          :materials => [[1,129,3], [0,280,1]],
    674.          :category => :Tinkering,},
    675.          #Triple Shuriken
    676.         
    677.          132=> { :result => [0,311,1],
    678.          :materials => [[0,166,1]],
    679.          :category => :Voodoo,},
    680.          #Skull Grenade
    681.         
    682.          133=> { :result => [0,312,1],
    683.          :materials => [[0,291,1], [0,81,1]],
    684.          :category => :Voodoo,},
    685.          #Eventuality Talisman
    686.         
    687.          134=> { :result => [0,313,1],
    688.          :materials => [[0,311,4]],
    689.          :category => :Voodoo,},
    690.          #Skull Grenade Banch
    691.         
    692.          135=> { :result => [0,314,1],
    693.          :materials => [[0,312,4]],
    694.          :category => :Voodoo,},
    695.          #Eventuality Talisman Banch
    696.         
    697.          136=> { :result => [1,138,1],
    698.          :materials => [[0,318,1], [0,110,1]],
    699.          :category => :Tinkering,},
    700.          #Torch (Offensive)
    701.         
    702.          137=> { :result => [1,139,1],
    703.          :materials => [[0,318,1]],
    704.          :category => :Tinkering,},
    705.          #Club
    706.         
    707.          138=> { :result => [2,167,1],
    708.          :materials => [[0,318,1], [0,110,1]],
    709.          :category => :Tinkering,},
    710.          #Torch (Defensive)
    711.         
    712.          139=> { :result => [1,6,1],
    713.          :materials => [[0,318,1], [0,154,1], [0,280,1]],
    714.          :category => :Tinkering,},
    715.          #Hunting Bow
    716.         
    717.          140=> { :result => [0,320,1],
    718.          :materials => [[0,37,1], [0,57,1]],
    719.          :category => :Tinkering,},
    720.          #Tinkered frost grenade
    721.         
    722.          141=> { :result => [0,57,4],
    723.          :materials => [[2,1,1]],
    724.          :category => :Tinkering,},
    725.          #casual to bandages
    726.         
    727.          142=> { :result => [0,324,1],
    728.          :materials => [[0,63,1],[0,153,1]],
    729.          :category => :Cooking,},
    730.          #Vegetable Soup
    731.         
    732.          143=> { :result => [0,324,1],
    733.          :materials => [[0,94,1],[0,13,1]],
    734.          :category => :Cooking,},
    735.          #Vegetable Soup
    736.         
    737.          144=> { :result => [0,324,3],
    738.          :materials => [[0,94,1],[0,13,1], [0,63,1]],
    739.          :category => :Cooking,},
    740.          #Vegetable Soup
    741.         
    742.          145=> { :result => [0,327,1],
    743.          :materials => [[0,104,1]],
    744.          :category => :Tinkering,},
    745.          #Cold Powder
    746.         
    747.         146=> { :result => [0,37,1],
    748.          :materials => [[0,104,3], [0,280,1]],
    749.          :category => :Tinkering,},
    750.          #frost grenade
    751.         
    752.         147=> { :result => [0,329,1],
    753.          :materials => [[0,104,1]],
    754.          :category => :Alchemy,},
    755.          #winter solution
    756.         
    757.         148=> { :result => [0,327,2],
    758.          :materials => [[0,104,3]],
    759.          :category => :Tinkering,},
    760.          #Cold Powder Grenade
    761.         
    762.         149=> { :result => [0,330,4],
    763.          :materials => [[0,104,1], [0,15,2]],
    764.          :category => :Cooking,},
    765.          #Frosted Apple
    766.         
    767.         150 => { :result => [2,17,1],
    768.          :materials => [[0,30,2], [0,9,2]],
    769.          :category => :Smithing,},
    770.          #iron cuirass
    771.         
    772.         151 => { :result => [0,332,1],
    773.          :materials => [[0,163,1], [0,63,1]],
    774.          :category => :Cooking,},
    775.          #sweetcorn
    776.         
    777.         152 => { :result => [0,335,3],
    778.          :materials => [[0,336,2], [0,15,3]],
    779.          :category => :Cooking,},
    780.          #apple tart
    781.         
    782.         153 => { :result => [0,337,4],
    783.          :materials => [[0,92,5]],
    784.          :category => :Cooking,},
    785.          #orange juice
    786.         
    787.         154 => { :result => [0,339,2],
    788.          :materials => [[0,13,3]],
    789.          :category => :Cooking,},
    790.          #carrot juice
    791.         
    792.         
    793.         155 => { :result => [0,340,1],
    794.          :materials => [[0,63,1]],
    795.          :category => :Cooking,},
    796.          #roasted corn
    797.         
    798.         156 => { :result => [1,65,1],
    799.          :materials => [[0,147,2]],
    800.          :category => :Tinkering,},
    801.          #traveller's cloak
    802.         
    803.         157 => { :result => [2,84,1],
    804.          :materials => [[2,10,1], [0,178,1]],
    805.          :category => :Smithing,},
    806.          #copper->frostcopper armor
    807.         158 => { :result => [1,116,1],
    808.          :materials => [[0,9,3], [0,285,2], [0,30,1]],
    809.          :category => :Smithing,},
    810.          #sturdy claws
    811.         
    812.         159 => { :result => [2,83,1],
    813.          :materials => [[2,9,1], [0,178,1]],
    814.          :category => :Smithing,},
    815.          #copper->frostcopper helmet
    816.         
    817.         160 => { :result => [0,178,4],
    818.          :materials => [[0,9,4], [0,200,1]],
    819.          :category => :Smithing,},
    820.          #copper->frostcopper bar
    821.         
    822.         161 => { :result => [2,85,1],
    823.          :materials => [[2,11,2], [0,178,1]],
    824.          :category => :Smithing,},
    825.          #copper ring->frostcopper bracer
    826.         
    827.         162 => { :result => [2,183,1],
    828.          :materials => [[2,181,1], [0,178,1]],
    829.          :category => :Smithing,},
    830.          #copper->frostcopper shield
    831.         
    832.          163 => { :result => [1,26,1],
    833.          :materials => [[1,25,1], [0,178,1]],
    834.          :category => :Smithing,},
    835.          #copper->frostcopper claymore
    836.         
    837.          164 => { :result => [1,83,1],
    838.          :materials => [[1,84,1], [0,178,1]],
    839.          :category => :Smithing,},
    840.          #copper->frostcopper claws
    841.         
    842.         165 => { :result => [1,42,1],
    843.          :materials => [[1,141,1], [0,178,1]],
    844.          :category => :Smithing,},
    845.          #copper->frostcopper chain
    846.         
    847.         166 => { :result => [1,141,1],
    848.          :materials => [[0,9,3]],
    849.          :category => :Smithing,},
    850.          #copper chain
    851.         
    852.         167 => { :result => [1,142,1],
    853.          :materials => [[0,178,3]],
    854.          :category => :Smithing,},
    855.          #frostcopper chain
    856.         
    857.         168 => { :result => [2,182,1],
    858.          :materials => [[0,9,3], [0,318,1]],
    859.          :category => :Smithing,},
    860.          #copper shield
    861.         
    862.          169 => { :result => [1,27,1],
    863.          :materials => [[1,25,1]],
    864.          :category => :Tinkering,},
    865.          #balanced claymore
    866.         
    867.          170 => { :result => [1,34,1],
    868.          :materials => [[1,25,1], [0,200,3]],
    869.          :category => :Voodoo,},
    870.          #crymore
    871.         
    872.         171 => { :result => [1,25,1],
    873.          :materials => [[0,9,3], [0,286,1]],
    874.          :category => :Smithing,},
    875.          #copper claymore
    876.         
    877.         172 => { :result => [1,35,1],
    878.          :materials => [[0,27,1], [0,110,1], [0,100,2]],
    879.          :category => :Tinkering,},
    880.          #Burning Truth
    881.         
    882.         173 => { :result => [1,13,1],
    883.          :materials => [[0,9,1], [0,318,2]],
    884.          :category => :Smithing,},
    885.          #Copper Spear
    886.         
    887.          174 => { :result => [1,143,1],
    888.          :materials => [[0,178,1], [0,318,2]],
    889.          :category => :Smithing,},
    890.          #Frostcopper Spear
    891.         
    892.         175 => { :result => [1,143,1],
    893.          :materials => [[1,13,1], [0,178,1]],
    894.          :category => :Smithing,},
    895.          #copper->frostcopper spear
    896.         
    897.         176 => { :result => [2,183,1],
    898.          :materials => [[0,178,3], [0,318,1]],
    899.          :category => :Smithing,},
    900.          #Frostcopper shield
    901.         
    902.         177 => { :result => [1,43,1],
    903.          :materials => [[1,1,1], [1,13,1], [0,280,1]],
    904.          :category => :Tinkering,},
    905.          #Poor Halbred
    906.         
    907.         178 => { :result => [1,44,1],
    908.          :materials => [[0,318,1], [0,280,1], [0,30,1]],
    909.          :category => :Tinkering,},
    910.          #Polished Halbred
    911.         
    912.         179 => { :result => [2,2,1],
    913.          :materials => [[0,318,1], [0,147,1]],
    914.          :category => :Tinkering,},
    915.          #Buckler
    916.         
    917.          180 => { :result => [2,7,1],
    918.          :materials => [[0,318,3]],
    919.          :category => :Tinkering,},
    920.          #Barrel Shield
    921.         
    922.         181 => { :result => [1,26,1],
    923.          :materials => [[0,178,3], [0,286,2]],
    924.          :category => :Smithing,},
    925.          #frostcopper claymore
    926.         
    927.          182 => { :result => [0,349,1],
    928.          :materials => [[0,236,3]],
    929.          :category => :Tinkering,},
    930.          #Morpheus Grenade - Not assigned yet   
    931.         
    932.          183 => { :result => [0,32,20],
    933.          :materials => [[0,64,1], [0,209,10]],
    934.          :category => :Alchemy,},
    935.          #Crystal Vitality   - Not assigned yet
    936.         
    937.         184 => { :result => [0,50,9],
    938.          :materials => [[0,101,1], [0,166,1], [0,67,1]],
    939.          :category => :Voodoo,},
    940.          #Crystal Talent   - Not assigned yet
    941.         
    942.         185 => { :result => [0,38,2],
    943.          :materials => [[0,110,1], [0,9,1]],
    944.          :category => :Tinkering,},
    945.          #Fire Grenade   - Not assigned yet
    946.         
    947.         186 => { :result => [0,117,2],
    948.          :materials => [[0,44,1], [0,88,2], [0,161,1]],
    949.          :category => :Alchemy,},
    950.          #Preparation Elixir
    951.         
    952.         187=> { :result => [0,66,1],
    953.          :materials => [[0,44,1], [0,17,1]],
    954.          :category => :Alchemy,},
    955.          #Fighting Spirit
    956.         
    957.       188 => { :result => [1,63,1],
    958.          :materials => [[1,62,1], [0,178,1]],
    959.          :category => :Smithing,},
    960.          #copper->frostcopper blade
    961.         
    962.       189 => { :result => [1,62,2],
    963.          :materials => [[0,9,2], [0,69,1]],
    964.          :category => :Smithing,},
    965.          #Copper Blade
    966.         
    967.       190 => { :result => [1,63,2],
    968.          :materials => [[0,178,2], [0,69,1]],
    969.          :category => :Smithing,},
    970.          #Frostcopper Blade
    971.         
    972.       191 => { :result => [1,65,2],
    973.          :materials => [0,147,2],
    974.          :category => :Tinkering,},
    975.          #Traveller's Cloak
    976.         
    977.          }
    978.          end
    979. $crafting_category = :All
    980. class Recipe
    981.   attr_accessor :result
    982.   attr_accessor :materials
    983.   attr_accessor :known
    984.   attr_accessor :id
    985.   attr_accessor :gold_cost
    986.   attr_accessor :level
    987.   attr_accessor :category
    988.   attr_accessor :xp
    989.   def initialize(id,recipe_hash)
    990.     @id = id
    991.     @result = Material.new(recipe_hash[:result])
    992.     @materials = []
    993.     for item in recipe_hash[:materials]
    994.       @materials.push(Material.new(item))
    995.     end
    996.     @known = false
    997.     recipe_hash[:gold_cost] ? @gold_cost = recipe_hash[:gold_cost] : @gold_cost = 0
    998.     recipe_hash[:success] ? @rate = recipe_hash[:success] : @rate = 100
    999.     recipe_hash[:success_gain] ? @rated = recipe_hash[:success_gain] : @rated = 0
    1000.     recipe_hash[:level] ? @level = recipe_hash[:level] : @level = 1
    1001.     recipe_hash[:category] ? @category = recipe_hash[:category] : @category = CATEGORIES[0]
    1002.     recipe_hash[:xp] ? @xp = recipe_hash[:xp] : @xp = 0
    1003.     recipe_hash[:xp_deprac] ? @xpd = recipe_hash[:xp_deprac] : @xpd = 0
    1004.     recipe_hash[:craft_level] ? @clevel = recipe_hash[:craft_level] : @clevel = 0
    1005.     recipe_hash[:pxp] ? @pxp = recipe_hash[:pxp] : @pxp = 0
    1006.     !recipe_hash[:multiple].nil? ? @mult = recipe_hash[:multiple] : @mult = true
    1007.     @known = ADV_RECIPE::AUTO_LEARN_RECIPES
    1008.   end
    1009.   def name
    1010.     return @result.item.name
    1011.   end
    1012.   def multiple?
    1013.     @mult
    1014.   end
    1015.   def has_materials?
    1016.     for item in @materials
    1017.       return false unless $game_party.item_number(item.item) >= item.amount
    1018.     end
    1019.     return true
    1020.   end
    1021.   def has_gold?
    1022.     $game_party.gold >= @gold_cost
    1023.   end
    1024.   def has_craft_level?
    1025.     craft_level <= $game_party.craft_level_sym(@category)
    1026.   end
    1027.   def has_level?
    1028.     @level <= $game_party.highest_level && has_craft_level?
    1029.   end
    1030.   def craftable?
    1031.     has_gold? && has_materials? && has_level?
    1032.   end
    1033.   def craft_level
    1034.     @clevel
    1035.   end
    1036.   def amount_craftable?
    1037.     mat_amount = []
    1038.     for item in @materials
    1039.       mat_amount.push($game_party.item_number(item.item) / item.amount)
    1040.     end
    1041.     if @gold_cost > 0
    1042.       return [$game_party.gold / @gold_cost,mat_amount.min].min
    1043.     else
    1044.       return mat_amount.min
    1045.     end
    1046.   end
    1047.   def craft(fail = 0)
    1048.     remove_materials
    1049.     if fail < success_rate
    1050.       return add_result
    1051.     else
    1052.       return nil
    1053.     end
    1054.   end
    1055.   def remove_materials
    1056.     for item in @materials
    1057.       next unless item.consumed?
    1058.       $game_party.gain_item(item.item,-item.amount)
    1059.     end
    1060.     $game_party.gain_gold(-@gold_cost)
    1061.   end
    1062.   def add_result
    1063.     if ADV_RECIPE::USE_WA_RANDOMIZATION
    1064.       item = $game_party.add_weapon(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Weapon)
    1065.       item = $game_party.add_armor(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Armor)
    1066.       item = $game_party.add_item(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Item)
    1067.     else
    1068.       $game_party.gain_item(@result.item,@result.amount)
    1069.       item = @result.item
    1070.     end
    1071.     $game_party.gain_craft_exp(category_id, xp_gain)
    1072.     $game_party.members.each do |actor|
    1073.       actor.gain_exp(@pxp)
    1074.     end
    1075.     item
    1076.   end
    1077.   def category_id
    1078.     ADV_RECIPE::CATEGORIES.index(@category)
    1079.   end
    1080.   def xp_gain
    1081.     level_diff = $game_party.craft_level(category_id) - @clevel
    1082.     [@xp - @xpd * level_diff,0].max
    1083.   end
    1084.   def success_rate
    1085.     level_diff = $game_party.craft_level(category_id) - @clevel
    1086.     [@rate + @rated * level_diff,100].min
    1087.   end
    1088. end
    1089. class Material
    1090.   attr_accessor :item
    1091.   attr_accessor :amount
    1092.   def initialize(mat)
    1093.     @item = $data_items[mat[1]] if mat[0] == 0
    1094.     @item = $data_weapons[mat[1]] if mat[0] == 1
    1095.     @item = $data_armors[mat[1]] if mat[0] == 2
    1096.     @amount = mat[2]
    1097.     @consumed = mat[3].nil? ? true : mat[3]
    1098.   end
    1099.   def consumed?
    1100.     @consumed
    1101.   end
    1102. end
    1103. class Game_Party
    1104.   alias recipe_init initialize
    1105.   def initialize
    1106.     recipe_init
    1107.     @crafting_level = [1]*ADV_RECIPE::CATEGORIES.size
    1108.     @craft_exp = [0]*ADV_RECIPE::CATEGORIES.size
    1109.   end
    1110.   def craft_level(id)
    1111.     @crafting_level[id]
    1112.   end
    1113.   def craft_level_sym(sym)
    1114.     @crafting_level[ADV_RECIPE::CATEGORIES.index(sym)]
    1115.   end
    1116.   def craft_exp(id)
    1117.     @craft_exp[id]
    1118.   end
    1119.   def craft_exp_next(id)
    1120.     lvl = craft_level(id)
    1121.     return eval(ADV_RECIPE::XP_NEEDED_EQUATION)
    1122.   end
    1123.   def gain_craft_exp(id, val)
    1124.     @craft_exp[id] += val
    1125.     while craft_exp(id) >= craft_exp_next(id)
    1126.       @craft_exp[id] -= craft_exp_next(id)
    1127.       @crafting_level[id] += 1
    1128.     end
    1129.   end
    1130. end
    1131. module DataManager
    1132.   class << self
    1133.     alias rec_cgo create_game_objects
    1134.     alias rec_msc make_save_contents
    1135.     alias rec_esc extract_save_contents
    1136.   end
    1137.   def self.create_game_objects
    1138.     rec_cgo
    1139.     $game_recipes = create_recipes
    1140.   end
    1141.   def self.make_save_contents
    1142.     contents = rec_msc
    1143.     contents[:recipe] = $game_recipes
    1144.     contents
    1145.   end
    1146.   def self.extract_save_contents(contents)
    1147.     rec_esc(contents)
    1148.     $game_recipes = contents[:recipe]
    1149.   end
    1150.   def self.create_recipes
    1151.     recipes = {}
    1152.     ADV_RECIPE::RECIPES.each_pair do |key, val|
    1153.       recipes[key] = Recipe.new(key,val)
    1154.     end
    1155.     recipes
    1156.   end
    1157. end
    1158. class Game_Interpreter
    1159.   def learn_recipe(id)
    1160.     return if $game_recipes[id].nil?
    1161.     $game_recipes[id].known = true
    1162.   end
    1163.   def forget_recipe(id)
    1164.     return if $game_recipes[id].nil?
    1165.     $game_recipes[id].known = false
    1166.   end
    1167. end
    1168. class Window_RecipeList < Window_Selectable
    1169.   def initialize(x,y,w,h)
    1170.     super
    1171.     @data = $game_recipes.values.select {|recipe| include?(recipe)}
    1172.     refresh
    1173.   end
    1174.   def item_max
    1175.     @data ? @data.size : 1
    1176.   end
    1177.   def item
    1178.     @data && index >= 0 ? @data[index] : nil
    1179.   end
    1180.   def current_item_enabled?
    1181.     enable?(@data[index])
    1182.   end
    1183.   def include?(item)
    1184.     return false unless item.has_craft_level?
    1185.     return false unless item.known
    1186.     return true if @category == :All
    1187.     return @category == item.category
    1188.   end
    1189.   def set_category(cat)
    1190.     return if cat == @category
    1191.     @category = cat
    1192.     @data = $game_recipes.values.select {|recipe| include?(recipe)}
    1193.     refresh
    1194.   end
    1195.   def enable?(item)
    1196.     return false if item.nil?
    1197.     return false if $temp_disable_crafting
    1198.     item.craftable?
    1199.   end
    1200.   def draw_item(index)
    1201.     item = @data[index]
    1202.     if item
    1203.       rect = item_rect(index)
    1204.       rect.width -= 4
    1205.       enabled = $temp_disable_crafting ? true : enable?(item)
    1206.       draw_item_name(item.result.item, rect.x, rect.y, enabled)
    1207.       if item.amount_craftable? > 0
    1208.         draw_text(rect.x,rect.y,contents.width,24,"x"+item.amount_craftable?.to_s,2)
    1209.       end
    1210.     end
    1211.   end
    1212.   def current_item
    1213.     index >= 0 ? @data[index] : nil
    1214.   end
    1215.   def process_ok
    1216.     if current_item_enabled?
    1217.       Sound.play_ok
    1218.       Input.update
    1219.       call_ok_handler
    1220.     else
    1221.       Sound.play_buzzer
    1222.     end
    1223.   end
    1224.   def refresh
    1225.     create_contents
    1226.     super
    1227.   end
    1228.   def content_heights
    1229.     item_max * 24
    1230.   end
    1231. end
    1232. class Window_RecipeDetail < Window_Base
    1233.   def initialize(x,y,w,h)
    1234.     super
    1235.     @recipe = nil
    1236.   end
    1237.   def set_recipe(recipe)
    1238.     @recipe = recipe
    1239.     refresh
    1240.   end
    1241.   def refresh
    1242.     contents.clear
    1243.     contents.font.size = ADV_RECIPE::DETAIL_FONT_SIZE
    1244.     return if @recipe.nil?
    1245.     draw_craft_level unless ADV_RECIPE::DISABLE_PLAYER_LEVEL && ADV_RECIPE::DISABLE_CRAFT_LEVEL
    1246.     draw_materials
    1247.     draw_success_rate unless ADV_RECIPE::DISABLE_SUCCESS
    1248.     draw_gold_cost unless ADV_RECIPE::DISABLE_GOLD_COST
    1249.   end
    1250.   def draw_craft_level
    1251.     change_color(system_color, @recipe.has_level?)
    1252.     draw_text(0,0,contents.width,contents.font.size,"Craft Level:")
    1253.     change_color(normal_color, @recipe.has_level?)
    1254.     xx = 0
    1255.     if !ADV_RECIPE::DISABLE_PLAYER_LEVEL
    1256.       draw_text(0,0,contents.width,contents.font.size,@recipe.level,2)
    1257.       draw_icon(ADV_RECIPE::LEVEL_ICON,contents.width - 48,0)
    1258.       xx += 48
    1259.       text = @recipe.craft_level.to_s + "/"
    1260.     else
    1261.       text = @recipe.craft_level.to_s
    1262.     end
    1263.     if !ADV_RECIPE::DISABLE_CRAFT_LEVEL
    1264.       draw_text(0,0,contents.width - xx,contents.font.size,text,2)
    1265.       draw_icon(ADV_RECIPE::CATEGORY_ICONS[ADV_RECIPE::CATEGORIES.index(@recipe.category)],contents.width - 56 - xx,0)
    1266.     end
    1267.   end
    1268.   def draw_materials
    1269.     if ADV_RECIPE::DISABLE_CRAFT_LEVEL && ADV_RECIPE::DISABLE_PLAYER_LEVEL
    1270.       yy = 0
    1271.     else
    1272.       yy = contents.font.size
    1273.     end
    1274.     change_color(system_color, @recipe.craftable?)
    1275.     draw_text(0,yy,self.width,contents.font.size,"Required:")
    1276.     yy += contents.font.size
    1277.     for item in @recipe.materials
    1278.       change_color(normal_color, $game_party.item_number(item.item) >= item.amount)
    1279.       draw_icon(item.item.icon_index,0,yy)
    1280.       draw_text(24,yy,self.width,contents.font.size,item.item.name)
    1281.       string = $game_party.item_number(item.item).to_s + "/" + item.amount.to_s
    1282.       draw_text(0,yy,self.contents.width,contents.font.size,string,2)
    1283.       yy += contents.font.size
    1284.     end
    1285.   end
    1286.   def draw_success_rate
    1287.     change_color(system_color, @recipe.craftable?)
    1288.     draw_text(0,contents.height-contents.font.size,contents.width,contents.font.size,"Success Rate:")
    1289.     change_color(normal_color, @recipe.craftable?)
    1290.     draw_text(0,contents.height-contents.font.size,contents.width,contents.font.size,@recipe.success_rate.to_s + "%",2)
    1291.   end
    1292.   def draw_gold_cost
    1293.     if @recipe.gold_cost > 0
    1294.       change_color(system_color, @recipe.has_gold?)
    1295.       draw_text(0,contents.height-contents.font.size*2,contents.width,contents.font.size,"Crafting Cost:")
    1296.       change_color(normal_color, @recipe.has_gold?)
    1297.       draw_currency_value(@recipe.gold_cost,Vocab::currency_unit,0,contents.height-contents.font.size*2,contents.width)
    1298.     end
    1299.   end
    1300.   def draw_currency_value(value, unit, x, y, width)
    1301.     cx = text_size(unit).width
    1302.     change_color(normal_color,$game_party.gold >= value)
    1303.     draw_text(x, y, width - cx - 2, contents.font.size, value, 2)
    1304.     change_color(system_color)
    1305.     draw_text(x, y, width, contents.font.size, unit, 2)
    1306.   end
    1307. end
    1308. class Window_RecipeConfirm < Window_Selectable
    1309.   attr_accessor :amount
    1310.   def initialize(x,y,w,h)
    1311.     super
    1312.     @amount = 1
    1313.     refresh
    1314.   end
    1315.   def item_max; 1; end;
    1316.   def enable?(item); true; end;
    1317.   def refresh
    1318.     super
    1319.     draw_text(0,0,self.contents.width,line_height,"Craft",1)
    1320.     return unless @recipe && @recipe.craftable?
    1321.     draw_text(0,0,contents.width,line_height,"x"+@amount.to_s,2)
    1322.   end
    1323.   def activate
    1324.     super
    1325.     select(0)
    1326.   end
    1327.   def deactivate
    1328.     super
    1329.     select(-1)
    1330.   end
    1331.   def set_recipe(rec)
    1332.     return if rec == @recipe
    1333.     @recipe = rec
    1334.     @amount = 1
    1335.     refresh
    1336.   end
    1337.   def cursor_movable?
    1338.     active && open? && ADV_RECIPE::CRAFT_MULTIPLE && @recipe.multiple?
    1339.   end
    1340.   def cursor_down(wrap = false)
    1341.     change_amount(-10)
    1342.   end
    1343.   def cursor_up(wrap = false)
    1344.     change_amount(10)
    1345.   end
    1346.   def cursor_right(wrap = false)
    1347.     change_amount(1)
    1348.   end
    1349.   def cursor_left(wrap = false)
    1350.     change_amount(-1)
    1351.   end
    1352.   def change_amount(val)
    1353.     Sound.play_cursor
    1354.     @amount += val
    1355.     @amount = [[@amount,1].max,@recipe.amount_craftable?].min
    1356.     refresh
    1357.   end
    1358. end
    1359. class Scene_CraftingAll < Scene_Base
    1360.   def start
    1361.     super
    1362.     @help_window = Window_Help.new
    1363.     width = Graphics.width / 2
    1364.     height = Graphics.height - @help_window.height - 48
    1365.     @list_window = Window_RecipeList.new(0,@help_window.height+48,width,height-48)
    1366.     @list_window.set_handler(:ok, method(:list_success))
    1367.     @list_window.set_handler(:cancel, method(:cancel))
    1368.     @list_window.height += 48 if ADV_RECIPE::DISABLE_CRAFT_LEVEL
    1369.     @list_window.create_contents
    1370.     @detail_window = Window_RecipeDetail.new(width,@list_window.y,width,height-48*2)
    1371.     @detail_window.height += 48 if ADV_RECIPE::DISABLE_GOLD_COST
    1372.     @detail_window.create_contents
    1373.     height = @detail_window.y + @detail_window.height
    1374.     @confirm_window = Window_RecipeConfirm.new(width,height,width,48)
    1375.     @confirm_window.set_handler(:ok, method(:craft_success))
    1376.     @confirm_window.set_handler(:cancel, method(:confirm_cancel))
    1377.     if !ADV_RECIPE::DISABLE_GOLD_COST
    1378.       @gold_window = Window_Gold.new
    1379.       @gold_window.width = width
    1380.       @gold_window.y = Graphics.height - 48
    1381.       @gold_window.x = width
    1382.     end
    1383.     @popup_window = Window_RecPopup.new
    1384.     @popup_window.set_handler(:ok, method(:popup_ok))
    1385.     @popup_window.set_handler(:cancel, method(:popup_ok))
    1386.     @command_window = Window_RecCategory.new
    1387.     @command_window.set_handler(:ok, method(:command_ok))
    1388.     @command_window.set_handler(:cancel, method(:command_cancel))
    1389.     @gauge_window = Window_RecGauge.new unless ADV_RECIPE::DISABLE_CRAFT_LEVEL
    1390.   end
    1391.   def popup_ok
    1392.     @popup_window.deactivate
    1393.     @popup_window.close
    1394.     @list_window.activate
    1395.   end
    1396.   def update
    1397.     super
    1398.     @help_window.set_text(@list_window.current_item.result.item.description) if !@list_window.current_item.nil?
    1399.     if @command_window.active
    1400.       category = ADV_RECIPE::CATEGORIES[@command_window.index]
    1401.       @help_window.set_text(ADV_RECIPE::DESCRIPTIONS[category])
    1402.     end
    1403.     @detail_window.set_recipe(@list_window.current_item)
    1404.     @confirm_window.set_recipe(@list_window.current_item)
    1405.     @list_window.set_category(ADV_RECIPE::CATEGORIES[@command_window.index])
    1406.     @gauge_window.set_category(ADV_RECIPE::CATEGORIES[@command_window.index]) unless ADV_RECIPE::DISABLE_CRAFT_LEVEL
    1407.     return unless @list_window.current_item
    1408.     if @list_window.current_item.craftable?
    1409.       @confirm_window.opacity = 255
    1410.       @confirm_window.contents_opacity = 255
    1411.     else
    1412.       @confirm_window.opacity = 75
    1413.       @confirm_window.contents_opacity = 75
    1414.     end
    1415.   end
    1416.   def list_success
    1417.     @list_window.deactivate
    1418.     @confirm_window.activate
    1419.   end
    1420.   def craft_success
    1421.     amount = 0
    1422.     item = nil
    1423.     @confirm_window.amount.times do
    1424.       item2 = @list_window.current_item.craft(rand(100))
    1425.       if item2
    1426.         amount += 1
    1427.         item = item2
    1428.       end
    1429.     end
    1430.     if item
    1431.       @popup_window.set_text(item, amount)
    1432.     else
    1433.       @popup_window.set_text_fail
    1434.     end
    1435.     @confirm_window.change_amount(-1000)
    1436.     @gold_window.refresh unless ADV_RECIPE::DISABLE_GOLD_COST
    1437.     @list_window.refresh
    1438.     @gauge_window.refresh unless ADV_RECIPE::DISABLE_CRAFT_LEVEL
    1439.     @popup_window.activate
    1440.   end
    1441.   def confirm_cancel
    1442.     @confirm_window.deactivate
    1443.     @list_window.activate
    1444.   end
    1445.   def command_cancel
    1446.     $temp_disable_crafting = false
    1447.     SceneManager.return
    1448.   end
    1449.   def cancel
    1450.     @list_window.select(-1)
    1451.     @help_window.set_text("")
    1452.     @command_window.activate
    1453.   end
    1454.   def command_ok
    1455.     @list_window.select(0)
    1456.     @list_window.activate
    1457.   end
    1458. end
    1459. class Scene_Crafting < Scene_CraftingAll
    1460.   def start
    1461.     super
    1462.     @command_window.index = ADV_RECIPE::CATEGORIES.index($crafting_category)
    1463.     @command_window.deactivate
    1464.     @command_window.visible = false
    1465.     @list_window.height += 48
    1466.     @list_window.y -= 48
    1467.     @detail_window.height += 48
    1468.     @detail_window.y -= 48
    1469.     @list_window.create_contents
    1470.     @detail_window.create_contents
    1471.     @list_window.select(0)
    1472.     @list_window.activate
    1473.   end
    1474.   def cancel
    1475.     SceneManager.return
    1476.   end
    1477. end
    1478. class Window_RecCategory < Window_HorzCommand
    1479.   def initialize
    1480.     super(0,72)
    1481.   end
    1482.   def window_width; Graphics.width; end
    1483.   def window_height; 48; end
    1484.   def make_command_list
    1485.     ADV_RECIPE::CATEGORIES.each do |command|
    1486.       add_command(command.to_s,command)
    1487.     end
    1488.   end
    1489.   def item_width
    1490.     120
    1491.   end
    1492.   def draw_item(index)
    1493.     change_color(normal_color, command_enabled?(index))
    1494.     rect = item_rect_for_text(index)
    1495.     draw_text(rect, command_name(index))
    1496.     draw_icon(ADV_RECIPE::CATEGORY_ICONS[index],rect.x-24,rect.y)
    1497.   end
    1498.   def item_rect_for_text(index)
    1499.     rect = item_rect(index)
    1500.     rect.x += 28
    1501.     rect.width -= 28
    1502.     rect
    1503.   end
    1504. end
    1505. class Window_RecPopup < Window_Selectable
    1506.   def initialize
    1507.     super(Graphics.width/2-window_width/2,Graphics.height/2-window_height/2,120,48)
    1508.     self.openness = 0
    1509.     deactivate
    1510.   end
    1511.   def window_width; 120; end
    1512.   def window_height; 48; end
    1513.   def set_text(item, amount)
    1514.     contents.clear
    1515.     text = amount.to_s + "x " + item.name + "     "
    1516.     width = contents.text_size(text).width
    1517.     self.width = width + padding*2
    1518.     self.x = Graphics.width/2-width/2
    1519.     create_contents
    1520.     draw_text(24,0,contents.width,line_height,text)
    1521.     draw_icon(item.icon_index,0,0)
    1522.     open
    1523.   end
    1524.   def set_text_fail
    1525.     contents.clear
    1526.     text = "Crafting failed!"
    1527.     width = contents.text_size(text).width
    1528.     self.width = width + padding*2
    1529.     self.x = Graphics.width/2-width/2
    1530.     create_contents
    1531.     draw_text(12,0,contents.width,line_height,text)
    1532.     open
    1533.   end
    1534.   def process_ok
    1535.     if current_item_enabled?
    1536.       Input.update
    1537.       deactivate
    1538.       call_ok_handler
    1539.     else
    1540.       Sound.play_buzzer
    1541.     end
    1542.   end
    1543. end
    1544. class Window_RecGauge < Window_Base
    1545.   def initialize
    1546.     super(0,Graphics.height-48,Graphics.width/2,48)
    1547.     @category = :All
    1548.   end
    1549.   def refresh
    1550.     contents.clear
    1551.     return if @category == :All
    1552.     draw_icon(ADV_RECIPE::CATEGORY_ICONS[cat_index],0,0)
    1553.     draw_text(24,0,contents.width,24,$game_party.craft_level(cat_index))
    1554.     rate = $game_party.craft_exp(cat_index).to_f / $game_party.craft_exp_next(cat_index)
    1555.     draw_gauge(48, -3, contents.width-48, rate, tp_gauge_color1, tp_gauge_color2)
    1556.     if Module.const_defined?(:SPECIAL_GAUGES)
    1557.       @gauges[[48,-3]].set_extra("XP",$game_party.craft_exp(cat_index),$game_party.craft_exp_next(cat_index))
    1558.     else
    1559.       text = $game_party.craft_exp(cat_index).to_s+"/"+$game_party.craft_exp_next(cat_index).to_s
    1560.       draw_text(0,0,contents.width,24,text,2)
    1561.     end
    1562.   end
    1563.   def set_category(cat)
    1564.     return if cat == @category
    1565.     @category = cat
    1566.     refresh
    1567.   end
    1568.   def cat_index
    1569.     ADV_RECIPE::CATEGORIES.index(@category)
    1570.   end
    1571. end
    1572. class Window_MenuCommand < Window_Command
    1573.   alias recipe_aoc add_original_commands
    1574.   def add_original_commands
    1575.     recipe_aoc
    1576.     add_command("Recipe Viewer", :recipe) if ADV_RECIPE::ENABLE_MENU_ACCESS
    1577.   end
    1578. end
    1579. class Scene_Menu < Scene_MenuBase
    1580.   alias recipe_create_command_window create_command_window
    1581.   def create_command_window
    1582.     recipe_create_command_window
    1583.     @command_window.set_handler(:recipe,   method(:command_recipe))
    1584.   end
    1585.   def command_recipe
    1586.     $temp_disable_crafting = ADV_RECIPE::DISABLE_MENU_CRAFT
    1587.     SceneManager.call(Scene_CraftingAll)
    1588.   end
    1589. end
    复制代码


    Spoiler: Item Effect Boxes
                    Code:       
    1. ##----------------------------------------------------------------------------##
    2. ## Effects Box Script v1.0
    3. ## Created by Neon Black
    4. ##changed by Roninator 2
    5. ##
    6. ## For both commercial and non-commercial use as long as credit is given to
    7. ## Neon Black and any additional authors.  Licensed under Creative Commons
    8. ## CC BY 3.0 - http://creativecommons.org/licenses/by/3.0/.
    9. ##----------------------------------------------------------------------------##
    10.                                                                               ##
    11. ##----------------------------------------------------------------------------##
    12. ##    Revision Info:
    13. ## v1.0 - 3.3.2013
    14. ##  Wrote and debugged main script
    15. ##----------------------------------------------------------------------------##
    16.                                                                               ##
    17. $imported ||= {}                                                              ##
    18. $imported["EFFECTS_BOX"] = 1.0                                                ##
    19.                                                                               ##
    20. ##----------------------------------------------------------------------------##
    21. ##    Instructions:
    22. ## Place this script in the script editor below "Materials" and above "Main".
    23. ## This script requires Neon Black's Features and Effects name module.  You can
    24. ## obtain it from http://cphouseset.wordpress.com/modules/.  If you do not
    25. ## import it, you will get errors.
    26. ##
    27. ## This script is plug and play.  It allows a pop-up boxes to display on equips,
    28. ## items, and skills.  You can choose to have these pop-ups be constant, toggle
    29. ## with a button press, or only appear while a key is held down.  These display
    30. ## 3 bits of information.  First an added note, second all the stats equipping
    31. ## the item will provide, and finally all the effects or features of the item.
    32. ## A note can be added using <effect note> and </effect note> and placing your
    33. ## note in between those tags, like so:
    34. ##
    35. ##    <effect note>
    36. ##    This will display line 1
    37. ##    This will display line 2
    38. ##    </effect note>
    39. ##
    40. ##----------------------------------------------------------------------------##
    41.                                                                               ##
    42. module CP             # Do not touch                                          ##
    43. module EFFECTS_WINDOW #  these lines.                                         ##
    44. ##----------------------------------------------------------------------------##
    45. ##    Config:
    46. ## The config options are below.  You can set these depending on the flavour of
    47. ## your game.  Each option is explained in a bit more detail above it.
    48. ##
    49. ##------
    50. # This is the padding around the edges of the box.  Increasing this number will
    51. # increase the size of the box without increasing the size of it's contents.
    52. EDGES = 8
    53. # This is the font size of the pop up's text.  Adjusting this affects the entire
    54. # box's size.
    55. FONT_SIZE = 16
    56. # Choose to use font shadow or outlines.
    57. SHADOW = true
    58. OUTLINE = true
    59. # If this value is set to false, stats will not be shown on equips.
    60. SHOW_STATS = true
    61. # The key to press to toggle or show the box.
    62. BOX_KEY = :A
    63. # The show type for the pop-up box.  Any value other than these three will
    64. # prevent the box from being show.
    65. #  0 = Hold button to display the box.
    66. #  1 = Press button to toggle the box.
    67. #  2 = The box is constantly show.
    68. SHOW_TYPE = 1
    69. # If type 2 was selected above, this is the default state of the box.  Set it to
    70. # true to show the box or false to hide the box until the key is pressed.
    71. @show = false
    72. ##----------------------------------------------------------------------------##
    73.                                                                               ##
    74.                                                                               ##
    75. ##----------------------------------------------------------------------------##
    76. ## The following lines are the actual core code of the script.  While you are
    77. ## certainly invited to look, modifying it may result in undesirable results.
    78. ## Modify at your own risk!
    79. ###----------------------------------------------------------------------------
    80.   def self.toggle_effects
    81.     @show = !@show if Input.trigger?(BOX_KEY)
    82.     return @show
    83.   end
    84. end
    85. end
    86. module SceneManager
    87.   class << self
    88.     alias :cp_rshp_run :run unless method_defined?(:cp_rshp_run)
    89.   end
    90.   def self.run
    91.     cp_module_check_features
    92.     cp_rshp_run
    93.   end
    94.   def self.cp_module_check_features
    95.     return if $imported["CP_FEATURES_EFFECTS"]
    96.     a1 = "One or more scripts require Neon Black's Features and Effects module."
    97.     a2 = "This can be obtained at http://cphouseset.wordpress.com/modules/"
    98.     a3 = "Please add this module and try again."
    99.     a4 = "Please contact the creator of the game to resolve this issue."
    100.     if $TEST || $BTEST
    101.       msgbox "#{a1}/n#{a2}/n#{a3}"
    102.       Thread.new{system("start http://cphouseset.wordpress.com/modules/#features")}
    103.     else
    104.       msgbox "#{a1}/n#{a4}"
    105.     end
    106.   end
    107. end
    108. class Window_Selectable < Window_Base
    109.   def item
    110.     return nil
    111.   end
    112.   alias :cp_itembox_update :update
    113.   def update(*args)
    114.     cp_itembox_update(*args)
    115.     show_fet_window
    116.   end
    117.   def show_fet_window
    118.     key = key_show_features_box
    119.     show_feature_box if key && active && open?
    120.     remove_feature_box unless key && active && open?
    121.   end
    122.   def key_show_features_box
    123.     case CP::EFFECTS_WINDOW::SHOW_TYPE
    124.     when 0
    125.       return Input.press?(CP::EFFECTS_WINDOW::BOX_KEY)
    126.     when 1
    127.       @show = !@show if Input.trigger?(CP::EFFECTS_WINDOW::BOX_KEY)
    128.       return @show #CP::EFFECTS_WINDOW.toggle_effects
    129.     when 2
    130.       return true
    131.     else
    132.       return false
    133.     end
    134.   end
    135.   def show_feature_box  ## Creates the box if shift is held.
    136.     if item != @last_box_item
    137.       if feature_box_item?
    138.         @feature_box.dispose unless @feature_box.nil?
    139.         rect = item_rect(@index)
    140.         x = rect.x + self.x + padding + 24 - ox
    141.         y = rect.y + line_height + self.y + padding - oy - 2
    142.         @feature_box = Window_FeaturesShow.new(item, x, y, self)
    143.         @last_box_item = item
    144.       else
    145.         remove_feature_box
    146.       end
    147.     end
    148.   end
    149.   def feature_box_item?
    150.     item.is_a?(RPG::EquipItem) || item.is_a?(RPG::UsableItem)
    151.   end
    152.   def remove_feature_box  ## Dispose the box.
    153.     @feature_box.dispose unless @feature_box.nil?
    154.     @feature_box = nil
    155.     @last_box_item = nil
    156.   end
    157. end
    158. class Window_FeaturesShow < Window_Base
    159.   def initialize(item, x, y, parent)
    160.     @parent = parent
    161.     @bx = x; @by = y
    162.     @item = item
    163.     super(0, 0, 500, 500)
    164.     self.z = @parent.z + 500
    165.     self.windowskin = Cache.system("EffectsWindow")
    166.     self.back_opacity = 255
    167.     self.tone = Tone.new
    168.     make_width
    169.     make_height
    170.     make_position
    171.     draw_all_items
    172.   end
    173.   def make_width
    174.     contents.font.size = line_height
    175.     contents.font.outline = CP::EFFECTS_WINDOW::OUTLINE
    176.     contents.font.shadow = CP::EFFECTS_WINDOW::SHADOW
    177.     i = 120
    178.     unless notes.empty?
    179.       i = [i, notes.collect{|n| contents.text_size(n).width}.max + 2].max
    180.     end
    181.     unless effects.empty?
    182.       i = [i, effects.collect{|e| contents.text_size(e.vocab).width}.max + 2].max
    183.     end
    184.     unless stats.empty?
    185.       i = [i, stats.collect{|s| contents.text_size(s).width}.max + 2].max
    186.     end
    187.     self.width = i + standard_padding * 2
    188.   end
    189.   def make_height
    190.     sw = self.width - standard_padding * 2
    191.     i = standard_padding * 2
    192.     i += notes.size * line_height
    193.     i += effects.size * line_height
    194.     i += seps * line_height / 2
    195.     unless stats.empty?
    196.       w = stats.collect{|s| contents.text_size(s).width}.max + 2
    197.       n = [sw / w, 1].max
    198.       i += (stats.size + n - 1) / n * line_height
    199.     end
    200.     self.height = i
    201.     self.visible = false if i == standard_padding * 2
    202.     create_contents
    203.     contents.font.size = line_height
    204.     contents.font.outline = false
    205.     contents.font.shadow = false
    206.     change_color(normal_color)
    207.   end
    208.   def make_position
    209.     self.x = @bx + self.width > Graphics.width ? Graphics.width - self.width :
    210.              @bx
    211.     self.y = @by + self.height <= Graphics.height ? @by :
    212.              @by - self.height - @parent.line_height + 4 > 0 ? @by -
    213.              self.height - @parent.line_height + 4 : Graphics.height -
    214.              self.height
    215.   end
    216.   def standard_padding
    217.     CP::EFFECTS_WINDOW::EDGES
    218.   end
    219.   def line_height
    220.     CP::EFFECTS_WINDOW::FONT_SIZE
    221.   end
    222.   def seps
    223.     i = 0
    224.     i += 1 unless effects.empty?
    225.     i += 1 unless notes.empty?
    226.     i += 1 unless stats.empty?
    227.     return [i, 0].max
    228.   end
    229.   def stats
    230.     return [] unless CP::EFFECTS_WINDOW::SHOW_STATS && @item.is_a?(RPG::EquipItem)
    231.     r = []
    232.     8.times do |i|
    233.       next if @item.params[i] == 0
    234.       r.push("#{Vocab.param(i)}   #{@item.params[i]}")
    235.     end
    236.     return r
    237.   end
    238.   def notes
    239.     @item.effect_desc
    240.   end
    241.   def effects
    242.     if @item.is_a?(RPG::EquipItem)
    243.       @item.features
    244.     elsif @item.is_a?(RPG::UsableItem)
    245.       @item.effects
    246.     end
    247.   end
    248.   def draw_all_items
    249.     contents.clear
    250.     y = 0
    251.     notes.each do |l|
    252.       draw_text(1, y, contents.width, line_height, l)
    253.       y += line_height
    254.     end
    255.     y += line_height / 2 unless y == 0
    256.     unless stats.empty?
    257.       w = stats.collect{|s| contents.text_size(s).width}.max + 2
    258.       xt = contents.width / w
    259.       xw = contents.width / xt
    260.       xn = 0
    261.       y -= line_height
    262.       stats.each_with_index do |s, index|
    263.         y += line_height if index % xt == 0
    264.         case s
    265.         when /(.*)   (-?)(\d+)/i
    266.           draw_text(xw * (index % xt) + 1, y, xw, line_height, "#{$1.to_s}")
    267.           draw_text(xw * (index % xt) + 1, y, xw, line_height,
    268.                     "#{$2.to_s}#{$3.to_s}  ", 2)
    269.         end
    270.       end
    271.       y += line_height
    272.     end
    273.     y += line_height / 2 unless y == 0
    274.     effects.each do |e|
    275.       draw_text(1, y, contents.width, line_height, e.vocab)
    276.       y += line_height
    277.     end
    278.   end
    279. end
    280. class RPG::BaseItem
    281.   def effect_desc
    282.     make_effect_desc if @effect_desc.nil?
    283.     return @effect_desc
    284.   end
    285.   def make_effect_desc
    286.     @effect_desc = []
    287.     noted = false
    288.     self.note.split(/[\r\n]+/i).each do |line|
    289.       case line
    290.       when /<effect note>/i
    291.         noted = true
    292.       when /<\/effect note>/i
    293.         break
    294.       else
    295.         @effect_desc.push("#{line}")
    296.       end
    297.     end
    298.   end
    299. end
    300. ###--------------------------------------------------------------------------###
    301. #  End of script.                                                              #
    302. ###--------------------------------------------------------------------------###
    复制代码


    (I am including both scripts in this post because both have been modified.)

    Can we make it so that pressing "Shift" would display the item effects box in the crafting menus (and recipe viewer from the Main Menu) like it would in other windows?

    Any scripts requested are used for my Broken Reality RPG (https://f95zone.to/threads/broken-reality-rpg-v4-2-2-rutsah.86100/) (free-to-play).

    Thank you in advance for your time.


    本贴来自国际rpgmaker官方论坛作者:Rutsah处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/neon-black-effect-boxes-compatibility-with-recipes-by-vlue.159668/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 07:21 , Processed in 0.094344 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表