累计送礼: 0 个 累计收礼: 1 个 TA的每日心情 开心 2026-7-12 04:10
签到天数: 209 天
连续签到: 2 天
[LV.7]常住居民III
管理员
VIP
7
卡币
58883
OK点
16
推广点
0
同能卷
50
积分 68848
Spoiler: Recipes by Vlue
Code: #Advanced Recipe Crafting v1.2 #----------# #Features: Advanced Recipe crafting! Hold on tight! # #Usage: Set up your recipes, learn recipes, make items! Yay! # $crafting_category = :craft - call before Scene, craft is category # SceneManager.call(Scene_Crafting) - opens the Crafting menu # SceneManager.call(Scene_CraftingAll)- opens the category Crafting menu # learn_recipe(id) - teaches that recipe # forget_recipe(id) - forgets that recipe # #----------# #-- Script by: V.M of D.T # #- Questions or comments can be: # given by email: sumptuaryspade@live.ca # provided on facebook: http://www.facebook.com/DaimoniousTailsGames # All my other scripts and projects can be found here: http://daimonioustails.weebly.com/ # #- Free to use in any project with credit given, donations always welcome! module ADV_RECIPE #Whether or not crafted items use Weapon/Armor Randomization USE_WA_RANDOMIZATION = false #The names of the categories for All Crafting Menu, use :All for all recipes CATEGORIES = [:Alchemy,:Smithing,:Cooking,:Voodoo,:Tinkering] DESCRIPTIONS = { :Alchemy => "Mix herbs you find into powerful potions.", :Smithing => "The ability to create various armors and weapons.", :Cooking => "Used to process and improve raw food.", :Voodoo => "Dangerous variants of alchemy and black magia.", :Tinkering => "Convert non-metal materials into adventuring gear.", } #The icons for categories, same order as above CATEGORY_ICONS = [210,284,332,1,287] #The icon for player level LEVEL_ICON = 117 #Xp needed for crafting level, lvl is used for current level XP_NEEDED_EQUATION = "100 * lvl" #Allow the crafting of multiple items CRAFT_MULTIPLE = true #Allow or disallow menu access to the crafting scene ENABLE_MENU_ACCESS = true #Disable crafting from menu (turning it into a recipe viewer) DISABLE_MENU_CRAFT = true #Font Size of Detail window, smaller font size creates more room for materials DETAIL_FONT_SIZE = 18 #The following options disable the display of certain features. They still work # however if declared in recipes, so edit recipes accordingly. #Removes Gold Cost DISABLE_GOLD_COST = true #Removes success rate DISABLE_SUCCESS = true #Removes player level requirement DISABLE_PLAYER_LEVEL = true #Removes crafting level requirement and gauge DISABLE_CRAFT_LEVEL = true #Auto-learn all skills (can use forget_recipe to forget certain ones for later) AUTO_LEARN_RECIPES = false #The fun (read: complicated) part! #Recipe symbols: # #The crafted item, type is 0 for item, 1 for weapon, 2 for armor # :result => [type,id,amount] # #The materials required, same style as result. # :materials => [ [type,id,amount,consumed?],[type,id,amount] ... ], # # All the following are optional: # :gold_cost => amount - amount of gold to craft, can be 0 # :success => percent - base percent chance of successful craft # :success_gain => percent - percent gain on success per crafting level # :level => value - Hero level required to craft # :craft_level => value - Crafting level required to craft # :category => :category - Crafting category (:Alchemy, :Tailor, etc) # :multiple => false - disallows multiple crafts # :xp => amount - base Crafting xp gained per craft # :xp_deprac => amount - Xp lost per crafting level # :pxp => amount - Player xp gainer per craft # Formula for xp gained is as follows and is never negative: # xp gain = xp - (current_level - recipe_level) * xp_deprac #Useful items: 30 =iron bar /9 =copper bar /57 =bandages /101 =amber /110 =oil /69 =wyrm leather #/147 =boar leather # RECIPES = { 0 => { :result => [0,2,1], :materials => [[0,1,3]], :category => :Alchemy,}, #strong healing potion 1 => { :result => [0,9,1], :materials => [[0,8,2]], :category => :Smithing,}, #copper bar 2 => { :result => [0,152,1], :materials => [[0,11,1]], :category => :Cooking,}, #cooked boar steak 3 => { :result => [0,155,1], :materials => [[0,11,1],[0,153,1],[0,3,1]], :category => :Cooking,}, #fine boar meal 4 => { :result => [0,158,1], :materials => [[0,11,1]], :category => :Cooking,}, #boar sausage 5 => { :result => [0,128,1], :materials => [[0,74,1],[0,73,1],[0,14,5]], :category => :Cooking,}, #the Bomb 6 => { :result => [0,48,1], :materials => [[0,47,1]], :category => :Alchemy,}, #poison grenade 7 => { :result => [0,54,1], :materials => [[0,2,2],[0,5,1]], :category => :Alchemy,}, #advanced health potion 8 => { :result => [0,80,1], :materials => [[0,3,2], [0,212,2]], :category => :Alchemy,}, #whore's oil 9 => { :result => [0,157,1], :materials => [[0,16,1]], :category => :Cooking,}, #cooked fish 10 => { :result => [0,156,1], :materials => [[0,16,1],[0,153,1],[0,10,1]], :category => :Cooking,}, #fine fish meal 11 => { :result => [2,9,1], :materials => [[0,9,1]], :category => :Smithing,}, #copper helmet 12 => { :result => [2,10,1], :materials => [[0,9,2], [0,147,1]], :category => :Smithing,}, #copper armor 13 => { :result => [2,11,1], :materials => [[0,9,1]], :category => :Smithing,}, #copper ring 14 => { :result => [0,129,1], :materials => [[0,9,1]], :category => :Smithing,}, #copper shuriken 15 => { :result => [2,83,1], :materials => [[0,178,1]], :category => :Smithing,}, #frost copper helmet 16 => { :result => [2,84,1], :materials => [[0,178,2], [0,147,1]], :category => :Smithing,}, #frost copper armor 17 => { :result => [2,85,1], :materials => [[0,178,1]], :category => :Smithing,}, #frost copper bracelet 18 => { :result => [0,178,1], :materials => [[0,177,1]], :category => :Smithing,}, #frost copper bar 19 => { :result => [1,84,1], :materials => [[0,9,1]], :category => :Smithing,}, #copper claws 20 => { :result => [1,83,1], :materials => [[0,178,1]], :category => :Smithing,}, #frost copper claws 21 => { :result => [0,123,2], :materials => [[0,207,1],[0,336,1]], :category => :Alchemy,}, #Frost Candy 22 => { :result => [1,67,1], :materials => [[0,69,4]], :category => :Tinkering,}, #adventurer's cloak 23 => { :result => [0,189,1], :materials => [[0,188,1]], :category => :Cooking,}, #cooked scorpion meat 24 => { :result => [0,191,1], :materials => [[0,102,1]], :category => :Cooking,}, #cooked exotic meat 25 => { :result => [0,30,1], :materials => [[0,31,2]], :category => :Smithing,}, #iron bar 26 => { :result => [2,48,1], :materials => [[0,9,3],[0,43,1]], :craft_level => 7, :category => :Smithing,}, #sapphire shield 27 => { :result => [2,49,1], :materials => [[0,9,3],[0,42,1]], :category => :Smithing,}, #jade shield 28 => { :result => [2,50,1], :materials => [[0,9,3],[0,64,1]], :category => :Smithing,}, #ruby shield 29 => { :result => [2,47,1], :materials => [[0,30,2]], :category => :Smithing,}, #iron shield 30 => { :result => [2,18,1], :materials => [[0,30,2]], :category => :Smithing,}, #iron helmet 31 => { :result => [1,89,1], :materials => [[0,30,1]], :category => :Smithing,}, #iron axe 32 => { :result => [0,196,1], :materials => [[0,27,1]], :category => :Cooking,}, #cooked wolf meat 33 => { :result => [1,86,1], :materials => [[1,87,1],[0,200,2]], :category => :Smithing,}, #frost swapping sword 34 => { :result => [1,87,1], :materials => [[1,86,1],[0,100,2]], :category => :Smithing,}, #fire swapping sword 35 => { :result => [2,17,1], :materials => [[0,30,3]], :category => :Smithing,}, #iron cuirass 36 => { :result => [2,92,1], :materials => [[0,204,20]], :category => :Smithing,}, #slime tunic 37 => { :result => [0,1,1], :materials => [[0,3,2]], :category => :Alchemy,}, #healing potion 38 => { :result => [0,211,1], :materials => [[0,207,2]], :category => :Alchemy,}, #cold love 39 => { :result => [0,18,1], :materials => [[0,212,2]], :category => :Alchemy,}, #rising sun 40 => { :result => [0,210,1], :materials => [[0,209,1]], :category => :Alchemy,}, #liquified dragonroot 41 => { :result => [0,106,1], :materials => [[0,11,2],[0,153,1],[0,104,1], [0,15,1], [0,14,1]], :category => :Cooking,}, #Hioni Special 42 => { :result => [1,101,1], :materials => [[1,2,1], [0,30,1]], :category => :Smithing,}, #War Axe 43 => { :result => [2,101,1], :materials => [[2,1,2],[0,30,1]], :category => :Smithing,}, #Armored Shirt 52 => { :result => [0,6,1], :materials => [[0,3,2]], :category => :Alchemy,}, #antidote 53 => { :result => [0,7,1], :materials => [[0,3,1],[0,6,1]], :category => :Alchemy,}, #advanced antidote 54 => { :result => [0,5,1], :materials => [[0,209,1]], :category => :Alchemy,}, #Lady's Touch 55 => { :result => [0,162,1], :materials => [[0,21,1]], :category => :Cooking,}, #Cooked Cow Meat 56 => { :result => [0,106,1], :materials => [[0,250,2]], :category => :Alchemy,}, #exotic fume potion 57 => { :result => [0,112,2], :materials => [[0,3,1],[0,14,1], [0,209,1]], :category => :Alchemy,}, #strength potion 58 => { :result => [0,113,2], :materials => [[0,11,1],[0,92,1], [0,73,1]], :category => :Alchemy,}, #agility potion 59 => { :result => [0,114,2], :materials => [[0,3,1],[0,25,1], [0,63,1]], :category => :Alchemy,}, #defense potion 60 => { :result => [0,35,1], :materials => [[0,207,1],[0,112,1]], :category => :Alchemy,}, #blood-freezing potion 61 => { :result => [0,54,1], :materials => [[0,5,1],[0,67,1]], :category => :Alchemy,}, #advanced health potion 62 => { :result => [0,116,1], :materials => [[0,115,2]], :category => :Alchemy,}, #Imperia's Glory 63 => { :result => [0,227,1], :materials => [[0,226,2]], :category => :Alchemy,}, #Alusida 64 => { :result => [0,35,1], :materials => [[0,226,1],[0,115,1]], :category => :Alchemy,}, #Tuflosi 65 => { :result => [0,162,1], :materials => [[0,21,1]], :category => :Cooking,}, #Cooked Cow 66 => { :result => [0,34,1], :materials => [[0,44,2],[0,3,1], [0,207,1]], :category => :Alchemy,}, #Potion of Rage 67 => { :result => [0,49,2], :materials => [[0,3,2],[0,207,2], [0,212,3]], :category => :Alchemy,}, #Tissa's Blood 68 => { :result => [0,235,2], :materials => [[0,88,3], [0,153,1]], :category => :Cooking,}, #Mushroom Soup 69 => { :result => [0,236,1], :materials => [[0,88,1]], :category => :Voodoo,}, #Sleeping Powder 70 => { :result => [0,237,1], :materials => [[0,88,2], [0,3,1]], :category => :Alchemy,}, #Ertu Healing Potion 71=> { :result => [0,70,1], :materials => [[0,3,3]], :category => :Alchemy,}, #healing slave 72=> { :result => [2,121,1], :materials => [[0,30,5], [0,9,2], [0,42,1]], :category => :Smithing,}, #jewel of Asari 73=> { :result => [0,142,1], :materials => [[0,11,3], [0,153,2], [0,236,2]], :category => :Cooking,}, #Chimera Bait 74=> { :result => [0,144,1], :materials => [[0,10,1]], :category => :Cooking,}, #roasted bread 75 => { :result => [0,239,1], :materials => [[0,238,1], [0,153,1]], :category => :Cooking,}, #rat kebab 76 => { :result => [2,119,1], :materials => [[0,124,5], [0,123,1], [0,30,2]], :category => :Smithing,}, #White Skin 77 => { :result => [2,111,1], :materials => [[0,78,1], [0,9,1], [0,30,1]], :category => :Smithing,}, #Light Vest 78 => { :result => [2,69,1], :materials => [[0,78,2], [0,30,1], [0,202,1]], :category => :Smithing,}, #Wolfbane 79 => { :result => [2,65,1], :materials => [[0,124,2], [0,30,2]], :category => :Smithing,}, #Snakeskin 80 => { :result => [2,64,1], :materials => [[0,124,1], [0,30,3], [0,147,1]], :category => :Smithing,}, #The Unbitten 81 => { :result => [2,123,1], :materials => [[0,101,1], [0,30,1], [0,124,1], [0,46,2]], :category => :Smithing,}, #Security 82 => { :result => [2,124,1], :materials => [[0,9,1], [0,30,2], [0,124,1], [0,46,2]], :category => :Smithing,}, #Desert Explorer 83 => { :result => [2,125,1], :materials => [[0,9,2], [0,30,4], [0,124,1], [0,46,4]], :category => :Smithing,}, #Desert Roamer 84 => { :result => [2,125,1], :materials => [[0,43,1], [0,30,1], [0,46,2]], :category => :Smithing,}, #Desert Star 85 => { :result => [0,243,1], :materials => [[0,242,1], [0,153,1]], :category => :Cooking,}, #Fried Snake 86 => { :result => [0,244,1], :materials => [[0,243,2], [0,189,2], [0,153,1]], :category => :Cooking,}, #Desert Buffet 87 => { :result => [0,203,2], :materials => [[0,30,1]], :category => :Smithing,}, #Lockpicks 88 => { :result => [2,128,1], :materials => [[0,30,1], [0,46,1]], :category => :Smithing,}, #Light Helmet 89 => { :result => [0,249,2], :materials => [[0,15,2], [0,92,2], [0,73,1]], :category => :Cooking,}, #Varkhu Cocktail 90 => { :result => [1,125,1], :materials => [[1,3,1], [0,43,1], [0,42,1], [0,78,3]], :category => :Smithing,}, #Expert's Pickaxe 91 => { :result => [0,256,2], :materials => [[0,3,2], [0,238,1]], :category => :Alchemy,}, #Elixir of the Cat 92 => { :result => [0,257,2], :materials => [[0,3,1], [0,166,1], [0,204,1], [0,207,1]], :category => :Alchemy,}, #Elixir of Ossification 93 => { :result => [0,258,2], :materials => [[0,1,1], [0,163,1], [0,238,2], [0,209,1]], :category => :Alchemy,}, #Elixir of the Womb 94 => { :result => [0,259,2], :materials => [[0,251,2], [0,85,1], [0,103,1]], :category => :Alchemy,}, #Elixir of the Gentle Night 95 => { :result => [0,269,2], :materials => [[0,212,2], [0,47,1], [0,153,1], [0,3,1]], :category => :Alchemy,}, #Elixir of Liquid Relief 96 => { :result => [0,261,2], :materials => [[0,24,1], [0,67,1], [0,104,1], [0,163,1], [0,44,1]], :category => :Alchemy,}, #Elixir of Pentacure 97 => { :result => [2,1,1], :materials => [[0,154,2]], :category => :Smithing,}, #Casual Cloth 98 => { :result => [2,27,1], :materials => [[0,154,4]], :category => :Smithing,}, #Silk Shirt 99 => { :result => [2,21,1], :materials => [[0,154,4], [0,101,1], [0,124,2]], :category => :Smithing,}, #White Cloak 100=> { :result => [0,57,1], :materials => [[0,154,1]], :category => :Tinkering,}, #Bandage 101=> { :result => [2,134,1], :materials => [[0,154,6], [0,209,1], [0,9,1]], :category => :Smithing,}, #Web of Lies 102=> { :result => [1,127,1], :materials => [[0,9,1], [0,30,1], [0,154,1], [0,101,1], [0,120,1]], :category => :Smithing,}, #Stinger 103=> { :result => [0,131,2], :materials => [[0,161,2], [0,3,2]], :category => :Cooking,}, #Green Tea 104=> { :result => [0,132,2], :materials => [[0,161,2], [0,212,2]], :category => :Cooking,}, #Yellow Tea 105=> { :result => [0,45,1], :materials => [[0,28,1]], :category => :Cooking,}, #grilled fish 106=> { :result => [0,278,4], :materials => [[0,209,1], [0,3,1], [0,207,1], [0,67,1]], :category => :Alchemy,}, #Morbus Gravis Cure 107=> { :result => [1,135,1], :materials => [[0,81,1], [0,41,1], [0,154,20]], :category => :Voodoo,}, #Spider Staff 108=> { :result => [0,284,1], :materials => [[0,283,1], [0,153,1]], :category => :Cooking,}, #cooked bear 109=> { :result => [0,79,1], :materials => [[0,182,1]], :category => :Cooking,}, #boiled egg 110=> { :result => [0,137,1], :materials => [[0,182,2], [0,11,1], [0,153,1]], :category => :Cooking,}, #omelette 111=> { :result => [0,206,1], :materials => [[0,182,1], [0,153,1]], :category => :Cooking,}, #seasoned egg 112=> { :result => [1,133,1], :materials => [[1,14,1], [0,291,2], [0,57,1]], :category => :Voodoo,}, #bone dagger 113=> { :result => [2,139,1], :materials => [[0,291,1]], :category => :Voodoo,}, #bone earring 114=> { :result => [2,140,1], :materials => [[0,291,1], [0,3,3], [0,57,1], [0,286,1]], :category => :Voodoo,}, #lucky bone 115=> { :result => [2,141,1], :materials => [[0,291,5], [0,264,1], [0,286,1]], :category => :Voodoo,}, #skeletal feet 116=> { :result => [2,145,1], :materials => [[0,291,4], [0,57,1], [0,9,2]], :category => :Voodoo,}, #bone shield 117=> { :result => [2,146,1], :materials => [[0,166,3], [0,81,1], [0,286,1]], :category => :Voodoo,}, #skull helmet 118=> { :result => [2,3,1], :materials => [[0,286,3]], :category => :Voodoo,}, #bloody tooth 119=> { :result => [0,48,1], :materials => [[0,47,3], [0,166,1]], :category => :Voodoo,}, #poison grenade 120=> { :result => [2,147,1], :materials => [[0,264,4], [0,3,1]], :category => :Voodoo,}, #rat gloves 121=> { :result => [2,148,1], :materials => [[0,264,15], [0,110,1]], :category => :Voodoo,}, #rat vest 122=> { :result => [2,129,1], :materials => [[0,201,1], [0,81,1]], :category => :Voodoo,}, #spellbook 123=> { :result => [2,130,1], :materials => [[0,201,1], [0,81,5]], :category => :Voodoo,}, #grimmoire 124=> { :result => [2,131,1], :materials => [[0,166,1], [0,81,5]], :category => :Voodoo,}, #skull of a fool 125=> { :result => [2,133,1], :materials => [[0,57,1], [0,154,2], [0,264,1], [0,3,2], [0,81,2]], :category => :Voodoo,}, #Mosquito Linen 126=> { :result => [2,149,1], :materials => [[0,201,1], [0,81,3], [0,166,2], [0,204,1], [0,55,1], [0,264,1]], :category => :Voodoo,}, #black grimmoire 127=> { :result => [0,308,2], :materials => [[0,307,6]], :category => :Voodoo,}, #Minotaur Horn Dust 128=> { :result => [1,30,1], :materials => [[1,7,1], [0,178,1]], :category => :Smithing,}, #Copper->Frostcopper Slingshot 129=> { :result => [1,30,1], :materials => [[0,178,2], [0,280,1]], :category => :Smithing,}, #Frostcopper Slingshot 130=> { :result => [1,7,1], :materials => [[0,9,2], [0,280,1]], :category => :Smithing,}, #Copper Slingshot 131=> { :result => [0,185,1], :materials => [[1,129,3], [0,280,1]], :category => :Tinkering,}, #Triple Shuriken 132=> { :result => [0,311,1], :materials => [[0,166,1]], :category => :Voodoo,}, #Skull Grenade 133=> { :result => [0,312,1], :materials => [[0,291,1], [0,81,1]], :category => :Voodoo,}, #Eventuality Talisman 134=> { :result => [0,313,1], :materials => [[0,311,4]], :category => :Voodoo,}, #Skull Grenade Banch 135=> { :result => [0,314,1], :materials => [[0,312,4]], :category => :Voodoo,}, #Eventuality Talisman Banch 136=> { :result => [1,138,1], :materials => [[0,318,1], [0,110,1]], :category => :Tinkering,}, #Torch (Offensive) 137=> { :result => [1,139,1], :materials => [[0,318,1]], :category => :Tinkering,}, #Club 138=> { :result => [2,167,1], :materials => [[0,318,1], [0,110,1]], :category => :Tinkering,}, #Torch (Defensive) 139=> { :result => [1,6,1], :materials => [[0,318,1], [0,154,1], [0,280,1]], :category => :Tinkering,}, #Hunting Bow 140=> { :result => [0,320,1], :materials => [[0,37,1], [0,57,1]], :category => :Tinkering,}, #Tinkered frost grenade 141=> { :result => [0,57,4], :materials => [[2,1,1]], :category => :Tinkering,}, #casual to bandages 142=> { :result => [0,324,1], :materials => [[0,63,1],[0,153,1]], :category => :Cooking,}, #Vegetable Soup 143=> { :result => [0,324,1], :materials => [[0,94,1],[0,13,1]], :category => :Cooking,}, #Vegetable Soup 144=> { :result => [0,324,3], :materials => [[0,94,1],[0,13,1], [0,63,1]], :category => :Cooking,}, #Vegetable Soup 145=> { :result => [0,327,1], :materials => [[0,104,1]], :category => :Tinkering,}, #Cold Powder 146=> { :result => [0,37,1], :materials => [[0,104,3], [0,280,1]], :category => :Tinkering,}, #frost grenade 147=> { :result => [0,329,1], :materials => [[0,104,1]], :category => :Alchemy,}, #winter solution 148=> { :result => [0,327,2], :materials => [[0,104,3]], :category => :Tinkering,}, #Cold Powder Grenade 149=> { :result => [0,330,4], :materials => [[0,104,1], [0,15,2]], :category => :Cooking,}, #Frosted Apple 150 => { :result => [2,17,1], :materials => [[0,30,2], [0,9,2]], :category => :Smithing,}, #iron cuirass 151 => { :result => [0,332,1], :materials => [[0,163,1], [0,63,1]], :category => :Cooking,}, #sweetcorn 152 => { :result => [0,335,3], :materials => [[0,336,2], [0,15,3]], :category => :Cooking,}, #apple tart 153 => { :result => [0,337,4], :materials => [[0,92,5]], :category => :Cooking,}, #orange juice 154 => { :result => [0,339,2], :materials => [[0,13,3]], :category => :Cooking,}, #carrot juice 155 => { :result => [0,340,1], :materials => [[0,63,1]], :category => :Cooking,}, #roasted corn 156 => { :result => [1,65,1], :materials => [[0,147,2]], :category => :Tinkering,}, #traveller's cloak 157 => { :result => [2,84,1], :materials => [[2,10,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper armor 158 => { :result => [1,116,1], :materials => [[0,9,3], [0,285,2], [0,30,1]], :category => :Smithing,}, #sturdy claws 159 => { :result => [2,83,1], :materials => [[2,9,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper helmet 160 => { :result => [0,178,4], :materials => [[0,9,4], [0,200,1]], :category => :Smithing,}, #copper->frostcopper bar 161 => { :result => [2,85,1], :materials => [[2,11,2], [0,178,1]], :category => :Smithing,}, #copper ring->frostcopper bracer 162 => { :result => [2,183,1], :materials => [[2,181,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper shield 163 => { :result => [1,26,1], :materials => [[1,25,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper claymore 164 => { :result => [1,83,1], :materials => [[1,84,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper claws 165 => { :result => [1,42,1], :materials => [[1,141,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper chain 166 => { :result => [1,141,1], :materials => [[0,9,3]], :category => :Smithing,}, #copper chain 167 => { :result => [1,142,1], :materials => [[0,178,3]], :category => :Smithing,}, #frostcopper chain 168 => { :result => [2,182,1], :materials => [[0,9,3], [0,318,1]], :category => :Smithing,}, #copper shield 169 => { :result => [1,27,1], :materials => [[1,25,1]], :category => :Tinkering,}, #balanced claymore 170 => { :result => [1,34,1], :materials => [[1,25,1], [0,200,3]], :category => :Voodoo,}, #crymore 171 => { :result => [1,25,1], :materials => [[0,9,3], [0,286,1]], :category => :Smithing,}, #copper claymore 172 => { :result => [1,35,1], :materials => [[0,27,1], [0,110,1], [0,100,2]], :category => :Tinkering,}, #Burning Truth 173 => { :result => [1,13,1], :materials => [[0,9,1], [0,318,2]], :category => :Smithing,}, #Copper Spear 174 => { :result => [1,143,1], :materials => [[0,178,1], [0,318,2]], :category => :Smithing,}, #Frostcopper Spear 175 => { :result => [1,143,1], :materials => [[1,13,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper spear 176 => { :result => [2,183,1], :materials => [[0,178,3], [0,318,1]], :category => :Smithing,}, #Frostcopper shield 177 => { :result => [1,43,1], :materials => [[1,1,1], [1,13,1], [0,280,1]], :category => :Tinkering,}, #Poor Halbred 178 => { :result => [1,44,1], :materials => [[0,318,1], [0,280,1], [0,30,1]], :category => :Tinkering,}, #Polished Halbred 179 => { :result => [2,2,1], :materials => [[0,318,1], [0,147,1]], :category => :Tinkering,}, #Buckler 180 => { :result => [2,7,1], :materials => [[0,318,3]], :category => :Tinkering,}, #Barrel Shield 181 => { :result => [1,26,1], :materials => [[0,178,3], [0,286,2]], :category => :Smithing,}, #frostcopper claymore 182 => { :result => [0,349,1], :materials => [[0,236,3]], :category => :Tinkering,}, #Morpheus Grenade - Not assigned yet 183 => { :result => [0,32,20], :materials => [[0,64,1], [0,209,10]], :category => :Alchemy,}, #Crystal Vitality - Not assigned yet 184 => { :result => [0,50,9], :materials => [[0,101,1], [0,166,1], [0,67,1]], :category => :Voodoo,}, #Crystal Talent - Not assigned yet 185 => { :result => [0,38,2], :materials => [[0,110,1], [0,9,1]], :category => :Tinkering,}, #Fire Grenade - Not assigned yet 186 => { :result => [0,117,2], :materials => [[0,44,1], [0,88,2], [0,161,1]], :category => :Alchemy,}, #Preparation Elixir 187=> { :result => [0,66,1], :materials => [[0,44,1], [0,17,1]], :category => :Alchemy,}, #Fighting Spirit 188 => { :result => [1,63,1], :materials => [[1,62,1], [0,178,1]], :category => :Smithing,}, #copper->frostcopper blade 189 => { :result => [1,62,2], :materials => [[0,9,2], [0,69,1]], :category => :Smithing,}, #Copper Blade 190 => { :result => [1,63,2], :materials => [[0,178,2], [0,69,1]], :category => :Smithing,}, #Frostcopper Blade 191 => { :result => [1,65,2], :materials => [0,147,2], :category => :Tinkering,}, #Traveller's Cloak } end $crafting_category = :All class Recipe attr_accessor :result attr_accessor :materials attr_accessor :known attr_accessor :id attr_accessor :gold_cost attr_accessor :level attr_accessor :category attr_accessor :xp def initialize(id,recipe_hash) @id = id @result = Material.new(recipe_hash[:result]) @materials = [] for item in recipe_hash[:materials] @materials.push(Material.new(item)) end @known = false recipe_hash[:gold_cost] ? @gold_cost = recipe_hash[:gold_cost] : @gold_cost = 0 recipe_hash[:success] ? @rate = recipe_hash[:success] : @rate = 100 recipe_hash[:success_gain] ? @rated = recipe_hash[:success_gain] : @rated = 0 recipe_hash[:level] ? @level = recipe_hash[:level] : @level = 1 recipe_hash[:category] ? @category = recipe_hash[:category] : @category = CATEGORIES[0] recipe_hash[:xp] ? @xp = recipe_hash[:xp] : @xp = 0 recipe_hash[:xp_deprac] ? @xpd = recipe_hash[:xp_deprac] : @xpd = 0 recipe_hash[:craft_level] ? @clevel = recipe_hash[:craft_level] : @clevel = 0 recipe_hash[:pxp] ? @pxp = recipe_hash[:pxp] : @pxp = 0 !recipe_hash[:multiple].nil? ? @mult = recipe_hash[:multiple] : @mult = true @known = ADV_RECIPE::AUTO_LEARN_RECIPES end def name return @result.item.name end def multiple? @mult end def has_materials? for item in @materials return false unless $game_party.item_number(item.item) >= item.amount end return true end def has_gold? $game_party.gold >= @gold_cost end def has_craft_level? craft_level <= $game_party.craft_level_sym(@category) end def has_level? @level <= $game_party.highest_level && has_craft_level? end def craftable? has_gold? && has_materials? && has_level? end def craft_level @clevel end def amount_craftable? mat_amount = [] for item in @materials mat_amount.push($game_party.item_number(item.item) / item.amount) end if @gold_cost > 0 return [$game_party.gold / @gold_cost,mat_amount.min].min else return mat_amount.min end end def craft(fail = 0) remove_materials if fail < success_rate return add_result else return nil end end def remove_materials for item in @materials next unless item.consumed? $game_party.gain_item(item.item,-item.amount) end $game_party.gain_gold(-@gold_cost) end def add_result if ADV_RECIPE::USE_WA_RANDOMIZATION item = $game_party.add_weapon(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Weapon) item = $game_party.add_armor(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Armor) item = $game_party.add_item(@result.item.id,@result.amount) if @result.item.is_a?(RPG::Item) else $game_party.gain_item(@result.item,@result.amount) item = @result.item end $game_party.gain_craft_exp(category_id, xp_gain) $game_party.members.each do |actor| actor.gain_exp(@pxp) end item end def category_id ADV_RECIPE::CATEGORIES.index(@category) end def xp_gain level_diff = $game_party.craft_level(category_id) - @clevel [@xp - @xpd * level_diff,0].max end def success_rate level_diff = $game_party.craft_level(category_id) - @clevel [@rate + @rated * level_diff,100].min end end class Material attr_accessor :item attr_accessor :amount def initialize(mat) @item = $data_items[mat[1]] if mat[0] == 0 @item = $data_weapons[mat[1]] if mat[0] == 1 @item = $data_armors[mat[1]] if mat[0] == 2 @amount = mat[2] @consumed = mat[3].nil? ? true : mat[3] end def consumed? @consumed end end class Game_Party alias recipe_init initialize def initialize recipe_init @crafting_level = [1]*ADV_RECIPE::CATEGORIES.size @craft_exp = [0]*ADV_RECIPE::CATEGORIES.size end def craft_level(id) @crafting_level[id] end def craft_level_sym(sym) @crafting_level[ADV_RECIPE::CATEGORIES.index(sym)] end def craft_exp(id) @craft_exp[id] end def craft_exp_next(id) lvl = craft_level(id) return eval(ADV_RECIPE::XP_NEEDED_EQUATION) end def gain_craft_exp(id, val) @craft_exp[id] += val while craft_exp(id) >= craft_exp_next(id) @craft_exp[id] -= craft_exp_next(id) @crafting_level[id] += 1 end end end module DataManager class << self alias rec_cgo create_game_objects alias rec_msc make_save_contents alias rec_esc extract_save_contents end def self.create_game_objects rec_cgo $game_recipes = create_recipes end def self.make_save_contents contents = rec_msc contents[:recipe] = $game_recipes contents end def self.extract_save_contents(contents) rec_esc(contents) $game_recipes = contents[:recipe] end def self.create_recipes recipes = {} ADV_RECIPE::RECIPES.each_pair do |key, val| recipes[key] = Recipe.new(key,val) end recipes end end class Game_Interpreter def learn_recipe(id) return if $game_recipes[id].nil? $game_recipes[id].known = true end def forget_recipe(id) return if $game_recipes[id].nil? $game_recipes[id].known = false end end class Window_RecipeList < Window_Selectable def initialize(x,y,w,h) super @data = $game_recipes.values.select {|recipe| include?(recipe)} refresh end def item_max @data ? @data.size : 1 end def item @data && index >= 0 ? @data[index] : nil end def current_item_enabled? enable?(@data[index]) end def include?(item) return false unless item.has_craft_level? return false unless item.known return true if @category == :All return @category == item.category end def set_category(cat) return if cat == @category @category = cat @data = $game_recipes.values.select {|recipe| include?(recipe)} refresh end def enable?(item) return false if item.nil? return false if $temp_disable_crafting item.craftable? end def draw_item(index) item = @data[index] if item rect = item_rect(index) rect.width -= 4 enabled = $temp_disable_crafting ? true : enable?(item) draw_item_name(item.result.item, rect.x, rect.y, enabled) if item.amount_craftable? > 0 draw_text(rect.x,rect.y,contents.width,24,"x"+item.amount_craftable?.to_s,2) end end end def current_item index >= 0 ? @data[index] : nil end def process_ok if current_item_enabled? Sound.play_ok Input.update call_ok_handler else Sound.play_buzzer end end def refresh create_contents super end def content_heights item_max * 24 end end class Window_RecipeDetail < Window_Base def initialize(x,y,w,h) super @recipe = nil end def set_recipe(recipe) @recipe = recipe refresh end def refresh contents.clear contents.font.size = ADV_RECIPE::DETAIL_FONT_SIZE return if @recipe.nil? draw_craft_level unless ADV_RECIPE::DISABLE_PLAYER_LEVEL && ADV_RECIPE::DISABLE_CRAFT_LEVEL draw_materials draw_success_rate unless ADV_RECIPE::DISABLE_SUCCESS draw_gold_cost unless ADV_RECIPE::DISABLE_GOLD_COST end def draw_craft_level change_color(system_color, @recipe.has_level?) draw_text(0,0,contents.width,contents.font.size,"Craft Level:") change_color(normal_color, @recipe.has_level?) xx = 0 if !ADV_RECIPE::DISABLE_PLAYER_LEVEL draw_text(0,0,contents.width,contents.font.size,@recipe.level,2) draw_icon(ADV_RECIPE::LEVEL_ICON,contents.width - 48,0) xx += 48 text = @recipe.craft_level.to_s + "/" else text = @recipe.craft_level.to_s end if !ADV_RECIPE::DISABLE_CRAFT_LEVEL draw_text(0,0,contents.width - xx,contents.font.size,text,2) draw_icon(ADV_RECIPE::CATEGORY_ICONS[ADV_RECIPE::CATEGORIES.index(@recipe.category)],contents.width - 56 - xx,0) end end def draw_materials if ADV_RECIPE::DISABLE_CRAFT_LEVEL && ADV_RECIPE::DISABLE_PLAYER_LEVEL yy = 0 else yy = contents.font.size end change_color(system_color, @recipe.craftable?) draw_text(0,yy,self.width,contents.font.size,"Required:") yy += contents.font.size for item in @recipe.materials change_color(normal_color, $game_party.item_number(item.item) >= item.amount) draw_icon(item.item.icon_index,0,yy) draw_text(24,yy,self.width,contents.font.size,item.item.name) string = $game_party.item_number(item.item).to_s + "/" + item.amount.to_s draw_text(0,yy,self.contents.width,contents.font.size,string,2) yy += contents.font.size end end def draw_success_rate change_color(system_color, @recipe.craftable?) draw_text(0,contents.height-contents.font.size,contents.width,contents.font.size,"Success Rate:") change_color(normal_color, @recipe.craftable?) draw_text(0,contents.height-contents.font.size,contents.width,contents.font.size,@recipe.success_rate.to_s + "%",2) end def draw_gold_cost if @recipe.gold_cost > 0 change_color(system_color, @recipe.has_gold?) draw_text(0,contents.height-contents.font.size*2,contents.width,contents.font.size,"Crafting Cost:") change_color(normal_color, @recipe.has_gold?) draw_currency_value(@recipe.gold_cost,Vocab::currency_unit,0,contents.height-contents.font.size*2,contents.width) end end def draw_currency_value(value, unit, x, y, width) cx = text_size(unit).width change_color(normal_color,$game_party.gold >= value) draw_text(x, y, width - cx - 2, contents.font.size, value, 2) change_color(system_color) draw_text(x, y, width, contents.font.size, unit, 2) end end class Window_RecipeConfirm < Window_Selectable attr_accessor :amount def initialize(x,y,w,h) super @amount = 1 refresh end def item_max; 1; end; def enable?(item); true; end; def refresh super draw_text(0,0,self.contents.width,line_height,"Craft",1) return unless @recipe && @recipe.craftable? draw_text(0,0,contents.width,line_height,"x"+@amount.to_s,2) end def activate super select(0) end def deactivate super select(-1) end def set_recipe(rec) return if rec == @recipe @recipe = rec @amount = 1 refresh end def cursor_movable? active && open? && ADV_RECIPE::CRAFT_MULTIPLE && @recipe.multiple? end def cursor_down(wrap = false) change_amount(-10) end def cursor_up(wrap = false) change_amount(10) end def cursor_right(wrap = false) change_amount(1) end def cursor_left(wrap = false) change_amount(-1) end def change_amount(val) Sound.play_cursor @amount += val @amount = [[@amount,1].max,@recipe.amount_craftable?].min refresh end end class Scene_CraftingAll < Scene_Base def start super @help_window = Window_Help.new width = Graphics.width / 2 height = Graphics.height - @help_window.height - 48 @list_window = Window_RecipeList.new(0,@help_window.height+48,width,height-48) @list_window.set_handler(:ok, method(:list_success)) @list_window.set_handler(:cancel, method(:cancel)) @list_window.height += 48 if ADV_RECIPE::DISABLE_CRAFT_LEVEL @list_window.create_contents @detail_window = Window_RecipeDetail.new(width,@list_window.y,width,height-48*2) @detail_window.height += 48 if ADV_RECIPE::DISABLE_GOLD_COST @detail_window.create_contents height = @detail_window.y + @detail_window.height @confirm_window = Window_RecipeConfirm.new(width,height,width,48) @confirm_window.set_handler(:ok, method(:craft_success)) @confirm_window.set_handler(:cancel, method(:confirm_cancel)) if !ADV_RECIPE::DISABLE_GOLD_COST @gold_window = Window_Gold.new @gold_window.width = width @gold_window.y = Graphics.height - 48 @gold_window.x = width end @popup_window = Window_RecPopup.new @popup_window.set_handler(:ok, method(:popup_ok)) @popup_window.set_handler(:cancel, method(:popup_ok)) @command_window = Window_RecCategory.new @command_window.set_handler(:ok, method(:command_ok)) @command_window.set_handler(:cancel, method(:command_cancel)) @gauge_window = Window_RecGauge.new unless ADV_RECIPE::DISABLE_CRAFT_LEVEL end def popup_ok @popup_window.deactivate @popup_window.close @list_window.activate end def update super @help_window.set_text(@list_window.current_item.result.item.description) if !@list_window.current_item.nil? if @command_window.active category = ADV_RECIPE::CATEGORIES[@command_window.index] @help_window.set_text(ADV_RECIPE::DESCRIPTIONS[category]) end @detail_window.set_recipe(@list_window.current_item) @confirm_window.set_recipe(@list_window.current_item) @list_window.set_category(ADV_RECIPE::CATEGORIES[@command_window.index]) @gauge_window.set_category(ADV_RECIPE::CATEGORIES[@command_window.index]) unless ADV_RECIPE::DISABLE_CRAFT_LEVEL return unless @list_window.current_item if @list_window.current_item.craftable? @confirm_window.opacity = 255 @confirm_window.contents_opacity = 255 else @confirm_window.opacity = 75 @confirm_window.contents_opacity = 75 end end def list_success @list_window.deactivate @confirm_window.activate end def craft_success amount = 0 item = nil @confirm_window.amount.times do item2 = @list_window.current_item.craft(rand(100)) if item2 amount += 1 item = item2 end end if item @popup_window.set_text(item, amount) else @popup_window.set_text_fail end @confirm_window.change_amount(-1000) @gold_window.refresh unless ADV_RECIPE::DISABLE_GOLD_COST @list_window.refresh @gauge_window.refresh unless ADV_RECIPE::DISABLE_CRAFT_LEVEL @popup_window.activate end def confirm_cancel @confirm_window.deactivate @list_window.activate end def command_cancel $temp_disable_crafting = false SceneManager.return end def cancel @list_window.select(-1) @help_window.set_text("") @command_window.activate end def command_ok @list_window.select(0) @list_window.activate end end class Scene_Crafting < Scene_CraftingAll def start super @command_window.index = ADV_RECIPE::CATEGORIES.index($crafting_category) @command_window.deactivate @command_window.visible = false @list_window.height += 48 @list_window.y -= 48 @detail_window.height += 48 @detail_window.y -= 48 @list_window.create_contents @detail_window.create_contents @list_window.select(0) @list_window.activate end def cancel SceneManager.return end end class Window_RecCategory < Window_HorzCommand def initialize super(0,72) end def window_width; Graphics.width; end def window_height; 48; end def make_command_list ADV_RECIPE::CATEGORIES.each do |command| add_command(command.to_s,command) end end def item_width 120 end def draw_item(index) change_color(normal_color, command_enabled?(index)) rect = item_rect_for_text(index) draw_text(rect, command_name(index)) draw_icon(ADV_RECIPE::CATEGORY_ICONS[index],rect.x-24,rect.y) end def item_rect_for_text(index) rect = item_rect(index) rect.x += 28 rect.width -= 28 rect end end class Window_RecPopup < Window_Selectable def initialize super(Graphics.width/2-window_width/2,Graphics.height/2-window_height/2,120,48) self.openness = 0 deactivate end def window_width; 120; end def window_height; 48; end def set_text(item, amount) contents.clear text = amount.to_s + "x " + item.name + " " width = contents.text_size(text).width self.width = width + padding*2 self.x = Graphics.width/2-width/2 create_contents draw_text(24,0,contents.width,line_height,text) draw_icon(item.icon_index,0,0) open end def set_text_fail contents.clear text = "Crafting failed!" width = contents.text_size(text).width self.width = width + padding*2 self.x = Graphics.width/2-width/2 create_contents draw_text(12,0,contents.width,line_height,text) open end def process_ok if current_item_enabled? Input.update deactivate call_ok_handler else Sound.play_buzzer end end end class Window_RecGauge < Window_Base def initialize super(0,Graphics.height-48,Graphics.width/2,48) @category = :All end def refresh contents.clear return if @category == :All draw_icon(ADV_RECIPE::CATEGORY_ICONS[cat_index],0,0) draw_text(24,0,contents.width,24,$game_party.craft_level(cat_index)) rate = $game_party.craft_exp(cat_index).to_f / $game_party.craft_exp_next(cat_index) draw_gauge(48, -3, contents.width-48, rate, tp_gauge_color1, tp_gauge_color2) if Module.const_defined?(:SPECIAL_GAUGES) @gauges[[48,-3]].set_extra("XP",$game_party.craft_exp(cat_index),$game_party.craft_exp_next(cat_index)) else text = $game_party.craft_exp(cat_index).to_s+"/"+$game_party.craft_exp_next(cat_index).to_s draw_text(0,0,contents.width,24,text,2) end end def set_category(cat) return if cat == @category @category = cat refresh end def cat_index ADV_RECIPE::CATEGORIES.index(@category) end end class Window_MenuCommand < Window_Command alias recipe_aoc add_original_commands def add_original_commands recipe_aoc add_command("Recipe Viewer", :recipe) if ADV_RECIPE::ENABLE_MENU_ACCESS end end class Scene_Menu < Scene_MenuBase alias recipe_create_command_window create_command_window def create_command_window recipe_create_command_window @command_window.set_handler(:recipe, method(:command_recipe)) end def command_recipe $temp_disable_crafting = ADV_RECIPE::DISABLE_MENU_CRAFT SceneManager.call(Scene_CraftingAll) end end 复制代码
Spoiler: Item Effect Boxes
Code: ##----------------------------------------------------------------------------## ## Effects Box Script v1.0 ## Created by Neon Black ##changed by Roninator 2 ## ## For both commercial and non-commercial use as long as credit is given to ## Neon Black and any additional authors. Licensed under Creative Commons ## CC BY 3.0 - http://creativecommons.org/licenses/by/3.0/. ##----------------------------------------------------------------------------## ## ##----------------------------------------------------------------------------## ## Revision Info: ## v1.0 - 3.3.2013 ## Wrote and debugged main script ##----------------------------------------------------------------------------## ## $imported ||= {} ## $imported["EFFECTS_BOX"] = 1.0 ## ## ##----------------------------------------------------------------------------## ## Instructions: ## Place this script in the script editor below "Materials" and above "Main". ## This script requires Neon Black's Features and Effects name module. You can ## obtain it from http://cphouseset.wordpress.com/modules/. If you do not ## import it, you will get errors. ## ## This script is plug and play. It allows a pop-up boxes to display on equips, ## items, and skills. You can choose to have these pop-ups be constant, toggle ## with a button press, or only appear while a key is held down. These display ## 3 bits of information. First an added note, second all the stats equipping ## the item will provide, and finally all the effects or features of the item. ## A note can be added using <effect note> and </effect note> and placing your ## note in between those tags, like so: ## ## <effect note> ## This will display line 1 ## This will display line 2 ## </effect note> ## ##----------------------------------------------------------------------------## ## module CP # Do not touch ## module EFFECTS_WINDOW # these lines. ## ##----------------------------------------------------------------------------## ## Config: ## The config options are below. You can set these depending on the flavour of ## your game. Each option is explained in a bit more detail above it. ## ##------ # This is the padding around the edges of the box. Increasing this number will # increase the size of the box without increasing the size of it's contents. EDGES = 8 # This is the font size of the pop up's text. Adjusting this affects the entire # box's size. FONT_SIZE = 16 # Choose to use font shadow or outlines. SHADOW = true OUTLINE = true # If this value is set to false, stats will not be shown on equips. SHOW_STATS = true # The key to press to toggle or show the box. BOX_KEY = :A # The show type for the pop-up box. Any value other than these three will # prevent the box from being show. # 0 = Hold button to display the box. # 1 = Press button to toggle the box. # 2 = The box is constantly show. SHOW_TYPE = 1 # If type 2 was selected above, this is the default state of the box. Set it to # true to show the box or false to hide the box until the key is pressed. @show = false ##----------------------------------------------------------------------------## ## ## ##----------------------------------------------------------------------------## ## The following lines are the actual core code of the script. While you are ## certainly invited to look, modifying it may result in undesirable results. ## Modify at your own risk! ###---------------------------------------------------------------------------- def self.toggle_effects @show = !@show if Input.trigger?(BOX_KEY) return @show end end end module SceneManager class << self alias :cp_rshp_run :run unless method_defined?(:cp_rshp_run) end def self.run cp_module_check_features cp_rshp_run end def self.cp_module_check_features return if $imported["CP_FEATURES_EFFECTS"] a1 = "One or more scripts require Neon Black's Features and Effects module." a2 = "This can be obtained at http://cphouseset.wordpress.com/modules/" a3 = "Please add this module and try again." a4 = "Please contact the creator of the game to resolve this issue." if $TEST || $BTEST msgbox "#{a1}/n#{a2}/n#{a3}" Thread.new{system("start http://cphouseset.wordpress.com/modules/#features")} else msgbox "#{a1}/n#{a4}" end end end class Window_Selectable < Window_Base def item return nil end alias :cp_itembox_update :update def update(*args) cp_itembox_update(*args) show_fet_window end def show_fet_window key = key_show_features_box show_feature_box if key && active && open? remove_feature_box unless key && active && open? end def key_show_features_box case CP::EFFECTS_WINDOW::SHOW_TYPE when 0 return Input.press?(CP::EFFECTS_WINDOW::BOX_KEY) when 1 @show = !@show if Input.trigger?(CP::EFFECTS_WINDOW::BOX_KEY) return @show #CP::EFFECTS_WINDOW.toggle_effects when 2 return true else return false end end def show_feature_box ## Creates the box if shift is held. if item != @last_box_item if feature_box_item? @feature_box.dispose unless @feature_box.nil? rect = item_rect(@index) x = rect.x + self.x + padding + 24 - ox y = rect.y + line_height + self.y + padding - oy - 2 @feature_box = Window_FeaturesShow.new(item, x, y, self) @last_box_item = item else remove_feature_box end end end def feature_box_item? item.is_a?(RPG::EquipItem) || item.is_a?(RPG::UsableItem) end def remove_feature_box ## Dispose the box. @feature_box.dispose unless @feature_box.nil? @feature_box = nil @last_box_item = nil end end class Window_FeaturesShow < Window_Base def initialize(item, x, y, parent) @parent = parent @bx = x; @by = y @item = item super(0, 0, 500, 500) self.z = @parent.z + 500 self.windowskin = Cache.system("EffectsWindow") self.back_opacity = 255 self.tone = Tone.new make_width make_height make_position draw_all_items end def make_width contents.font.size = line_height contents.font.outline = CP::EFFECTS_WINDOW::OUTLINE contents.font.shadow = CP::EFFECTS_WINDOW::SHADOW i = 120 unless notes.empty? i = [i, notes.collect{|n| contents.text_size(n).width}.max + 2].max end unless effects.empty? i = [i, effects.collect{|e| contents.text_size(e.vocab).width}.max + 2].max end unless stats.empty? i = [i, stats.collect{|s| contents.text_size(s).width}.max + 2].max end self.width = i + standard_padding * 2 end def make_height sw = self.width - standard_padding * 2 i = standard_padding * 2 i += notes.size * line_height i += effects.size * line_height i += seps * line_height / 2 unless stats.empty? w = stats.collect{|s| contents.text_size(s).width}.max + 2 n = [sw / w, 1].max i += (stats.size + n - 1) / n * line_height end self.height = i self.visible = false if i == standard_padding * 2 create_contents contents.font.size = line_height contents.font.outline = false contents.font.shadow = false change_color(normal_color) end def make_position self.x = @bx + self.width > Graphics.width ? Graphics.width - self.width : @bx self.y = @by + self.height <= Graphics.height ? @by : @by - self.height - @parent.line_height + 4 > 0 ? @by - self.height - @parent.line_height + 4 : Graphics.height - self.height end def standard_padding CP::EFFECTS_WINDOW::EDGES end def line_height CP::EFFECTS_WINDOW::FONT_SIZE end def seps i = 0 i += 1 unless effects.empty? i += 1 unless notes.empty? i += 1 unless stats.empty? return [i, 0].max end def stats return [] unless CP::EFFECTS_WINDOW::SHOW_STATS && @item.is_a?(RPG::EquipItem) r = [] 8.times do |i| next if @item.params[i] == 0 r.push("#{Vocab.param(i)} #{@item.params[i]}") end return r end def notes @item.effect_desc end def effects if @item.is_a?(RPG::EquipItem) @item.features elsif @item.is_a?(RPG::UsableItem) @item.effects end end def draw_all_items contents.clear y = 0 notes.each do |l| draw_text(1, y, contents.width, line_height, l) y += line_height end y += line_height / 2 unless y == 0 unless stats.empty? w = stats.collect{|s| contents.text_size(s).width}.max + 2 xt = contents.width / w xw = contents.width / xt xn = 0 y -= line_height stats.each_with_index do |s, index| y += line_height if index % xt == 0 case s when /(.*) (-?)(\d+)/i draw_text(xw * (index % xt) + 1, y, xw, line_height, "#{$1.to_s}") draw_text(xw * (index % xt) + 1, y, xw, line_height, "#{$2.to_s}#{$3.to_s} ", 2) end end y += line_height end y += line_height / 2 unless y == 0 effects.each do |e| draw_text(1, y, contents.width, line_height, e.vocab) y += line_height end end end class RPG::BaseItem def effect_desc make_effect_desc if @effect_desc.nil? return @effect_desc end def make_effect_desc @effect_desc = [] noted = false self.note.split(/[\r\n]+/i).each do |line| case line when /<effect note>/i noted = true when /<\/effect note>/i break else @effect_desc.push("#{line}") end end end end ###--------------------------------------------------------------------------### # End of script. # ###--------------------------------------------------------------------------### 复制代码
(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/