Advertisement
Guest User

FF9 Help Patch/Example

a guest
Oct 23rd, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.12 KB | None | 0 0
  1. # Patch for Item Menu
  2. # Use as example how to make window specific commands
  3.  
  4. module Config
  5.   module FF9_Help
  6.   # Window_Command      = {...}
  7.     Window_ItemCategory = {
  8.     # Item Scene
  9.       "Items" => ['View items \i[261] you have.'],
  10.       "Weapons" => ['View weapons \i[144] you have.'],
  11.       "Armours" => ['View armors \i[160] you have.'],
  12.       "Key Items" => ['View key items \i[240] you have.'],
  13.     }
  14.   end
  15. end
  16.  
  17. class Window_ItemCategory < Window_HorzCommand
  18.  
  19.   def ff9_help_text
  20.   # Config::FF9_Help::Window_Command[command_name(index)]
  21.     Config::FF9_Help::Window_ItemCategory[command_name(index)]
  22.   end
  23.  
  24.   def ff9_help_avalaible?
  25.   # Config::FF9_Help::Window_Command.include?(command_name(index)) rescue return
  26.     Config::FF9_Help::Window_ItemCategory.include?(command_name(index)) rescue return
  27.   end
  28. end
  29.  
  30. =begin
  31. # Works the same in custom Window_Selectable's with these methods
  32.  
  33.   def ff9_help_text
  34.     Config::FF9_Help::YOUR_CUSTOM_WINDOW[@data[index].name]
  35.   end
  36.  
  37.   def ff9_help_avalaible?
  38.     Config::FF9_Help::YOUR_CUSTOM_WINDOW.include?(@data[index].name) rescue return
  39.   end
  40. =end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement