Icon Actor Command Window
Authors: Reno-s--Joker, Calintz16438
Version: 3.0
Type: Aesthetic Enhancement for Actor Command Window
Key Term: Battle Add-on
IntroductionSomething I hope I can thank this awesome community with. :D
A purely aesthetic modification of the actor's command window (Attack, Skill, etc. window) during battle. See screenshots/demo for better description.
You will have to customise Scene Battle yourself and link it to this script if you have more battle commands (e.g. special skill windows like 'summon' or 'status').
This was my second script, so at the moment it's kinda rigid and hard to customise (although now greatly improved thanks to Calintz's help :-*). If anyone likes it enough, i'll try my best to make it even better. :D
Features
- Now features easy to use config options so no scripting familiarity is needed at all! :D
- Now includes an option for vertical icons!
- Four tip window/ icon window combinations to choose from.
- Each actor's commands on their turn appear in a centred* command window
- Commands appear as icons (no text)
- Non-invasive tip text to explain icons - select between two types (to ensure readability of tip - see screenshots)
- Can have any number of commands (except it will go off the screen if you have TOO many of course)
- Uses larger icons than normal
- * Customise all position, opacity, windowskin, colour, etc. values easily with Cal's new config section
ScreenshotsDefault ScriptScreenies Demonstrating Tip Window Styles: ShowHide
Screenie for default window style (shorter battlers) - the tip window is under the icons
(http://i210.photobucket.com/albums/bb72/reno-s--brain/default.jpg)
Screenie for alternate window style (taller batters) - it's almost impossible to read when they're too tall
(http://i210.photobucket.com/albums/bb72/reno-s--brain/for_taller.jpg)
Calintz's ScriptScreenies Demonstrating Cal's Script: ShowHide
Coloured text
(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod02.jpg)
Standard text
(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod03.jpg)
Version 3.0Coming soon... hopefully. ^-^
For the time being... just get the gist from the other versions. :xD:
DemoVersion 3.0 Demo: Rapidsharehttp://rapidshare.com/files/205553108/Actor_Command.rar
Older VersionsDefault Script Demo - Mediafire:
http://www.mediafire.com/download.php?jyzqgxrkkzj (more up-to-date, I think)
Default Script Alternate download site - Rapidshare:
http://rapidshare.com/files/184111783/ActorCommandDemo.rar
Calintz's Script Download
http://www.sendspace.com/file/rjrq73
ScriptThis is only the default script. Please download Calintz's demo if you wish to use his version of the script, and the 3.0 demo if you wish to use the latest version of the script (includes both Calintz's additions and the default script).
Main Script now with Scene_Battle Mods Included: ShowHide #==============================================================================
# ** Horizontal Battle Actor Command Window with Icons
#------------------------------------------------------------------------------
# brought to you by Reno-s--Joker
#------------------------------------------------------------------------------
# ** Window_ActorCommand
#------------------------------------------------------------------------------
# This window is used to select whether to fight or escape on the battle
# screen.
#==============================================================================
class Window_ActorCommand < Window_Selectable
# Quick customisation - make false if you want an opaque window along the top
# for the icon tips. Better for busy battle backs and tall actor battlers.
# Keep true if you want the window to remain transparent and under the actor
# command window.
TIP_TRANS = true # True is default
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Change these at will - they will not actually appear on the command window
# Just a good reminder :)
@commands = ["attack", "skills", "defend", "item", "rubbish", "random" ]
#Don't change this:
@item_max = @commands.size
# This section keeps the window centred no matter how many objects
super (0, 0, (64*@item_max)+32, 80)
self.contents = Bitmap.new(self.width-32, self.height-32)
self.x = (640-self.width)/2
#You can customise these to change opacity and position of the window:
self.y = 242
self.opacity = 150
self.back_opacity = 95
# Change the icons in this section if you're re-ordering the commands
for i in 0..@commands.size
case i
when 0
icon = "C-attack" # Change this to the icon of the first command
when 1
icon = "C-skill" # Change this to the icon of the second command
when 2
icon = "C-defend" # ... etc.
when 3
icon = "C-item"
# If you have assigned icons to all your desired commands, you can delete
# the two lines below:
else
icon = "C-errorhandling"
end
draw_item(i, 8+(64*i), 0,icon, 235)
end
self.active = false
self.visible = false
self.index = 0
#--------------------------------------------------------------------------
# * Set up the icon tip window
#--------------------------------------------------------------------------
@tip_window = Window_Help.new
if TIP_TRANS == false
@tip_window.opacity = 150
else
@tip_window.contents = Bitmap.new(self.width-32, self.height-32)
@tip_window.contents.font.size = 18
@tip_window.contents.font.color = system_color
@tip_window.contents.font.bold = true
@tip_window.x = self.x
@tip_window.y = self.y + 55
@tip_window.width= self.width
@tip_window.height= 82
@tip_window.opacity = 0
end
@tip_window.active = false
@tip_window.visible= false
end
#--------------------------------------------------------------------------
# * Define method draw_item (used for the icons)
#--------------------------------------------------------------------------
def draw_item(index, x, y, picture, opacity)
bitmap = RPG::Cache.icon(picture)
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 48, 48), opacity)
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
if @index >= 0 and @index <=(@commands.size-1)
self.cursor_rect.set(8 + index * 64, 0, 48, 48)
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if self.active and @index >= 0 and @index <=(@commands.size-1)
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@index += 1
end
# If the left directional button was pressed
if Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
# Update help text (update_help is defined by the subclasses)
if self.active and @tip_window != nil
update_help
if Input.repeat?(Input::C)
@tip_window.visible = false
end
if Input.repeat?(Input::B)
@tip_window.visible = false
end
end
# Update cursor rectangle
update_cursor_rect
elsif self.active
# This section is a bit messy, but it makes the cursor 'loop' through the
# commands when you go too far left or right
if @index=0
if Input.press?(Input::LEFT)
@index=(@commands.size-1)
end
end
if @index>=@commands.size
@index=0
end
end
end
#--------------------------------------------------------------------------
# * Update the tip window text when you 'hover' over commands
#--------------------------------------------------------------------------
def update_help
case index
when 0
@tip_window.visible=true
@tip_window.set_text("Attack the enemy with your weapon", 1)
# Change the above to the description for your first command
when 1
@tip_window.visible=true
@tip_window.set_text("Use learned magic skills", 1)
# Change the above to the description for your second command
when 2
@tip_window.visible=true
@tip_window.set_text("Defend against attacks", 1)
# ... etc.
when 3
@tip_window.visible=true
@tip_window.set_text("Use an item from your bag", 1)
# If you have assigned descriptions for all your desired commands, you can
# delete the three lines below:
else
@tip_window.visible=true
@tip_window.set_text("<insert command description here>", 1)
end
end
end
#==============================================================================
# ** End of Main Script
#==============================================================================
#==============================================================================
# ** Scene Battle Mods - thanks to Fantasist's Help :)
#==============================================================================
class Scene_Battle
alias start_phase1_mod start_phase1
def start_phase1
start_phase1_mod
if @actor_command_window.is_a?(Window_Command)
@actor_command_window.dispose
@actor_command_window = Window_ActorCommand.new
end
end
alias phase3_setup_command_window_mod phase3_setup_command_window
def phase3_setup_command_window
phase3_setup_command_window_mod
@actor_command_window.x=(640-@actor_command_window.width)/2
end
end
#==============================================================================
# ** End of Scene Battle Mods
#==============================================================================
InstructionsTo download latest version:See demos section above. It should be the first link. When you open the script in RMXP, check the comments in the first part of the script for how to customise. <3
...
If you'd like to download the original script (this does not include the nice customisation available in Calintz's script):Download the demo and use the game's script layout as a guide. Demo requires Standard RTP thing to work.
OR
Copy and paste the script ("Main Script") above main.
You no longer need to make the two separate mods as before. :)
Finally, put your icons in the 'Graphics\Icons' folder and change the beginning parts of the main script to match their filenames. The icons should be 48x48.
To use Calintz's Mod:Download the demo from the above link.
CompatibilityI'm pretty sure it WON'T work with any kind of CBS which doesn't involve the standard tell-your-actor-what-to-do-using-a-window function (e.g. an ABS).
Currently does not work well with Blizzard's Chaos Rage Limit System, and probably not with RTAB either :'(, but I am still working on a new version! Please see this version of the script and Blizzard's EOS script if you wish to embark on this quest yourself using a vertical window: [REQUEST]I am looking to make these scripts compatible. (http://forum.chaos-project.com/index.php?topic=3026.0)
Credits and Thanks
- Calintz for adding to my script and making a wonderful new version of the script! ^-^
- GubiD from Creation Asylum forums for pointing me out to...
- http://www.rpgrevolution.com/forums/lofiversion/index.php/t18178.html - Jens009 BoF Cross Command
- Golden Sun for GBA - the inspiration for this script
- shdwlink1993 for databasing my script
- Fantasist for helping me improve the script by aliasing the Scene_Battle mods in to the main script
- Jackolas for pointing out a bug!
- Calintz (again) for suggesting I make it compatible with Blizzard's CRLS - it kinda worked! :P
Author's NotesI have managed to develop some compatibility with Blizzard's Chaos Rage Limit System (http://forum.chaos-project.com/index.php?topic=110.0)! Thanks to Calintz for giving me the motivation to make it work! :D Check second page of posts for demo DL.Works great with window skins that don't use a rectangle as their selection shape (e.g. a glowing circle would make the icon appear to glow as you passed over it).
Also highly recommended - a battle command memory script.I'm not a scripter so apologies about the version number and version history.... ^^;
And finally - please let me know if you get any errors!
Great looking script, Reno-s--Joker. I took the liberty of databasing it (I don't think anyone will mind ;))
As the night pulls on, I can't really check out the demo at the moment, unfortunately. But what I do see here is pretty impressive and awesome. Visual uses of the battle menu really makes a game more interesting and this perked my eyes open the moment I unspoilered that spoiler. :P
I will consider using this, and hopefully there won't be any errors. If there are, be prepared to see if you can fix it. :)
On an unrelated note, props to you with those cute names in the screenshot. And you finally got an avatar. :3 Lovely...
This seems to be pretty interesting I must say. I would check out the demo but it is like 5 in the morning and I can't get back to sleep. But probably tonight I will check this out.
Aesthetic indeed :) *powers up*
It is really neat, that is for sure...
Thanks everybody! I really appreciate your encouraging comments and I hope I can be of help if there are any issues.
I'm actually working on a few more aesthetic developments like animating it (although they're not going too well... :wacko:), but I'll be waiting for your feedback! :haha:
Thanks for the power up, Fantasist! And @Starrodkirby86: I do like to side with the monsters more often that not... I'll probably have to make a better, shinier avvie sometime soon. ;)
Okay, some tips:
Read Blizzard's scripting tutorial about
aliasing methods. That scene_battle 3 mod can be aliased.
The method Scene_Battle#start_phase1 is executed once everytime the battle scene starts. You can replace the command window by checking the class like this:
unless @actor_command_window.is_a?(Window_ActorStatus)
@actor_command_window.dispose
@actor_command_window = Window_ActorStatus.new
end
Thanks for the tip!
I tried to use aliasing but I just got a vague hang of it last week. I'll have a go at it again. :)
EDIT:
Wow, thanks! :haha: I've updated the script - now there's only one. Haha, and I've learned something more about aliasing. ;)
Thanks again.
Very nice job. I love the way you did the interface -- very next-genish.
Although, it'd be amazing if the script made those fancy shadows. But oh well, what use would we have of GIMP and Photoshop then, eh?
:D Thank you!
I know, I wanted it to at least increase the opacity of the selected icon and decrease the others' (like in this awesome rng menu I found, can't remember where), but I'm just not good enough at scripting yet... :|
Anyways, thanks again, I really appreciate it. :)
Again...I like it, haha...
Opacity isn't hard, though you'd have to use sprites instead, I believe.
For each icon, you'd create a sprite at the appropriate coordinates stored to x and y like this:
sprite = Sprite.new
sprite.x = x; sprite.y = y
sprite.bitmap = Bitmap.new(RPG::Cache.icon(<yadayada>)
sprite.opacity = 120 # the default opacity; looks see-through
Each time you change the icon, you'd call this, assuming the sprites were in an array and @index was your menu index:
@sprites[@index - 1].opacity = 120
@sprites[@index].opacity = 255
:D Thanks for the tips! I can see how that would work.
I don't understand arrays yet - could you explain how I could set one up?
^-^ Thanks again! <3
I'd not use sprites there. You could just redraw the window contents every time a button is pressed. You know the bitmap.blt method, right? Check the RMXP help file, the last argument is the optional opacity. But beware, do NOT do that in any update method. Do it only when the player moves the cursor.
Quote from: Fantasist on January 31, 2009, 01:32:07 am
You know the bitmap.blt method, right? Check the RMXP help file, the last argument is the optional opacity. But beware, do NOT do that in any update method. Do it only when the player moves the cursor.
LOL using the .blt method every frame?! NOW THAT WILL LAG! probably worse that refreshing the content of 6 windows, some that with gradient bars and such, every frame. I did that once went from 40FPS to 6FPS. LOL!
ya DON'T use ANY method that has even marginally heavy processing every frame unless you are deliberately trying to cause lag or know what you are doing. that includes anything that creates of modifies a bitmap.
QuoteBut beware, do NOT do that in any update method. Do it only when the player moves the cursor.
:P
I always update the equip windows in my CMS like that. Check for Input::repeat?(KEY) and then update the bitmap. Something like this:
def update
blah_blah
if Input.repeat?(Input::RIGHT) || Input.repeat?(Input::RIGHT)
redraw_icons # Draws icons with 128 opacity, except the one at the @index position
end
end
Oops, I remember that now. I thought that there was something like that, but I couldn't remember.
And as for lag, its funny how RMXP can make those heavy operations so trivial :P
That simple blt-opacity every frame would mean that instead of copy sprites to screen + flip buffer, it would become
- check to see if original bitmap is in cache
- if yes, then use it
- if no, load it and save it to cache
- create a new temporary buffer for drawing the opacity
- iterate through all pixels (thats 576 in a 24x24 image), multiplying all colors by opacity/255
- copy all those pixels to the sprite buffer, iterating through all of those pixels again (all 576) and another set of the same number in the destination
- copy all sprites to the screen
That's some serious CPU usage :P
Aww...
I was really hoping I could use this...
It however, is NOT compatible with Blizz's Chaos Rage system... =(
Wow, let me just digest all of that... :D
I'm having a few issues with the index looping but I'm sure I'll be able to work it out. It seems that it will work nicely. ^-^
@ Calintz16438: I haven't checked that script out yet, but I'll promise to look into is asap. :P
I would really appreciate it if there was some way you could make them compatible...
@WcW: So you say updating sprites is better than the blt operation (which is NOT done every frame, only when player presses buttons)? Hm, i'll have to test it out.
@Calintz: I just took a look at the Chaos Rage Limit System, but I don't think I can do this without some help - my scripting is pretty basic... D: But I'd really like to have a go at it, if I could - I think I want to use the Chaos Rage Limit System too! <333 :haha:
The only thing I'd think is the have the icons scroll instead of the new commands. Maybe it's not that hard, but there's a fair amount of code I have to process involving the actor command window... >-<
@Fantasist: I don't know half as much about scripting as you but they do seem to have similar effects. Although I can't detect the lag difference (if any) too well. ^-^ Well I appreciate that you'll test it out. <3
=)
it's okay...
:D I'm probably still going to have a crack at it, and I'll let you know if it's successful. ;)
EDIT:
This is what I have so far, although I think there is extreme lag... :wacko:
DO NOT USE D:First of back up your copy of Blizz's script. I'm going to rape it with my bad scripting, and it just wouldn't be right....
def update_sls_input(battler), def update_srs_input(battler), and def update_cds_input(battler)We need to change the RIGHT hold to an UP hold by changing these three lines:
1) if @actor_command_window.test_limit && Input.press?(Input::RIGHT)
2) if @actor_command_window.index == 1 && Input.press?(Input::RIGHT)
3) if @actor_command_window.index == 2 && Input.press?(Input::RIGHT)
Then we need to change the UP and DOWN to LEFT and RIGHT in all the parts which look like this:
if !Input.press?(Input::UP) && !Input.press?(Input::DOWN)
@actor_command_window.update
end
You should get icons that represent Soul Rage and Chaos Drive, etc.
module IconCFG
$icon = []
$icon[0]= "attack" # Change this to the icon of the first command
$icon[1]= "skill" # Change this to the icon of the second command
$icon[2]= "defend" # ... etc.
$icon[3]= "item"
$icon[4]= "soulrage"
$icon[5]= "soullimit"
$icon[6]= "chaosdrive"
end
Now for the laggy bit. Here is my patchy way of merging refresh and update. D: This code goes somewhere in def update, maybe after all the other stuff. IT DOES NOT ANIMATE!
I == FAIL
if BlizzCFG::SRS_ACTIVE == true and BlizzCFG::CDS_ACTIVE == true
self.contents.clear
self.contents.blt(8+(64*3), 0, RPG::Cache.icon($icon[3]), Rect.new(0,0,48,48), 255)
if @actor != nil
# if SLS usable and already command active
if BlizzCFG::SLS_ACTIVE && BlizzCFG::SL_USERS.include?(@actor.id) &&
@actor.sl_can_use?
if self.index != 0 || @commands[0] != @actor.limit_name
# draw the normal command
self.contents.blt(8+(64*0), 0, RPG::Cache.icon($icon[0]), Rect.new(0,0,48,48), 255)
elsif @commands[0] == @actor.limit_name
self.contents.blt(8+(64*0), 0, RPG::Cache.icon($icon[5]), Rect.new(0,0,48,48), 255)
end
else
self.contents.blt(8+(64*0), 0, RPG::Cache.icon($icon[0]), Rect.new(0,0,48,48), 200)
end
# if SRS usable and already command active
if BlizzCFG::SRS_ACTIVE && BlizzCFG::SR_USERS.include?(@actor.id)
if self.index != 1 || @commands[1] != BlizzCFG::SRS_NAME
# draw the normal command
self.contents.blt(8+(64*1), 0, RPG::Cache.icon($icon[1]), Rect.new(0,0,48,48), 255)
elsif @commands[1] == BlizzCFG::SRS_NAME
self.contents.blt(8+(64*1), 0, RPG::Cache.icon($icon[4]), Rect.new(0,0,48,48), 255)
end
else
self.contents.blt(8+(64*1), 0, RPG::Cache.icon($icon[1]), Rect.new(0,0,48,48), 200)
end
# if CDS usable and already command active
if BlizzCFG::CDS_ACTIVE && BlizzCFG::CD_USERS.include?(@actor.id)
if self.index != 2 || @commands[2] != BlizzCFG::CDS_NAME
# draw the normal command
self.contents.blt(8+(64*2), 0, RPG::Cache.icon($icon[2]), Rect.new(0,0,48,48), 255)
elsif @commands[2] == BlizzCFG::CDS_NAME
self.contents.blt(8+(64*2), 0, RPG::Cache.icon($icon[6]), Rect.new(0,0,48,48), 255)
end
else
self.contents.blt(8+(64*2), 0, RPG::Cache.icon($icon[2]), Rect.new(0,0,48,48), 200)
end
end
end
Part Three: Commands replacement stuff: ShowHide This goes right under
class Window_ActorCommand < Window_Selectable
attr_accessor :commands
attr_reader :actor
This goes under the list of commands which comes in my script
@commands2 = [@commands[0], BlizzCFG::SRS_NAME, BlizzCFG::CDS_NAME]
The script also works when I do this, I think:
def swap_commands(index)
@commands[index], @commands2[index] = @commands2[index], @commands[index]
#refresh<---- oo look, commented out
end
Well mainly because refresh=update now. I know this will have dire consequences for lag.
Currently this does not animate, show tips for soul system icons, nor do a helluva lotta things. :<_<:
I'll see if I can put it in presentable mode soon, but for the time being it should be clear I really need help!!! :O_O:
And btw I'm still working on and failing @ the opacity.... :urgh:
Hmm...
Haha, I can't make heads or tails of anything...
Good luck, I hope you can pull through.
I know... D: I was half asleep.
I'm not surprised if I try it again today and find out I was hallucinating.
Well, even crap is a start. :)
EDIT:
Here is a crappy demo of the modification to make it compatible. Sorry, Blizzard, if I killed your script. :( It pains me to do so. :O.o:
I'm still getting the gist of the slide animation, so I've omitted from the demo. And I suggest you change the icons I provided because they aren't very informative.
At the moment there aren't tip window descriptions for each of the chaos/soul commands, either. :<_<:
The Crappy Demo on MediaFire (http://www.mediafire.com/?ch5jzjm1duj)
Let me know what you think. ;)
QuoteHere is my patchy way of merging refresh and update.
Never combine those two methods o.o Make absolutely sure the code from refresh doesn't run on every update. I'll try the demo.
I knew I did something wrong as soon as I did it... >->
Thanks Fantasist. I deserve a bigger rebuke than that, though. :haha:
srry to post so late.. but found a bug.
with opaque window along the top for the icon tips this bug is the worse
if you use a skill, your allowed to select an enemy. but without selecting 1 you press on esc to return to the skill window (maybe because of wrong skill selected)
than this happens:
(http://i102.photobucket.com/albums/m99/aqua_nl/PK%20Game/bug.png)
note the top info panel and the Horizontal Icon Actor Command Window (which will move if u press left and right wile your still in the skill list)
you also get this if you don't use the top window for info but its less disturbing.
hope it can be fixed
Wow, good find - thank you Jackolas! :D
I think I might know how to fix this. ^-^ As soon as I get around to it I'll post it up - hopefully this weekend.
Np 8)
Would love to see the update. hope you get it fixed :haha:
horizontal menus are a pain in the ass.
that said, this looks good, keep it up.
:D Haha, thanks NAMKCOR! I really appreciate it. ^-^
EDIT:
:w00t:
Jackolas, I got it! ^-^ Although to be honest I don't know why it makes a difference:
#==============================================================================
# ** Horizontal Battle Actor Command Window with Icons
#------------------------------------------------------------------------------
# brought to you by Reno-s--Joker
#------------------------------------------------------------------------------
# ** Window_ActorCommand
#------------------------------------------------------------------------------
# This window is used to select whether to fight or escape on the battle
# screen.
#==============================================================================
class Window_ActorCommand < Window_Selectable
# Quick customisation - make false if you want an opaque window along the top
# for the icon tips. Better for busy battle backs and tall actor battlers.
# Keep true if you want the window to remain transparent and under the actor
# command window.
TIP_TRANS = false # True is default
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Change these at will - they will not actually appear on the command window
# Just a good reminder :)
@commands = ["attack", "skills", "defend", "item"]
#Don't change this:
@item_max = @commands.size
# This section keeps the window centred no matter how many objects
super (0, 0, (64*@item_max)+32, 80)
self.contents = Bitmap.new(self.width-32, self.height-32)
self.x = (640-self.width)/2
#You can customise these to change opacity and position of the window:
self.y = 242
self.opacity = 150
self.back_opacity = 95
# Change the icons in this section if you're re-ordering the commands
for i in 0..@commands.size
case i
when 0
icon = "C-attack" # Change this to the icon of the first command
when 1
icon = "C-skill" # Change this to the icon of the second command
when 2
icon = "C-defend" # ... etc.
when 3
icon = "C-item"
# If you have assigned icons to all your desired commands, you can delete
# the two lines below:
else
icon = "C-errorhandling"
end
self.contents.blt(8+(64*i), 0, RPG::Cache.icon(icon), Rect.new(0,0,48,48), 255)
end
self.active = false
self.visible = false
self.index = 0
#--------------------------------------------------------------------------
# * Set up the icon tip window
#--------------------------------------------------------------------------
@tip_window = Window_Help.new
if TIP_TRANS == false
@tip_window.opacity = 150
else
@tip_window.contents = Bitmap.new(self.width-32, self.height-32)
@tip_window.contents.font.size = 18
@tip_window.contents.font.color = system_color
@tip_window.contents.font.bold = true
@tip_window.x = self.x
@tip_window.y = self.y + 55
@tip_window.width= self.width
@tip_window.height= 82
@tip_window.opacity = 0
end
@tip_window.active = false
@tip_window.visible= false
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
if @index >= 0 and @index <=(@commands.size-1)
self.cursor_rect.set(8 + index * 64, 0, 48, 48)
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if self.active and @index >= 0 and @index <=(@commands.size-1)
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@index += 1
end
# If the left directional button was pressed
if Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
# Update help text (update_help is defined by the subclasses)
if self.active and @tip_window != nil
update_help
if Input.repeat?(Input::C)
@tip_window.visible = false
end
if Input.repeat?(Input::B)
@tip_window.visible = false
end
end
# Update cursor rectangle
update_cursor_rect
elsif self.active
# This section is a bit messy, but it makes the cursor 'loop' through the
# commands when you go too far left or right
if @index=0
if Input.press?(Input::LEFT)
@index=(@commands.size-1)
end
end
if @index>=@commands.size
@index=0
end
end
end
#--------------------------------------------------------------------------
# * Update the tip window text when you 'hover' over commands
#--------------------------------------------------------------------------
def update_help
case index
when 0
@tip_window.visible=true
@tip_window.set_text("Attack the enemy with your weapon", 1)
# Change the above to the description for your first command
when 1
@tip_window.visible=true
@tip_window.set_text("Use learned magic skills", 1)
# Change the above to the description for your second command
when 2
@tip_window.visible=true
@tip_window.set_text("Defend against attacks", 1)
# ... etc.
when 3
@tip_window.visible=true
@tip_window.set_text("Use an item from your bag", 1)
# If you have assigned descriptions for all your desired commands, you can
# delete the three lines below:
else
@tip_window.visible=true
@tip_window.set_text("<insert command description here>", 1)
end
end
end
#==============================================================================
# ** End of Main Script
#==============================================================================
#==============================================================================
# ** Scene Battle Mods - thanks to Fantasist's Help :)
#==============================================================================
class Scene_Battle
alias start_phase1_mod start_phase1
def start_phase1
start_phase1_mod
if @actor_command_window.is_a?(Window_Command)
@actor_command_window.dispose
@actor_command_window = Window_ActorCommand.new
end
end
alias phase3_setup_command_window_mod phase3_setup_command_window
def phase3_setup_command_window
phase3_setup_command_window_mod
@actor_command_window.x=(640-@actor_command_window.width)/2
end
end
#==============================================================================
# ** End of Scene Battle Mods
#==============================================================================
OR if you've made heaps of mods to the code, just find this section in def update:
# Update cursor rectangle
update_cursor_rect
else
# This section is a bit messy, but it makes the cursor 'loop' through the
# commands when you go too far left or right
if @index=0 (etc, etc.)
and change the
into
:D Hope it works for you! Let me know of any issues! <3
Works like a dream.
so far I know this script is than bug free :P
Well done. (I really love the script more every time I see it).
you maybe wane change the script on the first page (since its your main article about the script)
It makes me so happy you like it so much! :D
That's a good idea - lol, thanks for reminding me! Will do. ^-^
Calintz! :D
I've uploaded a demo of the best working version of my script compatible with Blizzard's CRLS.
Rapidshare DL (http://rapidshare.com/files/183502768/ActorCommandDemo.rar)
Personal Site Mirror (http://www.downloads.brain.izfree.com/CRLSxACM.rar)
Currently the only thing it doesn't do is animate the icon when you press 'up' - I think I'll need somebody's help with that one... *feels guilty about asking Fantasist* :^_^':
I also apologise for the poorly made, 2 second graphics - but hey, it works... ^-^; The overlaying allows for a bit more flexibility anyways.
I hope you'll check it out! I'm still working on animating it! :D
It's still not compatible...
Really? What's the problem? :(
It claims the CRSL.. .. ..
Wait, you mean I shoved it in the CRLS demo? :^_^':
You do have to get rid of Blizzard's mod to the actor command window and change the stuff in the CRLS. As much as I hate to say this, it's the CRLS that's not compatible with this script, not the other way around. I only changed a few lines in my script to make way for the command changes and icon shifting.
It makes no difference which script is the culprit. This system becomes incompatible with my game, because of my current selection...
I guess I won't be using this unless someone makes CRSL compatible for me, seeing as how I can't do it myself...I had everything already planned out with how I was gonna use this.
**Good script though.
**I couldn't get the font to change color though, no matter how hard I tried, and I only tried this with your DEMO.. .. .. :???:
Aww... well it was worth a try. Thanks for your patience, buddy! ;)
One thing I'm unsure of - why would you want to change the font colour? :???: The command window only has icons... D:
Okay sorry - I'm being really slow today and my head kills me. :(
Thanks again - I'll keep working on improving the compatibility anyways. :D
My mistake for not clarifying...
I wanted to change the font color of the help window text...
I do hope you can pull through with this.
:D That's okay!
If you want to change the entire text's colour, that should be fairly easy. ;)
Window_Help doesn't allow for any other coloured text other than white. In this section of the code:
#--------------------------------------------------------------------------
# * Set Text
# text : text string displayed in window
# align : alignment (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
# If at least one part of text and alignment differ from last time
if text != @text or align != @align
# Redraw text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
comment out this line.
self.contents.font.color = normal_color
If you want the text to always appear a different colour:Then in the tip window setup code:
#--------------------------------------------------------------------------
# * Set up the icon tip window
#--------------------------------------------------------------------------
@tip_window = Window_Help.new
self.help_window = @tip_window
if RsJCFG::TIP_TRANS == false
@tip_window.opacity = 150
else
@tip_window.contents = Bitmap.new(self.width-32, self.height-32)
@tip_window.contents.font.size = 18
@tip_window.contents.font.bold = true
@tip_window.x = self.x
@tip_window.y = self.y + 55
@tip_window.width= self.width
@tip_window.height= 82
@tip_window.opacity = 0
end
@tip_window.active = false
@tip_window.visible= false
end
Add this line:
self.contents.font.color = Color.new(X, X, X, X)
(make sure you change the xs to the colour values of the colour you want.
If you want to change it for CRLS options onlyReplace this:
#--------------------------------------------------------------------------
# * Update the tip window text when you 'hover' over commands
#--------------------------------------------------------------------------
def update_help
case index
when 0
if Input.press?(Input::UP) and BlizzCFG::SLS_ACTIVE and BlizzCFG::SL_USERS.include?(@actor.id) and @actor.sl_can_use? and @commands[0] == @actor.limit_name and self.active
skill = $data_skills[@actor.limit_id]
@tip_window.set_text(skill.description, 1)
elsif self.active
@tip_window.visible=true
@tip_window.set_text("Attack the enemy with your weapon", 1)
# Change the above to the description for your first command
end
when 1
if Input.press?(Input::UP) and BlizzCFG::SRS_ACTIVE and BlizzCFG::SR_USERS.include?(@actor.id) and @commands[1] == BlizzCFG::SRS_NAME and self.active
@tip_window.set_text("Soul Rage", 1)
elsif self.active
@tip_window.visible=true
@tip_window.set_text("Use learned magic skills", 1)
# Change the above to the description for your second command
end
when 2
if Input.press?(Input::UP) and BlizzCFG::CDS_ACTIVE and BlizzCFG::CD_USERS.include?(@actor.id) and @commands[2] == BlizzCFG::CDS_NAME and self.active
@tip_window.set_text("Chaos Drive", 1)
elsif self.active
@tip_window.visible=true
@tip_window.set_text("Defend against incoming attacks", 1)
# ... etc.
end
when 3
@tip_window.visible=true
@tip_window.set_text("Use an item from your bag", 1)
else
@tip_window.visible=false
end
end
#end
end
with this new code.
#--------------------------------------------------------------------------
# * Update the tip window text when you 'hover' over commands
#--------------------------------------------------------------------------
def update_help
case index
when 0
if Input.press?(Input::UP) and BlizzCFG::SLS_ACTIVE and BlizzCFG::SL_USERS.include?(@actor.id) and @actor.sl_can_use? and @commands[0] == @actor.limit_name and self.active
skill = $data_skills[@actor.limit_id]
self.contents.font.color = Color.new(255, 0, 0, 255)
@tip_window.set_text(skill.description, 1)
elsif self.active
@tip_window.visible=true
@tip_window.set_text("Attack the enemy with your weapon", 1)
# Change the above to the description for your first command
end
when 1
if Input.press?(Input::UP) and BlizzCFG::SRS_ACTIVE and BlizzCFG::SR_USERS.include?(@actor.id) and @commands[1] == BlizzCFG::SRS_NAME and self.active
self.contents.font.color = Color.new(255, 0, 0, 255)
@tip_window.set_text("Soul Rage", 1)
elsif self.active
@tip_window.visible=true
@tip_window.set_text("Use learned magic skills", 1)
# Change the above to the description for your second command
end
when 2
if Input.press?(Input::UP) and BlizzCFG::CDS_ACTIVE and BlizzCFG::CD_USERS.include?(@actor.id) and @commands[2] == BlizzCFG::CDS_NAME and self.active
self.contents.font.color = Color.new(255, 0, 0, 255)
@tip_window.set_text("Chaos Drive", 1)
elsif self.active
@tip_window.visible=true
@tip_window.set_text("Defend against incoming attacks", 1)
# ... etc.
end
when 3
@tip_window.visible=true
@tip_window.set_text("Use an item from your bag", 1)
else
@tip_window.visible=false
end
end
#end
end
Hope it helped! :D
I hadn't checked the Window_Help's main processing window. Maybe I should have, knowing that your window was a subsidiary class to it :P...The rest is history, Lol. I knew syntax, but I couldn't figure out why the color wasn't changing...
Thank you =)
Awesome~! It took me a while too. ^-^
:D Glad it worked - and I should be thanking you. <3
Ha, definitely not XD...
It really is a shame that this is incompatible though.
I WAS gonna use it.
I made the icon window 100% transparent, so that all that was displayed, were the icons, and I placed that window at the very top of the screen a couple pixels from the edge. With the (x, y) of the help_window being directly under the Icon Window placing the icons at the top, not only provided extra aesthetics, but made the help_window much easier to read as well...
The only thing left to do was to change the font color of the help text...
EDIT:I customized your script to the exact specifications that I was gonna use in my game, and here are some screenies of what it would have looked like...
ScreenshotsMap(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod.jpg)
Text(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod01.jpg)
Battle(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod02.jpg)
Battle(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod03.jpg)
**I added some shade to the help text...
**If you would like this DEMO to be your default DEMO, let me know, and I will upload it and send you the link. I don't need credit for this, I just liked this system, and wanted to help XD...
But it's not incompatible! The only thing it does is that it doesn't animate... ;___;
... Okay, never mind. It's up to you about the demo - but no matter what you ARE getting credit. :D
<3
Did you notice how I edited the script and added a shadow under the text?
**I even uploaded a new screenshot. The white is a heck of a lot better looking than the yellow, Lmao :^_^':
Download Link: Customized
http://www.sendspace.com/file/rjrq73
**Do you think you could re-create this exact system to be vertical so that it runs down along the edge of the right side of the screen?? From the top of the picture...down to the status window. I would like that more than the horizontal bar.
^-^ I did notice it. I actually think it looks quite nice up there, and the shadow helps for readability.
It would be cool if you could add a config module that allows you to change the colour of the text easily... but yeah I like white much better. :P
I've updated the main post, btw. <3
And a vertical command window would be MUCH easier to make - mainly due to the fact that the standard command window IS vertical... I'm a bit busy at the moment but that wouldn't be much of a problem (unless I'm sorely mistaken). D:
That would probably also be easier to merge with the CRLS. But I shouldn't get ahead of myself. :O
OK!! Well, I will try my best to add that module. I have seen them used, and I am pretty sure I know how to do it, so give me a couple minutes...
**I am really looking forward to seeing the completion of the vertical one!!
EDITLol, I kinda went crazy and added a ton of modules for easy customizations XD. I reorganized a couple things. I think it makes the script neater. I also added some of my own icons for graphical purposes.
**Give me a few more minutes for touch ups please, and I will upload the update =)
FINAL EDIT Calintz's mod
v2.1The update is finished...
Screenshot(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Horizontal%20Actor%20Command%20Window%20Battle%20Add-On/ActorCommand_mod04.jpg)
I have added modules for the following:
- Size
- Bold
- Italic
- Color
- Location of Shadow
- Icons
Download Linkhttp://www.sendspace.com/file/7acyrq
**How do I edit Blizzard's CRSL to be compatible??
WOW MAN! <3 I checked it out today and you really cleaned up my code! :haha:
I'm still perfecting the vertical command window - did you want it to be down the middle or to one side? [please say down the middle... the one-side is giving me a headache... :'(]
But this is so cool, it has been improved so much! Thanks Calintz! :)
And about the CRLS - if you checked out my demo I already started work on it: you mainly have to convert the new commands into icons too by the same sliding motion, and make it so that the tip window updates when that happens. I gtg, but I can try and be more clear if you have specific questions about parts, and def help you out as best as I can if you want to take over. :D
Calintz, it's simple. Just copy pase my edit of the Command window. Then you need to add icons to the commands and that should be it.
Lol, it's kind of funny, but I have no clue how to add icons to a window :^_^':
I will see what I can do though...
Hey Calintz, I've modded your demo so it can go vertical now. I'm not sure what's stopping me from changing the x position of the vertical window, so at the moment it just sits in the middle. D:
Please check it out and let me know if it's what you want! :)
Rapidshare Download (http://rapidshare.com/files/205553108/Actor_Command.rar)
It's perfect...That is exactly what I had in mind.
The only thing left to do, is to get those icons to the right of the screen =)
BTW:
Very nice job adding those extra modules and commands XD...
:w00t: Yaay!
I was having a few issues moving the icons, but I was trying to make them go left. :| It didn't work. I'll see if I can try again sometime.
And not really - just picking up where you left off. ;)
*has updated original post*
I have solved the problem with the vertical battle actor command window remaining in the middle at all times, but I need your help with something else now.