Revisiting An Old Friend: RMXP

Since getting RMXP again (through the earlier Humble Bundle deal), I’ve been experimenting with RGSS again. Surprising how much I forgot. Anyway, as a side-project to the Q-Engine and The Gladiator Project, I’ve been working on some "Tweaks and Add-Ons" for RMXP, including an alternative Status Screen layout. These are mostly simple tweaks at the moment, but more add-ons are planned for the future. I’m also thinking about writing an Extra Stats script for RMXP, but not sure yet. It’ll be updated on RPG Maker Times & Companion as soon as it’s finished, along with the relevant details.

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…

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,…

Adding Window Text Effects

Using the built-in RGSS/2 script, we can add some cool effects for enhancing or beautifying text, if used properly. These include a shadow effect and outlined text. Both of these scripts should work in both RMXP and RMVX, although I think there’s an added font feature in RMVX for creating shadow effects without script.) Shadow Effect Add the following to Window_Base: #—————————————————# * Draw Shadow# x : draw spot x-coordinate# y : draw spot y-coordinate# w : width# h : height# text : text to display#—————————————————-def draw_shadow(x, y, w, h, text) # Display shadow/shadow color self.contents.font.color = Color.new(200, 200, 200, 205) self.contents.draw_text(x + 4, y + 4, w, h, text,…

Simple Font Draw

As the title suggests, this is a simple routine for redefining fonts, such as name, size, bold, italic, etc. Although this was written in RMXP, it should also work in RMVX and RMVXA. The default format for manipulating fonts in windows is: self.contents.font.name = "font name" self.contents.font.size = 22 and so on. The reason that self.contents is used first is because this refers to the bitmap (Bitmap) used for the window’s contents. Whenever fonts need to be "drawn" into a window, the font and draw methods will be called from Bitmap and written into the window contents area.