Author Topic: [XP] Icon Actor Command Window  (Read 22459 times)

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
[XP] Icon Actor Command Window
« on: January 15, 2009, 08:26:41 AM »
Icon Actor Command Window
Authors: Reno-s--Joker, Calintz16438
Version: 3.0
Type: Aesthetic Enhancement for Actor Command Window
Key Term: Battle Add-on

Introduction

Something 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

Screenshots

Default Script
(click to show/hide)
Calintz's Script
(click to show/hide)
Version 3.0
Coming soon... hopefully. ^-^
For the time being... just get the gist from the other versions. :xD:

Demo

Version 3.0 Demo: Rapidshare
http://rapidshare.com/files/205553108/Actor_Command.rar

Older Versions
Default 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

Script

This 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).
(click to show/hide)


Instructions

To 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.

Compatibility

I'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.

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 Notes

I have managed to develop some compatibility with Blizzard's Chaos Rage Limit System! 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!

Offline shdwlink1993

  • Ethereal Devastator
  • ****
  • Posts: 435
  • LV: 63
  • Gender: Male
    • View Profile
    • YouTube Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #1 on: January 15, 2009, 08:35:07 AM »
Great looking script, Reno-s--Joker. I took the liberty of databasing it (I don't think anyone will mind ;))
Stuff I've made:

(click to show/hide)

"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Offline Starrodkirby86

  • Kirby de Varita Estelar
  • Guardian of Chaos
  • ********
  • Posts: 3282
  • LV: 194
  • Gender: Male
  • ~!
    • View Profile
    • The Archive of Starrodkirby86
Re: [XP] Horizontal Icon Actor Command Window
« Reply #2 on: January 15, 2009, 09:18:37 AM »
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...

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).



Offline King Munkey

  • Moderator of Munkeys
  • Astral Trancist
  • *****
  • Posts: 789
  • LV: 37
  • Gender: Male
  • Dance with the Munkey!
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #3 on: January 15, 2009, 12:20:16 PM »
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.

G_G Is my hero!
Munkey != monkey
Munkey > monkey

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Horizontal Icon Actor Command Window
« Reply #4 on: January 15, 2009, 02:47:50 PM »
Aesthetic indeed :) *powers up*
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #5 on: January 16, 2009, 02:41:36 AM »
It is really neat, that is for sure...

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Horizontal Icon Actor Command Window
« Reply #6 on: January 16, 2009, 06:58:37 AM »
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.  ;)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Horizontal Icon Actor Command Window
« Reply #7 on: January 16, 2009, 07:22:08 AM »
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:
Code: [Select]
unless @actor_command_window.is_a?(Window_ActorStatus)
  @actor_command_window.dispose
  @actor_command_window = Window_ActorStatus.new
end

Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Horizontal Icon Actor Command Window
« Reply #8 on: January 16, 2009, 07:45:02 AM »
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.

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #9 on: January 22, 2009, 04:39:30 AM »
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?

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Horizontal Icon Actor Command Window
« Reply #10 on: January 25, 2009, 06:10:51 AM »
: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. :)

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #11 on: January 25, 2009, 08:53:38 PM »
Again...I like it, haha...

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #12 on: January 31, 2009, 07:11:37 AM »
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:
Code: [Select]
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:
Code: [Select]
@sprites[@index - 1].opacity = 120
@sprites[@index].opacity = 255

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Horizontal Icon Actor Command Window
« Reply #13 on: January 31, 2009, 07:58:37 AM »
: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

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Horizontal Icon Actor Command Window
« Reply #14 on: January 31, 2009, 08:32:07 AM »
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.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5119
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #15 on: January 31, 2009, 09:05:51 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.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Horizontal Icon Actor Command Window
« Reply #16 on: January 31, 2009, 10:34:35 AM »
Quote
But 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:

Code: [Select]
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
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #17 on: January 31, 2009, 07:33:30 PM »
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

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Horizontal Icon Actor Command Window
« Reply #18 on: January 31, 2009, 10:09:54 PM »
Aww...
I was really hoping I could use this...

It however, is NOT compatible with Blizz's Chaos Rage system... =(

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Horizontal Icon Actor Command Window
« Reply #19 on: February 01, 2009, 03:22:08 AM »
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