Thursday, November 5, 2009

Miscellaneous Updates

Well, once again there have been fewer entries than I'd like to see, but that's the price we pay when work takes priority. I'm in between jobs right now, so will have more time for consistent updates and to give a progress report on The Gladiator Project.

Regular visitors will already recognize the new layout and design. I'm not sure if I like it yet, so may tweak it again, though I was going for the three-column layout as I find it neater and more versatile. It took me a long LONG time to configure it exactly how I wanted it (basically tweaked Blogger's Scribe Template and added graphics).

Yes, three of the images on the title is from Runescape, for those who regularly play it. The first is my Broodoo Mask disguise, the second is my ghost impression for Halloween and the third is my Bear Mask. Runescape is actually one of my favorite games right now, alongside IGG's Wonderland Online.

In the meantime, I'll have a progress report ready in the next entry - not the game itself, since that isn't even started yet, but some of the graphics I've created for the game.

Tuesday, September 29, 2009

The Gladiator Project

If there's a period in history that fascinates me the most, it would have to be the Roman gladiatorial games. So I thought, a while ago now, why not create a game loosely based on precisely that. I started the project (initially for RM2K3), entitled Brotherhood: Gladiator, which I've now nicknamed "The Gladiator Project". The project was abandoned and soon forgotten about for various reasons. I rediscovered part of it recently and decided to try and port it over to RMXP/VX, bringing it a little more up-to-date.

Although the RM2K3 project was about 50% complete, when my hard drive died I lost a large portion of the materials I had for it and porting it over to RMXP/VX was at that particular time somewhat overwhelming. I'm now starting it anew, specifically for RMXP/VX. Because of RGSS's versatility and flexibility, it means that a lot more detail can go towards things like custom menus and in-game variables, not to mention aesthetics.

Some of the features I'm hoping to include in the game are:

  • Bestiary (Bestiarius): For logging opponents fought in the arena and keeping track of their strengths and weaknesses.
  • Achievement Diary (Diarium Facti): A log of major accomplishments and achievements, such as killing a certain number of opponents or surviving for a certain number of battles in the Arena.
  • Job Log (Laboris Tabulae): In between combats, the opportunity to perform various tasks for others, gaining additional experience and kudos.
  • Calendrical System: A complete time/calendar system for use in the Arena.
  • System Options: Additional options to change things like windowskin color, background music/sound effects volume control, and more besides.


At the moment, "The Gladiator Project" is in its embryo stages, but progress is slowly being made. Watch this space for more info and updates!

Tuesday, September 22, 2009

Real Time KTS Mod

This is in answer to Miaucho's question (in the comments) about how it would be possible to rename the months to something else and is a followup to the Kylock Time System Script I posted a while ago.

While I have an intermediate understanding of RGSS at the moment, I will experiment on my own. That's how I learn things. Thing is I couldn't quite figure out how to implement the month array into the time system without encountering a few problems. My mind drew a blank.

Anyway, I found the Real Time KTS Mod by accident. This is a modification of Kylock's, but it's a very good one at that, utilizing the system clock for real time. Its rich array of features include:

  • Current Time (hours, minutes and seconds)
  • Current Date (weekday, month and year)
  • Seasons
  • Weather (according to season)


The demo version can also be downloaded here.

It should be easy to rename the months by placing an array in the KTS Module, something like:

MONTH_NAME = ["Month One", "Month Two" ... etc.]


Then calling it later (in getMonthName):

monthname = KTS::MONTH_NAME[@month]


And that should work. (I can't thoroughly test it yet - but I will soon - as my copy of RMVX isn't working properly for some reason!)

Wednesday, September 2, 2009

Kylock Time System Script

This is in answer to Steve's question (in one of the comments), asking if it was possible to place the actual time and date into separate in-game variables. Short answer is "Yes, it is!"

I'm still working on my full calendrical system script, but the best time system that I've found is this one:



This video shows how to use the demo script, downloadable here.

Alternatively, the "original" forum post goes into much more detail.

Tuesday, September 1, 2009

Still Here!

Apologies for the lack of updates. I haven't abandoned this blog. Things have been hectic and, due to my hard drive failing, lost my data, including my RPG Maker programs and projects. I'm not really bothered by it because they can be redone, and just like writing, the first draft is always the rough draft anyway.

Thanks for the comments and support. I've just re-downloaded RMVX, so will be making full use of it again. And will answer your question, Steve, soon. Just please bear with me.

Tuesday, May 19, 2009

Time/Date Formats

In yesterday's entry, System Time/Date Script, I showed how to use the built-in Time function to display the current (system) time and date.

To change format, the strftime method has a number of options available.

Its basic format is

strftime(format)


where format is the format string to be used, which may be specified with the following:

  • %A - Full day of the week (Sunday, Monday, etc.)
  • %a - Abbreviated day of the week (Sun, Mon, etc.)
  • %B - Full month (January, February, etc.)
  • %b - Abbreviated month (Jan, Feb, etc.)
  • %c - Current Date and Time (system clock format)
  • %d - Day of the month (01-31)
  • %H - Time of day in 24-hour format (00-23)
  • %I - Time of day in 12-hour format (01-12)
  • %j - Day of the year (001-366)
  • %M - Minutes (00-59)
  • %m Numerical month of the year (01-12)
  • %p - Displays AM or PM after the time
  • %S - The number of seconds (00-60, 60 being a "leap second")
  • %U - Week of the year, the first week starting with the first Sunday (00-53)
  • %W - Week of the year, the first week starting with the first Monday (00-53)
  • %w - Day of the week (0-6, 0 denoting Sunday)
  • %X - Displays the Time
  • %x - Displays the Date
  • %Y - Displays the Year as a 4-digit number (2009)
  • %y - Displays the Year as a 2-digit number (00-99)
  • %Z - Displays the default (system) Time Zone
  • %% - Displays a % character

Note that this is case sensitive.


So, as an example, to display the full date, including day, month and year, strftime would be set to:

strftime = ("%A, %d %B, %Y")


The result would be
Tuesday, 20 May, 2009
.

System Time/Date Script

RMXP and RMVX has a built-in Time function that allows the display of the current date and time (based on the system clock). I found this by accident while sifting through the Help file - actually while searching for Bitmap and Sprite management - and after some experimentation discovered how to place it in windows.

To use it, there are two functions to be aware of:

Time.now

This reads the current time and date from the system clock.

strftime("%I:%M:%S %p")

This converts the time into a string, using the time of day (in 12-hour format), minutes and seconds, as well as showing AM/PM.

So to add the time and date, we can add the following:

t = Time.now
time = t.strftime("%I:%M:%S %p")
date = t.strftime("%a, %d %b, %Y")

What this will do is store the time/date stamp format into variables and convert them to strings so that they can then be "drawn" in a window.

In RMXP, the following script can be used to replace the default. In RMVX, create a new script called Window_PlayTime:
#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
# This window displays play time on the menu screen.
#==============================================================================

class Window_PlayTime < 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
self.contents.font.size = 16
t = Time.now
time = t.strftime("%I:%M:%S %p")
date = t.strftime("%a, %d %b, %Y")
self.contents.font.color = normal_color
self.contents.draw_text(0, -2, 140, WLH, date, 1)
self.contents.draw_text(0, 14, 140, WLH, time, 1)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end


RMXP will display the replacement time/date in the default "Play Time" window on the menu status.

To make this work in RMVX, add the following to Scene_Menu:

In the start definition routine, add

@window_playtime = Window_PlayTime.new
@window_playtime.x = X
@window_playtime.y = Y

where X and Y are the x- and y-coordinates for the window placement.

Add the following to the terminate definition routine:

@window_playtime.dispose

This is to ensure that the window doesn't stay onscreen when the status menu has been exited.

And finally, add the following to the update definition routine:

@window_playtime.update

This is to ensure that the time refreshes every second while on the status menu.


The resultant "Play Time" window should now contain the current time and date, thus:

Tue, 19 May, 2009
12:33:22 PM


And that's it, but the strftime element does have a number of different format options, which I'll detail in the next entry.