RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[ACE]Need Help With Two Scripts

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 74
RMRK Junior - - Cute Pegasus Pony

Here is the first script 'Information' now.

Spoiler for:
Code: [Select]
=begin
Information
version: 1.0
Created by: Casper Gaming (http://www.caspergaming.com/) as the 'Professions' Script
Modified by Nightgazer Starlight

Compatibility:
Made for RPGVXAce

FEATURES
Creates an information window that can show information on the different characters.

SETUP
Set up required. Instructions below.
=end

module INFO # Don't edit

  NAME = "Information" # This is the name of the command. You will see this in
                       # the menu and as the title of the window.

  FONT_SIZE = 24 # 24 is the default game font size. 20 is this. The true size.

  MENU = false #Show in menu? If not, use following script call to call the
               #information scene: SceneManager.call(Scene_Information)

  INFORMATION1 = "Ariel"
  INFORMATION2 = "Hikaru"
  INFORMATION3 = "Arick"
  INFORMATION4 = "Ash Williams"
  INFORMATION5 = "Elise"
  INFORMATION6 = "Kittie"
  INFORMATION7 = "Mikuru Asahina"
  INFORMATION8 = "Twilight Sparkle"
  INFORMATION9 = "Pinkie Pie"
  INFORMATION10 = "Applejack Apple"
  INFORMATION11 = "Rainbow Dash"
  INFORMATION12 = "Rarity Belle"
  INFORMATION13 = "Fluttershy"
  INFORMATION14 = "Spike"

end # Don't edit this

class Window_Information < Window_Base
  include INFO
 
  def initialize
    super(0, line_height*2, Graphics.width, Graphics.height-line_height*2)
    refresh
  end
 
  def refresh
    contents.clear
    contents.font.size = FONT_SIZE
      draw_information(0, 0)
    end
  end

  def draw_information(x, y)

    draw_text(x, y, contents.width, line_height, INFORMATION1)
    draw_text(x, y + line_height, contents.width, line_height, INFORMATION2)
    draw_text(x, y + line_height*2, contents.width, line_height, INFORMATION3)
    draw_text(x, y + line_height*3, contents.width, line_height, INFORMATION4)
    draw_text(x, y + line_height*4, contents.width, line_height, INFORMATION5)
    draw_text(x, y + line_height*5, contents.width, line_height, INFORMATION6)
    draw_text(x, y + line_height*6, contents.width, line_height, INFORMATION7)
    draw_text(x, y + line_height*7, contents.width, line_height, INFORMATION8)
    draw_text(x, y + line_height*8, contents.width, line_height, INFORMATION9)
    draw_text(x, y + line_height*9, contents.width, line_height, INFORMATION10)
    draw_text(x, y + line_height*10, contents.width, line_height, INFORMATION11)
    draw_text(x, y + line_height*11, contents.width, line_height, INFORMATION12)
    draw_text(x, y + line_height*12, contents.width, line_height, INFORMATION13)
    draw_text(x, y + line_height*13, contents.width, line_height, INFORMATION14)
  end

# END EDITABLE REGION

class Window_Information_Title < Window_Base
  include INFO
 
  def initialize
    super(0, 0, Graphics.width, line_height*2)
    refresh
  end
 
  def refresh
    contents.clear
    draw_text(0, 0, contents.width, line_height, NAME, 1)
  end
end

class Scene_Information < Scene_Base

  def start
    super
    create_head_window
    create_info_window
  end
 
  def create_head_window
    @profession_title = Window_Information_Title.new
    @profession_title.viewport = @viewport
  end
 
  def create_info_window
    @info_window = Window_Information.new
    @info_window.viewport = @viewport
  end
 
  def update
    super
    if Input.trigger?(:B)
      Sound.play_cancel
      return_scene
    end
  end
end

class Scene_Menu < Scene_MenuBase
 
  alias create_command_window_vxinformation create_command_window
  def create_command_window
    create_command_window_vxinformation
    @command_window.set_handler(:vxinformation, method(:vxinformation_select)) if INFO::MENU
  end
 
  def vxinformation_select
    SceneManager.call(Scene_Information)
  end
end

class Window_MenuCommand < Window_Command
 
  alias vxinformation_command add_original_commands
  def add_original_commands
    vxinformation_command
    add_command(INFO::NAME, :vxinformation) if INFO::MENU
  end
end

Now what I need with that script is to make those names selectable.

Like when I select 'Ariel' it would then use the command 'SceneManager.call(Scene_Ariel)' there.

That would cause it to use my 'Ariel' script.

Spoiler for:
Code: [Select]
=begin
Ariel
version: 1.0
Created by: Casper Gaming (http://www.caspergaming.com/) as the 'Professions' Script
Modified by Nightgazer Starlight

Compatibility:
Made for RPGVXAce

FEATURES
Creates a window that shows information on the character named : Ariel.

SETUP
Set up required. Instructions below.
=end

module ARIEL_INFO # Don't edit

  NAME = "Ariel"       # This is the name of the command. You will see this in
                       # the menu and as the title of the window.

  FONT_SIZE = 24 # 24 is the default game font size. 20 is this. The true size.

  MENU = false #Show in menu? If not, use following script call to call the
               #ariel scene: SceneManager.call(Scene_Ariel)

  ARIEL1 = "Name : Ariel"
  ARIEL2 = "Class : Werewolf Princess"
  ARIEL3 = "Birthday : March 3, 1000 AF"
  ARIEL4 = "Age : 17"
  ARIEL5 = "Origin : Arethia"
  ARIEL6 = "Gender : Female"
  ARIEL7 = "Height : 5 ft. 3 in."
  ARIEL8 = "Weight : Secret"
#  ARIEL9 = " "
#  ARIEL10 = " "
#  ARIEL11 = " "
#  ARIEL12 = " "
#  ARIEL13 = " "
#  ARIEL14 = " "

end # Don't edit this

class Window_Ariel < Window_Base
  include ARIEL_INFO
 
  def initialize
    super(0, line_height*2, Graphics.width, Graphics.height-line_height*2)
    refresh
  end
 
  def refresh
    contents.clear
    contents.font.size = FONT_SIZE
      draw_ariel(0, 0)
    end
  end

  def draw_ariel(x, y)

    draw_text(x, y, contents.width, line_height, ARIEL1)
    draw_text(x, y + line_height, contents.width, line_height, ARIEL2)
    draw_text(x, y + line_height*2, contents.width, line_height, ARIEL3)
    draw_text(x, y + line_height*3, contents.width, line_height, ARIEL4)
    draw_text(x, y + line_height*4, contents.width, line_height, ARIEL5)
    draw_text(x, y + line_height*5, contents.width, line_height, ARIEL6)
    draw_text(x, y + line_height*6, contents.width, line_height, ARIEL7)
    draw_text(x, y + line_height*7, contents.width, line_height, ARIEL8)
#    draw_text(x, y + line_height*8, contents.width, line_height, ARIEL9)
#    draw_text(x, y + line_height*9, contents.width, line_height, ARIEL10)
#    draw_text(x, y + line_height*10, contents.width, line_height, ARIEL11)
#    draw_text(x, y + line_height*11, contents.width, line_height, ARIEL12)
#    draw_text(x, y + line_height*12, contents.width, line_height, ARIEL13)
#    draw_text(x, y + line_height*13, contents.width, line_height, ARIEL14)
  end

# END EDITABLE REGION

class Window_Ariel_Title < Window_Base
  include ARIEL_INFO
 
  def initialize
    super(0, 0, Graphics.width, line_height*2)
    refresh
  end
 
  def refresh
    contents.clear
    draw_text(0, 0, contents.width, line_height, NAME, 1)
  end
end

class Scene_Ariel < Scene_Base

  def start
    super
    create_head_window
    create_info_window
  end
 
  def create_head_window
    @profession_title = Window_Ariel_Title.new
    @profession_title.viewport = @viewport
  end
 
  def create_info_window
    @info_window = Window_Ariel.new
    @info_window.viewport = @viewport
  end
 
  def update
    super
    if Input.trigger?(:B)
      Sound.play_cancel
      return_scene
    end
  end
end

class Scene_Menu < Scene_MenuBase
 
  alias create_command_window_vxariel create_command_window
  def create_command_window
    create_command_window_vxariel
    @command_window.set_handler(:vxariel, method(:vxariel_select)) if ARIEL_INFO::MENU
  end
 
  def vxariel_select
    SceneManager.call(Scene_Ariel)
  end
end

class Window_MenuCommand < Window_Command
 
  alias vxariel_command add_original_commands
  def add_original_commands
    vxariel_command
    add_command(ARIEL_INFO::NAME, :vxariel) if ARIEL_INFO::MENU
  end
end

Now on my 'Ariel' script all I need to know is how to make a face pic appear in the upper right part.

---

Signature

If you are a believer of Jesus Christ, and are 100% proud of it, put this in your sig!!

- Nightgazer Starlight, Loyal Servant of The Royal Pony Sisters Princess Celestia and Princess Luna... Forever Equestria!

**
Rep:
Level 74
RMRK Junior - - Cute Pegasus Pony

Can somepony pleeease tell me how to, on my 'Ariel' script, to make her face pic appear in the upper right part now?

---

Signature

If you are a believer of Jesus Christ, and are 100% proud of it, put this in your sig!!

- Nightgazer Starlight, Loyal Servant of The Royal Pony Sisters Princess Celestia and Princess Luna... Forever Equestria!

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
Something like this?

Code: [Select]
#==============================================================================
# ** Window_Ariel
#------------------------------------------------------------------------------
#  Window that displays Ariel information
#==============================================================================

class Window_Ariel < Window_Base
  #--------------------------------------------------------------------------
  # * Draw Ariel Information
  #--------------------------------------------------------------------------
  def draw_ariel(x, y)
    # Draw Face
    draw_face("Actor1", 0, contents.width - 96, 0, true)   
    8.times {|i|
      # Draw Text
      draw_text(x, y + line_height * i, contents.width, line_height, ARIEL_INFO.const_get("ARIEL#{i+1}".to_sym) )
    }
  end
end
« Last Edit: January 13, 2013, 11:21:31 PM by TDS »

**
Rep:
Level 74
RMRK Junior - - Cute Pegasus Pony

Wow!^__^

Thanks!^_^

I got her face pic up there now fine!^_^

Here is the script now.

Spoiler for:
Code: [Select]
=begin
Ariel
version: 1.0
Created by: Casper Gaming (http://www.caspergaming.com/) as the 'Professions' Script
Modified by Nightgazer Starlight and TDS

Compatibility:
Made for RPGVXAce

FEATURES
Creates a window that shows information on the character named : Ariel.

SETUP
Set up required. Instructions below.
=end

module ARIEL_INFO # Don't edit

  NAME = "Ariel"       # This is the name of the command. You will see this in
                       # the menu and as the title of the window.

  FONT_SIZE = 24 # 24 is the default game font size. 20 is this. The true size.

  MENU = false #Show in menu? If not, use following script call to call the
               #ariel scene: SceneManager.call(Scene_Ariel)

  ARIEL1 = "Name : Ariel"
  ARIEL2 = "Class : Werewolf Princess"
  ARIEL3 = "Birthday : March 3, 1000 AF"
  ARIEL4 = "Age : 17"
  ARIEL5 = "Origin : Arethia"
  ARIEL6 = "Gender : Female"
  ARIEL7 = "Height : 5 ft. 3 in."
  ARIEL8 = "Weight : Slender"
  ARIEL9 = "Preference : Girls"
  ARIEL10 = "Marital Status : Engaged to Princess Hikaru of Lofthaven"
  ARIEL11 = "Favorite Food : Meat with good BBQ sauce on it"
  ARIEL12 = "Favorite Instrument : Flute"
  ARIEL13 = "2'nd Favorite Instrument : Synthesizer"
  ARIEL14 = "Eyes : Dark Blue"
  ARIEL15 = "Hair : Light Brown"

end # Don't edit this

class Window_Ariel < Window_Base
  include ARIEL_INFO
 
  def visible_line_number
    14
  end

  def initialize
    super(0, line_height*2, Graphics.width, Graphics.height-line_height*2)
    refresh
  end
 
  def refresh
    contents.clear
    contents.font.size = FONT_SIZE
      draw_ariel(0, 0)
    end
  end

  def draw_ariel(x, y)
    # Draw Face
    draw_face("Actor4", 7, contents.width - 96, 0, true)   
    15.times {|i|
      # Draw Text
      draw_text(x, y + line_height * i, contents.width, line_height, ARIEL_INFO.const_get("ARIEL#{i+1}".to_sym) )
    }
  end

# END EDITABLE REGION

class Window_Ariel_Title < Window_Base
  include ARIEL_INFO
 
  def initialize
    super(0, 0, Graphics.width, line_height*2)
    refresh
  end
 
  def refresh
    contents.clear
    draw_text(0, 0, contents.width, line_height, NAME, 1)
  end
end

class Scene_Ariel < Scene_Base

  def start
    super
    create_head_window
    create_info_window
  end
 
  def create_head_window
    @ari_title = Window_Ariel_Title.new
    @ari_title.viewport = @viewport
  end
 
  def create_info_window
    @info_window = Window_Ariel.new
    @info_window.viewport = @viewport
  end
 
  def update
    super
    if Input.trigger?(:B)
      Sound.play_cancel
      return_scene
    end
  end
end

class Scene_Menu < Scene_MenuBase
 
  alias create_command_window_vxariel create_command_window
  def create_command_window
    create_command_window_vxariel
    @command_window.set_handler(:vxariel, method(:vxariel_select)) if ARIEL_INFO::MENU
  end
 
  def vxariel_select
    SceneManager.call(Scene_Ariel)
  end
end

class Window_MenuCommand < Window_Command
 
  alias vxari_command add_original_commands
  def add_original_commands
    vxari_command
    add_command(ARIEL_INFO::NAME, :vxariel) if ARIEL_INFO::MENU
  end
end

Only problem is it will only hold 14 lines.

I tried adding a

Code: [Select]
  def visible_line_number
    14
  end

to get it to scroll if it went past 14 lines, but it didn't work out.

---

Signature

If you are a believer of Jesus Christ, and are 100% proud of it, put this in your sig!!

- Nightgazer Starlight, Loyal Servant of The Royal Pony Sisters Princess Celestia and Princess Luna... Forever Equestria!

*
Rep: +0/-0Level 1
RMRK Junior
【揚歌-教學麥克風直營店】官方線上購物網站─JM-180B有線麥克風擴音器│無線麥克風擴音器│揚歌小蜜蜂│專營教學麥克風及教學擴音器
 
 
https://mic-shop.com/