Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Rune

1
Tutorial Database / Window/Menu Scripting Tutorial
July 20, 2008, 06:18:11 pm
Some may remember this from one of the old CP forums, or even RMRK, this is basically my little tut on Windows, and will help towards you making your own CMSes and window scenes soon ;)

Introduction to Ruby/RGSS: ShowHide
RGSS was originated from ruby.
Ruby is a an exciting new, pure, object oriented programming language. While few people in the West have heard of Ruby yet, it has taken off like wildfire in Japan---already overtaking the Python language in popularity.

What makes Ruby so popular? Ruby weaves the best features of the best programming languages into a seamless, concise whole. Ruby is:
Powerful -- Ruby combines the pure object-oriented power of the classic OO language Smalltalk with the expressiveness and convenience of a scripting language such as Perl. Ruby programs are compact, yet very readable and maintainable; you can get a lot done in a few lines, without being cryptic.

Simple -- The syntax and semantics are intuitive and very clean. There aren't any "special cases" you have to remember. For instance, integers, classes, and nil are all objects, just like everything else. Once you learn the basics, it's easy to guess how to do new things---and guess correctly.

Transparent -- Ruby frees you from the drudgery of spoon-feeding the compiler. More than any other language we've worked with, Ruby stays out of your way, so you can concentrate on solving the problem at hand.

Available -- Ruby is open source and freely available for both development and deployment. Unlike some other new languages, Ruby does not restrict you to a single platform or vendor. You can run Ruby under Unix or Linux, Microsoft Windows, or specialized systems such as BeOS and others.
Most of all, Ruby puts the fun back into programming. When was the last time you had fun writing a program---a program that worked the first time; a program that you could read next week, next month, or next year and still understand exactly what it does? We find Ruby to be a breath of fresh air in the dense, often hectic world of programming. In fact, we see nothing but smiles after we present Ruby to programmers.
(Copied from another site, I have no understanding of Ruby, only RGSS)


Making a Window: ShowHide
To make a window, you need to make at least two definitions, def initialize, and def refresh.

def initialize

To start with, you need to name your window
For example:
class Window_MyWindow < Window_Base

Remember that RGSS is case sensitive, if something isnt the right case then you will most likely get an error, always check something is in the right case.

Now for def initialize, to start this, just type on a new line: def initialize
Simple enough?
Now type
super(0, 0, 128, 128)

This line calls the window
The numbers can be changed, the first number is the x co-ordinates of where the top left corner will appear on-screen, the second number is the y co-ordinates of the position of the window (both these are in pixels)
If both the first numbers are at 0 then the window will appear the top left corner of the screen
The third number is the x co-ordinates of the window itself (in pixels)
The last number is the y co-ords of the window (in pixels)
x goes up to 640 and y goes to 480
So a window can be at maximum, 640 x 480 pixels without going offscreen
(Try and keep the numbers as multiples of 32, they fit better this way)

Then, use
self.contents = Bitmap.new(width - 32, height - 32)

You don't change anything here, i'm not sure what this line does, so i've never edited it myself

Then, if you like, you can add
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize

If you don't add this here, then you can add it in def refresh
you can change $defaultfonttype to "Tahoma", "Arial" or any other font, and you can replace $defaultfontsize to any number you want, this determines the font's size.

Then put refresh, then end.
so your Window so far should look like this:
class Window_MyWindow < Window_Base
  def initialize
    super(0, 0, 128, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    refresh
  end


def refresh

Now you've made the window, you need to give it some contents
def refresh
  self.contents.clear

I think this line clears the window so that suff can be added to it
You can now add the two font lines in if you like, once that's done you may want to use this
self.contents.font.color = normal_color

The colors can all be found in Window_Base, and to create a color, change normal_color to Color.new(r, g, b)
r = red g = green b = blue
self.contents.draw_text(0, 0, 128, 32, "TEXT!!!!")

This line creates text, the first and second numbers determine where the text appears (x and y), and the second two numbers determine thespace the text can fit into, (Number 3 = x, Number 4 = y (usually 32))
Always put text in quotation marks, otherwise the program sees it as a method and searches for the definition for it
To add icons, battlers, charsets etc, use this syntax
bitmap = RPG::Cache.type of bitmap("Name of bitmap")
self.contents.blt(x, y, bitmap, Rect.new(0, 0, x that bitmap has to fit in, y that bitmap has to fit in))

That should be pretty self explanatory...

So now your Window should look something like this
class Window_MyWindow < Window_Base
  def initialize
    super(0, 0, 128, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = Color.new(255, 0, 0)
    self.contents.draw_text(0, 0, 128, 32, "TEXT!!!")
    bitmap = RPG::Cache.icon("001-Weapon01")
    self.contents.blt(0, 64, bitmap, Rect.new(0, 0, 24, 24))
  end
end

Add that extra end at the end (so there's two ends) to round off your window
You will get a syntax error if there are too many or not enough ends


I couldn't think of anything to go between windows and Menu Systems, if you think there should be something in-between these, then just say so ;)

Most scripters start their scripts with comment lines, there are two ways (that I know of) of doing this
One is to put a # at the start of every comment line, note that you can put these after parts in a script on the same line, to explain what each line does, for example
$scene = Scene_Menu.new(3) #Calls the Menu and starts at the 4th option (Will be explained later in the tutorial)

But, you CANNOT use a comment, then use a scripting syntax, e.g.
#To call the menu# $scene = Scene_Menu.new(3)

The syntax itself will be seen as a comment and therefore ignored
To save the time and trouble of putting a # on every line, most scripters use these
=begin

This begins a section of comments
=end

And this ends it, pretty self-explanatory I think
All scripts released on forums or whatnot should include comments so that the user knows exactly what they're doing

def initialize

Now the comments are over, name your scene, for example, the default menu is called Scene_Menu, so we'll call it that.
So, start off with
class Scene_Menu

So that's over and done with, now type def initialize
The way I do my menus (the only way I know) may be different to what other scripters use
So... on the SAME LINE as def initialize, type (menu_index = 0), I think this presets the starting option for when you access the menu, in scripting, most things start at 0, so 0 = 1, 1 = 2, 2 = 3 etc etc etc
So your def initialize should look like this now,
def initialize(menu_index = 0)

Now, you need to define what menu_index actually is, to do this
@menu_index = menu_index

can be used.
Now end your def initialize
So your CMS should look like this now,
class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end

Short eh?
That's only the very beginning

def main

Start off your def main as, well, def main
Now to make the options for your menu
s1 = "Items"

That would be an option for your menu, keep in mind that the options here don't start at 0, so s1 would be the first option, you could also put
s1 = $data_system.words.item

This searches the last page of the database for whatever you have named "Items", note that this only works for item, skill and equip, make all your options
Once you're done you should have something like this
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "Quit"

Remember that you can add options and remove them as you please, i've no idea why, but the program automatically sees these as menu_index
Now, it's decision time, is your menu not going to cover the whole screen? If so, do you want to see the map instead of blackness? If so, add this line
@spriteset = Spriteset_Map.new

Now, to make your options appear, you need to put them in a window, use this to do that
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])

The number is the width (x) of the window, and the options appear at the end, remember to update these whenever you add or remove options
Now to set the index for Window_Command
@command_window.index = @menu_index

This sets Window_Command to menu_index
You can disable options if contitions are not met, like not enough characters
if $game_party.actors.size == 0
  @command_window.disable_item(0)
  @command_window.disable_item(1)
  @command_window.disable_item(2)
  @command_window.disable_item(3)
end

The == is not a typo, you need that to determine that if your party has no more, no less than 0 characters then those options will be disabled, notice they start from 0
Now to disable saving
if $game_system.save_disabled
  @command_window.disable_item(4)
end

That means that if save is disabled then "Save" will turn grey, you can actually disable it later
@playtime_window = Window_PlayTime.new
@playtime_window.x = #Set the x co-ordinates of where the playtime window will appear
@playtime_window.y = #Set the playtime window's y co-ords
@steps_window = Window_Steps.new
@steps_window.x = #The x co-ords of the steps window
@steps_window.y = #The steps window's y co-ords
@gold_window = Window_Gold.new
@gold_window.x = #The x of the gold window
@gold_window.y = #The y of the gold window
@status_window = Window_MenuStatus.new
@status_window.x = #The x of the menustatus window
@status_window.y = #The y of the menustatus window

Here you can set wher each window goes, and what each window is, a menu only really needs a command_window and a status_window, but you can add or remove windows as you please
Graphics.transition
loop do
  Graphics.update
  Input.update
  update

These lines set the transition
  if $scene != self
    break
  end
end

This means that if the current scene isn't the menu, then loop do breaks

  Graphics.freeze
  @spriteset.dispose
  @command_window.dispose
  @playtime_window.dispose
  @steps_window.dispose
  @gold_window.dispose
  @status_window.dispose
end

These lines dispose of all the windows when the menu is exited, you don't need the spriteset line if you didn't add the line earlier, and the end ends def main

def update

def update
  @spriteset.update
  @command_window.update
  @playtime_window.update
  @steps_window.update
  @gold_window.update
  @status_window.update

Again, don't put the spriteset line if you didn't before
These lines update each window every frame or so I think

  if @command_window.active
    update_command
    return
  end

These lines mean that if the cursor is on the command window, then it tells the program to go to the definition of update_command
  if @status_window.active
    update_status
    return
  end
end

These lines do the same but for the status window (the window you go to when you are selecting the characters)
And the last end ends def update

def update_command

def update_command
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Map.new
    return
  end

These lines mean that if the cancel button is pressed then you go back to the map
if Input.trigger?(Input::C)
  if $game_party.actors.size == 0 and @command_window.index < 4
    $game_system.se_play($data_system.buzzer_se)
    return
  end

These lines mean that if the party has exactly 0 characters and the option you have chosen is less than 4 (starting from 0) Then it plays a buzzer and returns to the command window
case @command_window.index

This line means that the response changes for each option in the command window
when 0
  $game_system.se_play($data_system.decision_se)
  $scene = Scene_Item.new

This is the basic response for a selection, though it can get more advanced than that
when 1
  $game_system.se_play($data_system.decision_se)
  @command_window.active = false
  @status_window.active = true
  @status_window.index = 0
when 2
  $game_system.se_play($data_system.decision_se)
  @command_window.active = false
  @status_window.active = true
  @status_window.index = 0
when 3
  $game_system.se_play($data_system.decision_se)
  @command_window.active = false
  @status_window.active = true
  @status_window.index = 0

Those 3 are skill, equip and status, they appear the same, but for the responses, see def update_status
when 4
  if $game_system.save_disabled
    $game_system.se_play($data_system.buzzer_se)
    return
  end
  $game_system.se_play($data_system.decision_se)
  $scene = Scene_Save.new

That means that if save is disabled, then it plays a buzzer and returns to the command window
If save is enabled then it goes to the save screen
    when 5
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_End.new
    end
    return
  end
end

This calls the end screen when Quit is selected
Then the ends end everything except class Scene_Menu

def update_status

def update_status
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
    return
  end

Those lines make it so when the cancel button is pressed and the status screen is active, then it goes back to the command window
if Input.trigger?(Input::C)
  case @command_window.index
  when 1
    if $game_party.actors[@status_window.index].restriction >= 2
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Skill.new(@status_window.index)

This makes it go to the skill screen, i've no idea what the first lines under when 1 do...
      when 2
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end

The rest of the lines seem pretty self explanatory, that's the end of Scene_Menu, make sure there are enough ends at the end, you will get a syntax error if there aren't the right number of ends at the end

Showing Icons

What I do here, is make myself a brand spanking new window with the same co-ordinates as my at the top of my menu, before class Scene_Menu
class Window_Icons < Window_Base
  def initialize
    super(x position of your command window, y position of you command window, x of your command window, y of you command window)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end

Now, like in the Making a Window section, you need to place the icons, like this

  def refresh
    self.contents.clear
    bitmap = RPG::Cache.icon("034-Item03")
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("044-Skill01")
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("013-Body01")
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("Status")
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("037-Item06")
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), 160)
    bitmap = RPG::Cache.icon("039-Item08")
    self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), 160)
  end
end

Where x and y are the x and y of where you want the icons to appear, if you want you can add a number at the end like I have, to set the opacity (transparency) of the icon
Then, you need to add it into your menu
Before the line that says
@command_window = Window_Command.new

Paste this:
@icon_window = Window_Icon.new
@icon_window.x = !!!
@icon_window.y = !!!!

Change the !!! to the x co-ordinates of your command windowand change !!!! to the y co-ordinates of it

Then where it says all the crap like:
@command_window.dispose

Insert:
@icon_window.dispose

Then find:
@command_window.update

And add:
@icon_window.update


That should be it, enjoy :)


Using Variables: ShowHide

Ingame Variables

You can use ingame variables in scripting, for example
$var = $game_variables[x]

Where x is the id of the variable, starting from 1
If you are making a window that uses an ingame variable, you can display it by using that syntax in def initialize above refresh and under the line that says
self.contents = Bitmap.new(width - 32, height - 32)

And using this line
self.contents.draw_text(0, 0, 96, 32, $var.to_s, 1)

The numbers have already been explained in the Making a Window section of this tut
The 1 centers the number, I think if you put a 2 there, I think it aligns it to the right, and if you don't put a number then it aligns to the left

Scripting Variables and Game class

The way I make scripting variables may be different to the way other scripters do it, if any scripters out there know any other ways, then post it ;)

class Game_Var
  attr_accessor :var
  def initialize
    $var = 0
  end
end

That seems pretty self explanatory, the $ makes var a global variable and the fourth line makes $var preset to 0
In the def initialize of the window you want the variable displayed in, put
@game_var = Game_Var

Change game_var and Game_Var to whatever you have called your game class
You can now display the variable the same way you would display ingame variables, but changing the values is different, you need to use a call script that I don't know yet, if I figure it out i'll post it here ;)


More to come ;) if you have any problems with anything here, just post it and i'll try and fix it ;)
2
Intelligent Debate / Animal Rights
July 20, 2008, 05:22:00 pm
What are people's views on the matter?

In my own opinion, animals should not be treated the way they are. Experiments carried out involving household cleaners or similar products are unnecessary, as the reaction may be different to humans from what effects they have on animals. I've seen some rather frightening images of animals in states like this, and would just like to ask, if this was you in their state, how would you feel?

Secondly, meat. Yes, I am a meat eater, though I'm nowhere near proud of it. The thought of eating something that was once a living creature sickens me. I refuse to eat meat off my own back, but if it's there on my plate, then I will eat it. When I move out, I plan to become a Vegetarian, no matter what anyone else tells me.

I have many other points, but I want to hear other people's opinions on the matter.
3
RMXP Script Database / [XP] One-Man CMS
June 29, 2008, 05:58:03 pm
One-Man CMS
Authors: Rune, modern algebra
Version: 1.1
Type: Custom Menu System
Key Term: Custom Menu System



Introduction

This is basically a one-character CMS. Not much more to say really.


Version History

(* marks current version.)

  • <Version 1.0> Command window displayed horizontally at the bottom of the screen with the Status window above it. Playtime and Gold windows displayed in Status window.

  • <Version 1.1> * Command window is now displayed at the side of the Status window.



Planned Future Versions


  • None planned. Although other versions may appear if alterations are suggested or requested




Features


  • HP/SP bars. You will need images for the bars, but I haven't added any, as I'm a n00b at art, and I didn't want everyone's Menu to look identical. You will also need a separate border image for the bars and you can also change the way the bars go down between squashing the image, or cropping parts of it off. Instructions are in the script. (Code by Modern Algebra)

  • Horizontal Command window.

  • Equipment display.

  • No ugly blackness around the windows.

  • One character displayed, but the active character is changeable in-game! Instructions on how to do so are in the script.

  • The height and y co-ordinate of the Command Window changes with the number of commands in the window!




Screenshots

Default six commands
Spoiler: ShowHide


Two extra commands
Spoiler: ShowHide

(Excuse the quality of the HP/SP bars, they were only a quick paint job.)


Demo

None needed.


Script

Spoiler: ShowHide

#==============================================================================
# ** One-Man CMS
#  * by Rune
#------------------------------------------------------------------------------
#  Little configuration required:
#
#  Must have three images in the pictures folder of your project named "HP_bar",
#  "SP_bar" (both of these must be from 100 x 4 to 100 x 10 pixels) and one
#  named "bar_border", this one must be 102 pixels in width and the height of
#  your bars + 2 pixels, and must consist of a one pixel thick border for your
#  HP/SP bars, and may include a darker colour in the centre.
#------------------------------------------------------------------------------
# * Credit:
#   Rune
#   Modern Algebra for the HP/SP bars coding and for the Window_Command edit
#                  (I'm 99.7% sure that was him).
#==============================================================================

#==============================================================================
# * HP/SP bar configuration
#==============================================================================

HP_BAR = RPG::Cache.picture("HP_bar") # Name of your HP bar
SP_BAR = RPG::Cache.picture("SP_bar") # Name of your SP bar
BAR_BORDER = RPG::Cache.picture("bar_border") # Name of your HP/SP bar border
DECREASE_STYLE = 0 # 0 = squash, 1 = crop

#==============================================================================
# * End of HP/SP bar configuration
#==============================================================================

#==============================================================================
# * MenuStatus bar configuration
#==============================================================================

$activecharid = 1 # Change this to match the current active character
                  # The number is the character's ID in the database
                  # I.e. Arshes = 1, Basil = 2, Cyrus = 3, etc...
                  # To change ingame, use a call script command and type:
                  # $activecharid = number

#==============================================================================
# * End of MenuStatus configuration
#==============================================================================

#==============================================================================
# * Window_Base (Edit)
#==============================================================================

class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Battler
  #     actor   : actor
  #     x       : draw spot x-coordinate
  #     y       : draw spot y-coordinate
  #     opacity : opacity
  #--------------------------------------------------------------------------
  def draw_actor_battler(actor, x, y, opacity)
    char = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    self.contents.blt(x, y, char, char.rect, opacity)
  end
end

#==============================================================================
# * End of Window_Base (Edit)
#==============================================================================

#==============================================================================
# * Window_Command (Rewrite)
#==============================================================================

class Window_Command < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(width, commands, column_max = 1, style = 0, inf_scroll = 1)
    super(0, 0, width, (commands.size * 1.0 / column_max).ceil * 32 + 32)
    @inf_scroll = inf_scroll
    @item_max = commands.size
    @commands = commands
    @column_max = column_max
    @style = style
    self.contents = Bitmap.new(width - 32, (@item_max * 1.0 / @column_max).ceil * 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw_Item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(index%@column_max * (self.width / @column_max) + 4, 32 * (index/@column_max), self.width / @column_max - 40, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index], @style)
  end
  #--------------------------------------------------------------------------
  # * Disable Item
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
  #--------------------------------------------------------------------------
  # * Update Help
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_actor($game_party.actors[$scene.actor_index])
  end
end

#==============================================================================
# * End of Window_Command (Rewrite)
#==============================================================================

#==============================================================================
# * Window_PlayTime (Edit)
#==============================================================================

class Window_PlayTime
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Play Time", 2)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
end

#==============================================================================
# * End of Window_PlayTime (Edit)
#==============================================================================

#==============================================================================
# * Window_MenuStatus (Rewrite)
#==============================================================================

class Window_MenuStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(240, 32, 320, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    actor = $game_actors[$activecharid]
    draw_actor_battler(actor, 128, 160, 160)
    self.contents.font.size = 32
    self.contents.font.color = Color.new(0, 0, 0, 255)
    self.contents.draw_text(4, 4, 288, 32, actor.name, 1)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, 288, 32, actor.name, 1)
    self.contents.font.size = 22
    draw_actor_class(actor, 16, 160)
    draw_actor_level(actor, 16, 128)
    draw_actor_state(actor, 16, 192)
    draw_actor_exp(actor, 0, 96)
    border = BAR_BORDER
    src_rect = Rect.new(0, 0, 102, 12)
    self.contents.blt(39, 71, border, src_rect)
    self.contents.blt(183, 71, border, src_rect)
    hp = HP_BAR
    sp = SP_BAR
    case DECREASE_STYLE
    when 0
      hp_percent = ((actor.hp.to_f / actor.maxhp.to_f) * 100).to_i
      dest_rect = Rect.new (40, 72, hp_percent, 10)
      self.contents.stretch_blt (dest_rect, hp, hp.rect)
      sp_percent = ((actor.sp.to_f / actor.maxsp.to_f) * 100).to_i
      dest_rect = Rect.new (184, 72, sp_percent, 10)
      self.contents.stretch_blt (dest_rect, sp, sp.rect)
    when 1
      hp_percent = ((actor.hp.to_f / actor.maxhp.to_f) * 100).to_i
      src_rect = Rect.new (0, 0, hp_percent, 10)
      self.contents.blt (40, 72, hp, src_rect)
      sp_percent = ((actor.sp.to_f / actor.maxsp.to_f) * 100).to_i
      src_rect = Rect.new (0, 0, sp_percent, 10)
      self.contents.blt (184, 72, sp, src_rect)
    end
    draw_actor_hp(actor, 0, 48)
    draw_actor_sp(actor, 144, 48)
    draw_item_name($data_weapons[actor.weapon_id], 0, 224)
    draw_item_name($data_armors[actor.armor1_id], 0, 256)
    draw_item_name($data_armors[actor.armor2_id], 0, 288)
    draw_item_name($data_armors[actor.armor3_id], 0, 320)
    draw_item_name($data_armors[actor.armor4_id], 0, 352)
  end
  #--------------------------------------------------------------------------
  # * Dummy
  #--------------------------------------------------------------------------
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(0, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(0, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(0, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(0, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(0, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[actor.weapon_id], 0, 144)
    draw_item_name($data_armors[actor.armor1_id], 0, 208)
    draw_item_name($data_armors[actor.armor2_id], 0, 272)
    draw_item_name($data_armors[actor.armor3_id], 0, 336)
    draw_item_name($data_armors[actor.armor4_id], 0, 400)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

#==============================================================================
# * End of Window_MenuStatus (Rewrite)
#==============================================================================

#==============================================================================
# * Scene_Menu
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Makes the Map appear in the background
    @spriteset = Spriteset_Map.new
    # Make command window
    s1 = "Inventory"
    s2 = "Abilities"
    s3 = "Equipment"
    s4 = "Status"
    s5 = "Save Game"
    s6 = "Quit Game"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6], 1, 2)
    @command_window.index = @menu_index
    @command_window.y = 240 - @command_window.height / 2
    @command_window.x = 80
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    # Make status window
    @status_window = Window_MenuStatus.new
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 400
    @playtime_window.y = 160
    @playtime_window.opacity = 0
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 400
    @gold_window.y = 224
    @gold_window.opacity = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @spriteset.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @spriteset.update
    @gold_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equip screen
        $scene = Scene_Equip.new
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new
      when 4  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
end

#==============================================================================
# * End of Scene_Menu
#==============================================================================



Instructions

Instructions are inside the script, at the top. Just read through the green comment lines.


Compatibility

No compatibility issues known.



Credits and Thanks


  • Rune

  • Modern Algebra

  • Thanks to Modern Algebra, for a couple of scriptlets. I'll leave it up to him whether he wants to be credited, but until he says, be sure to credit him anyway.




Author's Notes

There are no restrictions. I don't care how this is used, as long as I get a little credit acknowledgment in your game's credits.
PM me on RMRK or CP if you have any issues, or just post in the topic.
If you have any problems, criticism, praise or queries, I'm right here. ;)

Enjoy.
4
Script Requests / Simple Script 'Shop'
March 24, 2008, 06:11:49 pm
Simple Script 'Shop'


Introduction
Some of you may remember this from RMRK. Basically, this is exactly what it says on the tin.
Post requests here, and I or someone else who 'works' here will take them up, but keep in mind, a scripter can only do so much, which you will be able to see by their profiles below. Also, a scripter is obliged to decline any requests that he/she may: not wish to, refuse to, or doesn't have the ability to do.
ALSO! The name of the topic says 'Shop'. Do not be fooled by this, as no payment is necessary. All we ask for is credit in your game.


Profiles

Rune
Scripting Level: Rookie
Years of Experience: 1 - 1.5 yrs
Program: XP
Can do:

  • CMSes
  • Status/Equipment Screen Edits
  • Records/Rewards Scripts
  • Scripts that go along the same lines as that.

Can't/Won't do:

  • CBSes
  • MMORPG Scripts xD
  • Requests that do not follow the template (below)

Other: Please excuse me if there is something I cannot do. I have encountered this problem many-a-time on RMRK. I will always try my best to do what I'm asked to do ;)

Juan
Scripting Level: Noob
Years of Experience: 1.6 yrs
Program: XP
Can do:

  • Custom menu systems
  • Minor battle system edits
  • Minor custom message script edits
  • Anything window based
  • Anything script that menu based or along these lines

Can't/Won't do:

  • MMORPG Scripts
  • A complete battle system(Something like soul rage)
  • Requests that do not follow the template (above)

Other: "I can not script on the weekends since I am at my dads house because rpg maker xp isn't installed and the account I use on that computer is limited."

Nortos
Scripting Level: Noob
Years of Experience: 4 months
Program: XP
Can do:

  • CMSes
  • Battle Layouts
  • Window based stuff e.g shops, save files
  • Title screen edits

Can't/Won't do:

  • MMORPG Scripts
  • A complete battle system(Something like soul rage)
  • Requests that do not follow the template

Other: May not be able to script sometimes due to busy life: friends, soccer, tae kwon do and own project

Fantasist
Scripting Level: Amateur
Years of Experience: About 2 years
Program: XP
Can do:

  • Visual stuff involving Windows, Sprites, etc.
  • File stuff, like save/load/backup systems, etc.
  • Other minor things at which I'm not that good.

Can't/Won't do:

  • Battle systems
  • CMSes (I'm too busy for a complete CMS, but don't hesitate to ask)

Other: "I am busy, and I work on random schedules and whims. Sorry if I might not be able
to respond properly to your requests."

We currently need at least one VX scripter



Templates

Do not post the code tags please.
Request Template
Spoiler: ShowHide
[b]Name: [/b]State your forum username
[b]Request: [/b] Explain your request in full. Provide links if necessary, if you have any custom scripts you want it to be compatible with, etc.
[b]Program: [/b]Is your request for XP or VX?
[b]Mockup: [/b] Post a mockup of what the script should look like visually. If you want a remake of a system from a game, post an image(s) or link(s) to an image(s) of the system.
[b]Other: [/b]Anything else worth saying.


Recruitment Template
Spoiler: ShowHide
[b]Name: [/b]State your forum username
[b]Scripting Level: [/b] What level would you say you are at scripting?
[b]Years of Experience: [/b]How long have you been able to script for?
[b]Program: [/b]Do you script on XP, VX, or both?
[b]Example of work: [/b] Post an example of your work. Screeny(s) please, no actual script.
[b]Can do: [/b]
[list]
[*] Post what you are capable of doing as a scripter
[*] And so on...
[/list]
[b]Can't/Won't do: [/b]
[list]
[*] Post what you are not capable of doing as a scripter, or refuse to do
[*] And so on...
[/list]
[b]Other: [/b]Anything else worth saying.


That should be all. If I've missed anything, please say ;)
5
Rune's Status Screen [Edit]
Authors: Rune
Version: 1.0.0
Type: Script Edit
Key Term: Menu Add-on



Introduction

Basically, it's an edited version of the original status screen, but moved around, and with a grand total of seven windows to make it look good. It also displays the battler picture in the bottom centre window.
A simple edit, but I like it...


Features


  • Battler Display
  • Different Layout
  • In Boxes



Screenshots




Demo

None needed


Script

First, add this into Window_Base, before the last end.
Window_Base addition: ShowHide
  def draw_actor_battler(actor, x, y)
    bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end


Then replace the whole of Window_Status with this.
Window_Status: ShowHide
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
#  This window displays full status specs on the status screen.
#==============================================================================

class Window_Status < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_battler(@actor, 280, 430)
    draw_actor_graphic(@actor, 182, 80)
    self.contents.font.size = 36
    self.contents.font.name = "Monotype Corsiva"
    draw_actor_name(@actor, 240, 32)
    self.contents.font.size = 22
    self.contents.font.name = "Tahoma"
    draw_actor_class(@actor, 250, 80)
    draw_actor_level(@actor, 32, 32)
    draw_actor_state(@actor, 32, 64)
    draw_actor_hp(@actor, 200, 144, 172)
    draw_actor_sp(@actor, 200, 176, 172)
    self.contents.font.color = system_color
    self.contents.draw_text(0, 160, 170, 32, "Stats:", 1)
    draw_actor_parameter(@actor, 0, 224, 0)
    draw_actor_parameter(@actor, 0, 256, 1)
    draw_actor_parameter(@actor, 0, 288, 2)
    draw_actor_parameter(@actor, 0, 320, 3)
    draw_actor_parameter(@actor, 0, 352, 4)
    draw_actor_parameter(@actor, 0, 384, 5)
    draw_actor_parameter(@actor, 0, 416, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(400, 32, 80, 32, "EXP")
    self.contents.draw_text(400, 64, 80, 32, "NEXT")
    self.contents.font.color = normal_color
    self.contents.draw_text(400 + 80, 32, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(400 + 80, 64, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(400, 160, 210, 32, "Equipment", 1)
    draw_item_name($data_weapons[@actor.weapon_id], 410 + 16, 208 + 16)
    draw_item_name($data_armors[@actor.armor1_id], 410 + 16, 256 + 16)
    draw_item_name($data_armors[@actor.armor2_id], 410 + 16, 320)
    draw_item_name($data_armors[@actor.armor3_id], 410 + 16, 354 + 16)
    draw_item_name($data_armors[@actor.armor4_id], 410 + 16, 416)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(410, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(410, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(410, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(410, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(410, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 410 + 24, 160)
    draw_item_name($data_armors[@actor.armor1_id], 410 + 24, 208 + 16)
    draw_item_name($data_armors[@actor.armor2_id], 410 + 24, 272 + 16)
    draw_item_name($data_armors[@actor.armor3_id], 410 + 24, 336 + 16)
    draw_item_name($data_armors[@actor.armor4_id], 410 + 24, 416)
  end
end


And finally replace your current Scene_Status with this.
Scene_Status: ShowHide
class Window < Window_Base
  def initialize
    super(0, 0, 64, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
  end
end

#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
#  This class performs status screen processing.
#==============================================================================

class Scene_Status
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Get actor
    @actor = $game_party.actors[@actor_index]
    # Make status window
    @status_window = Window_Status.new(@actor)
    @w1 = Window.new
    @w1.x = 200
    @w1.y = 230
    @w1.height = 250
    @w1.width = 200
    @w2 = Window.new
    @w2.x = 200
    @w2.y = 150
    @w2.height = 80
    @w2.width = 200
    @w3 = Window.new
    @w3.x = 0
    @w3.y = 230
    @w3.height = 250
    @w3.width = 200
    @w4 = Window.new
    @w4.x = 400
    @w4.y = 150
    @w4.height = 80
    @w4.width = 240
    @w5 = Window.new
    @w5.x = 400
    @w5.y = 230
    @w5.height = 250
    @w5.width = 240
    @w6 = Window.new
    @w6.x = 0
    @w6.y = 150
    @w6.height = 80
    @w6.width = 200
    @w7 = Window.new
    @w7.x = 0
    @w7.y = 0
    @w7.height = 150
    @w7.width = 640
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @w1.dispose
    @w2.dispose
    @w3.dispose
    @w4.dispose
    @w5.dispose
    @w6.dispose
    @w7.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(3)
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Switch to different status screen
      $scene = Scene_Status.new(@actor_index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Switch to different status screen
      $scene = Scene_Status.new(@actor_index)
      return
    end
  end
end



Instructions

It's basically plug-n-play.

If you can't see the name font, download it, and put it in your computer's 'Fonts' folder.
Linky >> http://www.newfonts.net/index.php?pa=show_font&id=130



Compatibility

No known incompatibility issues.


Credits and Thanks


  • Just me



Author's Notes

Any problems, or queries, reply here, or contact me via PM. ;)
6
RMXP Script Database / [XP] Rune's CMS
March 23, 2008, 04:30:57 pm
Rune's CMS #5
Authors: Rune
Version: 1.0.0
Type: Menu System
Key Term: Custom Menu System



Introduction

Thought I'd kick-start my stay here at Chaosproject with a script.
This is my fifth released CMS, and I have to say, I think it's my best yet.


Features


  • Battler Display
  • Equipment Display
  • Cool Font (imo)
  • Location Display
  • Put your game name into it



Screenshots

Command Menu Active
Spoiler: ShowHide


Status Window Active
Spoiler: ShowHide



Demo

None needed


Script

Simply replace your current Scene_Menu with this:
Spoiler: ShowHide
#======================#
#     > CMS #5         #
#      > By Rune       #
#       > Ver. 1       #
#======================#

#---------------------Window_Base---------------------
#---------------------Battler display---------------------

class Window_Base
  def draw_actor_battler(actor, x, y, opacity)
    bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end

#---------------------Name + Class display---------------------

  def draw_actor_name_menu(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 160, 32, actor.name, 1)
  end 
  def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 160, 32, actor.class_name, 1)
  end

#---------------------Level display---------------------

  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, "Lv:")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 24, 32, actor.level.to_s, 2)
  end

#---------------------EXP display---------------------

  def draw_actor_exp(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 608 / 4, 32, "EXP")
    self.contents.font.color = normal_color
    self.contents.draw_text(x - 16, y + 16, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 68, y + 16, 12, 32, "/", 1)
    self.contents.draw_text(x + 80, y + 16, 84, 32, actor.next_exp_s)
  end

#---------------------Equipment display---------------------

  def draw_item_name_menu(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 608 / 4 - 28, 32, item.name)
  end
end


#---------------------Window_MenuStatus---------------------

class Window_MenuStatus < Window_Selectable
  def initialize
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = i * 608 / 4
      y = 0
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x + 12, y + 64)
      draw_actor_battler(actor, x + 75, y + 256, 160)
      self.contents.font.size = 28
      self.contents.font.name = "Monotype Corsiva"
      draw_actor_name_menu(actor, x - 10, y)
      self.contents.font.size = 24
      draw_actor_class(actor, x - 10, y + 32)
      draw_actor_level(actor, x + 2, y + 64)
      draw_actor_state(actor, x + 50, y + 64)
      draw_actor_hp(actor, x + 2, y + 208)
      draw_actor_sp(actor, x + 2, y + 224)
      draw_actor_exp(actor, x + 2, y + 240)
      self.contents.draw_text(0, 270, 608, 32, "=========================================================================================================================")
      draw_item_name_menu($data_weapons[actor.weapon_id], x + 2, y + 288)
      draw_item_name_menu($data_armors[actor.armor1_id], x + 2, y + 320)
      draw_item_name_menu($data_armors[actor.armor2_id], x + 2, y + 352)
      draw_item_name_menu($data_armors[actor.armor3_id], x + 2, y + 384)
      draw_item_name_menu($data_armors[actor.armor4_id], x + 2, y + 416)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@index * 608 / 4, 0, 608 / 4, self.height - 32)
    end
    if Input.repeat?(Input::RIGHT)
      if (@column_max == 1 and Input.trigger?(Input::RIGHT)) or
          @index < @item_max - @column_max
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + @column_max) % @item_max
      end
    end
    if Input.repeat?(Input::LEFT)
      if (@column_max == 1 and Input.trigger?(Input::LEFT)) or
          @index >= @column_max
        $game_system.se_play($data_system.cursor_se)
        @index = (@index - @column_max + @item_max) % @item_max
      end
    end
  end
end


#---------------------Window_Gold---------------------

class Window_Gold < Window_Base
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.font.name = "Monotype Corsiva"
    self.contents.font.size = 24
    self.contents.draw_text(0, 32, 128, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 128, 32, $data_system.words.gold)
  end
end


#---------------------Window_PlayTime---------------------

class Window_PlayTime
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.font.name = "Monotype Corsiva"
    self.contents.font.size = 24
    self.contents.draw_text(4, 0, 120, 32, "Play Time")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
  end
end


#---------------------Window_Command---------------------

class Window_Command
  def refresh
    self.contents.clear
    for i in 0...@item_max
      self.contents.font.name = "Monotype Corsiva"
      self.contents.font.size = 24
      draw_item(i, normal_color)
    end
  end
end


#---------------------Window_Location---------------------

$data_mapinfos = load_data('Data/MapInfos.rxdata')

class Window_Location < Window_Base
  def initialize
    super(0, 0, 320, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.name = "Monotype Corsiva"
    self.contents.font.size = 24
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Location:")
    self.contents.font.color = normal_color
    name = $data_mapinfos[$game_map.map_id].name 
    self.contents.draw_text(96, 0, 192, 32, name)
  end
end

#---------------------Window_GameName---------------------

class Window_GameName < Window_Base
  def initialize
    super(0, 0, 320, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.name = "Monotype Corsiva"
    self.contents.font.size = 24
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 288, 32, "Insert Name Of Game", 1)
  end
end


#---------------------Scene_Menu---------------------

class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save Game"
    s6 = "End Game"
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    @status_window.contents_opacity = 44
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 160
    @playtime_window.y = 320
    @playtime_window.visible = true
    @gold_window = Window_Gold.new
    @gold_window.x = 320
    @gold_window.y = 320
    @gold_window.visible = true
    @loc_window = Window_Location.new
    @loc_window.x = 0
    @loc_window.y = 416
    @loc_window.visible = true
    @gn_window = Window_GameName.new
    @gn_window.x = 320
    @gn_window.y = 416
    @gn_window.visible = true
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.x = 240
    @command_window.y = 128
    @command_window.height = 32 * 6 + 1
    @command_window.visible = true
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @loc_window.dispose
    @gn_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  def update
    @command_window.update
    @loc_window.update
    @gn_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @command_window.visible = false
        @gold_window.visible = false
        @playtime_window.visible = false
        @loc_window.visible = false
        @gn_window.visible = false
        @status_window.contents_opacity = 256
        @status_window.active = true
        @status_window.index = 0
      when 2
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @command_window.visible = false
        @gold_window.visible = false
        @playtime_window.visible = false
        @loc_window.visible = false
        @gn_window.visible = false
        @status_window.contents_opacity = 256
        @status_window.active = true
        @status_window.index = 0
      when 3
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @command_window.visible = false
        @gold_window.visible = false
        @playtime_window.visible = false
        @loc_window.visible = false
        @gn_window.visible = false
        @status_window.contents_opacity = 256
        @status_window.active = true
        @status_window.index = 0
      when 4
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @command_window.visible = true
      @gold_window.visible = true
      @playtime_window.visible = true
      @loc_window.visible = true
      @gn_window.visible = true
      @status_window.contents_opacity = 64
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end



Instructions

Plug-n-play, except the game name.
Ctrl + f to search through the script for "Insert Name Of Game". Replace the text inside the quotation marks with the name of your game.

If you can't see the font, download it, and put it in your computer's 'Fonts' folder.
Linky >> http://www.newfonts.net/index.php?pa=show_font&id=130



Compatibility

No known incompatibility issues.


Credits and Thanks


  • Just me



Author's Notes

Any problems, or queries, reply here, or contact me via PM. ;)
7
Welcome! / It be me
March 23, 2008, 04:00:05 pm
Hey, some of you may remember me from the old forum, or other forums.
So, a little background information:

Name:
Alias(es):
Age:
Education:
RPG Maker skills: Basic scripter
Religion: Atheist
Dating/Marital status: Single
Sexual orientation: Straight

So, hi everyone :P
8
New Projects / Apocalypse
March 15, 2008, 07:08:53 am


[Created in RMXP]

Due to the constant criticism I've been having about this game, and the fact that the players weren't the only ones that thought the game was a whole pile of shite, I've decided to remake this game.
This time around will carry across most of the character names from the previous game, but will follow a similar, but very different storyline. This time around I am determined not to give up and I am determined to make people think "Holy shit, this game rocks!" instead of "... What the fuck did I just waste precious hours of my life playing?" So, let's proceed.

None of the following is final

Characters:

Rune
Weapon - Rapier
Age - 19
Home - DeJääré Castle
Specialty - Sword Skills
Bio - TBC

Verne DeJääré
Weapon - Rod
Age - 27
Home - DeJääré Castle
Specialty - Black Magi
Bio - TBC

Jiira Lité
Weapon - Bow & Arrow
Age - 21
Home - TBC
Specialty - Enemy Skills
Bio - TBC

Lode O'teris
Weapon - Broad Sword
Age - 40
Home - TBC
Specialty - Sword Skills
Bio - TBC

Koren
Weapon - Staff
Age - Unknown
Home - TBC
Specialty - White Magi
Bio - Unknown

Balt Taraki
Weapon - Poleaxe
Age - 37
Home - TBC
Specialty - Status Skills
Bio - TBC

[Sub-Characters]

Disciples Of Vai

Tsein: TBC
Jéjin: TBC
Käunaught: TBC
Sval: TBC
Guyver: TBC
Neima: Twin sister of Oparia.
Oparia: Twin sister of Neima.
Folne: TBC
Lucio: TBC

Other Characters

Klinos: TBC

Master: The name given to the lord of DeJääré Castle

Others to be confirmed[/spoiler]

Story:
Spoiler: ShowHide
TBC. The game is still in the planning stages.


Scripts Used and Credit:

Spoiler: ShowHide
None. The game is still in the planning stages.


Graphics:

Spoiler: ShowHide
 None. The game is still in the planning stages.


Audio:

Spoiler: ShowHide
 None. The game is still in the planning stages.


If I've missed anyone, please shoot me.

Screenies:

Spoiler: ShowHide

None. The game is still in the planning stages.


Demo:
None. The game is still in the planning stages.