[XP] Few Questions (Involving Battle and Status)

Hello.

I was wonder how to edit the script so that instead of the mini-sprite on screen next to their stats so that I could have a different picture on there. (A full body portrait for the status page)

Also, I found a topic here that involved a notification that a character leveled up. Is it possible to have a face portrait of the person who leveled up on the top right after battle results? (Similar to Tales of Vesperia's found on 2:10 http://www.youtube.com/watch?v=-w_M4XvSKhk)
For the notification that the character leveled up picture, I'd need the topic you found.

Also this is a strange request, I hope it will look good in the end, because it seems like it will go behind all the text.

  1. class Window_Base < Window
  2.     def draw_actor_graphic3(actor,x,y)
  3.       face = RPG::Cache.picture(actor.name + "_status") rescue nada2(actor)
  4.       cw = face.width
  5.       ch = face.height
  6.       src_rect = Rect.new(0, 0, cw, ch)
  7.       self.contents.blt(x, y, face, src_rect)    
  8.     end
  9.     end  
  10. class Window_Status
  11. def refresh
  12.     self.contents.clear
  13.     draw_actor_graphic3(@actor, 0, 0)
  14.     draw_actor_name(@actor, 4, 0)
  15.     draw_actor_class(@actor, 4 + 144, 0)
  16.     draw_actor_level(@actor, 96, 32)
  17.     draw_actor_state(@actor, 96, 64)
  18.     draw_actor_hp(@actor, 96, 112, 172)
  19.     draw_actor_sp(@actor, 96, 144, 172)
  20.     draw_actor_parameter(@actor, 96, 192, 0)
  21.     draw_actor_parameter(@actor, 96, 224, 1)
  22.     draw_actor_parameter(@actor, 96, 256, 2)
  23.     draw_actor_parameter(@actor, 96, 304, 3)
  24.     draw_actor_parameter(@actor, 96, 336, 4)
  25.     draw_actor_parameter(@actor, 96, 368, 5)
  26.     draw_actor_parameter(@actor, 96, 400, 6)
  27.     self.contents.font.color = system_color
  28.     self.contents.draw_text(320, 48, 80, 32, "EXP")
  29.     self.contents.draw_text(320, 80, 80, 32, "NEXT")
  30.     self.contents.font.color = normal_color
  31.     self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
  32.     self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
  33.     self.contents.font.color = system_color
  34.     self.contents.draw_text(320, 160, 96, 32, "equipment")
  35.     draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
  36.     draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
  37.     draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
  38.     draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
  39.     draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  40.   end
  41.   end
Expand to see the code.


Put this above Main and for every graphic that you want. Put in the pictures folder and put the Actorname_status. Another words write _status after the filename of the character
So what I have is a file named 001-Fighter01_status.png in the Picture folder. When I clicked on status in the menu, the game ended saying:

Script 'Body Portrait' line 3: NoMethodError occurred.

undefined method `nada2' for #<Window_Status:0x7ab9bf0>

And the topic that talked about having the level up thing was here:
viewtopic.php?f=155&t=66163
No no no. You're supposed to use the Actors name, not the sprites name. You know the one you set in the database. Lets say your hero's name is Aluxes. name it

Aluxes_status

As for the nada2 thing, that's my fault for giving you something without a proper rescue.

  1. class Window_Base < Window
  2.   def rescue12(actor)
  3.     face = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  4.     end
  5.     def draw_actor_graphic3(actor,x,y)
  6.       face = RPG::Cache.picture(actor.name + "_status") rescue rescue12(actor)
  7.       cw = face.width
  8.       ch = face.height
  9.       src_rect = Rect.new(0, 0, cw, ch)
  10.       self.contents.blt(x, y, face, src_rect)    
  11.     end
  12.     end  
  13. class Window_Status
  14. def refresh
  15.     self.contents.clear
  16.     draw_actor_graphic3(@actor, 0, 0)
  17.     draw_actor_name(@actor, 4, 0)
  18.     draw_actor_class(@actor, 4 + 144, 0)
  19.     draw_actor_level(@actor, 96, 32)
  20.     draw_actor_state(@actor, 96, 64)
  21.     draw_actor_hp(@actor, 96, 112, 172)
  22.     draw_actor_sp(@actor, 96, 144, 172)
  23.     draw_actor_parameter(@actor, 96, 192, 0)
  24.     draw_actor_parameter(@actor, 96, 224, 1)
  25.     draw_actor_parameter(@actor, 96, 256, 2)
  26.     draw_actor_parameter(@actor, 96, 304, 3)
  27.     draw_actor_parameter(@actor, 96, 336, 4)
  28.     draw_actor_parameter(@actor, 96, 368, 5)
  29.     draw_actor_parameter(@actor, 96, 400, 6)
  30.     self.contents.font.color = system_color
  31.     self.contents.draw_text(320, 48, 80, 32, "EXP")
  32.     self.contents.draw_text(320, 80, 80, 32, "NEXT")
  33.     self.contents.font.color = normal_color
  34.     self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
  35.     self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
  36.     self.contents.font.color = system_color
  37.     self.contents.draw_text(320, 160, 96, 32, "equipment")
  38.     draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
  39.     draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
  40.     draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
  41.     draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
  42.     draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  43.   end
  44.   end
Expand to see the code.


Change the code I gave you with this one.

As for Notification that the character leveled up. Do you just want all face graphics for all the people that leveled up to be displayed in the battle results screen? I love tales of vesperia, but they were showing people who leveled up who weren't in the party.
Tested it out and it's awesome. Thank you.

For the level up, I think it'll be good if it's everyone (including ones not in battle).

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71241