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

Pages: 1 2 [3]
41
Advertising / Quantum Core [Down untill furthur notice]
« on: March 04, 2008, 02:44:38 PM »
I regret to announce that the Quantum Core forums will be dissolved with effect from 14-March-2009, 8:30 PM GMT 5:30.

Reason:
   Mental resources. It is still my dream to complete the game but I don't have the state of mind to facilitate progress. I would only be disappointing you by keeping the site up. I hope that it will be back some day with considerable progress on the game, but I'm afraid it is not now.

To the members:
   I appreciate you taking your time and I am really sorry. If you have any content posted there, I request you to secure it before the forums close. I will keep a backup of all the important posts and topics, so in case you forgot to save any data, you can always contact me by PM. You can also contact me by e-mail, but I check the CP inbox a lot frequently than I check my mail ;)
My e-mail address: thefantasist [AT] yahoo [DOT] com

Thank you.

(click to show/hide)

42
RMXP Script Database / [XP] Temp Save v2.1
« on: February 24, 2008, 12:02:29 PM »
Temp Save
Authors: Fantasist
Version: 2.1
Type: Save Feature
Key Term: Title / Save / Load / GameOver Add-on

Introduction

With this script, the 'Save' option in the menu will do a quick save and take you to the title screen. The next time you load, the quick save is loaded instead of letting the player choose from the save files. Once the quick save file is loaded, it is deleted.

Features

  • Imitates the quick save feature found in many games
  • Saving from menu will quick save and take you to the title screen instead of opening the save scene (and leaves the normal saving only for save points in the game)
  • Works with almost any related script including CMSes, exotic save systems and even encryption systems

Screenshots

n/a

Demo

On demand.

Script

Place this script anywhere above "Main" and below "Scene_Load".
(click to show/hide)

Instructions

In Scene_Title, find the following lines or similar:

Code: [Select]
@continue_enabled = false
for i in 0..3
  if FileTest.exist?("Save#{i+1}.rxdata")
    @continue_enabled = true
  end
end

Now add the following lines right after the above code:

Code: [Select]
if FileTest.exist?(Scene_File::TEMP_SAVE_NAME)
  @continue_enabled = true
end

Configuration

TEMP_SAVE_NAME: The name (and path if needed) for the temp save file.

TEMP_LOAD_TEXT: The message to be displayed when a temp save is loaded.

TEMP_SAVE_TEXT: The message to be displayed when asking for temp save confirmation.

DISABLE_PROMPT: If this is set to true, the prompt and confirmation windows will be disabled. (Please check Issues!)

Compatibility

   From version 2.0, it should be compatible with almost anything, including exotic save systems, save scenes and even encryption systems.

For scripters: There is nothing like absolute compatibility, so this still has it's limitations:
  • The quick save procedure is only activated when Scene_Save is calledfrom Scene_Menu. You can change that by tinkering with "@temp_save_active" in "Scene_Save" -> "initialize".
  • This script assumes that you're using the Scene_File class for the saving and loading.

Issues

   If DISABLE_PROMPT is activated, while loading or saving a quick-save, there will be 2 sounds of button press instead of 1. Actually, it is the sound of button press and the sound of saving and loading. Fixing this means losing a lot of compatibility (since v2.0), so I have no intention of doing that unless I get an idea which retains compatibility.

Credits and Thanks

  • Fantasist, for making this script
  • dmoose for requesting this script
  • Hadeki for requesting the improvements

Author's Notes

If you have any problems, suggestions or comments, you can find me at:

 - http://forum.chaos-project.com
 - http://quantumcore.forumotion.com

Enjoy ^_^

43
Intelligent Debate / Contemporary Technology, boon or bane?
« on: February 06, 2008, 02:57:04 PM »
When I say contemporary, I talk about technology between, say, 1900 to present (a little here and there). Another thing is, this does not need to be a debate, a discussion is fine too :)

44
Tutorial Database / Making ground spikes (by Snailer)
« on: January 28, 2008, 04:14:44 PM »
Quote from: Snailer
This is my first tut  ;D Weeee !!!

Here I will try to teach you how to make spikes that will be rejected with button/switch  so it will go back into the ground..


First of all you need to know how switches are used so it will be a bit easier if you dont know how they work maybe this explains it a bit...

Now using the event layer make a Switch sprite so it will be easy for you to see where the button is  :)
just like in image 1 :D
Also make the spikes that will come out of the ground
Image 1
(click to show/hide)

Now we want it to hurt the player if he/she touches it, not ? do something like this..

Image 2
(click to show/hide)
First, make something like a flash screen so the player notices something like " Omy GAWD ! I CANT TOUCH THAT ! "
and make it jump away or something.. ( If you dont want that put through ON to OFF so you wont need the jump, I used it because i liked this more. )


Okay lets continue..
Go back to the switch and we will start making the scene of the spikes that will retreat..  :D
Image 3
(click to show/hide)
As you can see it turns a switch on the name wont matter but its the number it has..
Also use something like a sound to give it some life :D..

Now make a new page at the Switch event and put conditions to switch That was turned on at the first page..
like this.
 
Image 4
(click to show/hide)

Now we have made the switch to turn everything on

Go back to the spikes event and make a new page here too.
Set the Condition also to the switch that was turned on in image 3.
Now we probably want it to move so it looks very nice wont we ?
So make a move event command that will change graphics and put a pause in-between every one of em so it wont skip so fast as u can see, also an wait + an SELF SWITCH ! this is important so you wont have to make the same event over and over but you can just copy paste it.
Image 5
(click to show/hide)


Now we just make an Page 3 and with that put it Through, Condition to If SELF SWITCH A = On, and of course the sprite 

Image 6
(click to show/hide)


Hope this helps you and tell me if I forgot something ;D
Have a nice day  :D.

45
Tutorial Database / Map Exterior Tutorial: #1 Mountain Towns (by Falcon)
« on: January 28, 2008, 03:58:13 PM »
Quote from: Falcon
Tutorial One: The Mountain Town
Well, in my opinion, mountain towns are some of the easiest towns to make, as you can use terrain to take up most of the space on the map.

Part 1: Preparation
Making a town is much harder than making a small map, you need to take a few minutes to plan out your town.

Step 1
Get an idea of the location in the world.

The map we're going to be making will be a town in the middle of two mountains, the town will be mainly a pit stop for traders going from one city to another. The city will have only one road, an inn, a equip shop, a item shop, and a farmer's house.

Step 2
Sketch the map out on paper

I highly suggest sketching the map out on paper, you don't need it on hand when you make the map, but you'll get the overall shape of the map in your head, and you won't be making the map as you go.


Part 2: Creation

Download the map data that I made for each step
http://www.mediafire.com/?enjd0ylxx3r (extract the map datas in to a blank RMXP project)


Step 1
Alright, let's start by making the southern mountain.
Tip: While making mountains, vary the length and height of the edges to make the map feel more realistic
Tip: While making mountains, vary the height, using three spaces for the wall makes it look repetitive

(click to show/hide)

Step 2
Let's do the same for the top part, let's also make a small cut off for a sidequest or a path to another small town.

(click to show/hide)

Step 3
Now, one elevation isn't really a mountain, so let's make two or three levels of elevation for each side.

(click to show/hide)

Step 4
Let's do the same to the northern mountain.

(click to show/hide)

Step 5
Now, let's make the path that runs through town, and on the northern path, lets make grass and other things which obstruct that path, so it's clear it's not traveled as much as the main road is.

(click to show/hide)

Step 6
It's time to add the houses, let's put the inn where the both roads meet, let's put the item shop along the main road, and let's put the other houses along the road. Let's also add a well in town and a graveyard.

(click to show/hide)

Step 7
Now all we have left is to add the trees and other details.

(click to show/hide)

Step 8
Time to add events.

(click to show/hide)

Step 9
Walk away from your map, return in about 15 minutes and see if there's anything you forgot. We need to put in more autotile use, or the northern path will look out of place, so let's add more autotiles.

(click to show/hide)

The Final Product
A great town, perfect for an inn break after a mountain pass :)

(click to show/hide)
[/spoiler]

46
General Discussion / Some of my maps, (most of my maps (-_-'))
« on: January 28, 2008, 10:31:29 AM »
Well, I'm not good at mapping. Or is it true? Is it just that I don't spend enough time on them? Whatever be the reason, I didn't make many maps, and here are the few I made. There are some more hidden deep in my archives, I'll dig them out later. Let me know how good I am for a noob, who knows, it might just inspire me to make maps for my game.

(click to show/hide)

47
Script Troubleshooting / Using RGSS200 classes in RMXP
« on: January 21, 2008, 12:11:09 PM »
So I like the bitmap effects in RMVX and decided to use it in RMXP, so I turned to the Win32API class. There's no documentation in RMXP help file and all I know is that there are 3 args - dll name, method/class/module, arguments, something I don't know. I tried this:

Code: [Select]
bmp = Win32API.new 'RGSS200E', 'Bitmap', 'Graphics/pic.jpg', ''
I get this error when I run the game:

Runtime error
GetProcAdress: Bitmap or BitmapA

I request anyone with knowledge on Win32API to shed some light on this *cough*Bliz*cough*:)

48
Intelligent Debate / Global Warming
« on: January 10, 2008, 05:27:29 PM »
Is it a crisis in the first place? And is it really human made? I say none:

This is a layman's myth buster, simple and to the point. In the end, there's a reference to a petition against global warming. You might want to google it if you're interested.
http://www.abd.org.uk/green_myths.htm

Got to love this one. It's got statistical data, and it puts the evidences in favor of global warming in question based on the accuracy of the methods normally appliedto collect data.
http://xtronics.com/reference/globalwarming.htm

And this is a rather aggressive take on global warming.
http://www.americanpolicy.org/un/thereisnoglobal.htm



49
General Discussion / VX Experiences
« on: January 10, 2008, 05:07:39 PM »
So how many of you tried the RMVX demo and how do you like it?

In case you don't know where to find it, here's the link:
http://www.rpgmakervx.com/

You'll also find an english patch and some ither stuff.

50
RMXP Script Database / [XP] Moving Windows v1.0
« on: January 08, 2008, 09:31:29 PM »
Moving Windows
Authors: Fantasist
Version: 1.0
Type: Graphical Enhancement
Key Term: Misc System

Introduction

Moves a window with a 'decelerating' effect (think STCMS)

Features

  • Moves windows with a 'decelerating' effect rather than plain motion
  • Can handle movement in any direction, just give the window a destination and it will move there

Screenshots

N/A

Demo

Paste this in a new slot just below Scene_Menu and you have your demo (after installing the script of course)

Code: [Select]
class Scene_Menu

  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = 'Status'
    s5 = 'Save'
    s6 = 'End Game'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.y = -224
    if $game_party.actors.size == 0
      (0..3).each {|i| @command_window.disable_item(i)}
    end
    @command_window.disable_item(4) if $game_system.save_disabled
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = -160
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = -160
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = -160
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 640
    @status_window.y = 0
    # Move the windows
    @command_window.move(0, 0)
    @playtime_window.move(0, 224)
    @steps_window.move(0, 320)
    @gold_window.move(0, 416)
    @status_window.move(160, 0)
   
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      break if $scene != self
    end
    Graphics.freeze
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
 
  alias moving_wins_test_menu_upd update
  def update
    @command_window.move(0, 0)
    @playtime_window.move(0, 224)
    @steps_window.move(0, 320)
    @gold_window.move(0, 416)
    @status_window.move(160, 0)
    moving_wins_test_menu_upd
  end
 
end


Script

Paste in a new script slot above main.
Code: [Select]
#==============================================================================
# ** Moving Windows
#------------------------------------------------------------------------------
# by Fantasist
# Version: 1.0
# Date: 14-Sep-2009
#------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First version
#------------------------------------------------------------------------------
# Description:
#
#     This script adds moving functionality to windows.
#------------------------------------------------------------------------------
# Compatibility:
#
#     Might not be compatible with other similar scripts.
#------------------------------------------------------------------------------
# Instructions:
#
#     Paste this script below "Window_Base" and above "Main".
#
#     The syntax for moving a window is:
#
#           my_window.move(dest_x, dest_y[, move_speed])
#
#     where
#           dest_x: Destination X coordinate
#           dest_y: Destination Y coordinate
#           move_speed (optional): Speed divider. Larger numbers means faster.
#
#     The attributes "dest_x", "dest_y" and "move_speed" can be used directly
#     without using the "move" function all the time.
#
#     The "moving?" function returns "true" if the windows are in motion. This
#     can be used as an event in exotic systems of all sorts :)
#------------------------------------------------------------------------------
# Issues:
#
#     None known.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#   Fantasist - For making this.
#------------------------------------------------------------------------------
# Notes:
#
#   If you have any questions, suggestions or comments, you can find me at:
#
#    - www.chaos-project.com
#    - www.quantumcore.forumotion.com
#
#   Enjoy ^_^
#==============================================================================

#==============================================================================
# ** Window_Base
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Attributes
  #--------------------------------------------------------------------------
  attr_accessor :dest_x
  attr_accessor :dest_y
  attr_accessor :move_speed
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias move_wins_winbase_init initialize
  def initialize(x, y, width, height)
    move_wins_winbase_init(x, y, width, height)
    self.dest_x = x
    self.dest_y = y
    self.move_speed = 3
  end
  #--------------------------------------------------------------------------
  # * Moving?
  #--------------------------------------------------------------------------
  def moving?
    return (self.x != self.dest_x || self.y != self.dest_y)
  end
  #--------------------------------------------------------------------------
  # * Move
  #--------------------------------------------------------------------------
  def move(dest_x, dest_y, move_speed = nil)
    self.dest_x = dest_x
    self.dest_y = dest_y
    self.move_speed = move_speed unless move_speed.nil?
  end
  #--------------------------------------------------------------------------
  # * Move Wins
  #--------------------------------------------------------------------------
  def move_wins
    dx = (self.dest_x - self.x).to_f / self.move_speed
    dy = (self.dest_y - self.y).to_f / self.move_speed
    # Decimal correction
    dx = self.dest_x > self.x ? dx.ceil : dx.floor
    dy = self.dest_y > self.y ? dy.ceil : dy.floor
    # Moving
    self.x += dx
    self.y += dy
  end
  #--------------------------------------------------------------------------
  # * x=
  #--------------------------------------------------------------------------
  def x=(val)
    self.dest_x = val unless moving?
    super(val)
  end
  #--------------------------------------------------------------------------
  # * y=
  #--------------------------------------------------------------------------
  def y=(val)
    self.dest_y = val unless moving?
    super(val)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias move_wins_winbase_update update
  def update
    move_wins_winbase_update
    move_wins if moving?
  end
end

(click to show/hide)

Instructions

Paste this script below "Window_Base" and above "Main".

The syntax for moving a window is:
Code: [Select]
my_window.move(dest_x, dest_y[, move_speed])
where
     dest_x: Destination X coordinate
     dest_y: Destination Y coordinate
     move_speed (optional): Speed divider. Larger numbers means faster.

   The attributes "dest_x", "dest_y" and "move_speed" can be used directly without using the "move" function all the time.

   The "moving?" function returns "true" if the windows are in motion. This can be used as an event in exotic systems of all sorts :)

Compatibility

Might not be compatible with other similar scripts.

Credits and Thanks

Credit Fantasist (me) for making it.

Author's Notes

If you have any questions, suggestions or comments, you can find me at:

 - www.chaos-project.com
 - www.quantumcore.forumotion.com

Enjoy ^_^

51
General Discussion / Version Numbering Formats
« on: January 08, 2008, 09:06:27 PM »
First things first: be original. Don't worry about getting laughed at.

Here are some formats, you can get the general idea:

This is suggested by Susys:
Quote
i made up of a simple formula for this:

X.Y.E

X: The product version

Y: Product minor version

E: Minor enchants to the product

EX:

2.5.9

the 2 meand thers about 2 chapters in the game.
the 5 means ther are about 4 extra side quests and 1 extra feature.
the 9 meand thers 9 extra item or skills.

now when the 5 becomes a 10 you have to make 2 a 3
and if the 9 becomes a 20 change the 5 to a 6

and if u want 4 numbers

2.5.9.500

the first 3 numbers r the same

the 500 is like how close you it is to make the 2 a 3 (out of 1000 or you can make it out of a %)

Falcon's method:
Quote
Here's what I use.

A.BC

A = Complete Rewrites
B = Functional Additions
C = Bug Fixes

Blizzard's method:
Quote
I usually use only 2 numbers.

v.a

v - main version
a - minor version

I change v only when I come with a to 9 or I overwork the complete code and change half of it. I only managed to get with a to 9 with my party switcher. When I fix some really minor bugs or add some vers imple options, I add a third number

v.ab

Only in big stuff I use four numbers

v.a.b.c

v - main version
a - grand changes (my Blizz-ABS will be 1.1.0.0 when I've done all the stuff I wanted)
b - normal changes
c - any little change

That's what I use for my game and my Blizz-ABS only so far. And I usually don't add a "b" like "v1.4b" when I release a script the first time. I add it when I fix the first bugs that come up when somebody tries it out. It means "beta", lol! I don't use the "b" when I use 4 numbers though.

Fantasist's method (it's me, lol):
Quote
I think I'll use a.b.c.
a - Major changes/rewrite, the main version number.
b - Minor changes and enhancements.
c - Really minor changes, which are not worth mentioning.

Bug fixes are added to either a, b or c depending on the severity of the bug.

mastermoo420's suggestion (really amusing):
Quote
Or, you can plainly go for the gusto. Start out with v1 and just make it v1.0 with as many .0's as you want. Then when you go on, you can make it look professional with things such as v1.1.3 when all you've really done is add a line of code :V But the main thing, I suppose, is to go with the flow.

52
RPG Maker Scripts / [Dead for the time being]A wierd drawing engine
« on: January 08, 2008, 08:45:23 PM »
Got carried away while doing something else. Just try it out. Talk to the girl with pink hair.

WARNING: Drains the CPU!

Screenshot:


Download link:
http://www.sendspace.com/file/4dfkpv

Keys you might want to try out are, L, R, A, C
L - Reset
R - Screenshot (buggy)
A - Speed up cursor (during moving AND drawing)
C - Press to draw line

There's one more thing you need to do. Open Game.ini file and change RGSS100J.dll to RGSS102E.dll.

Note: For those who bother to open the script editor, you might find some extra stuff, I recommend you DO NOT USE THEM in your projects if you don't know what you're doing. Doing so might cause compatibility problems, and all those extras are still under development.

Comments are appreciated ^_^

53
RMXP Script Database / [XP] Multiple Starting Points
« on: January 08, 2008, 08:39:05 PM »
Multiple Starting Points
Authors: Fantasist
Version: 1.1
Type: Game mode enhancement
Key Term: Misc Add-on

Introduction

When 'New Game' option is selected, a new sub-menu is opened, where the player can choose from different modes. Each mode starts in a different map.

Features

  • Different modes allow the player to start the game from different locations/maps
  • Smooth fade effect when switching to modes window
  • Window adjusts to text and number of modes

Screenshots

Just try it out, It comes with example config (starts the game in the same map at 2 different positions).

Demo

http://www.sendspace.com/file/fpsy0q

Script

Place this script above 'Main'. If you're using any other scripts, all of them should come BELOW this script.
Code: [Select]
#==============================================================================
# ** Multiple Starting Points
#------------------------------------------------------------------------------
# by Fantasist
# Version 1.1
# 3-July-2009
#------------------------------------------------------------------------------
# Version History:
#
#   1.0 - First release
#   1.1 - Improved compatibility and fixed off-screen window
#------------------------------------------------------------------------------
# Description:
#
#           When 'New Game' option is selected, a new sub-menu is
#   opened, where the player can chose from different modes. Each
#   mode starts in a different map.
#------------------------------------------------------------------------------
# Compatibility:
#
#           There might be issues with other scripts which modify Scene_Title.
#   This script should be placed ABOVE any other custom scripts if used.
#------------------------------------------------------------------------------
# Instructions:
#
#           Place this script above 'Main'. If you're using any other
#   scripts, all of them should come BELOW this script.
#------------------------------------------------------------------------------
# Configuration:
#
#   Scroll down a bit and you will find the configuration options. They are
#   already set to example values so you understand how to use them.  
#
#   GameModes: GameModes is an array of names of all the gamemodes you use.
#              Name of each mode should be enclosed in quotes ("like this").
#              Different modes should be seperated by commas.
#
#   MapIDs: For each game mode, you should specify the starting map ID here.
#           The order of map IDs match the order of the GameModes defined.
#
#   MapPos: For each mode, you should set the starting point on the map.
#           This is similar to 'Set Start Position' command. To know the
#           coordinates, go to the required map and use the event command
#           'Teleport'. After chosing the start position on the required map,
#           two numbers will be displayed on the top-right corner of the
#           window. These numbers are your starting positions.
#
#   MaxModes: This setting limits the size of the mode selection window.
#             For example, if there are 5 modes and you only want to display
#             3 at a time, you set MaxModes to 3.
#------------------------------------------------------------------------------
# Issues:
#
#    - DO NOT leave the above three arrays empty (none should be []). Just
#      don't use this script if you want to disable it, this won't work with
#      0 modes.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#    Credit me (Fantasist) for making this, IF you want to.
#------------------------------------------------------------------------------
# Notes:
#
#    If you have a problem or suggestion, you can find me at
#    www.chaos-project.com
#    Enjoy ^_^
#==============================================================================

#==============================================================================
# ** Scene_Title
#==============================================================================

class Scene_Title
  
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # Configuration Begin
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  
  GameModes = ['Map-1', 'Map-2', 'Map-3', 'Map-4', 'Map-5']
  
  MapIDs = [1, 2, 3, 4, 5]
  
  MapPos = [ [5, 10], [7, 10], [9, 10], [11, 10], [13, 10] ]
  
  MaxModes = 3
  
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # Configuration End
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  
  alias fts_MSP_title_main main
  def main
    if $BTEST
      battle_test
      return
    end
    # Load required stuff for window
    $data_system = load_data('Data/System.rxdata')
    $game_system = Game_System.new
    # Determine window width
    b = Bitmap.new(1, 1)
    w = 0
    for string in GameModes
      tmp = b.text_size(string).width + 32
      w = tmp if tmp > w
    end
    b.dispose
    w = [w, 192].max
    # Make window
    @mode_win = Window_Command.new(w, GameModes)
    @mode_win.height = [32 + MaxModes * 32, 32 + GameModes.size * 32].min
    @mode_win.back_opacity = 160
    @mode_win.x, @mode_win.y = 320 - @mode_win.width / 2, 288
    @mode_win.active = @mode_win.visible = false
    # Execute normal
    fts_MSP_title_main
    # Dispose window
    @mode_win.dispose
  end
  
  def update
    if @command_window.active
      update_command
    elsif @mode_win.active
      update_mode
    end
  end
  
  def update_command
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        Graphics.freeze
        @command_window.visible = @command_window.active = false
        @mode_win.active = @mode_win.visible = true
        Graphics.transition(5)
      when 1
        command_continue
      when 2
        command_shutdown
      end
    end
  end
  
  def update_mode
    @mode_win.update
    if Input.trigger?(Input::C)
      i = @mode_win.index
      start(MapIDs[i], MapPos[i][0], MapPos[i][1])
    elsif Input.trigger?(Input::B)
      Graphics.freeze
      @mode_win.visible = @mode_win.active = false
      @command_window.active = @command_window.visible = true
      Graphics.transition(5)
    end
  end
  
  def start(id, x, y)
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_stop
    Graphics.frame_count = 0
    $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
    $game_party.setup_starting_members
    $game_map.setup(id)
    $game_player.moveto(x, y)
    $game_player.refresh
    $game_map.autoplay
    $game_map.update
    $scene = Scene_Map.new
  end
  
end

Instructions

GameModes:
   GameModes is an array of names of all the gamemodes you use. Name of each mode should be enclosed in quotes ("like this"). Different modes should be seperated by commas.

MapIDs:
   For each game mode, you should specify the starting map ID here. The order of map IDs match the order of the GameModes defined.

MapPos:
   For each mode, you should set the starting point on the map. This is similar to 'Set Start Position' command. To know the coordinates, go to the required map and use the event command 'Teleport'. After chosing the start position on the required map, two numbers will be displayed on the top-right corner of the window. These numbers are your starting positions.

MaxModes:
   This setting limits the size of the mode selection window. For example, if there are 5 modes and you only want to display 3 at a time, you set MaxModes to 3.

Issues
  • DO NOT leave the above three arrays empty (none should be []). Just don't use this script if you want to disable it, this won't work with 0 modes.

Compatibility

There might be issues with other scripts which tamper Scene_Title. This script should be placed ABOVE any other custom scripts if used.

Credits and Thanks

Credit me (Fantasist) for making this, IF you want to.


Author's Notes

This can be very easily done with events, but for those who wanted the mode selection in the title screen, this is the script.

If you have a problem or suggestion, you can find me at:

 - www.chaos-project.com

Enjoy ^_^

54
Event System Database / Fantasist's Tips for Eventers
« on: January 08, 2008, 08:18:30 PM »
Fantasist's Tips for Eventers

       Events are a way to control the default scripts, eventing IS scripting in a way. There are certain things you can't do directly with event commands, but you don't need to resort to large script systems for a solution. Sometimes, pieces of code can be very useful. I'll be gathering those tips here in this thread. I'll keep this post updated with any new ideas I have. Feel free to suggest/request/ask anything. If you feel events are not getting your job done and you need a little more, this is your place.

Player and Event Positions on the Map


The map is a grid of 32x32 pixel tiles. Each tile has an adress in terms of X and Y coordinates. For some reason, if you want to know the player's/event's position on the current map, these are the lines of code:
Player's position:
Code: [Select]
$game_player.x  # The player's X coordinate
$game_player.y  # The player's Y coordinate

An Event's position:
Code: [Select]
$game_map.events[ID].x  # X position of the event. ID is the ID of the event in the map
$game_map.events[ID].y  # Y position of the event. ID is the ID of the event in the map

These can be very useful for things like minimaps. There is also another potential use for which I actually dug these lines: ranged actions. You can compare the distance between two events/player and make something happen. For example, you can make a caterpillar system where the event 'Follows the Hero' if the distance is more that 1 tile. You can make pets too: follow the hero if the distance is more than, say 6 tiles and move around randomly otherwise. That way, your pet wanders around near you but will follow you if you're too far.

Power of variables - Storing Strings


You know that variables are used to store numbers, right? Fact is, they can store pretty much ANYTHING, like text and even your current party. But for storing these other things, you should the Call Script command and use this code:
Code: [Select]
$game_variables[ID] = (thing to store)where ID is the ID of the variable you intend to use. (thing to store) can be anything, mostly
Code: [Select]
'text' or "text"or other things like
Code: [Select]
$game_party
How is this useful? You know that \n[1] will be replaced by the name of the first actor in the party, but what if you wanted to display the name of the first actor in the database? Or actually, if you want to display a frequently used or changing text in a message, what would you do? You'd use variables to store the text.

Let's cover the name of the actor first. To store the name of the 4th actor in the database, you'll use:
Code: [Select]
$game_variables[ID] = $data_actors[4].name$data_actors[4].name is the name of the 4th actor in the database.

Now here's another use. Say you have multiple possibilities in your game, where a message is different depending on a switch. So instead of doing this:
Code: [Select]
<>Conditional Branch: Switch [0036: Heaven's Blade Unlocked] == ON
  <>Message: Heaven's Blade is the strongest weapon in existance.
  Else Handler
  <>Message: Ultima Blade is the strongest weapon in existance.
  End

You can do this:
Code: [Select]
<>Conditional Branch: Switch [0036: Heaven's Blade Unlocked] == ON
  <>Script: $game_variables[1] = 'Heaven's Blade'
  Else Handler
  <>Script: $game_variables[1] = 'Ultima Blade'
  End
<>Message: \v[1] is the strongest weapon in existance.
And actually, you can simple use \v[1] whenever you want to refer to the strongest weapon in existance.

Range - distance between two points


Let's say there's two ppoints on the map and you want to find the distance between them. These two points can be anywhere, one below the other, vertically aligned, horizontally aligned, or diagonally placed at a distance. If you're familiar with the Pythogoran rule for the hypotenuse of a right angled triangle, this is exactly that, it gives the distance between two points:
Code: [Select]
Math.hypot(x2 - x1, y2 - y1) where x1, x2, y1 and y2 are the coordinates of the points (x1, y1) and (x2, y2).
It's mostly cartesian geometry, nothing complex once you know the basics. This piece of code can be VERY WELL USED in conjunction with Player and Event Positions on the Map to make ranged systems, the same things discussed in Player and Event Positions on the Map.

Get All Items


Ever wanted to have ALL the items during debug? I for one find it irritating using lots of 'Add Item' event command. Now, paste the following code into a 'Call Script' event command and you have all the items:

Code: [Select]
itemdata = load_data('Data/Items.rxdata')
wpndata = load_data('Data/Weapons.rxdata')
armordata = load_data('Data/Armors.rxdata')
(1..itemdata.size).each {|id| $game_party.gain_item(id, 99)}
(1..wpndata.size).each {|id| $game_party.gain_weapon(id, 99)}
(1..armordata.size).each {|id| $game_party.gain_armor(id, 99)}
$game_party.gain_gold(999999999)

The last line makes you VERY rich, you can remove it if you want.

Shop Everything


Same as above, for shops. Paste this anywhere above 'Main' and below 'Window_ShopBuy'. You need to set the SHOP_EVERYTHING_ID to the ID an item you make in the database. When you call a shop with that item, it'll call a shop with ALL items, weapons and armors (no exceptions).

Code: [Select]
class Window_ShopBuy
 
  SHOP_EVERYTHING_ID = 1
 
  alias fant_shop_everything_win_shop_buy_init initialize
  def initialize(shop_goods)
    if shop_goods[0][0] == 0 && shop_goods[0][1] == SHOP_EVERYTHING_ID
      goods = []
      # Items
      (1..$data_items.size).each {|i| goods.push([0, i])}
      # Weapons
      (1..$data_weapons.size).each {|i| goods.push([1, i])}
      # Armors
      (1..$data_armors.size).each {|i| goods.push([2, i])}
    end
    fant_shop_everything_win_shop_buy_init(goods)
  end
 
end

55
Chat / The "Post your Desktop" Thread
« on: January 08, 2008, 09:49:13 AM »
To make a screenshot, press "PrintScreen" next to F12. Open Paint, paste the picture and save it as png or jpg. Open a new tab in your web browser and type http://imageshack.us and upload your picture. After you are done you will get a list of links. Copy the second one that says "Thumbnail for forums (1)" next to it and post it.

PLEASE POST THUMBNAILS ONLY!

Oldest and cleanest:


Current, Made the wallpaper myself with media player and Irfanview:

56
News / Suggestions / Feedback / Fast Reply
« on: January 08, 2008, 07:50:31 AM »
If you're wondering where the fast-reply button is, there is no fast reply button in this forum, the fast reply box is present at the bottom of the page, if you enable it. Here's how:
Quote
Simply turn on the forum's default fast reply box in Profile->Look and Layout Preferences.

57
Quote
Nickname/Displayed name feature - turn it on
I registered with the name fantasist cause I don't have to type uppercase while logging in, but  thought the nickname feature is disabled. Could you please turn it on, Bliz?

PS: I know I'm lazy :D

58
Welcome! / The Fantasist is here
« on: January 08, 2008, 07:15:44 AM »
Hello everyone. I'm Fantasist, a day dreamer with a philosophical touch. And I'm also an RGSS scripter (the n00b scripter, I often call myself).

59
    The ultimate guide to distributing your game

    This post will be kept up-to-date as I gain more knowledge. Anyone's welcome to share any tips and if they're good enough, I'll add them.

    Note: This work is protected by copyright liscence.

    Quote
    Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License


    You are free:
    • to Share — to copy, distribute and transmit the work
    • to Remix — to adapt the work

    Under the following conditions:
    • Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
    • Noncommercial. You may not use this work for commercial purposes.
    • Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
    • For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
    • Any of the above conditions can be waived if you get permission from the copyright holder.
    • Nothing in this license impairs or restricts the author's moral rights.

    Table of contents:
    • 1. Introduction
    • 2. Making your game RTP-independent
    • 3. Gathering the resources together (using the Resource Tester)
    • 4. Testing and Debugging
    • 5. Filesize optimization
    • 6. Distributing your game [WIP]
    • 7. Useful tools
    • 8. F.A.Q.
    • 9. Contributers

    1. Introduction

       Are you making a game or already made one? You must have put a lot of effort into it, so much that when you finally want to show it to the world, you want your game to be as unique as possible. In that stage, the orange blob, 'Game.exe' might start to look annoying. Of course, the most common and inevetable problem is the dependency on RTP. This tutorial is meant to make you able to distribute your game in a very professional way, without the need for RTP and with an installer. I've given some tips on filesize, as making your game small in size always encourages others to download it in the first place. Sections 2, 3 and 6 cover the basics of distributing your game, but I recommend you read all of this tutorial. I promise that you'll feel the difference :)

    2. Making your game RTP-independent

       I'll explain here how to make your game run without RTP, nothing more, nothing less. That means that this is NOT about gathering the resources, that's covered in Topic 3. Follow these steps:
    • Search for 'RGSS' in your Windows directory. You'll find RGSS10xx.dll. If you're using the official version, you'll find RGSS102E.dll. If you're using the Postality Knights, you'll find RGSS100J.dll. You need to copy this and paste it in your game directory (the game folder).
    • Open the Game.ini file and modify the contents by using the following guide:
    Quote
    Library=RGSS102E.dll (the name of the RGSS dll you've just copied into the game folder)
    Scripts=Data\Scripts.rxdata
    Title= (Your game title which gets displayed on the title bar when in windowed mode)
    RTP1= (The default is 'Standard', the name of the RTP you're using, just erase the word)
    RTP2= (This is the name of the second RTP if you're using it, just leave it empty)
    RTP3= (same as above)
    Now try running the game. It will display a 'File not found' error and stop. That means the game is no longer using the RTP files, and is expecting the resources to be found in the game folder.

    Note: When you run Game.exe, it first searches for the RGSS dll specified in the Game.ini file, in the same directory (at the same place where Game.exe is). If it does not find it, it searches in the C:\Windows directory.

    3. Gathering resources

       Now that the game doesn't use the resources from the RTP folder, it expects them in the game's directory (the folders 'Graphics' and 'Audio'). Basically, all you need to do is copy every resource used by the game from the RTP directory (usually C:\Program Files\RGSS\Standard) into their respective folders in the game directory, that's all there is to it. But obviously it's not easy. You could always copy all of the RTP (nearly 20 MB) into the game folder, and a lot of unused resources get copied. Or, you could make note of EACH AND EVERY RESOURCE as you use them while making your game and copy them, or something similar, import every resource you use in the database from the RTP directory, both of which are not practical.

       If you've used RM2k/2k3 for some time, you might have come across a program which lists all the resources you're using in your game. Blizzard's Resource Tester does just the same. It will make a txt file with all the resources you're using, and what's more, even unused database entries like items and skills are logged. Once the list is ready, copy all the resources from the RTP folder into your game folder.

       I'd like to point the use of 'Ctrl' key in this context. If you already didn't know, you can select multiple files by holding down the Ctrl key and clicking the files you need. And If you're using Windows XP, in the folder toolbar, turn on the button "Copy To". Now select the necessary files in the RTP and use 'Copy To'. You'll be done in no time.

    Note: For avoiding possible problems, I advice you to name custom resources differently from the RTP files.

    4. Testing and Debugging

       This is a crucial step in releasing any kind of product. People don't like unexpected errors suddenly popping up while they're immersed in gameplay. Errors are not always technical, They could be glitches in the game or even logical errors. Here are the kinds of errors and bugs you might encounter:

    Script related errors: These are the errors you get because of inconsist scripts or improper use of "Call Script" event command. Most of the time, an error pops up and the game crashes.
    Solution: The best way to tackle this is to test all its features which you used, after you're done installing all the scripts. Scripts can be incompatible, so while it worked before, it might not work properly after you install another script. If you're not a scripter or can't solve the problem, get help from the maker, and if he/she's not available, get help from others.

    Glitches in the game: Most commonly encountered in event-based mini games and systems. For example, a jumping system might glitch and the player may jump into water and get stuck there. It could even be story related. For example, there's a quest where you need to get an item for the King from a monster. If you messed up the eventing, (a) When you return with the item, the King still says "Arshes, can you do me a favor? There's a monster blah blah... (b) After you defeat the monster and give the King the item, if you go back to where you defeated the monster, the monster's still there and the same cutscene ensues.
    Solution: This is solved by thorough test play. While playing, test every possible map and every possible side quest. After completing a quest, visit every map it involved to check if there are no glitches. The more attention you pay to detail, the better is the chance of finding bugs.

    Logical inconsistency: The best way to explain is a good example. Let's say you designed two monsters, a Bat and an Ogre. You've set the Bat to cast 'Sleep' and you've set the Ogre to cast 'Paralysis' once every two turns. And you happen to make a monster troop with these two monsters. What happens when the player battles them? The Bat casts 'Sleep' and the Ogre casts 'Paralysis'. You're either asleep or paralysed, so you can't act. The monsters still keep casting 'Sleep' and 'Paralysis'. Though technically nothing is wrong, that battle never ends.
    Solution: This can be corrected by even more observation to detail. Battles, mostly, should be played several times without cheating (no 'God-Mode' in this phase of testing :P). You might not spot them normally but you definitely will if you look for them.

    Note: After spending a lot of time on making the game, your brain might 'get used' to some inconsistencies and you might not be able to spto them. It's best if you ask other people to test play the game. When I say 'test play', I mean not just asking them to play the game, ask them to look for glitches and errors.

    5. Filesize optimization

    Why is smaller filesize important? Because it's easier for you to upload the game and easier for people to download it. Remember, uploading is not a one-time process. You might upload an update or a version with some bug fixes. Since most of the filesize is because of images and audio, you'll need to know the various methods and formats while saving them.

    For both images and audio, you need to keep two things in mind - quality and filesize. You can't get the best of both of them. Different formats offer different balances, it's you who need to decide what's best for your use. It's not difficult in case you were wondering.

    (click to show/hide)

    (click to show/hide)

    6. Distributing your game [WIP]

    Now that you're game is ready for playing, you can distribute it. In section 2, you made your game technically RTP independant, in section 3, you gathered all the resources and made your game practically RTP independant. All that's left is to pack the game folder and upload it.

    But before you do that, you might want to change the icon of Game.exe. Refer section 7 for how to modify the exe.

    You have three options for packing the resources.

    1. The "Make Game Disk" option from the "File" menu of RMXP. All this does is compress the game folder and make a self-extracting exe. This is normally fine, but it doesn't install any shortcuts anywhere.

    2. You can zip the game fplder and upload the zip file. Use a program like Winzip or WinRAR to compress the game folder.

    3. You can make an installer and upload the file. Refer section 7 to find an installer.

    7. Useful Tools

    (Clickable headings)

    Irfanview: IrfanView is one VERY nifty tool. It's basically a viewer with lots of common filters and ability to save in many formats. It can batch convert/rename files easily. You can even view AVIs and MPGs (don't know about other video files), and you can view PSDs. Only downsides I found are there's no way to change hue easily, and it's not an image editor, so you can't draw things. I highly recommend you get this. Also visit their website, you'll find lots of filter packs which might come in handy.

    XN Resource Editor: You can mod exe, dll and ocx files with this application. You can use this to change the icon of your Game.exe file. Resource Hacker is a similar progran, but looks a bit old and it doesn't come with an in-built bitmap editor. If XN Resource Editor gives you any problems (highly unlikely), you can use Resource Hacker instead.

    Clickteam Install Creator: You can create an installer for your game very easily with this program. It's totally free, but there's a link to their website in the last page while installation. Some might not like this, but I recommend it. There are other programs like this on the internet, so the choice is yours, just use Google.

    8. F.A.Q
    Awaiting questions...

    Contributers
    Blizzard (audio compression)
    Zeriab (image compression)[/list]

    Pages: 1 2 [3]