Help - Search - Members - Calendar
Full Version: Law's Battle Icons
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS-Submissions
The Law G14
Law's Battle Icons

Version 1.0
The Law G14
8/30/09


Introduction
This small little script I made basically allows the party command window in the battle screen to have icons. For example, next to skills, there would be a skill icon, and next to attack, there would be an attack icon and so on. Hope you guys enjoy the script smile.gif


Features

Allows the party command window to have icons.


Script

Click to view attachment

Compatibility

I don't think this would run into any compatibility issues, but if it does, feel free to report it to me.

Screenshot



Installation

Save FOUR icons in the icons section of your resource manager. The first icon, or the icon next to 'Attack' should be named Battle0, then the next icon, or the icon next to 'skill' should be Battle1, and so on.


FAQ

None as of now.

Terms and Conditions

Just credit it me where it's due smile.gif

Also, if you plan on hosting this script in other sites PLEASE TELL ME.

Special Thanks

Special Thanks to Blizzard for helping with the icon part of the script.
Icalasari
This script looks awesome, Law! Odd how something so simple can enhance the appearance of a battle
Holder
Wonderful to see you're moving into altering the battle system, you're progressing quickly.

Keep up the great work.
The Law G14
@Icalasari: Hey, thanks! If you find any problems, feel free to report them smile.gif

@Holder: Thanks, Holder smile.gif It was actually the easiest script I've made so far since before, I was trying to add icons to the command window in the menu and Blizzard helped me out. All I did was apply the same logic for this command window and I found myself a decent script.

Any suggestions are welcome smile.gif
Soul_Torn
Alright my issue is...
this script isn't compatible with the: Enu SBS Tanketai XP script...

*sounds like an utter newb*

is there a way to make it compatible?

Thanks,
Soul_Torn
The Law G14
Hm, may I see Enu's battle script, or could you just link me to the page that I can get the script?
Soul_Torn
QUOTE (The Law G14 @ Sep 26 2009, 12:45 PM) *
Hm, may I see Enu's battle script, or could you just link me to the page that I can get the script?


The Side View Battle Script:
http://www.rpgrevolution.com/forums/index....showtopic=25504

i don't know what the issue is again. XD.



the is the error message that pops up... it works fine when i use a clean game with no added scripts..>.>
The Law G14
Alright, found out how to fix it, finally. Put my script under all your other scripts, though keep it above main and that should do the trick.
Soul_Torn
QUOTE (The Law G14 @ Sep 26 2009, 01:00 PM) *
Alright, found out how to fix it, finally. Put my script under all your other scripts, though keep it above main and that should do the trick.


Thats how it is... and i still get that error message. O.o
The Law G14
Yeah, I figured it out! Alright, first of all, replace the old Battle Icons script you have with this:

CODE
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#=========================*Law's Battle Icons*=================================
#=========================Author: The Law G14==================================
#============================Version 1.0=======================================
#==============================================================================
#------------------------------------------------------------------------------
#===============================================================================
# ** Window_Command_Battle
#-------------------------------------------------------------------------------
# This window takes care of the icon pictures.
#-------------------------------------------------------------------------------
class Window_Command_Battle < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  attr_reader :continue
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize(index, continue)
    commands = [$data_system.words.attack, $data_system.words.skill, $data_system.words.guard,
                $data_system.words.item]
    super(0, 0, 160, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
  end
  #-----------------------------------------------------------------------------
  # * Draw Item
  #-----------------------------------------------------------------------------
  def draw_item(i, color)
    self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon("Battle#{i}")
    opacity = (color == normal_color ? 255 : 128)
    self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = color
    self.contents.draw_text(32, i*32, 148, 32, @commands[i])
  end  
end
#-------------------------------------------------------------------------------
# * Refresh
#-------------------------------------------------------------------------------
def refresh
  self.contents.clear
  for i in 0...@item_max
    draw_item(i, normal_color)
  end
end


Next, on line 51 of the Sideview 2 script, replace that line with this:

CODE
@actor_command_window = Window_Command_Battle.new(160, [s1, s2, s3, s4])


That should work smile.gif
Soul_Torn
DId it.
got this:


it only does this when i go to use the commands.
like it shows up, then crashes when i go to make the attack.
The Law G14
Alright here's the new script, replace it with the old Battle Icons script:

CODE
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#=========================*Law's Battle Icons*=================================
#=========================Author: The Law G14==================================
#============================Version 1.0=======================================
#==============================================================================
#------------------------------------------------------------------------------
#===============================================================================
# ** Window_Command_Battle
#-------------------------------------------------------------------------------
# This window takes care of the icon pictures.
#-------------------------------------------------------------------------------
class Window_Command_Battle < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  attr_reader :continue
  attr_accessor :commands
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize(index, continue)
    commands = [$data_system.words.attack, $data_system.words.skill, $data_system.words.guard,
                $data_system.words.item]
    super(0, 0, 160, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
  end
  #-----------------------------------------------------------------------------
  # * Draw Item
  #-----------------------------------------------------------------------------
  def draw_item(i, color)
    self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon("Battle#{i}")
    opacity = (color == normal_color ? 255 : 128)
    self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = color
    self.contents.draw_text(32, i*32, 148, 32, @commands[i])
  end  
end
#-------------------------------------------------------------------------------
# * Refresh
#-------------------------------------------------------------------------------
def refresh
  self.contents.clear
  for i in 0...@item_max
    draw_item(i, normal_color)
  end
end
Soul_Torn
Sorry for being such a bother.
Thanks! It finally works! biggrin.gif
Awesome script by the way... cool.gif
Now the equip menu is acting up again. xD.
wow...
The Law G14
Nope, you weren't a bother at all, I like helping out smile.gif

If you have any more questions please ask biggrin.gif

carnie_natas
QUOTE (The Law G14 @ Sep 26 2009, 01:40 PM) *
Nope, you weren't a bother at all, I like helping out smile.gif

If you have any more questions please ask biggrin.gif



i have a question law,why are you such a pimp????? (lol)

law has some of the best scripts ive seen thus far,no lie....maybe not some of the most complex,but some of the most needed options for a game,law provides to us,and no one else does it this good
The Law G14
Woah, thanks alot man, your comments mean a bunch to me smile.gif

Best scripts....? That has made my day biggrin.gif

If you have any questions about the script, please dont hesitate to ask biggrin.gif
BlackMask
Why is it when i ever i end up needing a script you've already made it!!!!
you are an Uber Pimp and I wish you great luck in you life
-Edit this script owns so much
The Law G14
Wow, you're too kind man, thank you very much!

Please tell me if you find any errors smile.gif
carnie_natas
of course it does,all of law's scripts shine!
BrokenCrowe
Sorry if i sound "bad"

but your icon script isn't compatible with the Minkoff's battle system

the script/ demo thingie can be found here:
http://www.rpgrevolution.com/forums/index....showtopic=30753
xD

Thanks,
Brokencrowe
The Law G14
Hey don't worry about it, man, I'm here to help biggrin.gif

But the link you gave me doesn't link to the actual script though, can you give me a different one?
BrokenCrowe
QUOTE (The Law G14 @ Oct 5 2009, 02:07 PM) *
Hey don't worry about it, man, I'm here to help biggrin.gif

But the link you gave me doesn't link to the actual script though, can you give me a different one?


i don't have the actual script... its in the demo...
sorry... :S

cause its like 5 separate scripts....
BlackMask
go into the script editor...... and copy all the scripts and post them...........sigh....
The Law G14
QUOTE
i don't have the actual script... its in the demo...


Is there any way you could give me a link to this demo? And yeah, like BlackMask said, just copy the scripts into the script editor (F11) of your game but keep them above main.
joey101
Hey does this work with extra battle commands???
The Law G14
I'm not entirely sure which script you're referring to, could you post the script within a spoiler here?
carnie_natas
Shoot i'm still using this script. I use a few of Law's godly scripts....Godly i tell you, our grandchildren will speak epic tales of law and the scripts.
The Law G14
lol haha thanks man, appreciate it biggrin.gif Please tell me if you find any errors!
carnie_natas
I haven't found any errors with anything you have provided me to use. Everything is epic thus far!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.