Face in Actor Command Window scrolling issue

Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
Sorry to bother yourselves,i found a snippet made by Ventwig that allows you to put faces in actor command window. The problem is present when you try to add new commands,this is what happens when you scroll the window:



As you can see,the face doesnt scrolls along with the commands...  Excuse me for my bad English and greetings from Argentina.

Pd: Here is the snippet

Code:
#============================================================================#Face in Actor Command Window#By Ventwig#Made for RydiaMis#================================================ class Window_ActorCommand < Window_Command  alias face_command_setup setup  def setup(actor)    face_command_setup(actor)    draw_face_command  end  def window_width    return 244  end  def item_rect(index)    rect = Rect.new    rect.width = item_width/2    rect.height = item_height    rect.x = index % col_max * (item_width + spacing) + item_width/2    rect.y = index / col_max * item_height    rect  end  def draw_face_command    draw_actor_face(@actor, 0, 0, enabled = true)  endend class Scene_Battle < Scene_Base  def update_info_viewport    move_info_viewport(0)   if @party_command_window.active    move_info_viewport(220) if @actor_command_window.active    move_info_viewport(64)  if BattleManager.in_turn?  end end
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I have split this question into its own thread. Any requests to modify or troubleshoot existing scripts do not belong in "Questions that don't deserve their own thread"


The issue is because the face is fixed to the window contents and not the border. You could probably get around it by either using two windows - one for the face and one for the commands, and making the border of one transparent, or by using a sprite for the face instead of blitting it to the window contents. If you use a sprite, you'll need to dispose of it correctly when the window is disposed.
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
Excuse me for posting it in the bad section,i dont wanted to create a new thread for a little issue like this one.

I could try the method of the window,i dont know anything about scripting but i´m going to try it.

Thanks you very much Shaz. :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
i dont wanted to create a new thread for a little issue like this one.


i dont know anything about scripting
:) If you don't know anything about scripting, how do you know it's "a little issue"?


I moved it because it's not a little issue ;) Yes, it will be a much simpler script than most, but still not small enough to "not deserve its own thread".
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
It is a start,but i dont know how to call the window in the scene_battle:

class Face_actor_window < Window_Base  def initialize()   super(x,y,width,height)  end  def draw_face_command    draw_actor_face(@actor, 0, 0, enabled = true)  endendBut i tested it with a script call in a map and the window appears (without the face)

Thanks you very much for inspiring me lady Shaz,im going to see if i can do the rest...
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The actor command window is a really weird one (unless you've got a script that modifies it). It's always there, but moved off to the side. When it's time to choose a command, the windows all move across a bit so it becomes visible. But your windows don't look like the RTP windows, so whatever script you're using might do something completely different.


You'd want to instantiate it ( ... = Face_partycommand.new) at the same time as the actor command window, and whenever anything is done with the command window, do a corresponding action to the face window. It MIGHT be enough to just set the x and y value to the same as the actor command window value, and ensure when one changes, the other changes too (so maybe reset the x and y in the update method).
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
Well... I did some tiny changes to scene_battle,related to windows size and cordinates,removed the party command and added the escape command to the actor_window.

About the new window,it worked... But it does not show the face of the current battler.

i´m going to continue tomorrow,i fell a little tired...

Sweet dreams and good start of the week.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Since the window (actor command) is always available, there's a method that changes the actor without destroying and recreating the window. You need to find where this is called, and create (and call at the same point) a similar method in your new window to change the face.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top