Introduction
This script disables the "ATTACK" menu option in the default battlesystem if the actor is equipped with a defined weapon. This may be useful if the weapon equipped is not meant for melee attack, but for some skill action in its place (a magic staff for example).
Just populate the LIST array within the BlockedWeapons module with the IDs of weapons that should not be allowed to make melee attacks.
Screenshots
All you'd see is that the "ATTACK" text in the Actor Command Window going Gray. Big Whoop.
Script
The Script
Code:
#==============================================================================
# ** Weapons Blocked from Attacks
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 12-02-2023
# RGSS / RMXP
#------------------------------------------------------------------------------
# This script disables the "ATTACK" menu option in the default battlesystem
# if the actor is equipped with a defined weapon. This may be useful if the
# weapon equipped is not meant for melee attack, but for some skill action
# in its place (a magic staff for example).
#
# Just populate the LIST array within the BlockedWeapons module with the IDs
# of weapons that should not be allowed to make melee attacks.
#------------------------------------------------------------------------------
#
# TERMS OF USE
# ===================
#
# Free for use, even in commercial products. Only due credit is needed.
#
#==============================================================================
module BlockedWeapons
LIST = [1]
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles data surrounding the system. Backround music, etc.
# is managed here as well. Refer to "$game_system" for the instance of
# this class.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :m_slot_detected # MultiSlots Detection
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias system_blocked_weapon_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Perform the original method
system_blocked_weapon_initialize
# Add new values for the auto-detection feature
@m_slot_detected = nil
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias actor_blocked_weapon_setup setup
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
def setup(actor_id)
# Perform the original method
actor_blocked_weapon_setup(actor_id)
# Set auto-detection flag within Game_System if a MultiSlots method found
$game_system.m_slot_detected = true if defined?(custom_slot_names)
end
end
#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
# This window deals with general command choices.
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# * Enable Item
# index : item number
#--------------------------------------------------------------------------
def enable_item(index)
draw_item(index, normal_color)
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Actor Command Window Setup
#--------------------------------------------------------------------------
alias battle_blocked_weapon_p3scw phase3_setup_command_window
alias battle_blocked_weapon_up3bc update_phase3_basic_command
#--------------------------------------------------------------------------
# * Actor Command Window Setup
#--------------------------------------------------------------------------
def phase3_setup_command_window
# Perform the original method
battle_blocked_weapon_p3scw
# Ensure Attack is enabled when drawn/redrawn
@actor_command_window.enable_item(0)
# Deactivate menu option appearance if using a no-attack weapon
@actor_command_window.disable_item(0) if phase3_no_attack_weapon?
end
#--------------------------------------------------------------------------
# * Frame Update (actor command phase : basic command)
#--------------------------------------------------------------------------
def update_phase3_basic_command
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by actor command window cursor position
if @actor_command_window.index == 0
# Play Buzzer and exit if using a no-attack weapon
if phase3_no_attack_weapon?
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
end
end
# Perform the original method
battle_blocked_weapon_up3bc
end
#--------------------------------------------------------------------------
# * Frame Update (Testing if hero using a no attack weapon)
#--------------------------------------------------------------------------
def phase3_no_attack_weapon?
if $game_system.m_slot_detected == true
for weapon in @active_battler.weapons
return true if BlockedWeapons::LIST.include?(weapon)
end
return false
end
return true if BlockedWeapons::LIST.include?(@active_battler.weapon_id)
end
end
Instructions
Paste below Scene_Debug and above Main. If using a custom battlesystem and/or MultiSlots!, then paste below those as well. Fill in the LIST array with IDs of weapons not allowing your hero to perform melee attacks.
Compatibility
Should be compatible with the default RPG combat system for RPGMaker XP. It attaches code to the method that reveals the combat window and to the method permitting action selection. Most anything else is either new or attached code.
Terms and Conditions
Free for use, even in commercial products. Only due credit is needed.
Do you need a simple save file manager to handle your saved games?
Then this might be the right script for you!
It will let you save and load your saved games.
Don't forget to set the value of the SAVE_ITEM_ID to 0 if your game doesn't need any item to be consumed before the player can save the game file as usual.
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
If you haven't seen much being posted by DerVVulfman apart from forum duties, he released a Notification of the Arduous Work he has been doing, archiving resources from lost sites, working upon a backup forum database, and forum security.
Occasions
A veteran who has been in the game development community since the days of RPGRevolution, Kaz, has now appeared. While not actively using any game maker, he still enjoys the community experience. He was greeted by DerVVulfman who challenged to determine whom was the elder present, Holder who waved, and Remi-chan who presented to our new member a render of her old Bizarre Monkey avatar for a touch of nostalgia.
General Chat
In world events, the four-day cease fire between Israel and Hamas would be the News of the World, one marked by Hamas violating the pause merely 15 minutes in. Still, the release went forward. But before the cease-fire, the IDF and UN evacuated babies from the Shifa Hospital to Egypt, and then uncovered a rocket factory built underneath a mosque. Iran is stepping up its rhetoric, this while the Jewish U.S. Ambassador's home is vandalized, a synagogue in Armenia set ablaze, and a manhunt is underway Iran backed terrorists sneaking into Britain. The victory of Javier Milei in Argentina had caused an upset in many socialist countries in Latin America. And China threatened Milei not to cut economic ties. But the 53 year old economist plans to do just that and deal with 'civilized' nations and stay away from the communist regime and its allies. Election integrity with voting machines in the U.S. hit the news this week as Pennsylvania machines are glitching, and a Federal Judge found Georgia machines with faulty security measures. Though Ukraine said it was hit by the largest drone strike ever this week, Russian troops under Lt Colonel Zladko made claim they are receiving suicide missions to cover up his blunders. And insofar as resources, the ammunition Russia acquired from North Korea had proven proves fatal as gun barrels and turrets have been damaged or blown. Troops punished by Biden's Vaccine Mandate suing for Billions in lost ages, daycare workers busted for running a Child Fight-Club ring, border security in Germany, the U.S, UK, the vehicle explosion on the Rainbow Bridge, and more hit this week's news. Reduced from 15.5K words to 276
Tech Talk
This week's News of the Cyber World is bad news for electric vehicles, whether it be Stellantis' recall of Hybrid vehicles after some caught fire, and a CEO from General Motors stepping down after the incident with a RoboTaxi and a pedestrian. Bad news for Google as well, as their anti-trust case heats up with secret deals with Spotify and anti-competition practices with Fortnite arose. North Koreans providing false credentials to steal western jobs, Elon Musk's lawsuit against MediaMatters for manufacturing false content, the CEO of OpenAi returning and more hit this week's cybernews.
Games Development
Development Discussion
Remastering of current works is apparent if you wanted to ask your fellow RMers, What's up? Remi-chan touched up some event code to prevent accidental battle damage from being inflicted during cutscenes and replaced a colorful backdrop within her outerspace adventure. KasperKalamity acquired RPGMaker MV, and as the weather chills, he began revising some of his maps. AVGB-KBGaming just acquire RPGMaker MZ which increased the number of available layers to four, something that surprised KasperKalamity. But not disappointed, he is enjoying some of his new editor's features.
This week, KasperKalamity made An annoucement that his game, Arbor's Eve, is now being designed with RPGMaker VX as its engine. He found that the mapping suited his tasts, though was curious if tutorials or help was available. Remi-chan suggested that the editor is much like the older systems, recommended reading the help file, and noted that she may be found oft in Discord.
Complete Projects
If a science fiction story with a rich collection of characters amidst a backdrop of alien worlds, Rave Heart is almost half-price at Steam. Starmage wished to announce that as of now that a Steam Autumn Sale is ongoing.
Material Development
Scripts Database
The PlayMusik jukebox crafted by kyonides was twice updated, primarily handling visual backdrops. However, RPGMaker XP does lack the built-in wave effect that the other two engines provide.
For those using either RPGMaker VX or VXAce and wishes to add a little phonic pinache, Vehikle SE by kyonides allows you to provide a little audio cue when boarding.
Resources Database
Working to safeguard RPGMaker resources from being lost, DerVVulfman archived D・M's Resources from a Geosites page that vanished in 2019. The website contained resources from RPGMaker 2000/2003 through to RPGMaker VX, the tilesets of a more modern or futuristic nature. Though the RPGMaker VX Characterset collection includes VX converted versions of both RPGMaker XP and 2003 heroes and villains.
Creativity Section
Filmography
A new thread within our Creativity section, we now have access to Remi-chan's Cinematic Theatre. A separate topic, here Remi-chan can spotlight all her animation works, beginning with her endeavor for 100 subscribers and her self-designed autobiography. It was followed by select cutsccenes from her more recognized games, and ending with a collection of trailers.
Well, that's it for this week.
“I know that there are people who do not love their fellow man, and I hate people like that!” - Tom Lehrer
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.
You may have noticed a slight slowdown in my own posting. This is not without reason, the reason being forum maintenance, backups, and data acquisition.
First, you may have witnessed a new thread within the Resources Database forum; a topic that has attached contents of a Geosites board owned by Japanese hoster named D・M. This board, now extinct is one of a number of sites I have encountered while working to backup and secure material from another site, RPG Maker Central.
I was advised to look at RPG Maker Central and attempt to create another Archive sub-forum as done for the 2010 version of RMXP.Org*and Creation Asylum. Considering whether to perform a back-up or save of the site required little incentive, the board itself having hiccups whereby the site would go blank for some days.
* The original RMXP.Org was rebranded "HBGames", afterwhich the domain name of RMXP.Org became available for a short time. It is the short-lived RMXP.Org that was archived.
It has been an arduous task, many of the resources which RPG Maker Central suggests to contain are have vanished. That is not to say that recovery of these resources are not possible, but a fair number were hosted at sites that the Internet Archive (or Wayback Machine) had no access (ie Imageshack, tekepon, etc). Still, I have currently amassed 6 MB of salvaged resources, and soon intend to archive the scripts database... minus any scripts already hosted within our board.
Simple fact. As of right now, RPG Maker Central is once again down.
● ● ●
Second, the board software has a bit of an issue. There is no danger to our site, though the 2021 Hacker and 500-spammer flood had an unforseen side-affect. Save-Point now no longer has the ability to create new subforums. This may seem like a mere nuisance. I mean, we have 50 (Fifty) subforums! And the issue created actually prevents conversion to another forum software. So it is something that needs to be addressed.
For this, a manual backup of every account and post has been launched. By manual, I literally mean... manually recreated by hand, retyped one by one, kept within actual member ID and thread order. This is obviously an even more arduous process, and one that will sadly take months. Yet, this approach had been performed to save forum content in the past.
Please be advised. If your eMail within the board is not up-to-date, please update it now, and send me a notice that your eMail has been changed. This, for the manual backup.
● ● ●
Third, forum security is still a top priority. Our board still adopts strict policies that accounts whose IP addresses had performed improper activites such as hacking, inserting malware, flooding sites with spam, will be immediately banned. And our policy forbidding the use of disposable or fraudulent eMail accounts is likewise being enforced.
Yes, some individuals may think it be fine to make a fake eMail to register to merely garner resources. But the basis of forums are that they are a service meant to share content and ideas. And such accounts that violate these requirements mean to either share nothing or solely send spam content.
Herein, I have temporarily archived the Resources of an RPGMaker Geosites webpage run by D・M. It went defunct at the end of Spring 2019.
A series of attachments, there are resources for RPGMaker 2000-2003, RPGMaker XP and RPGMaker VX. The tilesets within are of a modern/futuristic science-fiction nature.
And there are plenty of Charactersets for all. The RPGMaker VX tilesets even include VX adaptations of RPGMaker 2000, 2003 and XP characters.
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
Because of issues and discussions that have gone on within the forum, and demands placed within other sites, there are now Requirements for Generated A.I. Content. DerVVulfman laid out a case why any AI-Generated works now need to be labeled from the date posted then on, and upon differences between the Creativity boards and others.
Feedback and Suggestions
This January, kyonides inquired whether the rise of AI art would necessitate the need for the forum's rules to be updated. Some recently made suggestions that banning AI art being banned is commercially diriven, suggesting that one shouldn't entertain the thought of artists not being compensated, and saw no difference between using copyrighted art or mimicking an artist's style. Others however noted that companies would obviously wish to protect their interests, and how legal issues of AI generations have arisen. DerVVulfman locked the thread noting court rulings against AI art over copyright issues, criminal cases involving AI-based deepfakes, and how other services having made rules requiring the separation of AI generated content from all other.
General Chat
As the Israel/Hamas war dominates the News of the World, proof of warcrimes are revealed as the Hamas HQ was found within a Children's Hospital replete with weapons and evidence of hostages. Violence ensued on the streets, Pro-Hamas denostrators shutting down the DNC in California, only before a previous mob clashing with the police just before. And German Police did simultaneous raids on properties suspected of supporting Hezbollah. Still, in defiance of the UEFA, Israeli and Polish soccer teams held a moment to honor the victims of the October 7 attack. The BBC apologized for incorrectly reporting that Israeli solders targeted medics and Arabic speakers. And Columba U. Suspended Pro-Terror Student groups. Regarding illegal migrations, Finland places full blame upon Russia for its weaponization. For public relations, Paris clears the streets of camps for the Olympics while San Francisco streets are cleared to welcome China's President Xi, though a Czech news crew was robbed at gunpoint in San Francisco at the time. Meanwhile, Mexican President AMLO Praises Biden's choice to reinstate the Catch and Release policy which was implmented by Obama employees while known to be a failing policy. And of Failing policies, Boston Democrats wish to give foreign nationals the right to vote despite the law, and Illegal Aliens are now fleeing Sanctuary Cities as they admit they thought The process for legal status would be quick. Not good news for Democrats this week as Stacey Abrams's non Profit is now being investigated for financial corruption. A criminal referral was sent charging Michael Cohen for lying to Congress in 2019. And Loudoun County Voters fire Buba Biberaj, the prosecutor who charged the father of a rape victim of violent conduct when a school district conspired to conceal the rape. For U.S. President Biden's son, his tax probe appears to be quite active in California, this while attempting to sue Former President Trump and Bill Bar for losing the sweetheart plea deal over his firearm charge. Insofar as former President Trump, his lawyers are calling for a mistrial citing bias from the preciding judge. Though Germany plans to double military aide to Ukraine and Ukraine having sucesses long the Dnieper River, over 40,000 military age Ukrainians are attempting to avoid the fight. Meanwhile, The U.S. army is sending out letters to those soldiers that protested and were kicked out over Biden's Military Vaccine mandate. Another Mexican Government coverup, this time of the negligent death of a cuban migrant in custody, U.S. President Biden lifting sanctions on the Agency linked to Uyghur Genocide, the Republican-promised footage of all January 6 Capital video now available on X/Twitter, Chinese warship sonar injuring Australian naval divers, a French Senator Accused of Drugging Fellow Lawmaker in Attempted Rape, and so much more is in this week's news. Reduced from 15K words to 466
Tech Talk
For Elon Musk, it has been an especially bad week of News of the Cyber World, whether it be his antisemetic comments that drew boycots from most of Hollywood or suspension of advertisements from IBM and other sources. Then there's the issue with another Space-X rocket exploding and the Cybertruck controversy. There wasn't much good news for Google this week, now revealed they spent over $8 Billion to secure their monopoly with Samsung during their anti-trust lawsuit, and news that Google Maps left hikers in Canada stranded. Yet, not everything is at fault as a Tokyo doctor wants to sue Google because they won't remove his bad reviews. Job loss is a booming industry with AI as Amazon slashed hundreds more jobs. And even the CEO and co-developer of OpenAi got fired for lying to the company board. The dangers of Senator Durbin's Data Protection bill revealed, nearly half of Australia's ports shut down by cyberattacks, the Roblox lawsuit over child endangerment and online predators, and so much more hit this week's cybernews.
Forum Games & Nonsense
For those who want a chuckle, then you may wish to read about The Great Kender Crusade. Once more did DerVVullfman find an entertaining tale of Pen-and-Paper RPG campaigns, this one reveals the chaos unleashed when the game runner brings in a friend who wreaks a bit of havok with the rest of the players.
Games Development
Development Discussion
For those wondering What's Up among our forum's RMers, Charlie Fleed renewed the domain once more. Our sponsor who made Hartacon has moved from traditional RPGs towards tactical games such as X-Com, providing his Twitter/X channel. He also wondered if anyone was involved in Unity game development and would be interested in a collaboration. Insofar as work outside of Unity, Remi-chan continued the work upon her game, Fantasia. Videos of clashes against a Child of Clamity or the aspect of power herself have been reposted.
Code Support
Months ago, zlsl put forth a request to combine ATES with Ryex's Dynamic, the issue being that the dynamic map system disabled the audio from the weather effects script. So busy he was with his schedule, he has been unable to do much in game development. After all this time, he found a minor bug which he cannot solve, one that breaks the weather audio when switching from one map to another.
Tutorials
One more discussion on Ruby Scripting revealed how improper it is to define a method within another method, methods being a collection of executable statements and are not structures such as Class or Module objects which may. For this, he presented sample code which illustrates issues with executing methods, it even depicting how stacked methods incorrectly defined are actually considered part of the class and not part of a method it is within.
Material Development
Scripts Database
Kyonides' OtherLayers which lets users employ static pictures as map upper layers went through an upgrade, now allowing such images to function as lower-layer graphics.
Admittedly, PlayMusik is but a simple jukebox system for your Ruby-Based RPGMaker games. Originally just for VXAce, kyonides later backported his script for the other two engines.
The MenuDisabler by kyonides lets the users individually disable Skill, Equipment and like options in RPGMaker VX and VXAce engines when the need arises.
The Battle Item Count VX system by kyonides allows one to update or limit the number of items brought into battle, or remove them during combat.
Creativity Section
Music and Audio
Developing a game doesn't just require sprites and artwork; it requires ambience and music to make the player more engaged. So it is a good thing that Eric Matyas continues to Share His Original Music, though he has higher quality audio packs for nominal fees. Still, he crafted some urban works such as "QUIRKY CHARACTERS ON MY BLOCK", and for those on a journey to the mid-80s, the "CYBER TRAIN JOURNEY" can take you away with its early techno feel. And the low thrumming nature of the "DISCO COPS FROM THE FUTURE" may be just what you need for a dystopic future world.
Art and Design
No, you are not seeing double. You are indeed seeing two renders within Remi-chan's Neato Arty thread thing! of the same hero from Fantasia: Surreal Cosmic Projeny. As one of the characters planned to appear within Remi-chan's scheduled sequel, Lilac Graves undergoes a cosmetic makeover in both wardrobe and weapon skills that barely relect the power she will wield.
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 (1915-2010)
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.
It appears that Save-Point must draw a line which other sites have already, the separation between what is generated by machines and that of an individual. I understand that some may try to blur the line between using a simple faceset or characterset generator such as CharasProject, or Dall-E. Or that they spent some time to use an online tool such as Stable Diffusion to create something. However, a line does need to separate these instances.
There has been much talk within the art and music industry whereby many feel their actual identity stolen by A.I. Generators, and there have been incidents where A.I. had done so with actual criminal intent. Actual criminal intent is not forcing a ban upon A.I., for technology itself is neutral. It is the user that may use it for good or ill purposes. However, with the proliferation of A.I. for content development, rules needed to be created.
Do realize that most artwork created by A.I. is derived from some manner of source material, and there have been actual lawsuits over issues of copyright and plagiarism. Save-Point is not placing banishment against A.I. creations. However, guidelines needed to be identify works that are A.I. generated, protect those who may wish their use without realizing any legal status of the works, and consider the artists both within the forum and without.
As of today, 19th of November 2023, all A.I Generated content, whether it be in audible, visual, prose or any other format, must be identified by the content poster as an A.I. generated product. It must be the responsibility of the poster as the A.I. generators would not actively contact us.
● ● ●
Within the forum'sCreativity Sectionboard, the sub-forums now contain tags to identify threads that are for solely A.I. Generated content, and topics that contain a mixture of contemporary and A.I content. Within those threads that may contain both contemporary and A.I. content, the content itself must be immediately identified as such.
All other primary boards within the forum already contain their own prefix icons, and thus cannot be so-marked. As such, all other posts within the forum must unfortunately now contain notifications of A.I. content made as of today's date.
● ● ●
Please realize that A.I. Generated content is neither covered nor protected under Copyright Law, it having been ruled that copyright only covers creations of actual human content. The comically famous 'monkey selfie' case of 2015 being the basis.
While accidental incidents of non-compliance may occur, there had to be established penalties if one was negligent. However, repeated intentional offenses by any individual will be treated as if that individual plagiarized content and summarily banned. Please do not consider this heavy-handedness. Content generated by A.I. tools are derived from other sources and could be construed as plagiarized, and willful disregard thus would warrant such discipline.
[i]● ● ●[/i]
Changes have been made to the forum's User Submissions & Member Rights of Ownershipclause. It now includes the following: "Do note that content generated by A.I.(Artificial Intelligence) technologies may not be subject to copyright laws, and are not guaranteed." Likewise, the Save-Point's Rights and Limitationsclause now states "You are required to indicate any A.I. generated content posted as being such.".
For a more exacting read, please refer to theFORUM RULESwhich are also available within the top of the forum display.
Do you need to update the number of potions or elixirs currently available for the next couple of actors during battle?
Or were you in need of canceling your previous actor's action to change the item the actor is going to consume next?
Then this scriptlet is for you!
class Game_Party
def clear_battle_items
@actors.each {|m| m.current_action.clear }
end
def actors_battle_items
@actors.map {|m| m.current_action.item_id }
end
def battle_item_number(item_id)
return item_number(item_id) unless $game_temp.in_battle
battle_items = actors_battle_items.select {|bit_id| item_id == bit_id }
item_number(item_id) - battle_items.size
end
end
class Window_Item
alias :kyon_btl_itm_cnt_win_itm_ref :refresh
def refresh
@battle_items = {}
@battle_items.default = 99
kyon_btl_itm_cnt_win_itm_ref
end
def find_number(item_id)
case item
when RPG::Item
$game_party.battle_item_number(item_id)
when RPG::Weapon
$game_party.weapon_number(item_id)
when RPG::Armor
$game_party.armor_number(item_id)
end
end
def enable?(item)
return unless item.is_a?(RPG::Item)
$game_party.item_can_use?(item.id) and @battle_items[item.id] > 0
end
def draw_item(index)
item = @data[index]
number = find_number(item.id)
@battle_items[item.id] = number
enabled = enable?(item)
self.contents.font.color = enabled ? normal_color : disabled_color
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = enabled ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
def battle_item_none?
@battle_items[self.item.id] == 0
end
end
class Scene_Battle
alias :kyon_btl_itm_cnt_scn_btl_ph3_prr_act :phase3_prior_actor
alias :kyon_btl_itm_cnt_scn_btl_up_ph3_itm_sel :update_phase3_item_select
def turn_decrease_item_count
@active_battler.current_action.clear if @active_battler
end
def phase3_prior_actor
turn_decrease_item_count
kyon_btl_itm_cnt_scn_btl_ph3_prr_act
turn_decrease_item_count
end
def update_phase3_item_select
if Input.trigger?(Input::C) and @item_window.battle_item_none?
return $game_system.se_play($data_system.buzzer_se)
end
kyon_btl_itm_cnt_scn_btl_up_ph3_itm_sel
end
end
class Window_Item
alias :kyon_btl_itm_cnt_win_ref :refresh
def refresh
@battle_items = {}
@battle_items.default = 99
kyon_btl_itm_cnt_win_ref
end
def enable?(item)
$game_party.item_can_use?(item) and @battle_items[item.id] > 0
end
def draw_item(index)
rect = item_rect(index)
self.contents.clear_rect(rect)
item = @data[index]
return unless item
number = $game_party.battle_item_number(item)
@battle_items[item.id] = number
enabled = enable?(item)
rect.width -= 4
draw_item_name(item, rect.x, rect.y, enabled)
self.contents.draw_text(rect, sprintf(":%2d", number), 2)
end
def battle_item_none?
@battle_items[@data[@index].id] == 0
end
end
class Scene_Battle
alias :kyon_btl_itm_cnt_scn_btl_term :terminate
alias :kyon_btl_itm_cnt_scn_btl_st_pty_cmd_sel :start_party_command_selection
alias :kyon_btl_itm_cnt_scn_btl_prr_act :prior_actor
alias :kyon_btl_itm_cnt_scn_btl_end_trgt_act_sel :end_target_actor_selection
def terminate
kyon_btl_itm_cnt_scn_btl_term
$game_party.clear_battle_items
end
def start_party_command_selection
$game_party.clear_battle_items
kyon_btl_itm_cnt_scn_btl_st_pty_cmd_sel
end
def turn_decrease_item_count
@active_battler.clear_battle_item if @active_battler
end
def prior_actor
turn_decrease_item_count
kyon_btl_itm_cnt_scn_btl_prr_act
turn_decrease_item_count
end
def update_target_actor_selection
@target_actor_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_target_actor_selection
elsif Input.trigger?(Input::C)
Sound.play_decision
@active_battler.action.target_index = @target_actor_window.index
@active_battler.battle_item_id = @item.id if @item
@item = nil
end_target_actor_selection
end_skill_selection
end_item_selection
next_actor
end
end
def update_item_selection
@item_window.active = true
@item_window.update
@help_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_item_selection
elsif Input.trigger?(Input::C)
@item = @item_window.item
$game_party.last_item_id = @item.id if @item
return Sound.play_buzzer unless $game_party.item_can_use?(@item)
return Sound.play_buzzer if @item_window.battle_item_none?
Sound.play_decision
determine_item
end
end
end
class Window_ItemList
alias :kyon_btl_itm_cnt_mk_itm_lst :make_item_list
def enable?(item)
$game_party.usable?(item) and @battle_items[item.id] > 0
end
def make_item_list
@battle_items = {}
@battle_items.default = 99
kyon_btl_itm_cnt_mk_itm_lst
end
def draw_item_number(rect, item)
number = $game_party.battle_item_number(item)
@battle_items[item.id] = number
contents.font.color.alpha = number > 0 ? 255 : translucent_alpha
number = sprintf(":%2d", number)
draw_text(rect, number, 2)
end
end
class Scene_Battle
alias :kyon_btl_itm_cnt_scn_btl_term :terminate
alias :kyon_btl_itm_cnt_scn_btl_st_pty_cmd_sel :start_party_command_selection
alias :kyon_btl_itm_cnt_scn_btl_st_act_cmd_sel :start_actor_command_selection
alias :kyon_btl_itm_cnt_scn_btl_on_itm_ok :on_item_ok
alias :kyon_btl_itm_cnt_scn_btl_on_itm_cncl :on_item_cancel
def terminate
kyon_btl_itm_cnt_scn_btl_term
$game_party.clear_battle_items
end
def start_party_command_selection
kyon_btl_itm_cnt_scn_btl_st_pty_cmd_sel
$game_party.clear_battle_items
end
def start_actor_command_selection
kyon_btl_itm_cnt_scn_btl_st_act_cmd_sel
BattleManager.actor.clear_battle_item
end
def on_item_ok
BattleManager.actor.battle_item_id = @item_window.item.id
kyon_btl_itm_cnt_scn_btl_on_itm_ok
end
def on_item_cancel
BattleManager.actor.clear_battle_item
kyon_btl_itm_cnt_scn_btl_on_itm_cncl
end
end
Terms & Conditions
Free for use in ANY game.
Due credit is mandatory.
That's it!
Do you need to block the player's ability to consume items?
Or do you hate the team and wish to make it suffer by blocking all skills just because?
Or perhaps you should prevent the player from equiping new gear at any specific moment...
If any of those things is true, then this scriptlet is for you!
module Vocab
STATUS = "Status"
SAVE = "Save"
END_GAME = "End Game"
end
class Window_Command
include MenuDisabler
alias :kyon_menu_disabler_win_cmd_ref :refresh
def refresh
if MenuDisabler.used
refresh_commands
else
kyon_menu_disabler_win_cmd_ref
end
end
def change_command(n)
cmd = command(n)
color = @states[cmd] ? normal_color : disabled_color
draw_item(n, color)
end
def option_disabled?
!@states[command(@index)]
end
end
class Scene_Menu
alias :kyon_menu_disabler_scn_mn_main :main
alias :kyon_menu_disabler_scn_mn_up_cmd :update_command
def main
MenuDisabler.used = true
kyon_menu_disabler_scn_mn_main
end
def update_command
if Input.trigger?(Input::C)
if @command_window.option_disabled?
$game_system.se_play($data_system.cancel_se)
return
end
end
kyon_menu_disabler_scn_mn_up_cmd
end
end
class Window_Command
def change_command(name, enabled)
cmd = @commands.find {|v| v == name }
n = @commands.index(cmd)
draw_item(n, enabled) if n
end
def make_command_indexes
@names = {}
@commands.each_with_index {|c, n| @names[n] = c }
end
def current_name
@names[@index]
end
end
class Scene_Menu
include MenuDisabler
alias :kyon_disable_equip_scn_mn_crt_cmd_win :create_command_window
alias :kyon_disable_equip_scn_mn_cmd_sel :update_command_selection
def create_command_window
kyon_disable_equip_scn_mn_crt_cmd_win
@command_window.make_command_indexes
anybody = $game_party.members.size > 0
@states = {}
@states[Vocab.item] = (anybody and !$game_switches[BLOCK_ITEM_SWITCH])
@states[Vocab.skill] = (anybody and !$game_switches[BLOCK_SKILL_SWITCH])
@states[Vocab.equip] = (anybody and !$game_switches[BLOCK_EQUIP_SWITCH])
@states[Vocab.status] = anybody
@states[Vocab.save] = !$game_system.save_disabled
@states[Vocab.game_end] = true
@command_window.change_command(Vocab.item, @states[Vocab.item])
@command_window.change_command(Vocab.skill, @states[Vocab.skill])
@command_window.change_command(Vocab.equip, @states[Vocab.equip])
end
def update_command_selection
if Input.trigger?(Input::C)
name = @command_window.current_name
return Sound.play_cancel unless @states[name]
end
kyon_disable_equip_scn_mn_cmd_sel
end
end