ALEWORKS INPUT MOUSE SPRITE ADD-ON
<For use with Aleworks Input Mouse 2.03> Version: 1.2
Introduction
This script is an add-on to vgvgf's AleWorks Input Module (or AIM for short).
While the AIM system was relatively complete and let one use their system's mouse, entering full-screen mode with RPGMaker XP would eliminate the mouse sprite. Essentially, you would only have the default system sprite while in a windowed mode.
This system does not allow you to use the system mouse while in full-screen mode. Rather, it erases/hides the system mouse sprite upon execution, and replaces the sprite with one within a new Graphics\Mouse folder which can be cached. Said sprite will be visible in both full-screen and windowed modes.
Features
Hides the old mouse cursor
Creates a new Sprite_Mouse class which generates a new mouse cursor
The new mouse will be visible in both full-screen and windowed modes
Tracks the mouse within the Input module for simple menu use
Screenshots
A screenshot? It would show just a mouse cursor IN the game window.
Script
"script"
Code:
#==============================================================================
# ** ALEWORKS INPUT MOUSE SPRITE ADD-ON
#------------------------------------------------------------------------------
# by DerVVulfman
# Version 1.2 (2023/09/21) YYYY/MM/DD
# RPGMaker XP & VGVGF'S AIM 2.03 REQUIRED (not AWorks)
#==============================================================================
#
# PURPOSE & FUNCTION
#
# This script is an add-on to VGVGF's AleWorks Input Module (or AIM for short).
#
# While the AIM system was relatively complete and let one use their system's
# mouse, entering full-screen mode with RPGMaker XP would eliminate the mouse
# sprite. Essentially, you would only have the default system sprite while in
# a windowed mode.
#
# This system does not allow you to use the system mouse while in full-screen
# mode. Rather, it erases/hides the system mouse sprite upon execution, and
# replaces the sprite with one within a new Graphics\Mouse folder which can be
# cached. Said sprite will be visible in both full-screen and windowed modes.
#
#
#==============================================================================
#=============================================================================
# ** Module Aleworks Config (Named after the system)
#=============================================================================
module Aleworks
# Default Cursor in Mouse folder
BASE_MOUSE_CURSOR = "Cursor"
# Z-Depth of cursor
MOUSE_CURSOR_DEPTH = 12000
end
#==============================================================================
# ** Input
#------------------------------------------------------------------------------
# A module that handles input data from a gamepad or keyboard. This update
# adds old mouse sprite removal and tracking for users of vgvgf's AIM 2.03.
#==============================================================================
module Input
#-------------------------------------------------------------------------
# * APIs Definitions
#-------------------------------------------------------------------------
@cursor_show = Win32API.new('user32', 'ShowCursor', 'L', 'i')
#-------------------------------------------------------------------------
# * Alias Listings
#-------------------------------------------------------------------------
class << Input
alias old_update update unless $@
end
#--------------------------------------------------------------------------
# * Hide the PC's default mouse using the Win32API call
#--------------------------------------------------------------------------
def Input.hide_os_mouse
@cursor_show.call(0)
end
#--------------------------------------------------------------------------
# * Frame Update (handling the update of the custom mouse sprite)
#--------------------------------------------------------------------------
def self.update
old_update
$mouse_sprite.update
end
end
#==============================================================================
# ** RPG::Cache
#------------------------------------------------------------------------------
# Data class that handles the creation and retention of bitmaps within the
# RPG module.
#==============================================================================
module RPG::Cache
#--------------------------------------------------------------------------
# * Load Cached Resource (mouse)
# filename : filename
# hue : hue
#--------------------------------------------------------------------------
def self.mouse(filename, hue=0)
begin
# Load filename as normal
self.load_bitmap("Graphics/Mouse/", filename, hue)
rescue
# Load/create 32x32 blank if filename not found
self.load_bitmap("Graphics/Mouse/", "", hue)
end
end
end
#==============================================================================
# ** Sprite_Mouse
#------------------------------------------------------------------------------
# This sprite is used to display the mouse.
#==============================================================================
class Sprite_Mouse < RPG::Sprite
#--------------------------------------------------------------------------
# * Object Initialization
# viewport : viewport
#--------------------------------------------------------------------------
def initialize
super
update_icon_bitmap(Aleworks::BASE_MOUSE_CURSOR)
Input.hide_os_mouse
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
self.bitmap.dispose unless self.bitmap.nil?
super
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_visible?
return if Input.mouse_x?.nil?
return if Input.mouse_y?.nil?
self.x = Input.mouse_x?
self.y = Input.mouse_y?
self.z = Aleworks::MOUSE_CURSOR_DEPTH
update_icon
end
#--------------------------------------------------------------------------
# * Frame Update (when mouse arrow is/isn't in the window)
#--------------------------------------------------------------------------
def update_visible?
visible = true
visible = false if Input.mouse_x?.nil? || Input.mouse_y?.nil?
self.visible = visible
end
#--------------------------------------------------------------------------
# * Frame Update (When detecting if mouse over map event)
#--------------------------------------------------------------------------
def update_icon
update_icon_bitmap(Aleworks::BASE_MOUSE_CURSOR)
end
#--------------------------------------------------------------------------
# * Frame Update (When changing mouse cursor)
#--------------------------------------------------------------------------
def update_icon_bitmap(mouse_cursor)
cursor = mouse_cursor
return if @old_cursor == cursor
@old_cursor = cursor
self.bitmap = RPG::Cache.mouse(cursor)
end
end
# Just add the mouse globally
$mouse_sprite = Sprite_Mouse.new
Instructions
Generally, place this below vgvgf's Aleworks collection of scripts and above Main for this to work.
REQUIRES: You include a .png file within a new Graphics\Mouse folder, and have its name match that within the script's configuration.
FAQ
This is stripped down from other works that I have, and quite similar to the MKXP mouse script from last week. However, it uses Win32API calls that MKXP cannot support.
Compatibility
For use specifically with the Aleworks Input package, and not the AWorks system which requires an accompanying .dll.
Credits and Thanks
To Aleworks/vgvgf who made the initial system, but had not introduced a separate mouse sprite generating system.
Welcome dear readers to the latest issue of the Weekly Gazette! Here in the Gazette, we give you the news in brief of what occurred in the past week as well as provide any news happening in Save-Point itself
Official Area
Announcements and Updates
To promote healthy interaction between those needing help and those that come to their aid, the support boards now each have a Creating and Answering Requests thread stickied to each. It brings up some basics such as how long to wait before bumping a request, naming one's request, and more.
General Chat
Old games and things of the past was on the mind of kyonides this week. He decided to view clips from older games and dusted off the footage of old SimCity game from 1999. To his shock, the simulated world-building game simulated the September 11, 2001 destruction of the Twin Towers.
This week's News of the World covered illegal immigrants in New York, Staten Island residents demanding to secede from New York City while President Biden creates plans to send immigrants to outlying areas in New York. The southern U.S. border hit this week's news as well, finding migrants from Uzbekistan had support from ISIS, and gunfire erupted as a Texas Guardsman protected immigrants from cartel gunman. Calling China's actions contentious may be an understatement, claiming large portions of India as theirs, defending the Uyghur genocide, and using the military to protect their illegal fishing practices. The loss of Margaritaville's Jimmy Buffet, Chicago actively suing automakers for the rise in car theft in its city (that is NOT a typo), the Nobel Foundation banning Iranian, Russian and Belarus ambassadors, Italy possibly blowing off China's Belt and Road initiative, Russia threatening the use of nuclear weapons if Ukraine takes back its land (again), and more hit this week's news.
Tech Talk
This week's News of the Cyber World began when it was revealed that U.S. President Biden had roughly 5000 eMail aliases to conduct family business, such bringing even more calls for an impeachment inquiry. It wasn't the best week for Musk and electric cars as the latest Tesla self-driving car ran a red light during a test, and authorities put out a warning that electric vehicles can burst into flames when exposed to salt water. AI is still appearing to be a problem, creating political messages despite rules changes, and may result in possible AI content takeover by 2026. One set of computer hackers actually taking down another group's malicious spyware, telephone scam centers using the enslaved rather than employees, and much more hit this week's cybernews.
Games Development
Development Discussion
DerVVulfman is doing more coding, if you wondered What's up with RMers like him. He only just discovered some neglected code within RPGMaker XP's initial script library. After that, he showed off his work on windows-like listboxes and dropdown scrolling lists with a short and low quality .mp4 video attached to his post.
Complete Projects
It was Rave Heart's 3rd Anniversary. And commemorating the event, Starmage presented some adorable artwork by Berry B and a severely discounted price on Steam that lasted to the end of the week.
Upcoming Projects
Indeed, BlueSkies 3 is still being worked on. And this week, Starmage released a video which presents the hero fighting for their lives with the game's battle system.
Material Development
Tools
There was some buzz around the HiddenChest RGSS Player Executable by kyonides as DerVVulfman discovered that an earlier version of the Windows port did not suffer graphic issues experienced by the current edition. Howver, he noted that the current edition did have a bug-free mouse system which the earlier edition had not. There was also some back and forth regarding newer font handling options, added to cover RPGMaker VX and VXA functionality. But don't expect any upgrade or graphic repaired version for Windows any time soon as kyonides has become pretty busy,
Scripts Database
While the script garners the RPGMaker XP Script tag, the MKXP Compatible Mouse Add-on by DerVVulfman is a system that lets users of the MKXP take advantage of its built-in mouse support. MKXP is a replacement for RPGMaker's engine, open source but without support for Win32API handling.
Designed for RPGMaker VXAce, kyonides crafted TextColorTags to let users single out key words in messages to have their own specified color. The original version would only test a message for the first occurrence of a specified word. However, kyonides returned to corect that issue and his system will ensure that key words are always re-colored no matter how many there are within a message.
Resources Database
The artwork is not new. In fact, the content is downright old. However, DerVVulfman managed to find links to two resource dumps that were somehow lost. The lost RMVXP Gallery Files is a collection of all the material that was saved before the forum had lost the file upload system. Said content even predates our rebranding as Save-Point. Menawhile, the Pack of RMXP Phylomoritis.com resources are older still. It was this site that had a large number of early-era RPGMaker XP scripts that returned a number of lost features. But now, you can obtain all the characters, battlers and whatnot you need.
Creativity Section
Music and Audio
As he had done last week, Eric Matyas released another set of low-fidelity renders of the Shared Original Music he has been working so dilligently to provide. The new free tracks cover "Shattered Reality", "Shattered Mind", and a few other works that would fit in well with any thriller or horror game.
Art and Design
Inescapable allure amidst inescapable annihilation, this a description that one may find apt for the subject presented within Remi-chan's Neato Arty thread thing! Known originally as the Queen of Shadows, Remi-chan presents her in her final form, the Terminus Void herself. This celestial being is presented with an accompanying speed-draw.
Well, that's it for this week.
"As you get older, three things happen. The first is your memory goes, and I can’t remember the other two." - Sir Norman Wisdom
PROSPECTIVE GAZETEERS!
If you are the creator of a thread in Save-Point, you have the option of sending/writing your own entry into the Gazette. The Gazette accepts write-in announcements (which will be doublechecked). Likewise, the Gazette would welcome other content such as a comic-strip series, ongoing story arc, or the like.
Just PM DerVVulfman with the submissions. Submissions must be in by 10pm EST.
Since some forumer was having issues with some text color changing script of sorts, I decided to craft my own script so any window could change the color of certain texts only without using the color tags we all know after using the RM engines for years.
Code:
# These are the formats the Text Color Tags should follow:
Free for use in any game.
Due credit is mandatory.
Just keep in mind that nobody is forced to use any of my scripts or other people's.
If it doesn't suit your needs, don't use it.
That's it!
MKXP COMPATIBLE MOUSE ADD-on
<not an RPGMaker XP script but close> Version: 1.0
Introduction
MKXP, a replacement engine for RPGMaker XP, has built-in content to support mouse input. But it does not attach mouse input to the input class, generate a mouse cursor, nor deal with highlighting of menu options by way of the mouse. This script is a skeleton for users of MKXP or latter additions of HiddenChest (at least tested with 64bit Windows).
Features
Allows a new Graphics\Mouse folder for cashing the cursor
Creates a new Sprite_Mouse class for generating the mouse cursor
Tracks the mouse within the Window_Selectable class for simple menu use
Adds Left-Click for Input::C (Decision)
Adds Right-Click for Input::B (Cancel)
Adds Middle-Click for Input::A (um... up to you)
Shows simple means to add mouse control to any Scene_ code instances
Screenshots
A screenshot? It would show just a mouse cursor IN the game window.
Script
"script"
Code:
#==============================================================================
# ** MKXP Compatible Mouse Add-on
#------------------------------------------------------------------------------
# by DerVVulfman
# Version 1.0 (2023/08/30) YYYY/MM/DD
# MKXP / HiddenChest 1.1.49 Windows 64bit compatible
#==============================================================================
#==============================================================================
# ** Input
#------------------------------------------------------------------------------
# A module that handles input data from a gamepad or keyboard. This update
# adds mouse input by using class commands to attach its functionality.
#==============================================================================
class << Input
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias old_trigger? trigger? unless $@
#--------------------------------------------------------------------------
# * Trigger command
# num : Button ID number being tested
#--------------------------------------------------------------------------
def trigger?(num)
case num
when Input::A ; # Tertiary option
return (old_trigger?(num) or old_trigger?(Input::MOUSEMIDDLE))
when Input::B ; # Traditional cancel option
return (old_trigger?(num) or old_trigger?(Input::MOUSERIGHT))
when Input::C ; # Traditional decision option
return (old_trigger?(num) or old_trigger?(Input::MOUSELEFT))
end
end
end
#==============================================================================
# ** RPG::Cache
#------------------------------------------------------------------------------
# Data class that handles the creation and retention of bitmaps within the
# RPG module.
#==============================================================================
module RPG::Cache
#--------------------------------------------------------------------------
# * Load Cached Resource (mouse)
# filename : filename
#--------------------------------------------------------------------------
def self.mouse(filename)
self.load_bitmap("Graphics/Mouse/", filename)
end
end
#==============================================================================
# ** Sprite_Mouse
#------------------------------------------------------------------------------
# This sprite is used to display the mouse.
#==============================================================================
class Sprite_Mouse < RPG::Sprite
#--------------------------------------------------------------------------
# * Object Initialization
# viewport : viewport
#--------------------------------------------------------------------------
def initialize
super
update_icon_bitmap("Arrow")
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
self.x = Input.mouse_x
self.y = Input.mouse_y
self.z = 200
update_icon
end
#--------------------------------------------------------------------------
# * Frame Update (When detecting if mouse over map event)
#--------------------------------------------------------------------------
def update_icon
return unless $scene.is_a?(Scene_Map)
return if $game_map.scrolling? or $game_player.moving?
update_icon_bitmap("Arrow")
end
#--------------------------------------------------------------------------
# * Frame Update (When changing mouse cursor)
#--------------------------------------------------------------------------
def update_icon_bitmap(mouse_cursor)
cursor = mouse_cursor
return if @old_cursor == cursor
@old_cursor = cursor
self.bitmap = RPG::Cache.mouse(cursor)
end
end
# Just add the mouse globally
$mouse_sprite = Sprite_Mouse.new
#==============================================================================
# ** Window_Selectable
#------------------------------------------------------------------------------
# This window class contains cursor movement and scroll functions.
#==============================================================================
class Window_Selectable < Window_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias mkxp_mouse_selectable_initialize initialize
alias mkxp_mouse_selectable_update_cursor_rect update_cursor_rect
#--------------------------------------------------------------------------
# * Object Initialization
# x : window x-coordinate
# y : window y-coordinate
# width : window width
# height : window height
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
# Perform the original method with all window dimensions
mkxp_mouse_selectable_initialize(x, y, width, height)
# Add a minor scroll-wait value
@scroll_wait = 0
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
# Perform the original method
mkxp_mouse_selectable_update_cursor_rect
# Include mouse tracking operations
mouse_operation
end
#--------------------------------------------------------------------------
# * Perform mouse operations
#--------------------------------------------------------------------------
def mouse_operation
# Update the mouse
$mouse_sprite.update
# Acquire the mouse position in relation to menu position and 16px border
mx = Input.mouse_x - (self.x - self.ox + 16)
my = Input.mouse_y - (self.y - self.oy + 16)
# Define width and height
width = self.width / @column_max - 32
height = self.cursor_rect.height
# Cycle through items until mouse position detected
for index in 0...@item_max
x = index % @column_max * (width + 32)
y = index / @column_max * height
# Define mouse placement and exit when mouse position detected
if mx > x and mx < x + width and my > y and my < y + height
mouse_cursor(index)
break
end
end
end
#--------------------------------------------------------------------------
# * Track the position of the mouse cursor
#--------------------------------------------------------------------------
def mouse_cursor(index)
# Ignore if repeat
return if @index == index
@scroll_wait -= 1 if @scroll_wait > 0
row1 = @index / @column_max
row2 = index / @column_max
bottom = self.top_row + (self.page_row_max - 1)
if row1 == self.top_row and row2 < self.top_row
return if @scroll_wait > 0
@index = [@index - @column_max, 0].max
@scroll_wait = 4
elsif row1 == bottom and row2 > bottom
return if @scroll_wait > 0
@index = [@index + @column_max, @item_max - 1].min
@scroll_wait = 4
else
@index = index
end
$game_system.se_play($data_system.cursor_se)
end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias mkxp_mouse_scene_update update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Include mouse tracking operations
$mouse_sprite.update
# Perform the original method
mkxp_mouse_scene_update
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias mkxp_mouse_scene_update update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Include mouse tracking operations
$mouse_sprite.update
# Perform the original method
mkxp_mouse_scene_update
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias mkxp_mouse_scene_update update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Include mouse tracking operations
$mouse_sprite.update
# Perform the original method
mkxp_mouse_scene_update
end
end
Instructions
Generally, place this below Scene_Debug and above Main for this to work if you are using a generic RPGMaker XP set of scripts.
REQUIRES: You include a .png file named "Arrow" within a new Graphics\Mouse folder
FAQ
This is stripped down from other work that I have, made primarily to test different MKXP-based engines.
Compatibility
Not for RPGMaker XP, but compatible MKXP based engines. Earlier HiddenChest engines such as HiddenChest Hires has issues.
Credits and Thanks
Ancurio for MKXP, Kyonides for HiddenChest, and Melana for retaining HiddenChest Hires edition.
This are resources from Phylomoritis.com (before it shut down) which have been converted for use in rpg maker xp.
I would estimate 95% is perfectly fine and usable, you may have to check some (with the tilesets to see if they need editing since no convertor is perfect). The pack contains:
This system allows you to alter the save-game window to include a screen-shot of the field map where the player and party are is traversing. Along with that, there are items which may optionally be shown within the save game files.
The system also allows one to take advantage of two classic RPGMaker savegame scripts by RPG Advocate: the Unlimited Saves script which allows the game developer set how many save files may be recorded, and the Save Override script that brings up a prompt warning the player that an older save game would be erased in favor of the new.
Features
Save screen-shots of your current map into the save game files
Go beyond the 4 save-file limit
Either 2 or 3-save window layout (no 4-save window layout)
Alter the layout of your savegame windows to your specifications (in reason)
(INCLUDES) an XP port of 'snap_to_bitmap'
(INCLUDES) A PNG file generating script
Screenshots
Demo
CLICK HERE -- Box.Com link (Note the Download button at the top of the Box.Com window)
Instructions
Plenty... in the script.
Compatibility
Does a fair amount of rewrites to scripts that handle game saves, primarily as the window and scene scripts were based on Phylomortis rewrites. So, will likely not play well with other save-game altering scripts.
Notes
It uses a PNG file creation script not dissimilar to that within the Zlib system, but comparatively smaller and faster. It is used to actively make temporary files within the project's root directory, though they are deleted almost immediately. If the game's root folder is somehow protected from recording data, you would need to redirect the location where these temp .png files are recorded.
Credits and Thanks
Thanks to zeus81 for the snap-to-bitmap for RPGMaker XP script. And to RPG Advocate for the basis of the Unlimited Saves and Overwrite Prompt save scripts. Also thanks to Carlos_Davilla for noting how cloud-based services like DropBox may have issues with the generated .png files.
Terms and Conditions
Free for use in games, even commercial works. Only due credit for myself, RPG Advocate, zeus81 and Carlos_Davilla are required.
A silly little script... it lets you place icons within the traditional menu screens. Now, you will be able to determine if a companion is set to use only skills, if they are following close, or if they're a pet!
Script
Its a little thing right here
Code:
#==============================================================================
# ** Lycan Companion Icons
#------------------------------------------------------------------------------
# version 1.0
# by DerVVulfman
# 08-09-2023 (MM/DD/YYYY)
# RGSS / RPGMaker XP
#==============================================================================
#
# INTRODUCTION:
#
# A silly little script... it lets you place icons within the traditional
# menu screens. Now, you will be able to determine if a companion is set
# to use only skills, if they are following close, or if they're a pet!
#
# The system allows you to place icons within the modules:
# * Windows_Base - draw_actor_name
# * Windows_MenuStatus - refresh
# * Window_Status - refresh
#
#
#------------------------------------------------------------------------------
#
# INSTALLATION:
# =============
#
# Paste this script below The Lycan ABS and above Main to use. Add your
# custom icons that this script will use within the Graphics\Icons folder,
# and configure as needed. The comments should be easy to understand.
#
#------------------------------------------------------------------------------
#
# COMPATIBILITY:
#
# This script adds new statements to three default script methods by the use
# of the alias command. So it should be compatible with any menu system that
# has a structure similar enough to the default menus.
#
#==============================================================================
#
# TERMS AND CONDITIONS:
#
# Free for use, even in commercial games.
#
#==============================================================================
#==============================================================================#
# +--------------------------------------------------------------------------+ #
# | * * C O N F I G U R A T I O N P A G E * * | #
# | * * THE ICONS * * | #
# +--------------------------------------------------------------------------+ #
#==============================================================================#
module Lycan
# MAIN WINDOW POSITIONING
# =========================================================================
# Determines if icons appear in one of the three basic menu forms, and the
# general poacement of the icons themselves
# Draw Actor Name Connect Settings
# ======================== ========
COMPANION_NAME_ICONS = false
COMPANION_NAME_X = 0
COMPANION_NAME_Y = 0
# Menu Status Connect Settings
# ======================== ========
COMPANION_MENU_ICONS = true
COMPANION_MENU_X = 300
COMPANION_MENU_Y = 0
# INDIVIDUAL ICON DEFINITIONS
# =========================================================================
# Determines the icon graphics used for specific conditions and the general
# placement in relation to the window(s) applied. Nil or "" filenames will
# disable the icon itself.
#==============================================================================
# ** Game_ABS
#------------------------------------------------------------------------------
# This class deals with the Action Battle System and controls all Player,
# Enemy and Companion Actions on the map.
#==============================================================================
class Game_ABS
#--------------------------------------------------------------------------
# * Get Companion data from actor
# actor : actor
#--------------------------------------------------------------------------
def companion_from_actor(actor)
# Exit with nil if Companions system is off
return nil unless Lycan::COMPANIONS_ON
# Cycle through every companion in ABS memory
for companion in $game_companions.values
# Get the actor_ID (party member) of the companion
actor_id = companion.actor_id
# Get the comparative actor from the companion data
test = $game_party.actors[actor_id]
# return companion data if the compared actor is the actor requested
return companion if test == actor
end
# Return nil if no companion data found
return nil
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias comp_icons_base_draw_actor_name draw_actor_name
#--------------------------------------------------------------------------
# * Draw Name
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
# Perform the original method
comp_icons_base_draw_actor_name(actor, x, y)
# Exit unless enabled
return unless Lycan::COMPANION_NAME_ICONS == true
# Adjust position
x += Lycan::COMPANION_NAME_X
y += Lycan::COMPANION_NAME_Y
# Apply Icons
draw_companion_icons(actor, x, y)
end
#--------------------------------------------------------------------------
# * Draw Companion Icons
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_companion_icons(actor, x, y)
# Get the companion data based on the actor supplied
companion = $ABS.companion_from_actor(actor)
# Exit if no valid companion found
return if companion.nil?
# Draw icons
lycan_draw_follow(companion, x,y)
lycan_draw_close(companion, x,y)
lycan_draw_wait(companion, x,y)
lycan_draw_destroy(companion, x,y)
lycan_draw_norm_combat(companion, x,y)
lycan_draw_melee_only(companion, x,y)
lycan_draw_skill_only(companion, x,y)
lycan_draw_pet(companion, x,y)
end
#--------------------------------------------------------------------------
# * Draw Actor-Follow Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_follow(companion, x,y)
# Handle if proper flag settings
return if companion.destroy_flag == true
return if companion.close_follow == true
return if companion.wait_command == true
# Set location and push icon
x += Lycan::C_ICON_FOLLOW_X
y += Lycan::C_ICON_FOLLOW_Y
lycan_draw_icon(x, y, Lycan::C_ICON_FOLLOW_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Actor-Close-Follow Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_close(companion, x,y)
# Handle if proper flag settings
return unless companion.close_follow == true
# Set location and push icon
x += Lycan::C_ICON_CLOSE_X
y += Lycan::C_ICON_CLOSE_Y
lycan_draw_icon(x, y, Lycan::C_ICON_CLOSE_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Actor-Wait Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_wait(companion, x,y)
# Handle if proper flag settings
return unless companion.wait_command == true
# Set location and push icon
x += Lycan::C_ICON_WAIT_X
y += Lycan::C_ICON_WAIT_Y
lycan_draw_icon(x, y, Lycan::C_ICON_WAIT_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Actor-Hunt-n-Destroy Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_destroy(companion, x,y)
# Handle if proper flag settings
return unless companion.destroy_flag == true
# Set location and push icon
x += Lycan::C_ICON_DESTROY_X
y += Lycan::C_ICON_DESTROY_Y
lycan_draw_icon(x, y, Lycan::C_ICON_DESTROY_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Normal-Combat Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_norm_combat(companion, x,y)
# Handle if proper flag settings
return if companion.melee_only == true
return if companion.skill_only == true
# Set location and push icon
x += Lycan::C_ICON_NORMAL_X
y += Lycan::C_ICON_NORMAL_Y
lycan_draw_icon(x, y, Lycan::C_ICON_NORMAL_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Melee-Only Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_melee_only(companion, x,y)
# Handle if proper flag settings
return unless companion.melee_only == true
# Set location and push icon
x += Lycan::C_ICON_MELEE_X
y += Lycan::C_ICON_MELEE_Y
lycan_draw_icon(x, y, Lycan::C_ICON_MELEE_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Skill-Only Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_skill_only(companion, x,y)
# Handle if proper flag settings
return unless companion.skill_only == true
# Set location and push icon
x += Lycan::C_ICON_SKILL_X
y += Lycan::C_ICON_SKILL_Y
lycan_draw_icon(x, y, Lycan::C_ICON_SKILL_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Actor-Pet Icon
# companion : companion actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def lycan_draw_pet(companion, x,y)
# Handle if proper flag settings
return unless companion.pet_flag == true
# Set location and push icon
x += Lycan::C_ICON_PET_X
y += Lycan::C_ICON_PET_X
lycan_draw_icon(x, y, Lycan::C_ICON_PET_IMAGE)
end
#--------------------------------------------------------------------------
# * Draw Lycan Actor Item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# filename : icon filename
#--------------------------------------------------------------------------
def lycan_draw_icon(x, y, filename)
return if filename.nil?
return if filename == ""
bitmap = RPG::Cache.icon(filename)
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24))
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias comp_icons_menustatus_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Perform the original method
comp_icons_menustatus_refresh
# Exit unless enabled
return unless Lycan::COMPANION_MENU_ICONS == true
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
# Y position in screen
y = i * 116
# Adjust position
x = Lycan::COMPANION_MENU_X
y += Lycan::COMPANION_MENU_Y
# Apply Icons
draw_companion_icons(actor, x, y)
end
end
end
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias comp_icons_status_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Perform the original method
comp_icons_status_refresh
# Exit unless enabled
return unless Lycan::COMPANION_STAT_ICONS == true
# Adjust position
x = Lycan::COMPANION_STAT_X
y = Lycan::COMPANION_STAT_Y
draw_companion_icons(@actor, x, y)
end
end
Instructions
Paste this script below The Lycan ABS and above Main to use. Add your custom icons that this script will use within the Graphics\Icons folder, and configure as needed. The comments should be easy to understand.
Compatibility
Designed for RPGMaker XP and The Lycan ABS. This script adds new statements to three default script methods by the use of the alias command. So it should be compatible with any menu system that has a structure similar enough to the default menus.