*sigh* That's the same one I kept finding. I guess they could not do Led Zeppelin's song justice. Either that or I have higher standards because it's Led Zeppelin.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Spent more time working on my menu-related stuff, but most of it is either systematic gibberish or an alteration to certain draw_<things> functions. Actually, alot of the draw_ methods are being moved to the Bitmap class so they can be used independently between windows and sprites. Yadda yadda, generic information, here's a screenshot :D
Content Hidden
I wanted to use Seph's scroll states so bad so I altered it to fit my menu and realized I don't like it, so now I'm doing a new script to display states. Simply, it is a sprite that will display the state icon and name, and cycle through each actor's state every X frames. There is a mock example of it in that screenshot up there, and here is the WIP code for it (yes, WIP, not finished, don't use yet lol.)
Trickster's animated gradient bars has been slightly reformulated and cleaned up, I even drew new bars, backgrounds and borders. I'm pretty sure that its 'final' at this point, I'll have to get around to posting a topic and a demo for it sometime tomorrow.
I guess while we're at it, I'm starting an actor inventory system, and yes that code is still very WIP too. I guess I am going to go with some form of my limited carry / inventory cache concept after all! I still have to plan out the user interface and get working on that because I have no idea what the new "Scene_Item" is going to be like yet.
class << Input
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :convert_input_trigger?, :trigger?
alias_method :convert_input_repeat?, :repeat?
alias_method :convert_input_press?, :press?
#-----------------------------------------------------------------------------
# * Input.trigger?(input)
#-----------------------------------------------------------------------------
def trigger?(input)
# The usual, auto-convert if needed
convert_input_trigger?(convert(input))
end
#-----------------------------------------------------------------------------
# * Input.repeat?(input)
#-----------------------------------------------------------------------------
def repeat?(input)
# The usual, auto-convert if needed
convert_input_repeat?(convert(input))
end
#-----------------------------------------------------------------------------
# * Input.press?(input)
#-----------------------------------------------------------------------------
def press?(input)
# The usual, auto-convert if needed
convert_input_press?(convert(input))
end
#-----------------------------------------------------------------------------
# * Input.convert(input)
#-----------------------------------------------------------------------------
def convert(n)
# Auto convert if symbol
(n.is_a?(Symbol) ? n.to_input : n)
end
end
#===============================================================================
# ** Symbol
#===============================================================================
class Symbol
#-----------------------------------------------------------------------------
# * To Input
#-----------------------------------------------------------------------------
def to_input
# Return nil unless this symbol is in the input list
return nil unless Input::Convert.includes?(self)
# Convert to input object
Input.const_get(self)
end
end
Input : Combo
This is very early WIP, I already have plans on re-crafting this majorly tomorrow. Anyways, I needed a key sequencing script. We'll use Ryu's Hyduken as an example of what this does,,,.
class InputCombo
#-----------------------------------------------------------------------------
# * Public Instance Variables
#-----------------------------------------------------------------------------
attr_accessor :first_key # Matches first key before recording input
attr_accessor :auto_reset # Object is automatically reset when successful
#-----------------------------------------------------------------------------
# * Object Initialization
#-----------------------------------------------------------------------------
def initialize(time, *keys)
@first_key = true
@auto_reset = true
# Set goal time and keys
@set_time = time
@set_keys = keys
# Reset player's time/keys
reset
end
#-----------------------------------------------------------------------------
# * Reset
#-----------------------------------------------------------------------------
def reset
# Create a new array for keys if one doesn't exist
@keys ||= Array.new
# Set time to 0 and empty keys
@time = 0
@keys.clear
end
#-----------------------------------------------------------------------------
# * Time Limit Reached?
#-----------------------------------------------------------------------------
def time_limit_reached?
# False if set time is less than one frame
return false if @set_time < 1
# True if player's time equals or exceeds time limit
@time >= @set_time
end
#-----------------------------------------------------------------------------
# * Update
#-----------------------------------------------------------------------------
def update
# End method if keys matched
return if self.true?
# End method if time limit reached
return if self.time_limit_reached?
# Add one to player's time unless player hasn't matched a key yet
@time += 1 unless @first_key && @keys.empty?
# Iterate through input
Input::Convert.each do |input|
# If this input key was triggered
if Input.trigger?(input)
# If first key flag and player hasn't hit any correct keys
if @first_key && @keys.empty?
# Break iteration unless key matches first in set
break unless input == @set_keys[0]
end
# Add key to player's key list
@keys << input
# Break iteration
break
end
end
end
#-----------------------------------------------------------------------------
# * True?
#-----------------------------------------------------------------------------
def true?
# True if keys matched
@keys == @set_keys
end
end
class Scene_Map
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :testcombo_scnmap_main, :main
alias_method :testcombo_scnmap_update, :update
#-----------------------------------------------------------------------------
# * Main
#-----------------------------------------------------------------------------
def main
# Press C three times within approx 10 seconds (400 frames)
@combo = InputCombo.new(400, :L, :R, :L, :R)
# The usual
testcombo_scnmap_main
end
#-----------------------------------------------------------------------------
# * Update
#-----------------------------------------------------------------------------
def update
# Update combo object
@combo.update unless Object.const_defined?(:SDK)
# If combo sequence entered
if @combo.true?
# Print message
p 'Button combination L, R, L, R successfully entered!'
# Reset combo
@combo.reset
end
# The usual
testcombo_scnmap_update
end
end
Input : Menu
This was more or less an exercise to see if I could alias the functionality of changing an input key without the simple ONE letter overwrite on Scene_Map line 123 haha. Hey, I haven't scripted for awhile, so I needed the challenge.
class Game_Temp
#-----------------------------------------------------------------------------
# * Public Instance Variables
#-----------------------------------------------------------------------------
attr_accessor :input2menu # Flag for menu button
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :input2menu_gmtemp_initialize, :initialize
#-----------------------------------------------------------------------------
# * Object Initialization
#-----------------------------------------------------------------------------
def initialize(*args)
# The usual
input2menu_gmtemp_initialize(*args)
# Default to false
@input2menu = false
end
end
class Scene_Map
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :input2menu_scnmap_update, :update
#-----------------------------------------------------------------------------
# * Frame Update : Menu Call
#-----------------------------------------------------------------------------
def update
# Set flag for custom menu button
$game_temp.input2menu = true
# The usual
input2menu_scnmap_update
# Disable flag for custom menu button
$game_temp.input2menu = false
end
end
Input : Full Screen
F7 for one button fullscreen.
Code:
#===============================================================================
# ** Input : Full Screen
#===============================================================================
class << Input
#-----------------------------------------------------------------------------
# * Class Variable Declaration
#-----------------------------------------------------------------------------
@@fullscreen = Input::F7
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :input2fullscreen_input_update, :update
#-----------------------------------------------------------------------------
# * Input.update
#-----------------------------------------------------------------------------
def update(*args)
# The usual
input2fullscreen_input_update(*args)
# If fullscreen button is triggered
if self.trigger?(@@fullscreen)
# Set keyboard event (if nil)
@_keybd_event ||= Win32API.new('user32', 'keybd_event', 'LLLL', '')
# Call full screen inputs
@_keybd_event.call(18,0,0,0)
@_keybd_event.call(13,0,0,0)
@_keybd_event.call(13,0,2,0)
@_keybd_event.call(18,0,2,0)
# Reset frames to prevent lag
Graphics.frame_reset
# End method
return
end
end
end
Input : Shutdown
F8 for one button shutdown. This script will be enhanced to do a quick-save when you shut the game down, and re-load the saved file immediately in the next game's session.
class << Input
#-----------------------------------------------------------------------------
# * Class Variable Declaration
#-----------------------------------------------------------------------------
@@shutdown = Input::F8
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :input2shutdown_input_update, :update
#-----------------------------------------------------------------------------
# * Update
#-----------------------------------------------------------------------------
def update(*args)
# The usual
input2shutdown_input_update(*args)
# If shutdown key is currently being pressed
if self.press?(@@shutdown)
# Call the shutdown method
Scene_End.new.command_shutdown
# End method
return
end
end
end
This is a milestone to me haha! I used to only be able to script while drunk, I quit drinking back in 2009 and haven't been able to script since... until tonight! I feel empowered, like I can finally take all my different talents and invoke them to do my deeds :D
I've got a few new tracks. I still suck at 'generic RPG town' themes, but at the same time I can somehow pull off 'epic shit going down' themes like they're nothing. Anyways, onto the music!
Time To Get Serious
This is a track for some sort of invasion scene. I actually made this one awhile back, but I'm posting it because its the prelude to...
Official Business
Just when you thought the invasion mission was over, its time to fight some sort of mystical bad ass!
Headquarters
This is the theme for the player's headquarters. You can discuss missions in the war room, as well as converse with your entourage and decide who is coming with you.
Northern Cities
A generic northern city theme. This track was supposed to be more happy sounding, but I hear a little tension towards the end that tells me maybe the folks up north don't like us. Hurry on before you get snowballed to death!
Eastern Affairs
The theme for our stereotypically oriental friends in the east, I guess. Again, I'm not sure why my town themes sound like people hate us, but for some reason they just do lol. I know, this track is short, but again... its just a loop, so meh.
In other news, I need to get off the composing and get to game making before I wind up with hundreds of tracks and no game! x: