Create Your Own Menu (part 2)

Engine : RPG Maker VX Ace

Click here for part 1

3. Creating Actor Status Window

3a. Setup
Insert a new script under Window_MenuList, change the name to Window_MenuStatus.

3b. Create Window_MenuStatus class
Paste this code below in Window_MenuStatus

class Window_MenuStatus < Window_Selectable
  #Index is actor index, used for determining the actor and
  #window's position
  def initialize(index)
    #Window properties
    #super(x, y, width, height)
    super(0, 0, 116, 288)
    #save index to local variable
    @index = index
    #make a pointer to the actor
    @actor = $game_party.members[@index]
    #refresh the window contents
    refresh
  end
  
  def item_max
    1
  end

  def item_height
    height - standard_padding * 2
  end
  
  def refresh
    #clear the contents
    contents.clear
    #return unless actor isn't nil
    return unless @actor
    draw_actor_name
    draw_actor_level
    draw_actor_sprite
    draw_actor_face    
    draw_actor_parameter
  end
  
  def draw_actor_name
    #draw_text(x, y, width, height, text, align (default value is 0))
    #align :
    # 0 = Left
    # 1 = Center
    # 2 = Right
    #set the text height to font size, which is 24 for default
    draw_text(0, 0, contents.width, 24, @actor.name, 1)
  end
  
  def draw_actor_level
    #change the font size of contents to 16
    contents.font.size = 16
    
    #change the font color
    #change_color(color, enabled? (default value is true))
    
    #text_color(n) is to get the color of n index in window graphic
    #the same as \C[n] in Event message
    change_color(text_color(16))
    
    #Vocab::level_a is the term for level (short) that can be changed in 
    #database.
    #If there is #{} in double string (""), it will run the command in that 
    #bracket and combine the result.
    #"#{Vocab::level_a} : #{@actor.level}" is the same thing as :
    #   Vocab::level_a + " : " + @actor.level.to_s
    draw_text(0, 24, contents.width, 16, "#{Vocab::level_a} : #{@actor.level}", 1)
  end
  
  def draw_actor_sprite
    #draw_character(character name, character index, x, y)
    draw_character(@actor.character_name, @actor.character_index, contents.width/2, 76)
  end
  
  def draw_actor_face
    #draw_face(face_name, face_index, x, y, enabled? (default value is true))           
    draw_face(@actor.face_name, @actor.face_index, (contents.width-96)/2, 82, true)
    #(contents.width-96)/2 is for calculating the center point. 96 is the width of face graphic.
  end
  
  def draw_actor_parameter    
    contents.font.size = 16
    change_color(text_color(0))
    
    #draw hp text
    draw_text(0, 182, contents.width, 16, "#{@actor.hp} / #{@actor.mhp}")    
    #draw hp gauge
    #draw_gauge(x, y, width, rate, color1, color2)
    draw_gauge(0, 182, contents.width, @actor.hp_rate, text_color(20), text_color(21))
    
    #draw mp text
    draw_text(0, 208, contents.width, 16, "#{@actor.mp} / #{@actor.mmp}") 
    #draw mp gauge
    draw_gauge(0, 208, contents.width, @actor.mp_rate, text_color(22), text_color(23))
    
    #for calculating the percentage of experience. One variable has to be
    #converted to float(.to_f).
    exp_rate = @actor.exp / (@actor.next_level_exp - @actor.exp).to_f
    #draw exp text
    draw_text(0, 238, contents.width, 16, "#{@actor.exp} / #{@actor.next_level_exp - @actor.exp}")
    #draw exp gauge
    draw_gauge(0, 238, contents.width, exp_rate, text_color(28), text_color(29))
  end
end
Everything is explained in the code.
Now, let's test it. The step is like the previous part, but change the script call to:
You should see the window status of actor 1

Click here for part 3

0 komentar:

Create Your Own Menu (part 1)

Engine : RPG Maker VX Ace

What is this?

Do you want to make your own Menu but don't know how? Follow this tutorial, and I'm sure you can make it.

1. Figure Out the Layout

Before we go to coding action, we have to make the design first. It'll make the coding easier. For this tutorial, I want to make a menu that look like this,
The actor windows is separated so I can animate it later.

2. Creating Menu List Window

 

2a. Setup
Now, create a new project, so we won't be distracted with other script, then open the script editor. Select under ( insert here ), then change the name to "Window_MenuList". 


Q : Why we have to create a new window? Why can't we just use Window_MenuCommand instead?
A : Because I want the menu list to be horizontal, not vertical.

2b. Setup Position and Size
Paste this code below in Window_MenuList,

class Window_MenuList < Window_HorzCommand  
  def initialize  
    #Call superclass method with (x, y)  
    super(16, 16)  
    select_last  
  end    
  
  def window_width  
    512  
  end  
  
  def window_height  
    40  
  end  
  
  def line_height
    #Auto calculate the line height for text
    #Standard padding is a distance between window and it's contents,
    #default value is 12 
    window_height - standard_padding * 2
  end
  
  def select_last
    #Initialize @@last_command_symbol if it's nil
    @@last_command_symbol ||= nil
    #Change cursor index to the last position 
    select_symbol(@@last_command_symbol)  
  end
end

Other explanation:
  • "super" is for calling the superclass method. In this window for example, we call super(16, 16) in initialize, and it's the same thing as Window_HorzCommand.initialize(x, y).

For setting up position and size, you can use Photoshop or other graphics editor to do that. In Photoshop, press Ctrl+T or Edit>Free Transform, then change the anchor point to top-left.


2c. Creating the commands
The commands that we'll make is the same as default one plus new command called Crafting, but without Save. So the list commands is Items, Skills,  Equipment, Status, Formation, Crafting and Game End.

Now, insert this code below, above the very bottom of "end" in Window_MenuList.

#Make Command list
  def make_command_list    
    add_commands_list
  end

  def add_commands_list
    #add_command(Command Name, Command Symbol, Enabled?(true or false))
    add_command(Vocab::item,      :item,      main_commands_enabled)
    add_command(Vocab::skill,     :skill,     main_commands_enabled)
    add_command(Vocab::equip,     :equip,     main_commands_enabled)
    add_command(Vocab::status,    :status,    main_commands_enabled)
    add_command(Vocab::formation, :formation, formation_enabled)
    add_command(Vocab::game_end,  :game_end)
  end

  def main_commands_enabled
    #There's actor in the party?
    $game_party.exists
  end

  def formation_enabled
    #If actors in the party is 2 or more and formation not disabled
    $game_party.members.size >= 2 && !$game_system.formation_disabled
  end

  def process_ok
    #Save command position
    @@last_command_symbol = current_symbol
    super
  end

  def draw_item(index)
    #Change contents font size
    contents.font.size = 16
    super(index)
  end

If you want to add more command, insert add_command in add_command_list. Ouch, I forgot to add the Crafting command. So after we insert the Crafting command, the add_command_list would be like this,

  def add_commands_list
    #add_command(Command Name, Command Symbol, Enabled?(true or false))
    add_command(Vocab::item,      :item,      main_commands_enabled)
    add_command(Vocab::skill,     :skill,     main_commands_enabled)
    add_command(Vocab::equip,     :equip,     main_commands_enabled)
    add_command(Vocab::status,    :status,    main_commands_enabled)
    add_command(Vocab::formation, :formation, formation_enabled)
    add_command("Crafting",       :crafting)
    add_command(Vocab::game_end,  :game_end)
  end
Q : Why is there no true or false after command symbol?
A : If you leave it empty, it will use the default value,  which is true.
Q : What is the symbol for?
A : To distinguish the command with others, it will be used for creating the handler too.

Now, let's see if everything is correct. To test this window, we will create the window with Script Call in Event.
Save, then run the game. Activate the event, and you should see the window popped out.
Click here for part 2


0 komentar:

Parallax Utils v1.1b

Engine : RPG Maker VX Ace
Version: 1.1b

What is this?

Parallax Mapping utilities for VX Ace.

Features:

  • Easy to setup, only specify the file in Map Properties, then you good to go
  • 4 Layer Parallax
    • Background
    • Animated background
    • Overlay
    • Animated Overlay

Changelog:

  • v1.1b - 18 - 08 - 2015
    • Fixed overlay parallax not disposed after transfer player.
  • v1.1a - 16 - 08 - 2015
    • Fixed overlay parallax tint not working.
    • Fixed only png file can be detected.


Download:

http://pastebin.com/raw.php?i=bwX6QEmb

Credit:

DrDhoom



0 komentar:

Minesweeper v1.1

Version: 1.1

What is this?

Minesweeper, yes, a game that came with Windows. Your objective is to find all the mine, without triggering it. The game isn't encrypted, mess with it as you like.

How to play?

Press "C" when selecting a box that didn't open yet to place a flag. This flag is for memorizing where the bombs might be.
Press "C" when selecting a box that is already openned to open nearby box if flags near it is equal to the number.
Press "B" to open a box that didn't openned yet.

Screenshot:


Download:

http://www.mediafire.com/download/hnfknblbr1ue67u/%5BRGSS3%5DMinesweeper_v1.1.exe

Credit:

DrDhoom

3 komentar:

Commissions

Open for Script Commisions

Hey guys, do you want to hire me to create a script for you? or modify existing scripts? Just contact me at:
Facebook : fb.me/doctordhoom
Email: ibolt.letter@gmail.com / drd_workshop@yahoo.co.id

I'm also a Graphic Designer, you can commission me for art or make a print design etc.
Here's my DeviantArt : drdhoom.deviantart.com


 What kind of script that I will accept?

  • RGSS, RGSS2, RGSS3, or MV Plugin
  • Custom Battle System (but don't expect it to be cheap)
  • Custom Menu
  • Title Screen
  • Mini game
  • Compatibility Fix (I've to look at both script first, I can deny this if it's too much)
  • HUD
  • etc... if your request is not in this list neither below, just ask me

What kind of script that I wont accept?

  • Online stuff
  • 3D stuff

Payment method:

  • Paypal
  • Indonesia Local Bank Transfer (BNI / BRI)





0 komentar:

Animated Battleback v1.0

Engine : RPG Maker VX Ace
Version: 1.0

What is this?

This script allow you to animate the battleback.

Screenshot:


Download:

http://pastebin.com/raw.php?i=xuyC77fx

Credit:

jmoresca (Original creator)
DrDhoom

1 komentar:

Manipulate State v1.04

Engine : RPG Maker VX Ace
Version: 1.04

What is this?

Just like in Final Fantasy VII, successfully manipulated enemies are under your full control (wears off when you hit them). They are added to the player's party until they die, run way, the state wears off, or you end the battle somehow (victory or escape).

Features:

  • Add any/as many skills as you want to the enemy's skillset.
  • Easy to set up via notetags.
  • Many enemies can be manipulated at once
  • Manipulated enemies are added to the party's battle window and you use the same way you would use your player.
  • Added compatibility for YEA-SkillCostManager, Tsukihime's Cursor Memory, VE Toggle Target, VE Materia System, - DoubleX (YSA Battle System: Classical ATB Bug Fix)  

Required:

  • YEA - Ace Battle Engine v1.15+
  • YSA Battle System: Classical ATB
     

Screenshot:






Download:

http://pastebin.com/raw.php?i=7NJhTZew

Credit:

  • DrDhoom
  • joeyjoejoe (Commission requester)
  • DoubleX (YSA Battle System: Classical ATB Bug Fix)


1 komentar:

Resize Battleback v1.0

Engine : RPG Maker VX Ace
Version: 1.0

What is this?

You changed your game resolution but too lazy to resize the battleback image size? Just install this and everything is beautiful again.

Download:

http://pastebin.com/raw.php?i=GsqyGMqJ

Credit:

DrDhoom



0 komentar:

Parallax Utils v1.1

Engine : RPG Maker VX
Version: 1.1

What is this?

Parallax Mapping utilities for VX.

Features:

  • Easy to setup, only specify the file in Map Properties, then you good to go
  • 4 Layer Parallax
    • Background
    • Animated background
    • Overlay
    • Animated Overlay

Download:

http://pastebin.com/raw.php?i=a39kVEpf

Credit:

DrDhoom




2 komentar:

More Choices v1.0

Engine : RPG Maker XP
Version: 1.0

What is this?

Want to make a choice list that is more than 4 choices? That's what this script is for.

Screenshot:






Download:

http://pastebin.com/raw.php?i=KwKMmYBf

Credit:

DrDhoom

0 komentar:

Replace Actor Victory v1.0

Engine : RPG Maker VX Ace
Version: 1.0

What is this?

Replace specified actor with another actor when battle ended.

Download:

http://pastebin.com/raw.php?i=ZK7r7rXt

Credit:

DrDhoom



0 komentar:

Break Pack v0.8

Engine : RPG Maker VX
Version : 0.8

What is this?

This is a script pack that I make 2 years ago for RPG Maker VX. This pack add a lot of visual improvement.

Features:

  • Animated mouse cursor
  • In-map HUD
  • Element Evolution
    • for adding element into weapons and armors
  • Scene Menu, Item, and Skill
    • Fully intergrated with mouse system
  • Icon Frame
    • Icons will have a frame
    • Each icon can have different frame
  • Face Frame
    • Frame for face graphics
    • can be switched of with switch
  • Orb System
    • Weapon effect can be added with orbs
    • Only 5 orbs effect for now, which is Lifesteal, Critical Strike, Mana Break, Mana Steal, and Bash 

Screenshots:





Download:

http://www.mediafire.com/?0ehw3car210czr4

Credit:

  • DrDhoom
  • DerVVulfman for the Mouse Module
  • Modern Algebra for the Pathfinding
  • Woratana for the Mouse system



0 komentar: