[XP] Icon Actor Command Window

Started by Reno-s--Joker, January 15, 2009, 01:26:41 am

Previous topic - Next topic

Reno-s--Joker

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.

Calintz

February 27, 2009, 11:54:05 pm #41 Last Edit: February 27, 2009, 11:55:18 pm by Calintz16438
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.. .. .. :???:

Reno-s--Joker

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

Calintz

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.

Reno-s--Joker

: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:
Location: ShowHide
  #--------------------------------------------------------------------------
  # * 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:
Location: ShowHide
#--------------------------------------------------------------------------
  # * 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 only
Replace this:
Old code: ShowHide
  #--------------------------------------------------------------------------
  # * 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.
New code: ShowHide
  #--------------------------------------------------------------------------
  # * 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

Calintz

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 =)


Calintz

February 28, 2009, 06:15:51 am #47 Last Edit: March 01, 2009, 12:12:51 am by Calintz16438
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...

Screenshots
Map
Spoiler: ShowHide


Text
Spoiler: ShowHide


Battle
Spoiler: ShowHide


Battle
Spoiler: ShowHide


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

Reno-s--Joker

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

Calintz

March 01, 2009, 12:05:29 am #49 Last Edit: March 01, 2009, 12:19:59 am by Calintz16438
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.

Reno-s--Joker

^-^ 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

Calintz

March 01, 2009, 02:40:46 am #51 Last Edit: March 01, 2009, 06:19:51 am by Calintz16438
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!!


EDIT
Lol, 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.1
The update is finished...

Screenshot
Spoiler: ShowHide


I have added modules for the following:
  • Size

  • Bold

  • Italic

  • Color

  • Location of Shadow

  • Icons


Download Link
http://www.sendspace.com/file/7acyrq


**How do I edit Blizzard's CRSL to be compatible??

Reno-s--Joker

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

Blizzard

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.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz

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

Reno-s--Joker

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

Calintz

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

Reno-s--Joker

: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*

Calintz

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.