QuoteBefore we contuniue, read a tutorial on Alias;
Game_Map - setup
Game_Map - update
Game_Character - update
Game_Event - refresh
Game_Player - update
Sprite_Battler - update
Spriteset_Map - initialize
Spriteset_Map - update
Scene_Tile - main
Scene_Map - main
Scene_Map - update
Scene_Save - write_save_data
Scene_Load - read_save_data
Scene_Menu - initialize
Scene_Menu - main
Scene_Menu - update & command input
Scene_Battle - main
Scene_Battle - update
Scene_Battle - update_phase3_basic_command
Scene_Battle - make_basic_action_result
#--------------------------------------------------------------------------
def main
# Make command window
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
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 224
# Make steps window
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
Do you see that big mess??
def main
main_draw
# Main loop
loop [do
main_loop
break if main_scenechange?
end
main_dispose
main_tiletrigger
end
Quote from: Ruhani777 on March 19, 2007, 02:35:25 AM
where do you get sdks?
Quote from: Mr.Mo on September 07, 2006, 11:47:31 PMHuh? I know the SDK, but I haven't noticed anything that would increase RMXP's performance. Care to explain what you mean by that?
- SDK Script Overwrite - It rewrites some scripts in the database to increase compability and performance, if used the right way.
#==============================================================================
** 4.0 - Engine Updates
The following is a list of classes and methods that have been updated by the
SDK to help improve compatibility:
***************************** Found in Part I ******************************
* Created Methods :
- Bitmap#disable_dispose?
- RPG::Event::Page::Condition#conditions_met?
* Bug & Bug Prevention Fixes :
- Window_Base#dispose
- Window_SaveFile#initialize
- Interpreter#command_355
* Deprecated Methods :
- SDK : print -> return_log
- SDK : state -> enabled?
***************************** Found in Part II *****************************
* Split Methods :
- Game_Map#setup
- setup_map_id(map_id) # Setup Map ID
- setup_load # Setup Map Data
- setup_tileset # Setup Tileset Data
- setup_display # Setup Display
- setup_refresh # Setup Refresh
- setup_events # Setup Events
- setup_common_events # Setup Common Events
- setup_fog # Setup Fog
- setup_scroll # Setup Scroll
- Game_Map#update
- update_refresh # Update Refresh Flag
- update_scrolling # Update Scrolling
- update_events # Update Events
- update_common_events # Update Common Events
- update_fog_scroll # Update Fog Scrolling
- update_fog_color # Update Fog Color
- update_fog # Update Fog
- Game_Character#update
- update_movement_type # Update Movement Type
- update_animation # Update Animation Counters
- update_wait? # Update Wait Test
- update_force? # Update Force Route Test
- update_startlock? # Update Start/Lock Test
- update_movement # Update Movement
- Game_Event#refresh
- refresh_new_page # Refresh New Page
- refresh_page_change? # Refresh Page Change Test
- refresh_page_reset? # Refresh Page Reset Test
- refresh_set_page # Refresh Set page variables
- refresh_check_process # Check parallel processing
- Game_Player#update
- update_player_movement # Update Player Movement
- update_plyrmvttest? # Update Can Move Test
- update_scroll_down # Update Scroll Down
- update_scroll_left # Update Scroll Left
- update_scroll_right # Update Scroll Right
- update_scroll_up # Update Scroll Up
- update_nonmoving # Update Non-Moving
- Sprite_Battler#update
- redraw_battler # Redraw Battler
- loop_anim # Loop Animaiton
- adjust_actor_opacity # Adjust Actor Opacity
- adjust_blink # Adjust Blink
- adjust_visibility # Adjust Visibility
- sprite_escape # Sprite Escape
- sprite_white_flash # Sprite White Flash
- sprite_animation # Sprite Animation
- sprite_damage # Sprite Damage
- sprite_collapse # Sprite Collapse
- Spriteset_Map#initialize
- init_viewports # Initialize Viewports
- init_tilemap # Initialize Tilemap
- init_panorama # Initialize Panorama
- init_fog # Initialize Fog
- init_characters # Initialize Characters
- init_player # Initialize Player
- init_weather # Initialize Weather
- init_pictures # Initialize Pictures
- init_timer # Initialize Timer
- Spriteset_Map#update
- update_panorama # Update Panorama
- update_fog # Update Fog
- update_tilemap # Update Tilemap
- update_panorama_plane # Update Panorama Plane
- update_fog_plane # Update Fog Plane
- update_character_sprites # Update Character Sprites
- update_weather # Update Weather
- update_picture_sprites # Update Picture Sprites
- update_timer # Update Timer Sprite
- update_viewports # Update Viewports
- Spriteset_Battle#initialize
- init_viewport # Initialize Viewports
- init_battleback # Initialize Battleback
- init_enemysprites # Initialize Enemy Sprites
- init_actorsprites # Initialize Actor Sprites
- init_picturesprites # Initialize Picture Sprites
- init_weather # Initialize Weather
- init_timer # Initialize Timer
- Spriteset_Battle#update
- update_battleback # Update Battleback
- update_battlers # Update Actor Battlers
- update_sprites # Update Sprites
- update_weather # Update Weather
- update_timer # Update Timer
- update_viewports # Update Viewports
* Deprecated Methods :
- Game_Map : update_fog_colour -> update_fog_color
- Game_Character : update_wait -> update_wait?
- Game_Character : update_event_execution? -> update_startlock?
**************************** Found in Part III *****************************
All scenes are now child classes of SDK::Scene_Base. You still must alias
every Scene_Base method not defined below.
* Created Methods :
- Window_EquipItem#disable_update?
* Split Methods :
- Scene_Title#main
- main_battle_test? # Main Battle Test Mode Test
- main_variable # Main Variable Initialization
- main_database # Main Database Initialization
- main_test_continue # Test For Saved Files
- main_sprite # Main Sprite Initialization
- main_window # Main Window Initialization
- main_audio # Main Audio Initialization
- Scene_Title#command_new_game
- commandnewgame_audio # Audio Control
- commandnewgame_gamedata # Game Data Setup
- commandnewgame_partysetup # Party Setup
- commandnewgame_mapsetup # Map Setup
- commandnewgame_sceneswitch # Scene Switch
- Scene_Title#battle_test
- battletest_database # Setup Battletest Database
- commandnewgame_gamedata # Game Data Setup
- battletest_setup # Battletest Setup
- battletest_sceneswitch # Scene Switch
- Scene_Map#main
- main_spriteset # Main Spriteset Initialization
- main_window # Main Window Initialization
- main_end # Main End
- Scene_Map#update
- update_systems # Update Systems
- update_transferplayer? # Break if Transfer Player
- update_transition? # Break if Transition
- update_game_over? # Exit If Gameover
- update_to_title? # Exit if Title
- update_message? # Exit If Message
- update_transition # Update Transition
- update_encounter # Update Encounter
- update_call_menu # Update Menu Call
- update_call_debug # Update Debug Call
- update_calling # Update Calls
- Scene_Menu#main
- main_window # Main Window Initialization
- main_command_window # Main Command Window Setup
- Scene_Item#main
- main_window # Main Window Initialization
- Scene_Skill#main
- main_variable # Main Variable Initialization
- main_window # Main Window Initialization
- Scene_Equip#main
- main_variable # Main Variable Initialization
- main_window # Main Window Initialization
- Scene_Status#main
- main_variable # Main Variable Initialization
- main_window # Main Window Initialization
- Scene_File#main
- main_variable # Main Variable Initialization
- main_window # Main Window Initialization
- Scene_Save#write_save_data
- write_characters(file) # Write Characters
- write_frame(file) # Write Frame Count
- write_setup(file) # Write Setup Data
- write_data(file) # Write Game Data
- Scene_Load#read_save_data
- read_characters(file) # Read Characters
- read_frame(file) # Read Frame Count
- read_data(file) # Read Game Data
- read_edit # Read Edit
- read_refresh # Read Refresh
- Scene_End#main
- main_window # Main Window Initialization
- main_end # Main End
- Scene_Battle#main
- main_variable # Main Variable Initialization
- main_battledata # Setup Battle Temp Data & Interpreter
- main_troopdata # Setup Troop Data
- main_spriteset # Main Spriteset Initialization
- main_window # Main Window Initialization
- main_transition # Main Transition Initialization
- main_end # Main End
- Scene_Battle#update
- update_interpreter # Update Battle Interpreter
- update_systems # Update Screen & Timer
- update_transition # Update Transition
- update_message? # Update Message Test
- update_sseffect? # Update Spriteset Effect Test
- update_gameover? # Update Gameover Test
- update_title? # Update Title Test
- update_abort? # Update Abort Test
- update_wait? # Update Wait Test
- update_forcing? # Update Forcing Test
- update_battlephase # Update Battle Phase
- Scene_Shop#main
- main_window # Main Window Initialization
- Scene_Name#main
- main_variable # Main Variable Initialization
- main_window # Main Window Initialization
- Scene_Gameover#main
- main_sprite # Main Sprite Initialization
- main_audio # Main Audio Initialization
- main_transition # Main Transition Initialization
- main_end # Main End
- Scene_Debug#main
- main_window # Main Window Initialization
* Deprecated Methods :
- Scene_Title : main_background -> main_sprite
- Scene_Title : main_scenechange? -> main_break?
- Scene_Map : main_draw -> main_spriteset ; main_window
- Scene_Map : main_scenechange? -> main_break?
- Scene_Map : main_tiletrigger -> main_end
- Scene_Map : update_graphics -> nil
- Scene_Map : update_scene -> update_calling
- Scene_Title : main_windows -> main_window
- Scene_Title : main_scenechange? -> main_break?
- Scene_Battle : main_temp -> main_battledata
- Scene_Battle : main_troop -> main_troopdata
- Scene_Battle : main_command -> main_windows
- Scene_Battle : main_windows -> main_window
- Scene_Battle : main_scenechange? -> main_break?
***************************** Found in Part IV *****************************
* New Classes :
- Window_HorizCommand
* Created Methods :
- Window_Command#commands
- Window_Command#commands=
* Altered Classes :
- Window_ShopCommand # Child-class of Window_HorizCommand
- Window_PartyCommand # Child-class of Window_HorizCommand
* Rewrote Methods (Methods Created In Part III) :
- Scene_Title#main_window # Assigns Commands with SDK Commands
- Scene_Menu#main_command_window # Assigns Commands with SDK Commands
- Scene_End#main_window # Assigns Commands with SDK Commands
- Scene_Battle#main_window # Assigns Commands with SDK Commands
* Command Methods :
- Scene_Title#update
- main_command_input # Command Branch
- disabled_main_command? # Test For Disabled Command
- Scene_Menu#update_command
- disabled_main_command? # Test For Disabled Command
- main_command_input # Command Branch
- command_item # Item Command
- command_skill # Skill Command
- command_equip # Equip Command
- command_status # Status Command
- command_save # Save Command
- command_endgame # End Game Command
- active_status_window # Activate Status Method
- Scene_Menu#update_status
- disabled_sub_command? # Test For Disabled Command
- sub_command_input # Command Branch
- command_skill # Skill Command
- command_equip # Equip Command
- command_status # Status Command
- Scene_End#update
- disabled_main_command? # Test For Disabled Command
- main_command_input # Branch Command
- command_to_title # To Title Command
- command_shutdown # Shutdown Command
- command_cancel # Cancel Command
- Scene_Battle#update_phase2
- phase2_command_disabled? # Test For Disabled Command
- phase2_command_input # Command Branch
- phase2_command_fight # Fight Command
- phase2_command_escape # Escape Command
- Scene_Battle#update_phase3_basic_command
- phase3_basic_command_disabled? # Test for Disabled Command
- phase3_basic_command_input # Command Branch
- phase3_command_attack # Attack Command
- phase3_command_skill # Skill Command
- phase3_command_guard # Guard Command
- phase3_command_item # Item Command
- Scene_Shop#update_command
- disabled_main_command? # Test for Disabled Command
- main_command_input # Command Branch
- command_main_buy # Command Buy
- command_main_sell # Command Sell
- command_exit # Command Exit
- Scene_Shop#update_number
- number_cancel_command_input # Command Branch
- number_command_input # Command Branch
- command_number_buy # Command Buy
- command_number_sell # Command Sell
* Deprecated Methods :
- Scene_Menu : buzzer_check -> disabled_main_command?
- Scene_Menu : update_command_check -> main_command_input
- Scene_Menu : update_status_check -> sub_command_input
- Scene_Menu : command_start_skill -> command_skill
- Scene_Menu : command_start_equip -> command_equip
- Scene_Menu : command_start_status -> command_status
- Scene_Battle : check_commands -> phase3_basic_command_input
- Scene_Battle : update_phase3_command_attack -> phase3_command_attack
- Scene_Battle : update_phase3_command_skill -> phase3_command_skill
- Scene_Battle : update_phase3_command_guard -> phase3_command_guard
- Scene_Battle : update_phase3_command_item -> phase3_command_item
* Removed Methods :
- Scene_Menu#commands_init -> See SDK::Scene_Commands::Scene_Menu
- Scene_Battle#commands_init -> See SDK::Scene_Commands::Scene_Battle
- Scene_Battle#make_basic_action_result_attack
- Scene_Battle#make_basic_action_result_guard
- Scene_Battle#make_basic_action_result_escape
- Scene_Battle#make_basic_action_result_nothing
[/spoiler]
QuoteThe following is a list of classes and methods that have been updated by the
SDK to help improve compatibility:
- Spriteset_Map#initialize
- init_viewports # Initialize Viewports
- init_tilemap # Initialize Tilemap
- init_panorama # Initialize Panorama
- init_fog # Initialize Fog
- init_characters # Initialize Characters
- init_player # Initialize Player
- init_weather # Initialize Weather
- init_pictures # Initialize Pictures
- init_timer # Initialize Timer - Spriteset_Map#update
- update_panorama # Update Panorama
- update_fog # Update Fog
- update_tilemap # Update Tilemap
- update_panorama_plane # Update Panorama Plane
- update_fog_plane # Update Fog Plane
- update_character_sprites # Update Character Sprites
- update_weather # Update Weather
- update_picture_sprites # Update Picture Sprites
- update_timer # Update Timer Sprite
- update_viewports # Update Viewports
module SDK
@list = {}
@enabled = {}
#--------------------------------------------------------------------------
# * Logs a custom script
#--------------------------------------------------------------------------
def self.log(script, name, ver, date)
@list[script] = [name,ver,date]
@enabled[script] = true
end
#--------------------------------------------------------------------------
# * Returns a list of custom scripts
#--------------------------------------------------------------------------
def self.print(script = '')
if script == ''
return @list
else
return @list[script]
end
end
#--------------------------------------------------------------------------
# * Writes a list of the custom scripts to a file
#--------------------------------------------------------------------------
def self.write
file = File.open('Scripts List.txt', 'wb')
for key in @list.keys
file.write("#{@list[key][0]} : #{key} Version #{@list[key][1]}\n")
end
file.close
end
#--------------------------------------------------------------------------
# * Returns the state of the passed script
#--------------------------------------------------------------------------
def self.state(script)
return @enabled[script]
end
#--------------------------------------------------------------------------
# * Enables the passed script
#--------------------------------------------------------------------------
def self.enable(script)
@enabled[script] = true
end
#--------------------------------------------------------------------------
# * Disables the passed script
#--------------------------------------------------------------------------
def self.disable(script)
@enabled[script] = false
end
#--------------------------------------------------------------------------
# * Evals text from an input source
#--------------------------------------------------------------------------
def self.text_box_input(element, index)
return if index == 0
commands = element.split('|')
eval(commands[index])
end
#--------------------------------------------------------------------------
# * Returns a list of parameters from an event's comments
#--------------------------------------------------------------------------
def self.event_comment_input(*args)
parameters = []
list = *args[0].list
elements = *args[1]
trigger = *args[2]
return nil if list == nil
return nil unless list.is_a?(Array)
for item in list
next if item.code != 108
if item.parameters[0] == trigger
start = list.index(item) + 1
finish = start + elements
for id in start...finish
next if !list[id]
parameters.push(list[id].parameters[0])
end
return parameters
end
end
return nil
end
end
Quote from: Upcoming tute for intermediate scriptersInteresting side notes: SDK (Standard Development Kit) is an ironic name, because it actually doesn't fulfill the definition of "Standard". There is no such thing as "standard dependent". The SDK has only caused more incompatibility issues so far by separating SDK and non-SDK scripts, no matter if they were aliased (for more about aliasing see 2.1.) or not. Even today there is no standard defined for programming. Setting standards should not be attempted by people who are not professionals in this area and who do not have the authority to do so.