OmegaDev
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Scene_Menu scripts

3 posters

Page 1 of 2 1, 2  Next

Go down

Scene_Menu scripts Empty Scene_Menu scripts

Post by IMP1 Sun Jul 11, 2010 8:10 am

Custom Menu scripts are pretty easy, so if anyone wants one, post your request here.
Bare in mind I'm not a robot, and I'm not very consistent. Some requests I'll do in half an hour, some I won't have done in a week. It depends what frame of mind I'm in.

Oh, and tell what scripts you're using that might affect the menu, so I can work around them and stuff.

Bare in mind I'm not great graphically, but other people here are, so combine our talents for a beautiful, custom menu for your game.

I'm not gonna post a request template, 'cos i want you to roam free and not be limited by such things, but the more info you give me, the less time it'll take me as I wont keep coming back to you with questions. And of course, any requests resembling something like
OMG! maek me a menu plox!!11! I want it like FFVII which is a da best! Oh, and i relly like grapes and munnnes.
will just get ignored. Or flamed.
Don't be rude, don't be vague, don't be stupid (immature is fine), and don't be irrelevant.

Yeah. Hi.
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Fri Nov 19, 2010 11:24 pm

Could you possibly make a Scene_Status?
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Fri Nov 19, 2010 11:29 pm

Necro...post...
I'll leave decisions to close this up to imp/omegas...I don't know if this counts as a necropost.

Zero, read the official RULES before posting Evil or Very Mad
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sat Nov 20, 2010 8:23 am

Well, I'm still here. And still willing to smack out a Scene_Status. So I think we'll let it slide, eh Peva? Wink

@ZMA: How do you want it?
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Sat Nov 20, 2010 4:05 pm

Scene_Menu scripts StatusScreenUpdate

Like that but I want the stats for all party members. Easy enough right?
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sat Nov 20, 2010 4:31 pm

Yes, that *is* easy enough.
One question: How are birthday, age, gender determined? Note-tag, variable, other script, what?

Also, what do you mean by the stats for all the party members?

And you realise there's no actor class there, right?
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Sat Nov 20, 2010 5:11 pm

IMP1 wrote:Yes, that *is* easy enough.
1. How are birthday, age, gender determined? Note-tag, variable, other script, what?

2. Also, what do you mean by the stats for all the party members?

3. And you realise there's no actor class there, right?
1. Inside the script if possible.

2. I meant thats how I want the status screen for all members. Wow I sound stupid now.

3. Yes I do. I removed what class they where.
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sat Nov 20, 2010 5:47 pm

3: good
2: okie dokie
1: cool.
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Sat Nov 20, 2010 6:19 pm

Sweet so how long until your done? No Major rush Razz
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sun Nov 21, 2010 4:53 am

It should take me like 10 minutes. But one more thing. Do you want the actor's states to be drawn? If so, where?
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Sun Nov 21, 2010 11:24 am

States like Poison? If so no. Lol
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sun Nov 21, 2010 2:08 pm

Code:
module IMP_Window_Status_Request_1
 
  Actor_Birthdays = [
  "Leave me Blank! :D", # This is for Actor with ID 0, except there isn't one.
  "April 16th",
  "January 1st",
  ]
  Actor_Ages = [
  "Leave me Blank! :D", # This is for Actor with ID 0, except there isn't one.
  24,
  0,
  ]
  Actor_Origins = [
  "Leave me Blank! :D", # This is for Actor with ID 0, except there isn't one.
  "Okuron",
  "Knoxville",
  ]
  Actor_Genders = [
  "Leave me Blank! :D", # This is for Actor with ID 0, except there isn't one.
  "Male",
  "Female",
  ]
  Actor_Heights = [
  "Leave me Blank! :D", # This is for Actor with ID 0, except there isn't one.
  5.8,
  1.1,
  ]
  Actor_Weights = [
  "Leave me Blank! :D", # This is for Actor with ID 0, except there isn't one.
  142,
  9001,
  ]
 
  HP_Icon      = 1
  MP_Icon      = 2
  Level_Icon    = 3
  EXP_Icon      = 4
  EXP_left_Icon = 5
  ATK_Icon      = 6
  DEF_Icon      = 7
  SPI_Icon      = 8
  AGI_Icon      = 9
 
  Black_Background = true
 
end

class Game_Actor < Game_Battler
  attr_reader :id
  alias imp_edit_initialize initialize unless $@
  def initialize(actor_id)
    imp_edit_initialize(actor_id)
    @id = actor_id
  end
end

class Scene_Status < Scene_Base
 
  alias imp_zma_request_create_menu_background create_menu_background unless $@
  def create_menu_background
    if !IMP_Window_Status_Request_1::Black_Background
      imp_zma_request_create_menu_background
    end
  end
  alias imp_zma_request_start start unless $@
  def start
    imp_zma_request_start
    @status_window.opacity = 0
  end
  alias imp_zma_request_dispose_menu_background dispose_menu_background unless $@
  def dispose_menu_background
    if !IMP_Window_Status_Request_1::Black_Background
      imp_zma_request_dispose_menu_background
    end
  end

end

class Window_Status < Window_Base
  include IMP_Window_Status_Request_1
 
  def refresh
    self.contents.clear
    draw_actor_face(@actor, 8, 8)
    draw_actor_name(@actor, 112, 8)
    self.contents.font.color = system_color
    self.contents.draw_text(88,8+(1*WLH),112,WLH,"Birthday: ",2)
    self.contents.draw_text(88,8+(2*WLH),112,WLH,"Age: ",2)
    self.contents.draw_text(88,8+(3*WLH),112,WLH,"Origin: ",2)
    self.contents.draw_text(274,8+(1*WLH),112,WLH,"Gender: ",2)
    self.contents.draw_text(274,8+(2*WLH),112,WLH,"Height: ",2)
    self.contents.draw_text(274,8+(3*WLH),112,WLH,"Weight: ",2)
    self.contents.font.color = normal_color
    self.contents.draw_text(200,8+(1*WLH),112,WLH,Actor_Birthdays[@actor.id])
    self.contents.draw_text(200,8+(2*WLH),112,WLH,Actor_Ages[@actor.id])
    self.contents.draw_text(200,8+(3*WLH),112,WLH,Actor_Origins[@actor.id])
    self.contents.draw_text(386,8+(1*WLH),112,WLH,Actor_Genders[@actor.id])
    self.contents.draw_text(386,8+(2*WLH),112,WLH,Actor_Heights[@actor.id])
    self.contents.draw_text(386,8+(3*WLH),112,WLH,Actor_Weights[@actor.id])
    draw_icon(HP_Icon,0,144)
    draw_actor_hp(@actor,24,144,100)
    draw_icon(Level_Icon,0,176)
    self.contents.font.color = system_color
    self.contents.draw_text(24,176,180,WLH,"Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(88,176,180,WLH,@actor.level)
    draw_icon(EXP_left_Icon,0,208)
    self.contents.font.color = system_color
    self.contents.draw_text(24,208,180,WLH,"Next")
    self.contents.font.color = normal_color
    self.contents.draw_text(88,208,180,WLH,@actor.next_exp_s)
    draw_icon(EXP_Icon,0,240)
    self.contents.font.color = system_color
    self.contents.draw_text(24,240,180,WLH,"EXP")
    self.contents.font.color = normal_color
    self.contents.draw_text(88,240,180,WLH,@actor.exp_s)
    draw_icon(MP_Icon,140,144)
    draw_actor_mp(@actor,164,144,100)
    draw_icon(ATK_Icon,140,176)
    self.contents.font.color = system_color
    self.contents.draw_text(164,176,180,WLH,Vocab::atk)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,176,180,WLH,@actor.atk)
    draw_icon(DEF_Icon,140,208)
    self.contents.font.color = system_color
    self.contents.draw_text(164,208,180,WLH,Vocab::def)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,208,180,WLH,@actor.def)
    draw_icon(SPI_Icon,140,240)
    self.contents.font.color = system_color
    self.contents.draw_text(164,240,180,WLH,Vocab::spi)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,240,180,WLH,@actor.spi)
    draw_icon(AGI_Icon,140,272)
    self.contents.font.color = system_color
    self.contents.draw_text(164,272,180,WLH,Vocab::agi)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,272,180,WLH,@actor.agi)
    self.contents.font.color = system_color
    self.contents.draw_text(296, 144, 120, WLH, Vocab::equip)
    for i in 0..4
      draw_item_name(@actor.equips[i], 296 + 16, 144 + WLH * (i + 1))
    end
  end
 
end
Had to squish up the stuff on the left a bit. The equpiment was wider than your image allowed for.
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Sun Nov 21, 2010 2:40 pm

IMP1 wrote:
Had to squish up the stuff on the left a bit. The equpiment was wider than your image allowed for.
Its beautiful! I love it! Real fast though can you double check and see if I did this right?
Code:

#===============================================================================
# Status Menu
# by IMP1
# Requested by ZeroManArmy
# Last Updated 11/21/10
#===============================================================================

#===============================================================================
# CONFIGURATION
#===============================================================================

module IMP_Window_Status_Request_1

#===============================================================================
  Actor_Birthdays = [
  "Leave Blank", # Actor 0
  "April 16th",  # Actor 1
  "January 1st", # Actor 2
  "January 1st", # Actor 3
  "January 1st", # Actor 4
  ]
#===============================================================================
  Actor_Ages = [
  "Leave Blank", # Actor 0
  24,            # Actor 1
  0,            # Actor 2
  0,            # Actor 3
  0,            # Actor 4
  ]
#===============================================================================
  Actor_Origins = [
  "Leave Blank", # Actor 0
  "Okuron",      # Actor 1
  "Knoxville",  # Actor 2
  "Knoxville",  # Actor 3
  "Knoxville",  # Actor 4
  ]
#===============================================================================
  Actor_Genders = [
  "Leave Blank", # Actor 0
  "Male",        # Actor 1
  "Female",      # Actor 2
  "Female",      # Actor 3
  "Female",      # Actor 4
  ]
#===============================================================================
  Actor_Heights = [
  "Leave Blank", # Actor 0
  5.8,          # Actor 1
  1.1,          # Actor 2
  1.1,          # Actor 3
  1.1,          # Actor 4
  ]
#===============================================================================
  Actor_Weights = [
  "Leave Blank", # Actor 0
  142,          # Actor 1
  900,          # Actor 2
  900,          # Actor 3
  900,          # Actor 4
  ]
#===============================================================================
  HP_Icon      = 1
  MP_Icon      = 2
  Level_Icon    = 3
  EXP_Icon      = 4
  EXP_left_Icon = 5
  ATK_Icon      = 6
  DEF_Icon      = 7
  SPI_Icon      = 8
  AGI_Icon      = 9
#===============================================================================
  Black_Background = true
#===============================================================================

#===============================================================================
# END CONFIGURATION
#===============================================================================
 
end

class Game_Actor < Game_Battler
  attr_reader :id
  alias imp_edit_initialize initialize unless $@
  def initialize(actor_id)
    imp_edit_initialize(actor_id)
    @id = actor_id
  end
end

class Scene_Status < Scene_Base
 
  alias imp_zma_request_create_menu_background create_menu_background unless $@
  def create_menu_background
    if !IMP_Window_Status_Request_1::Black_Background
      imp_zma_request_create_menu_background
    end
  end
  alias imp_zma_request_start start unless $@
  def start
    imp_zma_request_start
    @status_window.opacity = 0
  end
  alias imp_zma_request_dispose_menu_background dispose_menu_background unless $@
  def dispose_menu_background
    if !IMP_Window_Status_Request_1::Black_Background
      imp_zma_request_dispose_menu_background
    end
  end

end

class Window_Status < Window_Base
  include IMP_Window_Status_Request_1
 
  def refresh
    self.contents.clear
    draw_actor_face(@actor, 8, 8)
    draw_actor_name(@actor, 112, 8)
    self.contents.font.color = system_color
    self.contents.draw_text(88,8+(1*WLH),112,WLH,"Birthday: ",2)
    self.contents.draw_text(88,8+(2*WLH),112,WLH,"Age: ",2)
    self.contents.draw_text(88,8+(3*WLH),112,WLH,"Origin: ",2)
    self.contents.draw_text(274,8+(1*WLH),112,WLH,"Gender: ",2)
    self.contents.draw_text(274,8+(2*WLH),112,WLH,"Height: ",2)
    self.contents.draw_text(274,8+(3*WLH),112,WLH,"Weight: ",2)
    self.contents.font.color = normal_color
    self.contents.draw_text(200,8+(1*WLH),112,WLH,Actor_Birthdays[@actor.id])
    self.contents.draw_text(200,8+(2*WLH),112,WLH,Actor_Ages[@actor.id])
    self.contents.draw_text(200,8+(3*WLH),112,WLH,Actor_Origins[@actor.id])
    self.contents.draw_text(386,8+(1*WLH),112,WLH,Actor_Genders[@actor.id])
    self.contents.draw_text(386,8+(2*WLH),112,WLH,Actor_Heights[@actor.id])
    self.contents.draw_text(386,8+(3*WLH),112,WLH,Actor_Weights[@actor.id])
    draw_icon(HP_Icon,0,144)
    draw_actor_hp(@actor,24,144,100)
    draw_icon(Level_Icon,0,176)
    self.contents.font.color = system_color
    self.contents.draw_text(24,176,180,WLH,"Level")
    self.contents.font.color = normal_color
    self.contents.draw_text(88,176,180,WLH,@actor.level)
    draw_icon(EXP_left_Icon,0,208)
    self.contents.font.color = system_color
    self.contents.draw_text(24,208,180,WLH,"Next")
    self.contents.font.color = normal_color
    self.contents.draw_text(88,208,180,WLH,@actor.next_exp_s)
    draw_icon(EXP_Icon,0,240)
    self.contents.font.color = system_color
    self.contents.draw_text(24,240,180,WLH,"EXP")
    self.contents.font.color = normal_color
    self.contents.draw_text(88,240,180,WLH,@actor.exp_s)
    draw_icon(MP_Icon,140,144)
    draw_actor_mp(@actor,164,144,100)
    draw_icon(ATK_Icon,140,176)
    self.contents.font.color = system_color
    self.contents.draw_text(164,176,180,WLH,Vocab::atk)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,176,180,WLH,@actor.atk)
    draw_icon(DEF_Icon,140,208)
    self.contents.font.color = system_color
    self.contents.draw_text(164,208,180,WLH,Vocab::def)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,208,180,WLH,@actor.def)
    draw_icon(SPI_Icon,140,240)
    self.contents.font.color = system_color
    self.contents.draw_text(164,240,180,WLH,Vocab::spi)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,240,180,WLH,@actor.spi)
    draw_icon(AGI_Icon,140,272)
    self.contents.font.color = system_color
    self.contents.draw_text(164,272,180,WLH,Vocab::agi)
    self.contents.font.color = normal_color
    self.contents.draw_text(220,272,180,WLH,@actor.agi)
    self.contents.font.color = system_color
    self.contents.draw_text(296, 144, 120, WLH, Vocab::equip)
    for i in 0..4
      draw_item_name(@actor.equips[i], 296 + 16, 144 + WLH * (i + 1))
    end
  end
 
end
Scene_Menu scripts StatusScreen
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sun Nov 21, 2010 3:29 pm

Looks fine to me. Smile
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Sun Nov 21, 2010 3:46 pm

Looks great Imp Smile You did a superb job Very Happy I would like to make a request. You can create whole new things, right? I'm using svykals ring menu, but that shouldn't matter. When you open up my scene (You can call it Scene_data or something, idc) it shows the players sprite, actor ones name, actor twos name with town after it, a variable labeled "Day" another variable labeled "Animals" and...I guess that's it. I hope you can do this. Just use your best judgment for where to place things, and I'll tell you if there is anything wrong with it.

EDIT: Oh also another variable labeled "Yesterday's Earnings"
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by ZeroManArmy Sun Nov 21, 2010 6:20 pm

Also IMP I was asking about the script.
ZeroManArmy
ZeroManArmy
Citizen
Citizen

Posts : 44
Gald : 164

Stats
Cookies: 0

http://ZeroManArmy.blogspot.com

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Mon Nov 22, 2010 2:30 am

@ZMA: I know.
@Peva: TOO MUCH FREEDOM. I don't know what looks good where. Give me more structure please >.<
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Mon Nov 22, 2010 5:51 am

Ok, I'll make a crappy paint image if that's ok?
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Mon Nov 22, 2010 10:43 am

Perfect.
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Mon Nov 22, 2010 5:09 pm

Here it is, just using a window. Have actor two be in it's own window, the player be in its own window, and then the statistics be in its own window.

BEWARE! Awesome graphics skillz! Open at own risk!
Spoiler:

Also \v[x] is a customizable variable. Also after actor 2's name, put "Town"
And can the "Statistics" all have a icon that is customizable?
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Wed Nov 24, 2010 3:52 pm

BUMP: Hey can you also add "Well: \v[x]" and "Bank: \v[x]" to the statistics side? And right under the "Actor 2 Town" can you add the play time in regular font. Please? Thank yoous!
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Sun Nov 28, 2010 11:16 am

BUMP Waaa even started yet?
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sun Nov 28, 2010 2:03 pm

No, I've been working on a side-scrolling platformer in Ruby (not RMVX). But it shouldn't take too long. I'll do it now Smile
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Peva Sun Nov 28, 2010 2:11 pm

THANKZ YOUZ!!!
Peva
Peva
Development Moderator
Development Moderator

Posts : 1281
Gald : 4414

Stats
Cookies: 0

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by IMP1 Sun Nov 28, 2010 3:00 pm

Code:
class Scene_MadeUpName < Scene_Base
 
  Animal_Variable  = 3
  Yest_Earn_Var    = 4
  Day_Variable      = 5
  Well_Variable    = 6
  Bank_Variable    = 7
 
  Animal_Icon_ID    = 1
  Yest_Earn_Icon_ID = 2
  Day_Icon_ID      = 3
  Well_Icon_ID      = 4
  Bank_Icon_ID      = 5
 
  Sprite_Frequency  = 16 # The higher the number, the slower the movement
  Black_Background_Behind_Windows = true
 
  WLH = Window_Base::WLH
 
  def start
    create_menu_background if !Black_Background_Behind_Windows
    @window1 = Window_Base.new(0,0,Graphics.width,Graphics.height/4)
    @window2 = Window_Base.new(0, Graphics.height/4, Graphics.width/3, 3*Graphics.height/4)
    @window3 = Window_Base.new(Graphics.width/3,Graphics.height/4,2*Graphics.width/3,3*Graphics.height/4)
   
    @window1.contents.font.size = 32
    text = $game_actors[2].name + " Town"
    @window1.contents.draw_text(0,0,@window1.contents.width,32,text,1)
    @window1.contents.font.size = WLH
    draw_time
   
    @window2.contents.font.bold = true
    @window2.contents.draw_text(0,0,@window2.contents.width,WLH,"Player",1)
    @window2.contents.font.bold = false
    text = $game_actors[1].name
    @window2.contents.draw_text(0,48,@window2.contents.width,WLH,text,1)
    @frame = 0
    @frames = [1,2,1,0]
    draw_sprite
   
    @window3.contents.font.bold = true
    @window3.contents.draw_text(0,0,@window3.contents.width,WLH,"Statistics",1)
    @window3.contents.font.bold = false
    @window3.draw_icon(Animal_Icon_ID,0,48)
    text = "Animals: #{$game_variables[Animal_Variable]}"
    @window3.contents.draw_text(32,48,@window3.contents.width,WLH,text,0)
    @window3.draw_icon(Yest_Earn_Icon_ID,0,48+(1*WLH))
    text = "Yesterday's Earnings: #{$game_variables[Yest_Earn_Var]}"
    @window3.contents.draw_text(32,48+(1*WLH),@window3.contents.width,WLH,text,0)
    @window3.draw_icon(Day_Icon_ID,0,48+(2*WLH))
    text = "Day: #{$game_variables[Day_Variable]}"
    @window3.contents.draw_text(32,48+(2*WLH),@window3.contents.width,WLH,text,0)
    @window3.draw_icon(Well_Icon_ID,0,48+(3*WLH))
    text = "Well: #{$game_variables[Well_Variable]}"
    @window3.contents.draw_text(32,48+(3*WLH),@window3.contents.width,WLH,text,0)
    @window3.draw_icon(Bank_Icon_ID,0,48+(4*WLH))
    text = "Bank: #{$game_variables[Bank_Variable]}"
    @window3.contents.draw_text(32,48+(4*WLH),@window3.contents.width,WLH,text,0)
   
  end
 
  def update
    update_input
    draw_sprite
    draw_time
    @window1.update
    @window2.update
    @window3.update
  end
 
  def update_input
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      return_scene
    # TETSINNING!HJUKL~~~~~~~~~~~~~~
    elsif Input.repeat?(Input::A)
      @window2.contents.clear_rect(80,160,32,32)
    #~~~~~~~~~~~~~~~~~~~
    end
  end
 
  def return_scene
    $scene = Scene_Map.new
  end
 
  def draw_sprite
    if Graphics.frame_count % Sprite_Frequency == 0
      @frame += 1; @frame %= 4
      x = @window2.contents.width / 2
      @window2.draw_actor_frame($game_actors[1],x,160,@frame)
    end
  end
 
  def draw_time
    @window1.contents.clear_rect(0,32,@window1.contents.width,WLH)
    secs = sprintf("%02d", (Graphics.frame_count/Graphics.frame_rate)%60)
    mins = sprintf("%02d", ((Graphics.frame_count/Graphics.frame_rate)/60)%60)
    hours = ((Graphics.frame_count/Graphics.frame_rate)/60)/60
    text = "#{hours}:#{mins}:#{secs}"
    @window1.contents.draw_text(0,32,@window1.contents.width,WLH,text,1)
  end
 
  def terminate
    @window1.dispose
    @window2.dispose
    @window3.dispose
    dispose_menu_background if !Black_Background_Behind_Windows
  end
 
end

class Window_Base < Window
 
  def draw_actor_frame(actor, x, y, frame = 1)
    return if actor.character_name == nil
    bitmap = Cache.character(actor.character_name)
    sign = actor.character_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = actor.character_index
    src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
    if frame == 0
      src_rect.x -= cw
    elsif frame == 2
      src_rect.x += cw
    end
    self.contents.clear_rect(x,y,cw,ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
 
end
What d'you reckon?
IMP1
IMP1
Coding Moderator
Coding Moderator

Posts : 503
Gald : 1399

Stats
Cookies: 5

Back to top Go down

Scene_Menu scripts Empty Re: Scene_Menu scripts

Post by Sponsored content


Sponsored content


Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum