This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sprite_Character | |
alias :th_y_distance_update_other :update_other | |
def update_other | |
th_y_distance_update_other | |
update_distance_zoom | |
end | |
def update_distance_zoom | |
ratio = ((@character.screen_y - 50) / Graphics.height.to_f * 2 ) + 0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple proof-of-concept of how to save and load battle data across battles. | |
# Simply make script calls during battle. | |
class Game_Temp | |
attr_accessor :boss_data | |
end | |
class Data_BattleData | |
attr_accessor :hp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RPG Maker VX Ace example | |
# | |
# The "Battle party" are the party members that will participate in battle. | |
# You can use conditional branches to check who is in the battle party | |
# eg: Check if actor 1 is in the battle party | |
$game_party.battle_members.include?($game_actors[1]) | |
# eg: Check if actor 5 is not in the battle party | |
!$game_party.battle_members.include?($game_actors[5]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This snippet will hide the window border and title for your RPG Maker VXAce game | |
# Simply insert it somewhere above Main in your project. | |
# Taken from Zeus81 Fullscreen++ | |
# http://forums.rpgmakerweb.com/index.php?/topic/14081-fullscreen/ | |
CreateWindowEx = Win32API.new('user32', 'CreateWindowEx', 'ippiiiiiiiii', 'i') | |
FindWindow = Win32API.new('user32', 'FindWindow', 'pp', 'i') | |
SetWindowLong = Win32API.new('user32' , 'SetWindowLong' , 'iii' , 'i') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an add-on to Zeus81's fullscreen++ script for RPG Maker | |
# http://forums.rpgmakerweb.com/index.php?/topic/14081-fullscreen/ | |
# You can basically hide/show the title and border of the game window | |
# by pressing F8 | |
# Doesn't work with F6 though. | |
class << Graphics | |
@border_hidden = false | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RPG Maker VX Ace by default shows the cumulative EXP up to now. | |
# For example, Level 1 to Level 2 requires 50 EXP and Level 2 to Level 3 requires 50 EXP. | |
# If you just reached level 2, Ace would say you currently have 50 EXP and need 50 EXP to level. | |
# This snippet makes it so that the current exp displayed is relative to the current level, and not level 1. | |
# So now it would say you have 0 EXP and need 50 EXP. | |
class Window_Status < Window_Selectable | |
def draw_exp_info(x, y) | |
s1 = @actor.max_level? ? "-------" : @actor.exp - @actor.exp_for_level(@actor.level) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Demonstration of how to run a common event when you encounter an enemy | |
class Scene_Map < Scene_Base | |
alias :th_encounter_common_event_start :start | |
def start | |
th_encounter_common_event_start | |
@battle_pending = false | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just storing this somewhere | |
module TH | |
Colors = { | |
0 => [ [175, 105, 105], [183, 95, 95]], | |
1 => [ [175, 140, 106], [183,139,95]], | |
2 => [ [175, 174, 106], [183, 182, 95]], | |
3 => [ [141, 175, 106], [140, 183, 95]], | |
4 => [ [106, 175, 106], [95, 183, 95]], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Scene_Map | |
def pre_battle_scene | |
Graphics.update | |
Graphics.freeze | |
@spriteset.dispose_characters | |
BattleManager.save_bgm_and_bgs | |
BattleManager.play_battle_bgm | |
#~ Sound.play_battle_start | |
end |
OlderNewer