Modifications for Jet's Mouse System, plus another thing

Hello, I've been modifying VX Ace to work like a fixed-screen adventure game system. I know I'm probably crazy (or not) but it's ALMOST there.
 
I am not a programmer though I can get the gist of some code. Currently I'm trying to figure out something with Jet's mouse system, and I've been searching for a few hours before I decided to ask directly.
 
http://pastebin.com/raw.php?i=3KPTNr7z
 
1) Can I change the mouse cursor icon with a script call? I have common events set up for the current item-in-use and would like to change the mouse cursor to indicate that an item is being handled rather than the normal cursor. (Also, I'd LIKE it to switch back to the default cursor when in the save/load menus for cleanness' sake, which I THINK I could do but might need another script call. Can a common event be called when the save or load menus are accessed?)
 
2) While I'm at it, can this script be modified to click the center of the cursor instead of the top left corner?
 
3) The other script is this simple item menu, and how it interacts with mouse usage:
 

Spoiler
 
Code:
#==============================================================================# ** Window_MenuItemCategory#==============================================================================class Window_ItemCommand < Window_ItemCategory  #--------------------------------------------------------------------------  # * Create Command List  #--------------------------------------------------------------------------  def make_command_list    #add_command(Vocab::item,     :item)    add_command(Vocab::key_item, :key_item)    add_command(Vocab::save,     :save, save_enabled)    add_command("Load",          :load)    add_command(Vocab::game_end, :game_end)  end  #--------------------------------------------------------------------------  # * Get Activation State of Save  #--------------------------------------------------------------------------  def save_enabled    !$game_system.save_disabled  endend#==============================================================================# ** Scene_Map#==============================================================================class Scene_Map < Scene_Base  #--------------------------------------------------------------------------  # * Call Menu Screen  #--------------------------------------------------------------------------  def call_menu    Sound.play_ok    SceneManager.call(Scene_Item)  endend#==============================================================================# ** Scene_Item#==============================================================================class Scene_Item < Scene_ItemBase  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    super    return on_cancel if Input.trigger?(:  end  #--------------------------------------------------------------------------  # * Create Category Window  #--------------------------------------------------------------------------  def create_category_window    @category_window = Window_ItemCommand.new    @category_window.viewport = @viewport    @category_window.help_window = @help_window    @category_window.y = @help_window.height    @category_window.set_handler(:ok,     method(:on_category_ok))  end  #--------------------------------------------------------------------------  # * [Cancel]  #--------------------------------------------------------------------------  def on_cancel    Sound.play_cancel    return_scene  end  #--------------------------------------------------------------------------  # * Category [OK]  #--------------------------------------------------------------------------  def on_category_ok    case @category_window.current_symbol    when :item, :key_item      @item_window.activate      @item_window.select_last    when :save      SceneManager.call(Scene_Save)    when :load      SceneManager.call(Scene_Load)    when :game_end      SceneManager.call(Scene_End)    end  endend
 
This is super nitpicky, BUT
 
With the mouse code the idea is to right-click to access the inventory. When this happens, the inventory is shown but isn't highlighted, you have to left click on the screen to activate the Key Items button in order to access the inventory. When that happens, IF you have previously selected an item[EDIT: I was wrong, first item is indeed selected by default], then that item is highlighted, and the mouse has to be moved again in order to actually click on the item it is hovering over.
 
If this could be fixed in one of two ways I would appreciate it: Either so that previously selected items are NOT highlighted on return to the menu (workable), or have it so that going to the menu automatically has the Key Items page selected so that the inventory is already active and so only has to be clicked once (preferable)
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
I'm sorry. I spent half an hour looking around for the correct forum and still wasn't sure when I posted
that's okay. We give people a bit of time to find their way around 🙂
2) At the end of create_category_window add the line

@category_window.select(0)It may work
Unfortunately that didn't work. I did see what'd happen if I set it to 1, and going into the menu it had Save highlighted, but highlighting the top option seems to be all that does
Then I misunderstood you. Sorry!

1) I think it is

Code:
Mouse.set_cursor(your_icon_index)
but I'm not SURE.
Then I misunderstood you. Sorry!

1) I think it is

Mouse.set_cursor(your_icon_index)but I'm not SURE.
This seems to work from inside the script editor (Putting it in the simple menu system makes it change to the selected icon while only in the menu, which is neat) but it doesn't seem to work from inside events.

I would also accept for #1 having a script inside the script editor change the mouse cursor based on the numeric value of a specific variable if that's possible. (Otherwise I've been rigging common events to do that kind of thing.)
Maybe :

CURSOR_ICONS = {  0 => 154, # <== When variable is 0, the icon is 154  1 => 382, # <== When variable is 1, the icon is 382  2 => 93,   # <== When variable is 2, the icon is 93  # And so on... but don't forget the comma after every element!}class Scene_Basealias :kocka_random_alias_update_8x7B :update  def update    kocka_random_alias_update_8x7B    @last_cursor_icon = 0 unless @last_cursor_icon    Mouse.set_cursor(CURSOR_ICONS[$game_variables[your_variable_id]]) if $game_variables[your_variable_id] != @last_cursor_icon    @last_cursor_icon = $game_variables[your_variable_id] # <== Don't forget to change your_variable_id!   endend
Warning : This code may BUG UP your game, if it even works

And for the script call try :

Code:
class Game_Interpreter  def change_cursor_icon(icon)    Mouse.set_cursor(icon)  endend
Okay I've had time to try this.

I'm not sure where to put the script you gave me so I put it in a file after Jet's mouse script

Apparently, it WILL change the cursor, but only while the item select screen is active, otherwise it returns to the default cursor defined in Jet's mouse script

For the script call I keep getting a syntax error. What's the format that goes in "icon"? Is it supposed to refer to the script you provided?
Spoiler
module Jet  module MouseSystem    VARIABLE_ID = 2    CURSOR_ICONS = {      0 => 156, # <== When variable is 0, the icon is 154      1 => 382, # <== When variable is 1, the icon is 382      2 => 93,   # <== When variable is 2, the icon is 93      # And so on... but don't forget the comma after every element!    }  endend class Scene_Base  include Jet::MouseSystem  alias :kocka_random_alias_update_8x7B :update  def update    kocka_random_alias_update_8x7B    Mouse.set_cache(CURSOR_ICONS[$game_variables[VARIABLE_ID]])  endend module Mouse  def self.set_cache(*args)    (@cursor ||= Sprite_Cursor.new).set_cache(*args)  end  class Sprite_Cursor < Sprite    def set_cache(i)      bitmap = Bitmap.new(24, 24)      bitmap.blt(0, 0, Cache.system("Iconset"), Rect.new(i % 16 * 24, i / 16 * 24, 24, 24), 255)      @bitmap_cache = bitmap    end  endend
Paste this code below Jet Mouse System (and delete the old one)

So, first set up your CURSOR_ICONS hash, and then you'll be able to change the icon with variable

But, if you want to change the cursor icon with script call use this code instead :

Spoiler
module Mouse  def self.set_cache(*args)    (@cursor ||= Sprite_Cursor.new).set_cache(*args)  end  class Sprite_Cursor < Sprite    def set_cache(i)      bitmap = Bitmap.new(24, 24)      bitmap.blt(0, 0, Cache.system("Iconset"), Rect.new(i % 16 * 24, i / 16 * 24, 24, 24), 255)      @bitmap_cache = bitmap    end  endendclass Game_Interpreter  def change_cursor_icon(icon)    Mouse.set_cache(icon)  endend
And then do the script call to change_cursor_icon(icon) where icon is icon iD

I don't know why would you need both script call and variable changer, when you can simply change the variable, and the cursor will change himself.
This works! Thanks a bunch, sorry it took me a bit to check it (Been shuffling my life around lately) but that knocks out item 1. I probably won't need a script call to change the mouse cursor with the script addendum, it was just an either/or.

As a side note, this has the effect of making the main menu cursor correlate to whatever was defined in Jet's script, and it changes once the game begins. Small bug: the cursor stays how it was when I back out to the title screen. I think I can change this by zeroing out the variable on save/load . . .

Original thread: https://forums.rpgmakerweb.com/threads/modifications-for-jets-mouse-system-plus-another-thing.43552/