Jet's Code Snippets

Jet10985's code snippets

Introduction

Content Hidden Spoiler
This is my collection of code snippets i make for fun. I just release to the public in case they want them or see them as handy. This is not a shop, don't ask me to write you a snippet. I write these in my spare time and therefore, requests ruin my fun.


List

Content Hidden Spoiler
Here is a list of all my snippets here, useful more so when i get more. Descriptions for snippets can be found here in the list.

  1. WindowSkin Snippet: This lets you have custom windowskins for every default window in the program.
  2.  
  3. Hide Text Box Snippet: This lets you make a text box that can be hidden, then brought back up by the player.
  4.  
  5. Run/Guard Hotkey: This lets you assign a button for quick access in battle that lets the player guard, or run.
  6.  
  7. Run/Guard Hotkey ATB Version: Does the same as the above, except works only with ATB.
  8.  
  9. Aliased Load Menu Option: It adds a Load menu option for quick loading.
  10.  
  11. Speed Save: This lets you assign a button to bring up the save menu quickly.
  12.  
  13. Extra Windows: This adds extra windows to the main menu, decided by you.
  14.  
  15. Parameter Icons: This adds icons next to parameters. Not yet compatible with Enelvon’s luck and resistance scripts.
  16.  
  17. Success Bar: This lets you create a bar of success that can turn switches on/off.
  18.  
  19. Change Actor Options: This allows you to change actor options like super guard or two swords style.
  20.  
  21. No Actor EXP: This allows you to define actors that cannot gain exp for some reason or another.
  22.  
  23. Change Windowskin: This lets you change the windowskin will in-game with a simple script call.
  24.  
  25. Cheat System: This lets you add a cheat system to your game.
Expand to see the code.


The Snippets


Windowskin snippet:
  1. #===============================================================================
  2. # WindowSkin Snippet
  3. # By Jet10985
  4. #===============================================================================
  5. # This snippet allows you to change the windowskin of every default window in
  6. # the program.
  7. # This script has: A lot of customization options.
  8. #===============================================================================
  9. # This script is not open for distribution to other sites without permission
  10. # from me, Jet10985. Please credit me if you use this script, for aliasing is
  11. # slightly difficult, and you probably couldn't do it unless your cool
  12. # like scripters are. Make sure that the new windowskin is not called window
  13. # because that would replace the default skin, unless that's what you wanted.
  14. # Also make sure the new windowskin is in the Graphics/System folder
  15. #===============================================================================
  16.  
  17. module Windowskins
  18.  
  19. # This Window is what is shown in the main menu containing player info.
  20. MENU_STATUS_SKIN = "window"
  21.  
  22. # This the windows that has menu commands like "items, skills, equip"
  23. MENU_COMMAND_SKIN = "window"
  24.  
  25. # This is the window that appears when you click game end in the menu.
  26. GAME_END_SKIN = "window"
  27.  
  28. # This is the status screen window. That's self explanatory.
  29. STATUS_SCREEN_SKIN = "window"
  30.  
  31. # This is the window text in shown in from events.
  32. MESSAGE_SKIN = "window"
  33.  
  34. # This is the window that shows items in the inventory.
  35. ITEM_SKIN = "window"
  36.  
  37. # This shows what the item does/it's desciption
  38. ITEM_DESCRIPTION_SKIN = "window"
  39.  
  40. # This is the window shown when you have to select what actor to use the item on
  41. ITEM_USE_SKIN = "window"
  42.  
  43. # This shows what the actor has equipped
  44. EQUIP_SKIN = "window"
  45.  
  46. # This shows the actors parameter changes in the equip screen
  47. EQUIP_STATUS_SKIN = "window"
  48.  
  49. # This shows all the items the player can equip
  50. EQUIP_LIST_SKIN = "window"
  51.  
  52. # This shows the weapon/armor description.
  53. EQUIP_DESCRIPTION_SKIN = "window"
  54.  
  55. # This shows the actors details on the skill screen.
  56. SKILL_SKIN = "window"
  57.  
  58. # This shows all the skills the actor has to use.
  59. SKILL_LIST_SKIN = "window"
  60.  
  61. # This shows the skills description
  62. SKILL_DESCRIPTION_SKIN = "window"
  63.  
  64. # This is the window shown when you have to select what actor to use the skill on
  65. SKILL_USE_SKIN = "window"
  66.  
  67. # This window shows how much gold you have.
  68. GOLD_SKIN = "window"
  69.  
  70. # This is the left half of the debug screen.
  71. DEBUG_LEFT_SKIN = "window"
  72.  
  73. # This is the right half of the debug screen.
  74. DEBUG_RIGHT_SKIN = "window"
  75.  
  76. # This is the other window in the debug screen, below the right half.
  77. DEBUG_DESCRIPTION_SKIN = "window"
  78.  
  79. # This is the window that holds the letters you can choose from in name input
  80. NAME_INPUT_SKIN = "window"
  81.  
  82. # This shows the actors current name in name input
  83. NAME_EDIT_SKIN = "window"
  84.  
  85. # This window is what pops-up when you have a number input.
  86. NUMBER_INPUT_SKIN = "window"
  87.  
  88. # This window is when a text box is hsown in battle. Different then TEXT_SKIN.
  89. BATTLE_MESSAGE_SKIN = "window"
  90.  
  91. # This shows actor's names, hp, and mp in battle
  92. BATTLE_STATUS_SKIN = "window"
  93.  
  94. # This shows the options in battle "attack, skill, guard, item"
  95. BATTLE_COMMAND_SKIN = "window"
  96.  
  97. # This shows the items to choose from in battle.
  98. BATTLE_ITEM_SKIN = "window"
  99.  
  100. # This shows the skills to choose from in battle
  101. BATTLE_SKILL_SKIN = "window"
  102.  
  103. # This shows the description of items/skills in battle.
  104. BATTLE_DESCRIPTION_SKIN = "window"
  105.  
  106. # This shows the options of "fight, run" at the beginning of battle
  107. PARTY_COMMAND_SKIN = "window"
  108.  
  109. # This windows shows what enemy you are targeting
  110. TARGET_ENEMY_SKIN = "window"
  111.  
  112. # This shows items to buy in the shop
  113. SHOP_BUY_SKIN = "window"
  114.  
  115. # This shows items to sell in the shop
  116. SHOP_SELL_SKIN = "window"
  117.  
  118. # This shows the amount of items to buy/sell in the shop
  119. SHOP_NUMBER_SKIN = "window"
  120.  
  121. # This shows actors parameters in the shop.
  122. SHOP_STATUS_SKIN = "window"
  123.  
  124. # This shows the command in the shop "buy, sell, cancel"
  125. SHOP_COMMAND_SKIN = "window"
  126.  
  127. # This is shown when in the shop, but not in the buy/sell menus
  128. SHOP_IDLE_SKIN = "window"
  129.  
  130. # This shows the description of items in shops.
  131. SHOP_DESCRIPTION_SKIN = "window"
  132.  
  133. # This is the window that you can choose save files from.
  134. SAVE_SKIN = "window"
  135.  
  136. # This shows the description of the save file.
  137. SAVE_DESCRIPTION_SKIN = "window"
  138.  
  139. # This is the window t the beggining of starting a game "new game, continue"
  140. TITLE_CHOICE_SKIN = "window"
  141.  
  142. end
  143.  
  144. #===============================================================================
  145. # There is no need to edit further unless you know what you are doing.
  146. # If you've got any errors, check to see if you spelled the name of the
  147. # custom windowskin correctly. An underscore and capital letter in the wrong
  148. # place can cause a error.
  149. #===============================================================================
  150.  class Window_Base < Window
  151.     alias jets_little_script_initialize_window_base :initialize unless $@
  152.     def initialize(*args)
  153.       jets_little_script_initialize_window_base(*args)
  154.       if $scene.is_a?(Scene_Shop)
  155.       self.windowskin = Cache.system(Windowskins::SHOP_IDLE_SKIN)
  156.       elsif $scene.is_a?(Scene_Debug)
  157.       self.windowskin = Cache.system(Windowskins::DEBUG_DESCRIPTION_SKIN)
  158.       elsif
  159.       self.windowskin = Cache.system("Window")
  160.       end
  161.     end
  162. end
  163. #===============================================================================
  164. class Window_Selectable
  165.  
  166.   alias jet8912_initialize initialize unless $@
  167.   def initialize(*args)
  168.     jet8912_initialize(*args)
  169.     if $scene.is_a?(Scene_End)
  170.       self.windowskin = Cache.system(Windowskins::GAME_END_SKIN)
  171.     end
  172.     if $scene.is_a?(Scene_Menu)
  173.       self.windowskin = Cache.system(Windowskins::MENU_COMMAND_SKIN)
  174.     end
  175.     if $scene.is_a?(Scene_Title)
  176.       self.windowskin = Cache.system(Windowskins::TITLE_CHOICE_SKIN)
  177.     end
  178.   end
  179. end
  180. #===============================================================================
  181. class Window_Help
  182.  
  183.   alias jet6384_initialize initialize unless $@
  184.   def initialize
  185.     jet6384_initialize
  186.     if $scene.is_a?(Scene_Equip)
  187.       self.windowskin = Cache.system(Windowskins::EQUIP_DESCRIPTION_SKIN)
  188.     end
  189.     if $scene.is_a?(Scene_Skill)
  190.       self.windowskin = Cache.system(Windowskins::SKILL_DESCRIPTION_SKIN)
  191.     end
  192.     if $scene.is_a?(Scene_Item)
  193.       self.windowskin = Cache.system(Windowskins::ITEM_DESCRIPTION_SKIN)
  194.     end
  195.     if $scene.is_a?(Scene_File)
  196.       self.windowskin = Cache.system(Windowskins::SAVE_DESCRIPTION_SKIN)
  197.     end
  198.     if $scene.is_a?(Scene_Shop)
  199.       self.windowskin = Cache.system(Windowskins::SHOP_DESCRIPTION_SKIN)
  200.     end
  201.     if $scene.is_a?(Scene_Battle)
  202.       self.windowskin = Cache.system(Windowskins::BATTLE_DESCRIPTION_SKIN)
  203.     end
  204.   end
  205. end
  206. #===============================================================================
  207. class Window_Gold
  208.  
  209.   alias jet2944_initialize initialize unless $@
  210.   def initialize(*args)
  211.     jet2944_initialize(*args)
  212.     self.windowskin = Cache.system(Windowskins::GOLD_SKIN)
  213.   end
  214. end
  215. #===============================================================================
  216. class Window_MenuStatus
  217.  
  218.   alias jet3794_initialize initialize unless $@
  219.   def initialize(*args)
  220.     jet3794_initialize(*args)
  221.     if $scene.is_a?(Scene_Item)
  222.       self.windowskin = Cache.system(Windowskins::ITEM_USE_SKIN)
  223.     end
  224.     if $scene.is_a?(Scene_Menu)
  225.       self.windowskin = Cache.system(Windowskins::MENU_STATUS_SKIN)
  226.     end
  227.     if $scene.is_a?(Scene_Skill)
  228.       self.windowskin = Cache.system(Windowskins::SKILL_USE_SKIN)
  229.     end
  230.   end
  231. end
  232. #===============================================================================
  233. class Window_Item
  234.  
  235.   alias jet4759_initialize initialize unless $@
  236.   def initialize(*args)
  237.     jet4759_initialize(*args)
  238.     if $scene.is_a?(Scene_Equip)
  239.       self.windowskin = Cache.system(Windowskins::EQUIP_LIST_SKIN)
  240.     end
  241.     if $scene.is_a?(Scene_Item)
  242.       self.windowskin = Cache.system(Windowskins::ITEM_SKIN)
  243.     end
  244.     if $scene.is_a?(Scene_Shop)
  245.       self.windowskin = Cache.system(Windowskins::SHOP_SELL_SKIN)
  246.     end
  247.     if $scene.is_a?(Scene_Battle)
  248.       self.windowskin = Cache.system(Windowskins::BATTLE_ITEM_SKIN)
  249.     end
  250.   end
  251. end
  252. #===============================================================================
  253. class Window_Skill
  254.  
  255.   alias jet1983_initialize initialize unless $@
  256.   def initialize(*args)
  257.     jet1983_initialize(*args)
  258.     if $scene.is_a?(Scene_Battle)
  259.       self.windowskin = Cache.system(Windowskins::BATTLE_SKILL_SKIN)
  260.     elsif
  261.       self.windowskin = Cache.system(Windowskins::SKILL_LIST_SKIN)
  262.     end
  263.   end
  264. end
  265. #===============================================================================
  266. class Window_SkillStatus
  267.  
  268.   alias jet2739_initialize initialize unless $@
  269.   def initialize(*args)
  270.     jet2739_initialize(*args)
  271.     self.windowskin = Cache.system(Windowskins::SKILL_SKIN)
  272.   end
  273. end
  274. #===============================================================================
  275. class Window_Equip
  276.  
  277.   alias jet2344_initialize initialize unless $@
  278.   def initialize(*args)
  279.     jet2344_initialize(*args)
  280.     self.windowskin = Cache.system(Windowskins::EQUIP_SKIN)
  281.   end
  282. end
  283. #===============================================================================
  284. class Window_EquipStatus
  285.  
  286.   alias jet2848_initialize initialize unless $@
  287.   def initialize(*args)
  288.     jet2848_initialize(*args)
  289.     self.windowskin = Cache.system(Windowskins::EQUIP_STATUS_SKIN)
  290.   end
  291. end
  292. #===============================================================================
  293. class Window_Status
  294.  
  295.   alias jet4749_initialize initialize unless $@
  296.   def initialize(*args)
  297.     jet4749_initialize(*args)
  298.     self.windowskin = Cache.system(Windowskins::STATUS_SCREEN_SKIN)
  299.   end
  300. end
  301. #===============================================================================
  302. class Window_SaveFile
  303.  
  304.   alias jet2739_initialize initialize unless $@
  305.   def initialize(*args)
  306.     jet2739_initialize(*args)
  307.     self.windowskin = Cache.system(Windowskins::SAVE_SKIN)
  308.   end
  309. end
  310. #===============================================================================
  311. class Window_ShopBuy
  312.  
  313.   alias jet1224_initialize initialize unless $@
  314.   def initialize(*args)
  315.     jet1224_initialize(*args)
  316.     self.windowskin = Cache.system(Windowskins::SHOP_BUY_SKIN)
  317.   end
  318. end
  319. #===============================================================================
  320. class Window_ShopNumber
  321.  
  322.   alias jet5696_initialize initialize unless $@
  323.   def initialize(*args)
  324.     jet5696_initialize(*args)
  325.     self.windowskin = Cache.system(Windowskins::SHOP_NUMBER_SKIN)
  326.   end
  327. end
  328. #===============================================================================
  329. class Window_ShopStatus
  330.  
  331.   alias jet9999_initialize initialize unless $@
  332.   def initialize(*args)
  333.     jet9999_initialize(*args)
  334.     self.windowskin = Cache.system(Windowskins::SHOP_STATUS_SKIN)
  335.   end
  336. end
  337. #===============================================================================
  338. class Window_NameEdit
  339.  
  340.   alias jet8888_initialize initialize unless $@
  341.   def initialize(*args)
  342.     jet8888_initialize(*args)
  343.     self.windowskin = Cache.system(Windowskins::NAME_EDIT_SKIN)
  344.   end
  345. end
  346. #===============================================================================
  347. class Window_NameInput
  348.  
  349.   alias jet7777_initialize initialize unless $@
  350.   def initialize(*args)
  351.     jet7777_initialize(*args)
  352.     self.windowskin = Cache.system(Windowskins::NAME_INPUT_SKIN)
  353.   end
  354. end
  355. #===============================================================================
  356. class Window_Message
  357.  
  358.   alias jet6666_initialize initialize unless $@
  359.   def initialize
  360.     jet6666_initialize
  361.     if $scene.is_a?(Scene_Battle)
  362.       self.windowskin = Cache.system(Windowskins::BATTLE_MESSAGE_SKIN)
  363.     elsif
  364.       self.windowskin = Cache.system(Windowskins::MESSAGE_SKIN)
  365.     end
  366.   end
  367. end
  368. #===============================================================================
  369. class Window_PartyCommand
  370.  
  371.   alias jet5555_initialize initialize unless $@
  372.   def initialize
  373.     jet5555_initialize
  374.     self.windowskin = Cache.system(Windowskins::PARTY_COMMAND_SKIN)
  375.   end
  376. end
  377. #===============================================================================
  378. class Window_ActorCommand
  379.  
  380.   alias jet4444_initialize initialize unless $@
  381.   def initialize
  382.     jet4444_initialize
  383.     self.windowskin = Cache.system(Windowskins::BATTLE_COMMAND_SKIN)
  384.   end
  385. end
  386. #===============================================================================
  387. class Window_TargetEnemy
  388.  
  389.   alias jet3333_initialize initialize unless $@
  390.   def initialize
  391.     jet3333_initialize
  392.     self.windowskin = Cache.system(Windowskins::TARGET_ENEMY_SKIN)
  393.   end
  394. end
  395. #===============================================================================
  396. class Window_BattleStatus
  397.  
  398.   alias jet2222_initialize initialize unless $@
  399.   def initialize
  400.     jet2222_initialize
  401.     self.windowskin = Cache.system(Windowskins::BATTLE_STATUS_SKIN)
  402.   end
  403. end
  404. #===============================================================================
  405. class Window_DebugLeft
  406.  
  407.   alias jet1111_initialize initialize unless $@
  408.   def initialize(*args)
  409.     jet1111_initialize(*args)
  410.     self.windowskin = Cache.system(Windowskins::DEBUG_LEFT_SKIN)
  411.   end
  412. end
  413. #===============================================================================
  414. class Window_DebugRight
  415.  
  416.   alias jet0000_initialize initialize unless $@
  417.   def initialize(*args)
  418.     jet0000_initialize(*args)
  419.     self.windowskin = Cache.system(Windowskins::DEBUG_RIGHT_SKIN)
  420.   end
  421. end
Expand to see the code.


Hide Text Box:
  1. #===============================================================================
  2. # Hide Text Box Snippet
  3. # By Jet10985
  4. # Original Code by Piejamas
  5. #===============================================================================
  6. # This snippet allows you to add scenes where the player can hide the textbox
  7. # to maybe look at a picture then bring the box back up.
  8. # This script has: 2 customization options.
  9. #===============================================================================
  10.  
  11. module Hide
  12.  
  13.   ACTIVATION_SWITCH = 5 # This is the switch that allows the player to hide the box
  14.  
  15.   TRIGGER = Input::F8 # This is the button that needs to be pressed to hide the box
  16.  
  17. end
  18.  
  19. #===============================================================================
  20. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  21. #===============================================================================
  22.  
  23. class Window_Message
  24.  
  25.   include Hide
  26.  
  27.   alias jet7535_base_update update unless $@
  28.   def update
  29.     jet7535_base_update
  30.     unless $scene.is_a?(Scene_Battle)
  31.     if $game_switches[ACTIVATION_SWITCH] && Input.trigger?(TRIGGER)
  32.       if self.visible
  33.         self.visible = false
  34.       elsif
  35.         self.visible = true
  36.       end
  37.       Sound.play_cursor
  38.       end
  39.     end
  40.   end
  41.    
  42.   def input_pause
  43.     if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  44.       if self.visible
  45.       self.pause = false
  46.         if @text != nil && !@text.empty?
  47.           new_page if @line_count >= MAX_LINE
  48.         else
  49.           terminate_message
  50.         end
  51.       end
  52.     end
  53.   end
  54. end
Expand to see the code.


Run/Guard Hotkey:
  1. #===============================================================================
  2. # Run/Guard Hotkey Snippet
  3. # By Jet10985
  4. #===============================================================================
  5. # This snippet allows you to add a hotkey type system to let players have a
  6. #  handy button to automaticly run or guard. Cannot use with ATB.
  7. # This script has: 2 customization options.
  8. #===============================================================================
  9.  
  10. module Hotkey
  11.    
  12.     GUARD_BUTTON = Input::F5  # This is what button is set to make you guard.
  13.    
  14.     RUN_BUTTON = Input::F6 # This is what button is set to make you run.
  15.  
  16. end
  17.  
  18. #===============================================================================
  19. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  20. #===============================================================================
  21. class Scene_Battle < Scene_Base
  22.    
  23.   include Hotkey
  24.    
  25.   alias jet2847_update_actor_command_selection update_actor_command_selection unless $@
  26.   def update_actor_command_selection
  27.     jet2847_update_actor_command_selection
  28.     if Input.trigger?(GUARD_BUTTON)
  29.       Sound.play_decision
  30.       @active_battler.action.set_guard
  31.       next_actor
  32.     end
  33.     if Input.trigger?(RUN_BUTTON)
  34.       if !$game_troop.can_escape
  35.         Sound.play_buzzer
  36.         return
  37.       end
  38.       Sound.play_decision
  39.       process_escape
  40.     end
  41.   end
  42. end
Expand to see the code.


Run/Guard Hotkey ATB version:
  1. #===============================================================================
  2. # Run/Guard Hotkey Snippet, ATB version
  3. # By Jet10985
  4. #===============================================================================
  5. # This snippet allows you to add a hotkey type system to let players have a
  6. #  handy button to automaticly run or guard. Only to be used with ATB.
  7. # This script has: 2 customization options.
  8. #===============================================================================
  9.  
  10. module Hotkey
  11.    
  12.     GUARD_BUTTON = Input::F5  # This is what button is set to make you guard.
  13.    
  14.     RUN_BUTTON = Input::F6 # This is what button is set to make you run.
  15.  
  16. end
  17.  
  18. #===============================================================================
  19. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  20. #===============================================================================
  21.   class Scene_Battle < Scene_Base
  22.    
  23.     include Hotkey
  24.    
  25.   alias jet2847_update_actor_command_selection update_actor_command_selection unless $@
  26.   def update_actor_command_selection
  27.     jet2847_update_actor_command_selection
  28.     if Input.trigger?(GUARD_BUTTON)
  29.       Sound.play_decision
  30.       @commander.action.set_guard
  31.       end_command
  32.     end
  33.     if Input.trigger?(RUN_BUTTON)
  34.       if !$game_troop.can_escape
  35.         Sound.play_buzzer
  36.         return
  37.       end
  38.       Sound.play_decision
  39.       process_escape
  40.     end
  41.   end
  42. end
Expand to see the code.


Alias Load Menu Option:
  1. #===============================================================================
  2. # Aliased Load Menu Option Snippet v.2
  3. # By Jet10985
  4. # Thanks to: Woratana
  5. #===============================================================================
  6. # This snippet adds a load option to the main menu for quick loading.
  7. # This script has: 2 customization options.
  8. #===============================================================================
  9. # To disable the load menu access use this command in the "script" event command
  10. # change_load_access(option)
  11. # option can equal either: true or false
  12. # true disables the load menu, false activates it.
  13. #===============================================================================
  14.  
  15. module Load
  16.  
  17.   LOAD_NAME = "Load" # This is the name of the load option
  18.  
  19.   MENU_INDEX = 5 #This is where to add the load menu as a option
  20.  
  21. end
  22.  
  23. #===============================================================================
  24. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  25. #===============================================================================
  26. class Game_System
  27.  
  28.     attr_accessor :load_disabled
  29.    
  30. end
  31.  
  32. class Game_Interpreter
  33.  
  34.   def change_load_access(option)
  35.     $game_system.load_disabled = option
  36.   end
  37. end
  38.  
  39. class Window_Command < Window_Selectable
  40.     alias jet4569_initialize initialize unless $@
  41.     alias jet9374_draw_item draw_item unless $@
  42.  
  43.   def initialize(*args)
  44.     @disabled_commands = []
  45.     jet4569_initialize(*args)
  46.   end
  47.  
  48.   def draw_item(*args)
  49.     jet9374_draw_item(*args)
  50.     @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true
  51.   end
  52.  
  53.   def ins_command(index, text)
  54.     @commands.insert(index, text)
  55.     @disabled_commands.insert(index, nil)
  56.     old_disabled_commands = @disabled_commands.dup
  57.     self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32
  58.     @item_max = @commands.size
  59.     create_contents            
  60.     refresh                    
  61.     old_disabled_commands.each_index do |i|
  62.       if !old_disabled_commands[i].nil?
  63.         draw_item(i, false)    
  64.       end
  65.     end
  66.   end
  67.  
  68.   def add_command(text)
  69.     ins_command(@commands.size, text)
  70.   end
  71. end
  72.  
  73. class Scene_Menu < Scene_Base  
  74.  
  75.   include Load
  76.  
  77.     def sort_newcommand
  78.       @sorted_command ||= []
  79.       newcommand = @newcommand - @sorted_command
  80.       newcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i }
  81.       @command_window.index = @menu_index
  82.       @sorted_command = @sorted_command + @newcommand
  83.     end
  84.    
  85.     alias jet6993_create_command_window create_command_window unless $@
  86.     def create_command_window(*args)
  87.       jet6993_create_command_window(*args)
  88.       @command_window.ins_command(MENU_INDEX, LOAD_NAME)
  89.       @newcommand ||= []
  90.       @newcommand << MENU_INDEX
  91.       sort_newcommand
  92.       if $game_system.load_disabled            
  93.         @command_window.draw_item(MENU_INDEX, false)
  94.       end
  95.     end
  96.    
  97.     alias jet3943_update_command_selection update_command_selection unless $@
  98.     def update_command_selection(*args)
  99.       @menucomorpg_change = false
  100.       if Input.trigger?(Input::C) && @command_window.index == MENU_INDEX
  101.         if $game_system.load_disabled
  102.         Sound.play_buzzer
  103.         return
  104.       end
  105.       Sound.play_decision
  106.       $scene = Scene_File.new(false, false, false)
  107.       else
  108.         if Input.trigger?(Input::C) && @command_window.index >
  109.         MENU_INDEX
  110.           @command_window.index -= 1
  111.           @menucomorpg_change = true
  112.         end
  113.         jet3943_update_command_selection(*args)
  114.       end
  115.       @command_window.index += 1 if @menucomorpg_change
  116.     end
  117.    
  118.     alias jet3446_update_actor_selection update_actor_selection unless $@
  119.     def update_actor_selection(*args)
  120.       @menucomorpg_change = false
  121.       if Input.trigger?(Input::C) && @command_window.index >
  122.       MENU_INDEX
  123.         @command_window.index -= 1
  124.         @menucomorpg_change = true
  125.       end
  126.       jet3446_update_actor_selection(*args)
  127.       @command_window.index += 1 if @menucomorpg_change
  128.     end
  129.   end
Expand to see the code.


Speed Save:
  1. #===============================================================================
  2. # Speed Save Option Snippet
  3. # By Jet10985
  4. #===============================================================================
  5. # This snippet adds a hotkey to open the save menu quickly on the map.
  6. # This script has: 1 customization option.
  7. #===============================================================================
  8.  
  9. module Speed_Save
  10.  
  11.   COMMAND_BUTTON = Input::F7 # This is what button is set to make you save.
  12.  
  13. end
  14.  
  15. #===============================================================================
  16. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  17. #===============================================================================
  18. class Scene_Map < Scene_Base
  19.  
  20.   include Speed_Save
  21.  
  22.   alias jet2228_update update unless $@
  23.   def update
  24.     jet2228_update
  25.     update_save
  26.   end
  27.  
  28.   def update_save
  29.     if Input.trigger?(COMMAND_BUTTON)
  30.       if $game_system.save_disabled
  31.         Sound.play_buzzer
  32.       else
  33.         $scene = Scene_File.new(true, false, false)
  34.       end
  35.     end
  36.   end
  37. end
Expand to see the code.


Extra Windows:
  1. #===============================================================================
  2. # Extra Windows Snippet
  3. # By Jet10985
  4. # Inspired by Modern Algebra
  5. #===============================================================================
  6. # This snippet allows you to add more windows to the main menu that will give
  7. # the player more detail into what they have accomplished while playing.
  8. # This script has: 5 customization options.
  9. #===============================================================================
  10.  
  11. module Extra_Window
  12.  
  13.   GOLD_ICON = 147  # The icon that appears in the gold window
  14.   PLAY_TIME_ICON = 188  # The icon that appears in the PlayTime window      
  15.   STEP_COUNTER_ICON = 48 # The icon that appears in the Step Counter window      
  16.   LOCATION_ICON = 153 # The icon that appears in the Location window
  17.  
  18.   #---------------------------------------------------------------------------
  19.   # Here is where you decide what windows actually appear. Here is the list:
  20.   # You can input numbers 0, 1, 2, and 3. always have a comma and space
  21.   # between numbers.
  22.   # 0 = Gold Window
  23.   # 1 = StepCount Window
  24.   # 2 = Location Window
  25.   # 3 = PlayTime Window
  26.   #---------------------------------------------------------------------------
  27.   EXTRA_WINDOWS = [0, 2]
  28.  
  29. end
  30.  
  31. #===============================================================================
  32. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  33. #===============================================================================
  34. class Game_System
  35.  
  36.   include Extra_Window
  37.  
  38.   attr_reader :extra_windows
  39.  
  40.   alias jet7812_initialize initialize unless $@
  41.   def initialize(*args)
  42.     @extra_windows = EXTRA_WINDOWS
  43.     jet7812_initialize(*args)
  44.   end
  45. end
  46. #-------------------------------------------------------------------------------
  47. class Game_Interpreter
  48.  
  49.   def add_optional_window(id)
  50.     $game_system.extra_windows.push(id) unless $game_system.extra_windows.include?(id)
  51.   end
  52.  
  53.   def remove_optional_window(id)
  54.     $game_system.extra_windows.delete(id)
  55.   end
  56. end
  57. #-------------------------------------------------------------------------------
  58. class Window_PlayTime < Window_Base
  59.  
  60.   include Extra_Window
  61.  
  62.   def initialize(x, y)
  63.     super(x, y, 160, 32 + WLH)
  64.     refresh
  65.   end
  66.  
  67.   def refresh
  68.     self.contents.clear
  69.     x, qe = 0, contents.width
  70.     if PLAY_TIME_ICON >= 0
  71.       draw_icon(PLAY_TIME_ICON, x, 0)
  72.       x += 24
  73.       qe -= 24
  74.     end
  75.     @total_sec = Graphics.frame_count / Graphics.frame_rate
  76.     hour = @total_sec / 60 / 60
  77.     min = @total_sec / 60 % 60
  78.     sec = @total_sec % 60
  79.     text = sprintf("%02d:%02d:%02d", hour, min, sec)
  80.     self.contents.font.color = normal_color
  81.     self.contents.draw_text(x, 0, qe, WLH, text, 2)
  82.   end
  83.  
  84.   def update
  85.     super
  86.     if Graphics.frame_count / Graphics.frame_rate != @total_sec
  87.       refresh
  88.     end
  89.   end
  90. end
  91. #-------------------------------------------------------------------------------
  92. class Window_StepCount < Window_Base
  93.  
  94.   include Extra_Window
  95.  
  96.   def initialize(x, y)
  97.     super(x, y, 160, 32 + WLH)
  98.     x, qe = 0, contents.width
  99.     if STEP_COUNTER_ICON >= 0
  100.       draw_icon (STEP_COUNTER_ICON, x, 0)
  101.       x += 24
  102.       qe -= 24
  103.     end
  104.     contents.font.color = normal_color
  105.     contents.draw_text (x, 0, qe, WLH, $game_party.steps.to_s, 2)
  106.   end
  107. end
  108. #-------------------------------------------------------------------------------
  109. class Window_Gold
  110.  
  111.   include Extra_Window
  112.  
  113.   def draw_currency_value(value, x, y, width, *args)
  114.     if GOLD_ICON >= 0
  115.       draw_icon(GOLD_ICON, x, y)
  116.       x += 24
  117.       width -= 24
  118.     end
  119.     super(value, x, y, width, *args)
  120.   end
  121. end
  122. #-------------------------------------------------------------------------------
  123. class Window_Location < Window_Base
  124.  
  125.   include Extra_Window
  126.  
  127.   def initialize(x, y)
  128.     height = 32 + WLH
  129.     y -= height
  130.     super(x, y, 160, height)
  131.     x, qe = 0, contents.width
  132.     if LOCATION_ICON >= 0
  133.       draw_icon(LOCATION_ICON, x, 0)
  134.       x += 24
  135.       qe -= 24
  136.     end
  137.     map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
  138.     contents.font.color = normal_color
  139.     contents.draw_text(x, 0, qe, WLH, map_name, 2)
  140.   end
  141. end
  142. #-------------------------------------------------------------------------------
  143. class Scene_Menu < Scene_Base
  144.  
  145.   alias jet5839_start start unless $@
  146.   def start
  147.     jet5839_start
  148.     create_extra_windows
  149.   end
  150.  
  151.   alias jet2039_terminate terminate unless $@
  152.   def terminate
  153.     jet2039_terminate
  154.     @extra_windows.each { |window| window.dispose }
  155.   end
  156.  
  157.   alias jet1099_update update unless $@
  158.   def update
  159.     jet1099_update
  160.     if $game_system.extra_windows.include?(1)
  161.       @extra_windows[$game_system.extra_windows.index(1)].update
  162.     end
  163.   end
  164.  
  165.   def create_extra_windows
  166.     y = Graphics.height
  167.     @extra_windows = []
  168.     $game_system.extra_windows.each { |i|
  169.       window = extra_window(i)
  170.       y -= window.height
  171.       window.y = y
  172.       @extra_windows.push(window)
  173.     }
  174.   end
  175.  
  176.   def extra_window(index)
  177.     return case index
  178.     when 0 then Window_Gold.new(0, 0)
  179.     when 1 then Window_StepCount.new(0, 0)
  180.     when 2 then Window_Location.new(0, 0)
  181.     when 3 then Window_PlayTime.new(0, 0)
  182.     end
  183.   end
  184. end  
Expand to see the code.


Parameter Icons:
  1. #===============================================================================
  2. # Parameter Icons Snippet
  3. # By Jet10985
  4. #===============================================================================
  5. # This snippet allows you to add icons next to parameter names whenever they are
  6. # shownn in windows. Currently Incompatable with Enelvon's Luck and Resistance.
  7. # This script has: 4 customization options.
  8. #===============================================================================
  9.  
  10.  
  11. module ParamIcons
  12.  
  13.   ATK_ICON = 132 # Icon shown next to Attack
  14.  
  15.   DEF_ICON = 52 # Icon shown next to Defence
  16.  
  17.   AGI_ICON = 48 # Icon shown next to Agility
  18.  
  19.   SPI_ICON = 133 # Icon shown next to Spirit
  20. end
  21.  
  22. #===============================================================================
  23. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  24. #===============================================================================
  25. class Window_Base < Window
  26.  
  27. def draw_actor_parameter(actor, x, y, type)
  28.      case type
  29.     when 0
  30.       parameter_name = Vocab::atk
  31.       parameter_value = actor.atk
  32.       parameter_icon = ParamIcons::ATK_ICON
  33.     when 1
  34.       parameter_name = Vocab::def
  35.       parameter_value = actor.def
  36.       parameter_icon = ParamIcons::DEF_ICON
  37.     when 2
  38.       parameter_name = Vocab::spi
  39.       parameter_value = actor.spi
  40.       parameter_icon = ParamIcons::SPI_ICON
  41.     when 3
  42.       parameter_name = Vocab::agi
  43.       parameter_value = actor.agi
  44.       parameter_icon = ParamIcons::AGI_ICON
  45.     end
  46.     self.contents.font.color = system_color
  47.     self.contents.draw_text(x, y, 120, WLH, parameter_name)
  48.     self.contents.font.color = normal_color
  49.     self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
  50.     self.draw_icon(parameter_icon, x - 25, y)
  51.   end
  52. end
Expand to see the code.


Success Bar:
  1. #===============================================================================
  2. # Success Bar Snippet
  3. # By Jet10985
  4. # Original Code by DarkLich (Reinorpg.com)
  5. #===============================================================================
  6. # This snippet allows you to call a success bar, a bar with an area of success
  7. # you have to hit by pressing the designated button.
  8. # This script has: 4 customization options.
  9. #===============================================================================
  10. # To create a success bar., you should use the command 'call script' with
  11. # Following code ==>> $scene = Scene_Bar.new(F, S, B, X, W)
  12. # F = How fast the targeter takes to go across the entire bar.
  13. # S = This is what switch wll be turned on/off if they succeed.
  14. # B = This is what switch will be turn on/off if they fail. Set to 0 if not wanted.
  15. # X = Where the success area is located.
  16. # W = How wide the success area is.
  17. #===============================================================================
  18.  
  19. module SuccessBar
  20.  
  21.   BACK_COLOR = Color.new(255, 255, 255) # The color of the bar background.
  22.  
  23.   SUCCESS_AREA_COLOR = Color.new(0, 255, 0) # The color of the area of success.
  24.  
  25.   TARGETER_COLOR = Color.new(255, 0, 0) # The color of the targeter.
  26.  
  27.   INPUT_BUTTON = Input::C # The button you have to press to stop the targetter.
  28.  
  29. end
  30.  
  31. #===============================================================================
  32. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  33. #===============================================================================
  34. class Window_Bar < Window_Base
  35.  
  36.   include SuccessBar
  37.  
  38.   attr_accessor :rx
  39.  
  40.   def initialize(xa, barwidth)
  41.     super(152, 192, 282, 50)
  42.     self.opacity = 0
  43.     @rx = 0
  44.     @xa = xa
  45.     @bw = barwidth
  46.     refresh
  47.   end
  48.  
  49.   def refresh
  50.     self.contents.clear
  51.     self.contents.fill_rect(@rx, 0, 10, 18, TARGETER_COLOR)
  52.     self.contents.fill_rect(0, 5, 250, 8, BACK_COLOR)
  53.     self.contents.fill_rect(@xa, 5, @bw, 8, SUCCESS_AREA_COLOR)
  54.   end
  55.  
  56.   def check
  57.     if @rx >= @xa && @rx + 10 <= @bw + @xa
  58.       return true
  59.     else
  60.       return false
  61.     end
  62.   end
  63. end
  64.  
  65. class Scene_Bar < Scene_Base
  66.  
  67.   include SuccessBar
  68.  
  69.   def initialize(speed, switch, badswitch, x, barwidth)
  70.     @direita = true
  71.     @speed = speed
  72.     @switch = switch
  73.     @bswitch = badswitch
  74.     @x = x
  75.     @b = barwidth
  76.   end
  77.  
  78.   def start
  79.     create_bg
  80.     @bar = Window_Bar.new(@x, @b)
  81.   end  
  82.  
  83.   def terminate
  84.     @bar.dispose
  85.     @back.dispose
  86.   end
  87.  
  88.   def create_bg
  89.     source = $game_temp.background_bitmap
  90.     bitmap = Bitmap.new(544, 416)
  91.     bitmap.stretch_blt(bitmap.rect, source, source.rect)
  92.     @back = Sprite.new(@viewport1)
  93.     @back.bitmap = bitmap
  94.   end
  95.  
  96.   def update
  97.     @bar.refresh
  98.     if @bar.rx >= 240
  99.       @direita = false
  100.     elsif @bar.rx <= 0
  101.       @direita = true
  102.     end
  103.     if @direita
  104.       @bar.rx += @speed
  105.     else
  106.       @bar.rx -= @speed
  107.     end
  108.     if Input.trigger?(INPUT_BUTTON)
  109.       if @bar.check
  110.         $game_switches[@switch] = !$game_switches[@switch]
  111.       else
  112.       if @bswitch > 0
  113.         $game_switches[@bswitch] = !$game_switches[@bswitch]
  114.       end
  115.         $scene = Scene_Map.new
  116.         Sound.play_buzzer
  117.       end
  118.     end
  119.   end
  120. end
Expand to see the code.


Change Actor Options:
  1. #===============================================================================
  2. # Change Actor Options Snippet v.2
  3. # By Jet10985
  4. # Inspired and partially written by: BigEd781
  5. #===============================================================================
  6. # This snippet allows you to change the options of an actor such as auto battle,
  7. # super guard, and two swords style.
  8. # This script has: No customization options.
  9. #===============================================================================
  10. # To change the option use this line of code:
  11. # change_trait(actor, option)
  12. #   trait = the option you want to change. this can be replaced by:
  13. #   two_swords_style, auto_battle, super_guard, fix_equipment, parmacology
  14. #   MAKE SURE that you include the "_" in the ones that show it.
  15. #   option = true or false. True give the actor the trait, false takes it away.
  16. #   actor = id of actor trait you want to change. remember, it starts at 0.
  17. #===============================================================================
  18.  
  19. #===============================================================================
  20. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  21. #===============================================================================
  22.  
  23. class Game_Interpreter
  24.  
  25.   def change_two_swords_style(actor, option)
  26.     $game_party.members[actor].actor.two_swords_style = option
  27.   end
  28.  
  29.   def change_super_guard(actor, option)
  30.     $game_party.members[actor].actor.super_guard = option
  31.   end
  32.  
  33.   def change_fix_equipment(actor, option)
  34.     $game_party.members[actor].actor.fix_equipment = option
  35.   end
  36.  
  37.   def change_pharmacology(actor, option)
  38.     $game_party.members[actor].actor.pharmacology = option
  39.   end
  40.  
  41.   def change_auto_battle(actor, option)
  42.     $game_party.members[actor].actor.auto_battle = option
  43.   end
  44.   end
Expand to see the code.


No Actor EXP:
  1. #===============================================================================
  2. # No Actor EXP Snippet
  3. # By Jet10985
  4. # Help by: OriginalWij
  5. #===============================================================================
  6. # This snippet allows you to define actors throughout the game that will not
  7. # gain exp AT ALL. Note: They can still level up trough the event command.
  8. # This script has: 1 customization option.
  9. #===============================================================================
  10. =begin
  11.  
  12. Adding Actors:
  13. To add Actors to the list of actors that don't gain exp use:
  14.  
  15. no_exp_gain(actor)
  16.  
  17. where actor is the id of the actor you don't want gaining exp.
  18.  
  19. Removing Actors:
  20. To allow an actor to gain exp again, use:
  21.  
  22. yes_exp_gain(actor)
  23.  
  24. where actor is the id of the actor you want to gain exp again.
  25. =end
  26.  
  27. module NoActorEXP
  28.  
  29.   # These are actors that will not gain exp by default. They
  30.   # can be removed from here by using the yes_exp_gain(actor)
  31.   NO_ACTOR_EXP = [6, 7, 8]
  32.                      
  33. end
  34.  
  35. #===============================================================================
  36. # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
  37. #===============================================================================
  38. class Game_Actor
  39.  
  40.   include NoActorEXP
  41.  
  42.   alias jet1999_change_exp change_exp unless $@
  43.   def change_exp (*args)
  44.     if NO_ACTOR_EXP != nil
  45.       jet1999_change_exp(*args) unless NO_ACTOR_EXP.include?(@actor_id)
  46.     end
  47.   end
  48. end
  49.  
  50. class Game_System
  51.  
  52.   include NoActorEXP
  53.  
  54.   attr_accessor :no_exp_actors
  55.  
  56.   alias jet1092_initialize initialize unless $@
  57.   def initialize
  58.     jet1092_initialize
  59.     @no_exp_actors = NO_ACTOR_EXP.clone
  60.   end
  61. end
  62.  
  63. class Game_Interpreter
  64.  
  65.   include NoActorEXP
  66.  
  67.   def no_exp_gain(actor)
  68.     if $game_system.no_exp_actors != nil
  69.       $game_system.no_exp_actors[$game_system.no_exp_actors.size] = actor unless $game_system.no_exp_actors.include?(actor)
  70.     end
  71.   end
  72.  
  73.   def yes_exp_gain(actor)
  74.     if $game_system.no_exp_actors != nil
  75.       $game_system.no_exp_actors.delete(actor) if $game_system.no_exp_actors.include?(actor)
  76.     end
  77.   end
  78. end
Expand to see the code.


Change Windowskin:
  1. #===============================================================================
  2. # Change WindowSkin Snippet
  3. # By Jet10985
  4. # Original Code by: Woratana
  5. #===============================================================================
  6. # This snippet allows you to change the windowskin of all the windows with a
  7. # simple script call in-game.
  8. # This script has: No customization options.
  9. #===============================================================================
  10. # To change the windowskin, use this code:
  11. # change_skin(skinname)
  12. #   skinname = the name of the windowskin file.
  13. #   Please note: The windowskins must all be in the Graphics/system folder.
  14. #===============================================================================
  15.  
  16.  
  17. class Window_Base
  18.  
  19.   alias jet2888_initialize initialize unless $@
  20.   def initialize(*args)
  21.     jet2888_initialize(*args)
  22.     self.windowskin = Cache.system($game_system.windowskin)
  23.     @wskin = $game_system.windowskin
  24.   end
  25.  
  26.   alias jet1899_update update unless $@
  27.   def update
  28.     jet1899_update
  29.     if @wskin != $game_system.windowskin
  30.       self.windowskin = Cache.system($game_system.windowskin)
  31.       @wskin = $game_system.windowskin
  32.     end
  33.   end
  34. end
  35.  
  36. class Game_System
  37.  
  38.   attr_accessor :windowskin
  39.  
  40.   alias jet4729_initialize initialize unless $@
  41.   def initialize
  42.     jet4729_initialize
  43.     @windowskin = "Window"
  44.   end
  45. end
  46.  
  47. class Game_Interpreter
  48.  
  49.   def change_skin(skinname)
  50.     $game_system.windowskin = skinname
  51.   end
  52. end
Expand to see the code.


Cheat System:
  1. #===============================================================================
  2. # Cheat System
  3. # By Jet10985
  4. # Help by: Yanfly
  5. #===============================================================================
  6. # This script is not open for distribution to other sites without permission
  7. # from me, Jet10985. Please credit me if you use this script.
  8. #===============================================================================
  9. # This script will add a cheat system
  10. #
  11. # This script has: 6 customization options.
  12. #===============================================================================
  13.  
  14. =begin
  15. The cheat name and the common event id match in the 2 different arrays.
  16. By default, if they put in "god" as a cheat, common event 1 would occur.
  17. If they put "cash" in as a cheat, then common event 2 would occur.
  18.  
  19. To add cheats, use a comma and write the cheat in quotations in the first array.
  20. Then, write the id of the common event that will occur in the second array.
  21.  
  22. NOTE: Each cheat can only be used 1 time.
  23.  
  24. If you decide to add a menu option, you may disable the entering of cheats
  25. by using this command in a script event:
  26.  
  27. change_cheat_access(option)
  28.  
  29. Where option can be true or false.
  30. true = They CAN'T enter cheats
  31. false = They CAN eneter cheats.
  32. =end
  33.  
  34.  
  35. module CheatSystem
  36.  
  37.   CHEAT_NAME = ["god", "cash", "wowza"] # These are the cheats themselves.
  38.  
  39.   CHEAT_EVENT = [1, 2, 3] # These are the common events the cheats correpsond to.
  40.  
  41.   ACTOR_ID = 8 # This is the actor id whose name will be used for cheats.
  42.  
  43.   ADD_MENU_OPTION = true # Add a menu option for the cheats?
  44.  
  45.   CHEATS_NAME = "Cheats" # This is the name of the Cheats option.
  46.  
  47.   MENU_INDEX = 5 #This is where to add the Cheats menu as a option.
  48.  
  49. end
  50.  
  51. class Game_System
  52.  
  53.   attr_accessor :cheat_names
  54.   attr_accessor :cheat_event
  55.   attr_accessor :used_cheats
  56.   attr_accessor :cheats_disabled
  57.  
  58. end
  59.  
  60. class Scene_Name
  61.  
  62.   include CheatSystem
  63.  
  64.   alias jet8593_terminate terminate unless $@
  65.   def terminate
  66.     jet8593_terminate
  67.     cheat_update
  68.   end
  69.  
  70.   def cheat_update
  71.     $game_system.cheat_names = CHEAT_NAME.clone if $game_system.cheat_names.nil?
  72.     $game_system.cheat_event = CHEAT_EVENT.clone if $game_system.cheat_event.nil?
  73.     $game_system.used_cheats = [] if $game_system.used_cheats.nil?
  74.     for i in 0...$game_system.cheat_names.size
  75.       if $game_actors[ACTOR_ID].name == $game_system.cheat_names[i]
  76.         $game_temp.common_event_id = $game_system.cheat_event[i] unless $game_system.used_cheats.include?(i)
  77.         $game_system.used_cheats.push(i)
  78.       end
  79.     end
  80.   end
  81. end
  82.  
  83. class Game_Interpreter
  84.  
  85.   def change_cheat_access(option)
  86.     $game_system.cheats_disabled = option
  87.   end
  88. end
  89.  
  90. if CheatSystem::ADD_MENU_OPTION
  91. class Window_Command < Window_Selectable
  92.     alias jet8590_initialize initialize unless $@
  93.     alias jet9743_draw_item draw_item unless $@
  94.  
  95.   def initialize(*args)
  96.     @disabled_commands = []
  97.     jet8590_initialize(*args)
  98.   end
  99.  
  100.   def draw_item(*args)
  101.     jet9743_draw_item(*args)
  102.     @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true
  103.   end
  104.  
  105.   def ins_command(index, text)
  106.     @commands.insert(index, text)
  107.     @disabled_commands.insert(index, nil)
  108.     old_disabled_commands = @disabled_commands.dup
  109.     self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32
  110.     @item_max = @commands.size
  111.     create_contents            
  112.     refresh                    
  113.     old_disabled_commands.each_index do |i|
  114.       if !old_disabled_commands[i].nil?
  115.         draw_item(i, false)    
  116.       end
  117.     end
  118.   end
  119.  
  120.   def add_command(text)
  121.     ins_command(@commands.size, text)
  122.   end
  123. end
  124.  
  125. class Scene_Menu < Scene_Base  
  126.  
  127.   include CheatSystem
  128.  
  129.     def sort_newcommand
  130.       @sorted_command ||= []
  131.       newcommand = @newcommand - @sorted_command
  132.       newcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i }
  133.       @command_window.index = @menu_index
  134.       @sorted_command = @sorted_command + @newcommand
  135.     end
  136.    
  137.     alias jet8940_create_command_window create_command_window unless $@
  138.     def create_command_window(*args)
  139.       jet8940_create_command_window(*args)
  140.       @command_window.ins_command(MENU_INDEX, CHEATS_NAME)
  141.       @newcommand ||= []
  142.       @newcommand << MENU_INDEX
  143.       sort_newcommand
  144.       if $game_system.cheats_disabled            
  145.         @command_window.draw_item(MENU_INDEX, false)
  146.       end
  147.     end
  148.    
  149.     alias jet8905_update_command_selection update_command_selection unless $@
  150.     def update_command_selection(*args)
  151.       @menucomorpg_change = false
  152.       if Input.trigger?(Input::C) && @command_window.index == MENU_INDEX
  153.         if $game_system.cheats_disabled
  154.         Sound.play_buzzer
  155.         return
  156.       end
  157.       Sound.play_decision
  158.       $game_temp.name_actor_id = ACTOR_ID
  159.       $game_temp.name_max_char = 8
  160.       $scene = Scene_Name.new
  161.       else
  162.         if Input.trigger?(Input::C) && @command_window.index >
  163.         MENU_INDEX
  164.           @command_window.index -= 1
  165.           @menucomorpg_change = true
  166.         end
  167.         jet8905_update_command_selection(*args)
  168.       end
  169.       @command_window.index += 1 if @menucomorpg_change
  170.     end
  171.    
  172.     alias jet1234_update_actor_selection update_actor_selection unless $@
  173.     def update_actor_selection(*args)
  174.       @menucomorpg_change = false
  175.       if Input.trigger?(Input::C) && @command_window.index >
  176.       MENU_INDEX
  177.         @command_window.index -= 1
  178.         @menucomorpg_change = true
  179.       end
  180.       jet1234_update_actor_selection(*args)
  181.       @command_window.index += 1 if @menucomorpg_change
  182.     end
  183.   end
  184. end
Expand to see the code.


CREDIT IF USED!

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=69325