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 - Valdred

1
Recruitment / Looking for work! [Scripter]
August 25, 2011, 05:17:27 pm
Hello everyone, I seek paid scripting work in RGSS. I work in XP only and can make battle systems, menus, map systems or pretty much whatever you can think of. I will NOT make anything Internet related or 3D-related, sorry. Payment goes trough paypal, and is sent AFTER the script is finished and delivered. I have experience in C++, VB, Ruby, PHP and many other languages which has given me valuable programming knowledge also applicable in RGSS.
2
Tutorial Database / Using bitmaps and sprites
April 24, 2011, 07:25:10 am
Bitmaps and Sprites
Learn how to make your game more visually appealing and exciting with scripted Sprites.

Creating a Sprite
Sprite is a class built into RGSS. It displays a bitmap on the screen. This is how you create a sprite that is displayed on the screen:

@sprite = Sprite.new
@sprite.bitmap = Bitmap.new(640, 480)

What I did here is to create the sprite. I then create a bitmap for the sprite specifying that it is 640 pixels wide and 480 pixels high. Alternatively, I can make the bitmap load a picture instead.

@sprite = Sprite.new
@sprite.bitmap = Bitmap.new("Graphics/Pictures/picture.png")

It will learn the dimensions of the picture so this makes your job easier.

Position of the sprite
The position of the sprite is handled using x and y as well as a z variable. The z variables determines where in the queue of visual elements it will be drawn. Far behind or in front. We set position this way:

@sprite.x = 50
@sprite.y = 60
@sprite.z = 250

If you leave them unassigned they will all be assigned the value of 0 making the sprite appear on the top left of the screen and down. This is usually a wanted position to have it in.
Some additional properties for the Sprite class are:

@sprite.angle = 360
@sprite.opacity = 255
@sprite.visible = true
@sprite.zoom_x = 50
@sprite.zoom_y = 40
@sprite.mirror = false
@sprite.tone = Tone.new(0, 0, 0, 20)


Color
Color is important in bitmaps. Every pixel in a bitmap is made up of four different values. Red, Green, Blue and alpha. The alpha channel is opacity. The rest is obvious.
RGSS has a built in Color class. You create a new Color object like this.

@black = Color.new(0, 0, 0, 255)
# Or you can leave out the alpha channel which will make it 0% transparent
@black = Color.new(0, 0, 0)
@white = Color.new(255,255,255)
@red = Color.new(255, 0, 0)

255 is the max value, while 0 is the lowest possible.

Setting pixels
In order to draw a pixel on a bitmap you use the .set_pixel method of the Bitmap object.

@sprite.bitmap.set_pixel(x, y, color)
# Or if we insert the values
@sprite.bitmap.set_pixel(0, 0, Color.new(0, 0, 0))

The above will make the top left pixel of the bitmap black.

Drawing rectangles
Sometimes we would rather want to draw a rectangle spanning over many pixels than just single pixels. It can be done very easily:

@sprite.bitmap.fill_rect(x, y, width, height, color)
# Or with inserted values
@sprite.bitmap.fill_rect(0, 0, 640, 480, Color.new(0, 0, 0))

The above will make the entire screen black.

Using loops to create dynamic effects
You can read about for loops in my other tutorial. They can be very handy if you want to create gradients for example:

for i in 1..100
c = Color.new(i*2, i*2, i*2)
@sprite.bitmap.fill_rect(0, i, 640, 1, c)
end

This will draw a quite nice gradient on the bitmap. The rect starts one pixel lower for each iteration as the i will go up one every time. The color changes as all the channels change to the value of i times two every iteration.

More may be coming soon. :) Hope it helped




Originally posted on rpgmakers.net
3
Recruitment / [130$] Hiring [Tilesets and Charsets]
January 17, 2011, 10:13:03 am
The tasks listed are not final and may be updated. Keep this in mind when applying.
General requirements

  • Reliability: I have hired multiple artists before, and only one of them completed the work. If you are unsure if you are able to complete the task (too busy, lazy etc.) do not apply.

  • Skill: Obviously, you must have a certain level of skill within the area. Show examples of what you have done before, the more of it the better.

  • Efficiency: I am not one to rush, but you must be able to prioritize so that the work can be complete as fast as possible



Tileset artist

  • Payment: 70$

  • Style: XP-RTP

  • Task:


Spoiler: ShowHide

Urban environment (Houses, streets, etc.) + Vatican city (Churches, statues etc.)
More info is to be added.


Charset artist

  • Payment: 60$

  • Style: XP-RTP

  • Task:


Spoiler: ShowHide
 
3 types of soldiers + 1 captain soldier. Each with these variations
- normal walking
- weapon drawn
- Firing weapon (legs standing still, animated)
- Speaking (Speech bubble animated above head and explaining hand movement: pointing etc.)
- hit (some blood falling hit-movement)
- hit2 (Variation of the above)
- hit3
- Falling to dead (Last frame is a permanent dead position)
- falling to dead 2 (variation of above)
- falling to dead 3
- reloading
- Being held as human shield (Leaning backwards. Should fit with
"holding as human shield" sprite explained later.


  • Soldier 1: Will be explained in further detail later. Using a pistol

  • Soldier 2: Will be explained in further detail later. Using a machine rifle

  • Soldier 3: Will be explained in further detail later. Using a shotgun

  • Captain: Will be explained in further detail later. Using a pistol



Hero (I already have the sprite) with 3 different weapons + without weapon. All with these variations
- normal walking (I have already)
- weapon drawn
- Firing weapon (legs standing still, animated)
- Speaking (Speech bubble animated above head and explaining hand movement: pointing etc.)
- hit (some blood falling hit-movement)
- hit2 (Variation of the above)
- hit3
- Falling to dead (Last frame is a permanent dead position)
- falling to dead 2 (variation of above)
- falling to dead 3
- reloading
- Holding as human shield (Leaning backwards. Should fit with
"held as human shield" sprite explained earlier.
- pulling up knife with non-weapon hand and stabbing
- same as above but with baseball bat
- Hitting with empty non-weapon hand


  • With pistol

  • With machine riffle

  • With shotgun:

  • With bare hand



10 civilians. All with these variations
- normal walking
- Speaking (Speech bubble animated above head and explaining hand movement: pointing etc.)

4
Entertainment / [TuT]N00bish for dummies
October 25, 2010, 08:48:41 am
Wanna learn to speak n00bish like a native n00b? Then this is for you




The n00bish alphabet
The noobish alphabet is very similar to the english one. Here are some exceptions:

@ = a as in V@Id/RED (Valdred)

1 = i as in 1N3@NE (Insane)

0 = o as in n00b (noob)

3 = Z as in 300m (zoom)

I = l as in I@ngauge (language)

Z = S as in 3pik n00b13h!!!1 (speek noobish!)




The n00bish articles
The noobish language don't make any difference between "a" or "an", and neither of "the", "these", "those" etc.

There is no difference between:
@ b1g h0use and @n b1g h0use.

tHe h0use and tHe3e h0use and tH03e h0use also all means either the house or the houses.




Capitals in the n00bish language
N00bs never capitalize the first letter. However, they do so to the second and last letter in each word, as long as these letters aren't exceptions mentioned in paragraph 1

If the word consists of only one letter, do not capitalize.
Examples:

f0ruM - forum The second letter (0) is a noobish letter and is not capitalized. The last letter (M) is an English letter and is capitalized.

b1@tcH - bitch Again, the second letter does not need capitalizing as it is a noobish letter. The last letter however, is not and must be capitalized.




Lawl - incommodum

N00bs use short words categorized as incommodum which is latin for annoying.
Incommodum is used to express feelings. If no particular feeling is to be expressed, Decommodum is to be used.

Incommodums:
Happy: - apply decommodus -
Sad: uhm..., so..., l0l?!1, l@wls wtf?!
Neutral: - apply decommodus -
Sarcastic: l@wls 1m 3@rca3t1c

Decommodums:
l@wl, l0lz, l0l, ^^, l@l@




Symbols

Noobs use symbols (whatever the word is) different from Englishmen:

Exclamation marks come in groups of two or more and are always accompanied by a 1

Question marks are always accompanied by a !!1 (see above)

Noobs don't use periods (.), commas (,), apostrophes(') or colons(:).




Terms

double letters like ee makes only one in noobish. ee = e

Noobs write words more or less like they are pronounced.




Exorcises
Translate these sentences into English:

u l0l c@N 3PeeK n00bi3H c@nT u?!!1

1 @M @w30m l@wlZ @nD tH1S tUt0r1@l 13 t00

Translate into n00bish:

I am learning noobish

Noobish is fun.

Soon I know noobish!
5
Advertising / Feedback on my website
October 04, 2010, 04:21:47 pm
So I finally got up a website. It's my first one, so I guess it's a lot of room for improvement.

http://bloodofthegods.net/
6
So I am going to take care of creating the html myself. But I don't know how to put this html on my site. I know I need a host, but I have never done it before, so I hope someone can explain in basic to me how it is done.
7
Script Troubleshooting / Saving Bitmap as a file.
August 17, 2010, 05:23:57 am
How can I save a bitmap or sprite object as a png or bitmap file?
8
Script Troubleshooting / Button input delay
July 31, 2010, 12:16:07 pm
So I'm making a battle system. There is two "modes" Battle-mode and non-battle-mode.
I use the Q key to switch between them. I'm having one problem. As the script checks for button input every frame, the player needs to be a ninja with his finger (really fast) in order to switch without making it instantly switching back. Any Idea's?
9
General Discussion / Where did my motivation go? :(
July 29, 2010, 01:18:46 pm
Suddenly... I feel that my motivation has disappeared. Although I want to complete my project/game so much, and I've worked so hard, I just get depressed when trying to do something. I have got so far, and I always look forward to working on my game, but when I sit there with rpg maker in front of me, I'm just... overwhelmed by the fact that it's still a lot to do, and if I fail to do it there wont be no game and all my time will have been useless.
What should I do? If somebody makes me get trough this, I will reward him with an unencrypted version of the game.



:(
10
General Discussion / Will this become too big?
July 01, 2010, 04:55:48 pm
Ok, filesize question. Is this too much considering download time and such? I'm afraid the amount of charsets might be a bit... large.
The amounts are not exact.

150-170 charsets in RTP size.
6-7 tilesets
20-30 pictures - 640 x 480
3-4 autotiles
0 animations
0 battlebacks
10-14 battlers/faces
2-3 fogs
1-2 windowskins
0 titles (using a script)
0 panoramas
8-14 icons
1 gameover
3-5 transitions

So, am I exaggerating? Will that be OK?
If I am not, and I do need to reduce the size, I have thought of something.
If I use bitmap2code to store at least half of the graphics as methods in code instead of files, then they can be loaded when needed. That way I could reduce the size a lot right?
11
RMXP Script Database / [XP] Event drop-down
June 05, 2010, 03:46:10 pm
Event drop-down
Authors: Valdred
Version: Beta
Type: Multiple ways to interact with events
Key Term: Environment Add-on



Introduction
This script allows you to give the player multiple choices when interacting with an event. A menu will pop up and give the player choices when the event is clicked on with the mouse (that comes with the script).
Alternatively, the player can press enter while facing the event to without any menu start the first available page, just like it use to be. :D



Features

  • Very easy. No in-script configuration or setup.
  • Everything inside the events.
  • Adds a mouse to the game.
  • Let the player choose from several options of your choice,
  • One event page for each option.




Screenshots
Spoiler: ShowHide







Demo
http://bb.xieke.com/files/Event%20dropdown.exe



Script
Put above main
Spoiler: ShowHide

class String
  def each_char
    if block_given?
      scan(/./m) do |x|
        yield x
        end
    else
      scan(/./m)
  end
end 
end
  # Default Handle                    Default String
    MOUSE_DEFAULT                 =   "default"

  # Mouse Array    Cursor Handle      Mouse Icon file
    MOUSE_ICON = { MOUSE_DEFAULT  =>  "default",
}
                   
  # Left-Clicking Control---
  # 0 = single click action
  # 1 = double-click action
  MOUSE_LEFT_ACTION = 0
 
  # Right-Clicking Control--
  # 0 = Menu / 'B' pressed
  # 1 = Stop Movement
  MOUSE_RIGHT_ACTION = 0

  #  Movement range--
  #  Range in 'steps' the pathfinding
  #  for NF Pathfinding version 2 beta
  #  High values & large maps causes lag
  PF_RANGE = 100

 
module Mouse
  #-------------------------------------------------------------------------
  # * Win32API calls
  #-------------------------------------------------------------------------
  @cursor_pos_get = Win32API.new('user32', 'GetCursorPos', 'p', 'i')
  @cursor_pos_set = Win32API.new('user32', 'SetCursorPos', 'ii', 'i')
  @cursor_show    = Win32API.new('user32', 'ShowCursor', 'L', 'i')
  @window_find    = Win32API.new('user32', 'FindWindowA', %w(p p), 'l') 
  @window_c_rect  = Win32API.new('user32', 'GetClientRect', %w(l p), 'i')
  @window_scr2cli = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i')
  @readini        = Win32API.new('kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l')
  @key            = Win32API.new("user32", "GetAsyncKeyState", 'i', 'i')
  #-------------------------------------------------------------------------
  # * Mouse Button Values
  #-------------------------------------------------------------------------
  Left_Click    = 1
  Right_Click   = 2
  Middle_Click  = 4
  MOUSE_BUTTONS = { Left_Click    => 1,
                    Right_Click   => 2,
                    Middle_Click  => 4 }
  MOUSE_REPEAT = MOUSE_BUTTONS.clone
  MOUSE_REPEAT.keys.each { |k| MOUSE_REPEAT[k] = [false, false, 10]} 
  #-------------------------------------------------------------------------
  # * Game Initialization Values
  #-------------------------------------------------------------------------
  @game_window = nil    # Set game handle to nil
  @cursor_show.call(0)  # Turn off system mouse
  #-------------------------------------------------------------------------
  # * Click?
  #     button : button to check
  #-------------------------------------------------------------------------
  def Mouse.click?(button)
    MOUSE_REPEAT[button][1] >= 1
  end
  #-------------------------------------------------------------------------
  # * Double Clicked?
  #     button : button to check
  #-------------------------------------------------------------------------
  def Mouse.dbclick?(button)
    MOUSE_REPEAT[button][1] == 2
  end 
  #-------------------------------------------------------------------------
  # * Get Mouse Position
  #-------------------------------------------------------------------------
  def Mouse.pos(catch_anywhere = true)
    x, y = screen_to_client(screen_x, screen_y)
    width, height = client_size
    if catch_anywhere or (x >= 0 and y >= 0 and x < width and y < height) 
      return x, y
    else
      return 0, 0
    end   
  end
  #-------------------------------------------------------------------------
  # * Set Mouse Position
  #     x      : new x-coordinate (0 to 640)
  #     y      : new y-coordinate (0 to 480)
  #-------------------------------------------------------------------------
  def Mouse.pos_set(x, y)
    x = [[x, 0].max, 640].min
    y = [[y, 0].max, 480].min
    x, y = client_to_screen(x, y)
    @cursor_pos_set.call(x, y)
  end
  #-------------------------------------------------------------------------
  # * Get Mouse X-Coordinate Position
  #-------------------------------------------------------------------------
  def Mouse.pos_x
    x, y = pos
    return x
  end
  #-------------------------------------------------------------------------
  # * Get Mouse Y-Coordinate Position
  #-------------------------------------------------------------------------
  def Mouse.pos_y
    x, y = pos
    return y
  end
  #-------------------------------------------------------------------------
  # * Get Mouse Screen Position
  #-------------------------------------------------------------------------
  def Mouse.screen
    pos = [0, 0].pack('ll')
    @cursor_pos_get.call(pos)
    return pos.unpack('ll')
  end 
  #-------------------------------------------------------------------------
  # * Get Mouse Screen X-Coordinate Position
  #-------------------------------------------------------------------------
  def Mouse.screen_x
    pos = [0, 0].pack('ll')
    @cursor_pos_get.call(pos)
    return pos.unpack('ll')[0]
  end
  #-------------------------------------------------------------------------
  # * Get Mouse Screen Y-Coordinate Position
  #-------------------------------------------------------------------------
  def Mouse.screen_y
    pos = [0, 0].pack('ll')
    @cursor_pos_get.call(pos)
    return pos.unpack('ll')[1]
  end
  #-------------------------------------------------------------------------
  #                           AUTOMATIC FUNCTIONS                          #
  #-------------------------------------------------------------------------
  #-------------------------------------------------------------------------
  # * Get the Game Window's width and height
  #-------------------------------------------------------------------------
  def Mouse.client_size
    rect = [0, 0, 0, 0].pack('l4')
    @window_c_rect.call(Mouse.hwnd, rect)
    right, bottom = rect.unpack('l4')[2..3]
    return right, bottom
  end 
  #-------------------------------------------------------------------------
  # * Get the game window handle (specific to game)
  #-------------------------------------------------------------------------
  def Mouse.hwnd
    if @game_window.nil?
      game_name = "\0" * 256
      @readini.call('Game','Title','',game_name,255,".\\Game.ini")
      game_name.delete!("\0")
      @game_window = @window_find.call('RGSS Player',game_name)
    end
    return @game_window
  end 
  #------------------------------------------------------------------------- 
  # * Convert game window coordinates from screen coordinates
  #------------------------------------------------------------------------- 
  def Mouse.screen_to_client(x, y)
    return nil unless x and y
    pos = [x, y].pack('ll')
    if @window_scr2cli.call(hwnd, pos) != 0
       return pos.unpack('ll')
     else
       return nil
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (Mouse version)
  #--------------------------------------------------------------------------
  def Mouse.update
    MOUSE_BUTTONS.keys.each do |key|
      temp = MOUSE_REPEAT[key][0]
      key_pres = @key.call(MOUSE_BUTTONS[key]) != 0
      key_trig = temp == key_pres ? 0 : (key_pres ? (MOUSE_REPEAT[key][2].between?(1, 9) ? 2 : 1) : -1)
      count = key_trig > 0 ? 0 : [MOUSE_REPEAT[key][2]+1, 20].min
      MOUSE_REPEAT[key] = [key_pres, key_trig, count]
    end
  end
  #-------------------------------------------------------------------------
  # * Visible?
  #-------------------------------------------------------------------------
  def Mouse.visible?(visible=true)
    if visible
      @cursor_show.call(-1)
    else
      @cursor_show.call(0)
    end
  end
end



#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :mouse_pf1                # Path Finding v1 detection bool
  attr_accessor :mouse_pf2                # Path Finding v2 detection bool
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias mouse_init initialize
  def initialize
    mouse_init
    @mouse_pf1 = nil
    @mouse_pf2 = nil
  end
end



#==============================================================================
# ** Sprite_Mouse
#------------------------------------------------------------------------------
#  This sprite is used to display the mouse.  It observes the Mouse module and
#  automatically changes mouse graphic conditions.
#==============================================================================

class Sprite_Mouse
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :icon
  attr_accessor :x
  attr_accessor :y
  attr_accessor :clicked
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @x            = 0
    @y            = 0
    @clicked    = nil
    @sprite       = Sprite.new
    @sprite.z     = 5000
    @draw         = false
    @events       = {}
    reset
  end
  #--------------------------------------------------------------------------
  # * Reset
  #--------------------------------------------------------------------------
  def reset
    @icon = RPG::Cache.icon(MOUSE_ICON[MOUSE_DEFAULT])
    @icon_name = MOUSE_ICON[MOUSE_DEFAULT]
    @sprite.bitmap.dispose if @sprite.bitmap != nil and @sprite.bitmap.disposed?
    @sprite.bitmap = @icon
    @draw = false
    # Updates the co-ordinates of the icon
    @x, @y = Mouse.pos
    @sprite.x = @x
    @sprite.y = @y
    @sprite.z = 5000
    @sprite.visible = true
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    Mouse.update
    # Updates the co-ordinates of the icon
    @x, @y = Mouse.pos
    return if @x == nil or @y == nil
    #Get Client Size
    width,height = Mouse.client_size
    @sprite.x = @x
    @sprite.y = @y
    #Check if needs to restart
    (@draw = (@x < 0 or @y < 0 or @x > width or @y > height)) if !@draw
    #Reset if need to reset
    reset if @draw and @x > 1 and @y > 1 and @x < width and @y < height
    #Show mouse if need to
    if (@x < 0 or @y < 0 or @x > width or @y > height) and @visible
      Mouse.visible?
    elsif (@x > 0 or @y > 0 or @x < width or @y < height) and !@visible
      Mouse.visible?(false)
    end
    #Return if Scene is not Scene_Map
    return if !$scene.is_a?(Scene_Map)
    #Check if the mouse is clicked
    mouse_pressed if Mouse.click?(Mouse::Left_Click) and !$game_temp.message_window_showing
    if MOUSE_RIGHT_ACTION == 1
      if $game_system.mouse_pf1
        $game_player.clear_path if Mouse.click?(Mouse::Right_Click)
      end
      if $game_system.mouse_pf2
        $path_finding.setup_depth(PF_RANGE)
        $path_finding.setup_player if Mouse.click?(Mouse::Right_Click)
      end
    end
    #Check for mouse over
    mouse_over_icon
  end
   
  #--------------------------------------------------------------------------
  # * Mouse Pressed
  #--------------------------------------------------------------------------
  def mouse_pressed(button_type = nil)
    @clicked = 1
    if Mouse.dbclick?(Mouse::Left_Click)
      @clicked = 2
    end
    # Routines called for Path Finding v1
    if $game_system.mouse_pf1
      # Turn to face regardless
      $game_player.find_facing(tile_x, tile_y)
      #If there is nothing than move
      return if !$game_map.passable?(tile_x, tile_y, 0, $game_player)
      $game_player.find_path(tile_x, tile_y)
    end
    # Routines called for Path Finding v2
    if $game_system.mouse_pf2
      $path_finding.setup_depth(PF_RANGE)
      $path_finding.setup_player
      $path_finding.add_paths_player(tile_x, tile_y, true)
      $path_finding.start_player     
    end
  end
  #--------------------------------------------------------------------------
  # * Mouseover Icon
  #--------------------------------------------------------------------------
  def mouse_over_icon
    object = get_object
    if object[0]
      event = @events[object[1].id]
      return if event == nil
      list = event.list
      return if list == nil
      #Check what the list is
      for key in MOUSE_ICON.keys
        next if !list.include?(key)
        next if @icon_name == MOUSE_ICON[key]
        @icon = RPG::Cache.icon(MOUSE_ICON[key])
        @icon_name = MOUSE_ICON[key]
        @sprite.bitmap.dispose if @sprite.bitmap != nil or @sprite.bitmap.disposed?
        @sprite.bitmap = @icon
      end
    elsif @icon_name != MOUSE_ICON[MOUSE_DEFAULT]
      @icon = RPG::Cache.icon(MOUSE_ICON[MOUSE_DEFAULT])
      @icon_name = MOUSE_ICON[MOUSE_DEFAULT]
      @sprite.bitmap.dispose if @sprite.bitmap != nil or @sprite.bitmap.disposed?
      @sprite.bitmap = @icon
    end
  end
  #--------------------------------------------------------------------------
  # * Get the current x-coordinate of the tile
  #--------------------------------------------------------------------------
  def tile_x
    return ((($game_map.display_x.to_f/4.0).floor + @x.to_f)/32.0).floor
  end
  #--------------------------------------------------------------------------
  # * Get the current y-coordinate of the tile
  #--------------------------------------------------------------------------
  def tile_y
    return ((($game_map.display_y.to_f/4.0).floor + @y.to_f)/32.0).floor
  end 
  #--------------------------------------------------------------------------
  # * Get Object
  #--------------------------------------------------------------------------
  def get_object
    for event in $game_map.events.values
      return [true,event] if event.x == tile_x and event.y == tile_y
    end
    return [false,nil]
  end 
  #--------------------------------------------------------------------------
  # * MOUSE Refresh(Event, List, Characterset Name
  #--------------------------------------------------------------------------
  def refresh(event, list)
    @events.delete(event.id)
    if event.list && event.list[0].code == 108
      icon = event.list[0].parameters
    end
    @events[event.id] = Mouse_Event.new(event.id)
    @events[event.id].list = icon
  end
end



$mouse = Sprite_Mouse.new


#==============================================================================
# ** Mouse_Event
#------------------------------------------------------------------------------
#  This class deals with events. It adds new functionality between events and
#  the mouse system.  It's used within the Game_Map class.
#==============================================================================

class Mouse_Event
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :id
  attr_accessor :list
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(id)
    @id = id
    @list = nil
  end
end



#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
#  switching via condition determinants, and running parallel process events.
#  It's used within the Game_Map class.
#==============================================================================

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Event ID
  #--------------------------------------------------------------------------
  def id
    return @id
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  alias nf_game_event_refresh refresh
  def refresh
    nf_game_event_refresh
    $mouse.refresh(self, @list)
  end
end



#==============================================================================
# ** Input
#------------------------------------------------------------------------------
#   Adds new Mouse Input functions into a new class
#==============================================================================
class << Input
  #--------------------------------------------------------------------------
  # * Update old input calls
  #--------------------------------------------------------------------------
  alias old_update update unless $@
  def Input.update
    old_update
    $mouse.update
  end
  #--------------------------------------------------------------------------
  # * Update old input triggers
  #     num : A, B, C
  #--------------------------------------------------------------------------
  alias old_trigger? trigger? unless $@
  def Input.trigger?(num)
    return old_trigger?(num) if Mouse.pos(false) == nil
    case num
    when Input::A
      return (old_trigger?(num) or Mouse.click?(Mouse::Middle_Click))
    when Input::B
      if MOUSE_RIGHT_ACTION == 0
        return (old_trigger?(num) or Mouse.click?(Mouse::Right_Click))
      else
        if !$scene.is_a?(Scene_Map)
          return (old_trigger?(num) or Mouse.click?(Mouse::Right_Click))         
        else
          return (old_trigger?(num))
        end
      end
    when Input::C
      if MOUSE_LEFT_ACTION == 0
        return (old_trigger?(num) or Mouse.click?(Mouse::Left_Click))       
      else
        if !$scene.is_a?(Scene_Map)
          return (old_trigger?(num) or Mouse.click?(Mouse::Left_Click))
        else
          if $mouse.clicked == 2
            return (old_trigger?(num) or Mouse.click?(Mouse::Left_Click))
          else
            return (old_trigger?(num))
          end
        end
      end
    else
      return old_trigger?(num)
    end
  end
  #--------------------------------------------------------------------------
  # * Check to see if an old input call was repeated
  #     num : B
  #--------------------------------------------------------------------------
  alias old_repeat? repeat? unless $@
  def repeat?(num)
    return old_repeat?(num) if Mouse.pos(false) == nil
    if num == Input::B
      return (old_repeat?(num) or Mouse.repeat?(Mouse::Right_Click))
    else
      return old_repeat?(num)
    end
  end 
end



#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #-------------------------------------------------------------------------- 
  attr_accessor :facingpath               # direction faced if 1 tile away
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias mouse_init initialize
  def initialize
    mouse_init
    # Path Finding v1 Detection
    if defined?(find_path)
      $game_system.mouse_pf1 = true
    else
      if defined?(pf_passable?)
        $game_system.mouse_pf2 = true
      end
    end
  end 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias mouse_update update
  def update
    turn_facing if @facingpath != 0
    mouse_update
  end 
  #--------------------------------------------------------------------------
  # * Find Facing Direction
  #   Addition to Path Finding v 1
  #-------------------------------------------------------------------------- 
  def find_facing(x,y)
    sx, sy = @x, @y     
    @facingpath = find_direction(sx,sy,x,y)
  end 
  #--------------------------------------------------------------------------
  # * Find Direction
  #   Addition to Path Finding v 1
  #-------------------------------------------------------------------------- 
  def find_direction(sx,sy,ex,ey)
    ffx = sx - ex
    ffy = sy - ey
    facing = 0
    case ffx
    when 1 ; facing = 4
    when -1; facing = 6
    when 0
      case ffy
      when 1 ; facing = 8
      when -1; facing = 2
      end
    end
    return facing
  end 
  #--------------------------------------------------------------------------
  # * Turn Towards Object
  #   Addition to Path Finding v 1
  #--------------------------------------------------------------------------
  def turn_to(b)
    # Get difference in player coordinates
    sx = @x - b.x
    sy = @y - b.y
    # If coordinates are equal
    if sx == 0 and sy == 0
      return
    end
    # If horizontal distance is longer
    if sx.abs > sy.abs
      # Turn to the right or left towards player
      sx > 0 ? turn_left : turn_right
    # If vertical distance is longer
    else
      # Turn up or down towards player
      sy > 0 ? turn_up : turn_down
    end
  end
  #--------------------------------------------------------------------------
  # * Turn Facing Click
  #   Addition to Path Finding v 1
  #-------------------------------------------------------------------------- 
  def turn_facing
    case @facingpath
    when 2; turn_down
    when 4; turn_left
    when 6; turn_right
    when 8; turn_up
    end
    # Turn off
    @facingpath = 0
  end 
  #--------------------------------------------------------------------------
  # * Run Path
  #   EDIT to Path Finding v 1
  #--------------------------------------------------------------------------
  def run_path
    return if moving?
    step = @map[@x,@y]
    if step == 1
      @map = nil
      @runpath = false
      turn_to(@object) if @object != nil and in_range?(self, @object, 1)
      return
    end
    dir = rand(2)
    case dir
    when 0
      move_right  if @map[@x+1, @y]   == step - 1 and step != 0
      move_down   if @map[@x,   @y+1] == step - 1 and step != 0
      move_left   if @map[@x-1, @y]   == step - 1 and step != 0
      move_up     if @map[@x,   @y-1] == step - 1 and step != 0
    when 1
      move_up     if @map[@x,   @y-1] == step - 1 and step != 0
      move_left   if @map[@x-1, @y]   == step - 1 and step != 0
      move_down   if @map[@x,   @y+1] == step - 1 and step != 0
      move_right  if @map[@x+1, @y]   == step - 1 and step != 0
    end
  end 
end

class Game_Map
  #--------------------------------------------------------------------------
  # * Get clicked
  #--------------------------------------------------------------------------
  def get_clicked
    for a in 1..$game_map.events.size
      x = @events[a].x == (Mouse.pos_x / 36) + 1
      y = @events[a].y == (Mouse.pos_y / 36) + 1
      return @events[a] if (x and y)
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Make_Menu
  #--------------------------------------------------------------------------
  def make_menu
    return if ! get_clicked
    options = get_clicked.make_pages
    names = get_clicked.make_names(options)
    $scene = Event_Menu.new(get_clicked, options, names)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias dropdown_update update
  def update
     dropdown_update
     if Input.trigger?(Input::C)
       make_menu
     end 
  end
end
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Make pages
  #--------------------------------------------------------------------------
  def make_pages
    options = []
    for i in 1..@event.pages.size
      break if @event.pages[i - 1] == nil
      if @event.pages[i - 1].list[0].parameters[0] != nil and
        @event.pages[i - 1].list[0].parameters[0].each_char.include?("%")
         options.push(i - 1)
       end
    end   
    return options
  end
  #--------------------------------------------------------------------------
  # * Make names
  #--------------------------------------------------------------------------
  def make_names(options)
    names = []
    for i in 1..options.size
      names.push(@event.pages[options[i - 1]].list[0].parameters[0].gsub("%", " "))
    end
    return names
  end
  #--------------------------------------------------------------------------
  # * Start Event
  #--------------------------------------------------------------------------
  def dropdown_start(n)
    @page_id = n
    start
    $game_system.map_interpreter.setup(@event.pages[@page_id].list, @id)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias dropdown_update update
  def update
    dropdown_update
    if ! @page_id == nil
      @list = nil if @list != @event.pages[@page_id].list
    end
  end
end
class Event_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(event, options, names)
    @pages = options
    @names = names
    @event = event
    @menu_index = 0
    @x = Mouse.pos_x
    @y = Mouse.pos_y
    event.clear_starting
    n = Bitmap.new(640, 32)
    @n = n.text_size(@names[0])
    n.dispose
    n = nil
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    @menu = Window_Command.new(@n.width, @names)
    @menu.index = @menu_index
    @menu.x = @x
    @menu.y = @y
    @spriteset = Spriteset_Map.new
    # 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
    @menu.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @menu.update
    @spriteset.update
    update_menu
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_menu
    # 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)
      # Branch by command window cursor position
      $scene = Scene_Map.new
      @event.dropdown_start(@pages[@menu.index])
      # set event page to menu index
       
       
    end # if input trigger
    return
  end # update_menu
end



Instructions

1. Insert a new script above main, bellow other scripts and paste this script in.

2. Import an icon you want to use as mouse cursor to your icons folder. I recomend weapon1 from the rtp icons.

By default, events don't use drop-down. You have to set up menu options like described in the following steps

3. To make an event have a menu, you first have to choose what different options the player will have when clicking this event.
    Make one page (in the event) for each option you want in the menu.

4. Make each of these pages start with a comment, in this comment put the following:
   
%name of option

   the "%" tells the script that this page is going to be in the menu, the "%" can be anywhere in the comment,
   but make sure the comment is the first command on the page.
   Pages without this will not be in the menu.


5. Exchange "name of option" (from the following step) with whatever you want the option to be in the menu if you have not already.

6. Bellow the comment, add stuff that happens if this option is selected.



Compatibility
This script should have great compatibility with pretty much anything.



Credits and Thanks





Author's Notes
This is in beta. It's probably lots of bugs and awkward things to fix. Please give me feedback on what sucks with this script so that I can improve it :)
12
General Discussion / Why we are all here.
May 11, 2010, 07:21:49 am
So let's discuss and share with each others our opinions of what makes a good rpg maker game. What is most important? and what things can ruin a game?
Gameplay vs. Story is an interesting question as well. Discuss.
13
Script Troubleshooting / I seek a supervisor.
May 10, 2010, 11:29:56 am
I'm working on a battle system for my game. I need help all the time, but if anyone is supposed to have a chance of answering my questions, they kinda need to see all my code. I'm pretty paranoid, and I don't want to share my work with everyone on the Internet, so I guess what I need is someone I can ask in pm's. Do anyone have time for a few questions a week, (I do not expect you to script for me, just help me find out why I'm getting errors.) and have enough scripting experience to be helpful, then I am grateful. I'm sorry for being a snob by the way. :shy:
14
I accidentally overwrote the scripts.rxdata of my game and now several months of coding is lost  :'(
I tried right-click > undo moving. Somehow it didn't work. I have run undelete, doesn't work as nothing is deleted, just overwritten. Damn, do anyone know a way I can restore it?
15
So this line is giving me a syntax error:

#@character_name = ""

it's not the last line, and what I posted is the full line. I tried to move it to another line, the syntax error followed.  :wacko:
16
I come up with this idea, wouldn't it be cool if chaos-project once a year had a look trough all the rm games released this year, and nominate "best storyline," "best charset-design," "best soundtrack," "Best game" and so on. As a tribute to blizzard, possibly the greatest rm'er ever who has just retired, this event could be called "The blizzard prize" or "the blizzard nomination"

you like it?
17
RMXP Script Database / [XP] Extended debug
April 16, 2010, 09:54:28 am
Extended debug
Authors: Valdred
Version: 1.0
Type: More powerful debug
Key Term: Game Utility



Introduction
Just a really simple script to make debugging more powerful. No credit needed if used.


Features


  • Teleport with a click in-game
  • Change gold in-game
  • Change variables & switches (not by me) in-game
  • No configuration. Insert script then run.



Screenshots
Spoiler: ShowHide




Script
Spoiler: ShowHide

#==============================================================================
# ** Extended debug
#------------------------------------------------------------------------------
#  This script extends the scene debug.
#------------------------------------------------------------------------------
#  *by Valdred
#  *Contact me at: Chaos-project.com, rmvxp.com or valdred.com
#==============================================================================

class Window_Gold < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   cx = contents.text_size($data_system.words.gold).width
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
 end
end


class Scene_Debug
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     menu_index : command cursor's initial position
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
 end
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main

   @command_window = Window_Command.new(160, ["Switches & variables", "Gold", "Location"])
   @command_window.index = @menu_index
   @spriteset = Spriteset_Map.new
   # 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

 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @command_window.update

   update_command

 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)
     # Branch by command window cursor position
     case @command_window.index
     when 0  # Switches
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to item screen
       $scene = Scene_Switches.new

     when 1  # gold
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
$scene = Scene_Gold.new
     when 2  # location
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
$scene = Scene_Location.new
     end
     return
   end
 end
 
 end







#==============================================================================
# ** Scene_Debug
#------------------------------------------------------------------------------
#  This class performs debug screen processing.
#==============================================================================

class Scene_Switches
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make windows
   @left_window = Window_DebugLeft.new
   @right_window = Window_DebugRight.new
   @help_window = Window_Base.new(192, 352, 448, 128)
   @help_window.contents = Bitmap.new(406, 96)
   # Restore previously selected item
   @left_window.top_row = $game_temp.debug_top_row
   @left_window.index = $game_temp.debug_index
   @right_window.mode = @left_window.mode
   @right_window.top_id = @left_window.top_id
   # 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
   # Refresh map
   $game_map.refresh
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @left_window.dispose
   @right_window.dispose
   @help_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @right_window.mode = @left_window.mode
   @right_window.top_id = @left_window.top_id
   @left_window.update
   @right_window.update
   # Memorize selected item
   $game_temp.debug_top_row = @left_window.top_row
   $game_temp.debug_index = @left_window.index
   # If left window is active: call update_left
   if @left_window.active
     update_left
     return
   end
   # If right window is active: call update_right
   if @right_window.active
     update_right
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when left window is active)
 #--------------------------------------------------------------------------
 def update_left
   # 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_Debug.new
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Display help
     if @left_window.mode == 0
       text1 = "C (Enter) : ON / OFF"
       @help_window.contents.draw_text(4, 0, 406, 32, text1)
     else
       text1 = "Left : -1   Right : +1"
       text2 = "L (Pageup) : -10"
       text3 = "R (Pagedown) : +10"
       @help_window.contents.draw_text(4, 0, 406, 32, text1)
       @help_window.contents.draw_text(4, 32, 406, 32, text2)
       @help_window.contents.draw_text(4, 64, 406, 32, text3)
     end
     # Activate right window
     @left_window.active = false
     @right_window.active = true
     @right_window.index = 0
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when right window is active)
 #--------------------------------------------------------------------------
 def update_right
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Activate left window
     @left_window.active = true
     @right_window.active = false
     @right_window.index = -1
     # Erase help
     @help_window.contents.clear
     return
   end
   # Get selected switch / variable ID
   current_id = @right_window.top_id + @right_window.index
   # If switch
   if @right_window.mode == 0
     # If C button was pressed
     if Input.trigger?(Input::C)
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Reverse ON / OFF
       $game_switches[current_id] = (not $game_switches[current_id])
       @right_window.refresh
       return
     end
   end
   # If variable
   if @right_window.mode == 1
     # If right button was pressed
     if Input.repeat?(Input::RIGHT)
       # Play cursor SE
       $game_system.se_play($data_system.cursor_se)
       # Increase variables by 1
       $game_variables[current_id] += 1
       # Maximum limit check
       if $game_variables[current_id] > 99999999
         $game_variables[current_id] = 99999999
       end
       @right_window.refresh
       return
     end
     # If left button was pressed
     if Input.repeat?(Input::LEFT)
       # Play cursor SE
       $game_system.se_play($data_system.cursor_se)
       # Decrease variables by 1
       $game_variables[current_id] -= 1
       # Minimum limit check
       if $game_variables[current_id] < -99999999
         $game_variables[current_id] = -99999999
       end
       @right_window.refresh
       return
     end
     # If R button was pressed
     if Input.repeat?(Input::R)
       # Play cursor SE
       $game_system.se_play($data_system.cursor_se)
       # Increase variables by 10
       $game_variables[current_id] += 10
       # Maximum limit check
       if $game_variables[current_id] > 99999999
         $game_variables[current_id] = 99999999
       end
       @right_window.refresh
       return
     end
     # If L button was pressed
     if Input.repeat?(Input::L)
       # Play cursor SE
       $game_system.se_play($data_system.cursor_se)
       # Decrease variables by 10
       $game_variables[current_id] -= 10
       # Minimum limit check
       if $game_variables[current_id] < -99999999
         $game_variables[current_id] = -99999999
       end
       @right_window.refresh
       return
     end
   end
 end
end


class Scene_Gold
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     menu_index : command cursor's initial position
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
 end
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   @command_window = Window_Command.new(160, ["set to zero", "-100", "-10", "-1", "+1", "+10", "+100", "*2", "*10"])
   @command_window.index = @menu_index
   @spriteset = Spriteset_Map.new
   @gold_window = Window_Gold.new
   @gold_window.x = 0
   @gold_window.y = 416
   # 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
   @gold_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @command_window.update
   @gold_window.update
   #@gold_window.update
   update_command
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_Debug.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  # set to zero
$game_party.gain_gold(-$game_party.gold)
@gold_window.refresh
     when 1  #
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
     $game_party.gain_gold(-100)
@gold_window.refresh
     when 2  #
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
$game_party.gain_gold(-10)
@gold_window.refresh
     when 3  #
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
$game_party.gain_gold(-1)
@gold_window.refresh
     when 4  #
               $game_system.se_play($data_system.decision_se)
$game_party.gain_gold(1)
@gold_window.refresh
     when 5  # end game
               $game_system.se_play($data_system.decision_se)
$game_party.gain_gold(10)
@gold_window.refresh
     when 6
               $game_system.se_play($data_system.decision_se)
$game_party.gain_gold(100)
@gold_window.refresh
     when 7
               $game_system.se_play($data_system.decision_se)
$game_party.gain_gold($game_party.gold)
@gold_window.refresh
     when 8
               $game_system.se_play($data_system.decision_se)
$game_party.gain_gold($game_party.gold * 10 - $game_party.gold)
@gold_window.refresh
     return
     end
   end
 end
end

class Scene_Location
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     menu_index : command cursor's initial position
 #--------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
   
 end
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main

   @command_window = Window_Command.new(160, ["Next", "Previous"])
   @command_window.index = @menu_index
   @spriteset = Spriteset_Map.new
   # 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

 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @command_window.update

   update_command

 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)
     # Branch by command window cursor position
     case @command_window.index
     when 0  #
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to item screen
@va = $game_map.map_id
@va += 1
$game_map.setup(@va)
$game_map.update
   @spriteset = Spriteset_Map.new
     when 1  #
@va = $game_map.map_id
@va -= 1
$game_map.setup(@va)
$game_map.update
   @spriteset = Spriteset_Map.new
     end
     return
   end
 end
 
 end









Instructions
1. Insert script
2. press f9 to open debug menu, when playtesting.


Compatibility

  • Scripts overwriting the scene_debug




Credits and Thanks


  • Enterbrain for the switches & variables scene



Author's Notes

18
Yeah, what is the difference between attributes and variables?
I don't get it.
19
General Discussion / 1 long vs. three short
April 05, 2010, 10:13:55 am
So what's the best idea?
putting all the storyline into one long game, or splitting it up in three shorter parts?
I need opinions.
20
here's the code I use
$game_party.gold -= 100


Heres my error message:

Nomethoderror occured. undefined method 'gold=' for #<Game_Party:0x13c0a50>


By some reason, rpg maker reads .gold as a method when in fact, it's a variable, or an attribute or whatever.
21
RMXP Script Database / [XP] Maps before title
April 02, 2010, 12:35:08 pm
Pre-title map(s)
Authors: Valdred
Version: 2.0
Type: Execute selected maps before the title screen
Key Term: Misc add-on



Introduction
Many people have requested a way to have one or more maps executed before the title screen so I decided to make this.
I guess it's mainly for cutscenes and stuff but it can be used for gameplay as well.


Features


  • Fully featured maps before the title screen, made and set up just like other maps.
  • Easy to use, I guess



Screenshots
The maps would look just like ordinary maps, no need for screenshots.




Script

Spoiler: ShowHide

#==============================================================================
# ** Maps before title
#------------------------------------------------------------------------------
#  By Valdred
#------------------------------------------------------------------------------
# Having problems? Go to chaos-project.org or rmvxp.com
#==============================================================================
module Starting_Config  #Set up players starting position BEFORE the title screen

 Starting_map = 6   # id of starting map.  
 Starting_x   = 7    # x-starting cordinate.
 Starting_y   = 7    # y-starting cordinate.
 
 First_time_Only        = true # Takes you to title if save file exist
 
end
#===============================================================================
# * Main Script
#===============================================================================


class Interpreter
 
 def finish
$scene = Scene_Title.new
 end
end

class Scene_Title
 alias maps_before_title main
 def main
   # call battle test
   if $BTEST
       battle_test
       return
     end
   if Starting_Config::First_time_Only
     (0..3).each { |i|
     if FileTest.exist?("Save#{i+1}.rxdata")
       @continue_enabled = true
     end}
   end
   if @continue_enabled
     maps_before_title
   elsif $maps_before_title_switch
     maps_before_title
   else
   # Load database
   $data_actors        = load_data("Data/Actors.rxdata")
   $data_classes       = load_data("Data/Classes.rxdata")
   $data_skills        = load_data("Data/Skills.rxdata")
   $data_items         = load_data("Data/Items.rxdata")
   $data_weapons       = load_data("Data/Weapons.rxdata")
   $data_armors        = load_data("Data/Armors.rxdata")
   $data_enemies       = load_data("Data/Enemies.rxdata")
   $data_troops        = load_data("Data/Troops.rxdata")
   $data_states        = load_data("Data/States.rxdata")
   $data_animations    = load_data("Data/Animations.rxdata")
   $data_tilesets      = load_data("Data/Tilesets.rxdata")
   $data_common_events = load_data("Data/CommonEvents.rxdata")
   $data_system        = load_data("Data/System.rxdata")
   # Make system object
   $game_system = Game_System.new
   # Make each type of game object
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   # Set up initial party
   $game_party.setup_starting_members
   # Set up initial map position
   $game_map.setup(Starting_Config::Starting_map)
   # Move player to initial position
   $game_player.moveto(Starting_Config::Starting_x, Starting_Config::Starting_y)
   # Refresh player
   $game_player.refresh
   # Run automatic change for BGM and BGS set with map
   $game_map.autoplay
   # Update map (run parallel process event)
   $game_map.update
   # Turns swith on
   $maps_before_title_switch = true
   # Sends you to the map
   $scene = Scene_Map.new
   end
 end
end

   


Insert above main.


Instructions
1. Put player starting position (you know, the square with an 's' inside) where you want the player to start after the title screen.

2. Near the top of the script, you will find a configuration section.
  Change '$starting_map' to the ID of the map you want the player to start at before the title. (the upper one of your maps got ID 1, the one bellow is ID 2 etc.) then change $starting_x and $starting_y
  to the players starting position on the map. (to find out the cordinates of a spot, go to events-layer and click the spot. The cordinates    will be in the bottom right of the editor)

3. When you want to proceed to the title screen. Use a 'script' event with this code:
finish





Compatibility

Will probably not work with some scripts editing the title screen. That's all, I think.


Credits and Thanks


  • Valdred for writing it
  • Nathmatt for optimizing the code and adding a nice feature.
  • Skaraflame and others for requesting it



Author's Notes
If you need help just tell, also if anyone feels like optimizing the script, just do it.
22
I need a modification of blizz-abs that prevents corpses from being showed as an animation.
I tried myself, but it didn't make sense to me.
23
Resource Database / Valdred's music
March 31, 2010, 01:01:10 pm
Some music I have made. You are free to use it all. Some of the tunes are not quite complete yet (like sad n' happy) but I'll upload updates versions as I complete them, and also add new tunes I make to the folder. I'm new to composing by the way, so don't expect any Mozart.

http://bb.xieke.com/files/2/BGM's.zip
24
Resource Requests / dungeon tileset
February 07, 2010, 12:59:29 pm
do anyone know about a good dungeon tileset or two?

(this is for xp)
25
News / Suggestions / Feedback / annoying advertisment
January 10, 2010, 01:21:15 pm
sometimes when i visit chaos project, what i meet is some annoying advertisement site.
i have added chaos project to "favorites" and pressing the same button everytime i am visiting so i know that i'm not spelling any url wrong.

description of the advertisement site:
some smiling lady, a lot of buttons leading to different categories.

do anyone know why this is happening?
26
New Projects / Blood of the Gods
January 08, 2010, 05:28:46 pm
Blood of the gods

And God blessed them, and God said to them,
"Be fruitful and multiply, and fill the earth and
subdue it; and have dominion over the fish of
the sea and over the birds of the air and over
every living thing that moves upon the earth.
You are my oath, and you will be the shepherds
of men, like your descendants will do after you,
when your time comes. Lead mankind in the right
direction, and be my prophets."


- Genesis, 24. The original bible.



Prologue
Spoiler: ShowHide

"Run, Escape while you can" The prisoner said.
The cell was dark, a bit wet and very cold. But suddenly, it ended. The voice of the prisoner became a distant mumbling. And Adam woke from the dream. Alarming, even a bit scary. Adam didn't believe in such things as prophecies. Still, his heart was beating twice as fast as it normally does. Aware of the fact, that he could not fall asleep again, he turned on the light and dressed himself. It was early morning, still dark outside. God had decided to wait a few more hours before waking up Italy. Obviously, someone wanted different. The piercing sound of tires against concrete, rose from the streets. It was not one car, it was many, and they had stopped. Adam approached the window, to have a look. There were soldiers, plenty of them. Effectively they surrounded his house, and prepared themselves to enter. The prisoner's words still rang in his ears. "Escape while you can." Apparently, his time was up. Swearing to never more ignore the power of dreams, he ran towards the door. He had not done anything illegal and he had no idea why the soldiers were here. But he was now convinced, convinced by the dreamman. He should have done as he asked him to at once, to run and escape while he could. He didn't want to do the same mistake again. Adam fled.






Storyline
Spoiler: ShowHide










Characters









Features

  • Original graphic.

  • Original soundtrack

  • Orginal battle system






Soundtrack

The sin called crusade
The sin called crusade (acoustic)

-More to come-




Screenshots & Video

Spoiler: ShowHide


Spoiler: ShowHide


Spoiler: ShowHide


Tileset/Map preview.



Credits

  • IAMFORTE

  • Agkuu

  • Blizzard

  • Cocoa

  • Sith-jester

  • Team-anti

  • raindrop

  • Sirjackrex







27
Welcome! / HI!
January 08, 2010, 05:15:44 pm
hi guys, looking forward to a good time here at chaos project.
about me:
first of all, i'm from norway, and i'm 13 years old, so please excuse my grammar and spelling.
i have been using rpg maker xp for about four months. i can do basic scripting, basic spriting (when saying basic i mean that i can do it, but not very well) and advanced eventing.   :)