RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Using the SDK - In-Depth

0 Members and 2 Guests are viewing this topic.

**
Rep:
Level 88
Some people get confused of the SDK. Its not some monster thats trying to eat your scripts, no, its more like an angel that makes it esier for you to make compatible scripts.

The SDK Module also has some usefull things like Auto-Writing credits, event reading and turning off/on scripts.

In this tutorial I will try to explain how to use the SDK, how converte scripts and how to custimize the SDK to your needs. It won't be easy for me to explain since SDK is pretty much self-explonatory so cirticsm is ok and expected ;).

What is SDK?

SDK can be broken in to two parts;
  • SDK Module - Makes some diffucult commands easy to use.
  • SDK Script Overwrite - It rewrites some scripts in the database to increase compability and performance, if used the right way.

Mostly people have compatiblity issues with the SDK script overwrite. Why?
Like I said before it overwrites some commands in the script database.
Here is a list of commands that are rewritten in the SDK;

Quote
   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
Before we contuniue, read a tutorial on Alias;
http://www.hbgames.org/forums/showthread.php?t=5698

Thats what the SDK is for ;)
Using the SDK
When you are making a script, you often need to refer to RMXPs default classes. The most refered default classes are;

Game_Player
Game_Character
Scene_Map

The most overwritten classes are;

Scene_Battle
Scene_Map
Game_Character
Scene_Menu

Every time you overwrite a class, you decrease the chance of compability with other scripts, not only the SDK ;).

Thats where SDK comes in to help. SDK Script Overwrite part of the SKD breaks methods(functions or defs) in to sections and parts. Lets observe Scene_Map for a sec;

This is method main in Scene_Map(non-sdk);
Code: [Select]
#--------------------------------------------------------------------------
  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??

Now this is the SDK version;
Code: [Select]
  def main
    main_draw   
    # Main loop
    loop [do
      main_loop
      break if main_scenechange?
    end
    main_dispose
    main_tiletrigger
  end

Now do you see the difference? The SDK just broke it into smaller parts, this increases compability. Because now you can alias esier. No need to overwrite anything.

Lets say you want to make a hud;

Firs you look at what you need to edit.

A hud is made of a cauple of windows and it appears on the map. So we need to use Scene_Map.

Usually you would need to edit Scene_Map directly. But with the SDK you don't need to. Lets say we already have the window for the hud called @hud_window.

Usually you want to do 3 things with a window;

Call
Update
Dispose

In the SDK, go to Scene_Map > def main, you see cauple of method calls;
  • main_draw - Used to call the windows.
  • main_dispose  - Used to dipose windows.

Now, still in the SDK, go to Scene_Map > def update, there is one method we can use there;
  • update_graphics - updates the windows and sprites

If you know how to alias then you know whats coming next. Now all you need to do is aliase with those controls. No need to over write anything.

In this lesson we learned to think of what need before we code, and how SDK can help us increase compability and why and how it does that.

How to Converte Scripts;
To converte scripts we use the same method as before. Converting long scripts can be a pain, so that why you need notepad to help you make a list.
What list you ask?

As we said before the SDK replaces most methods and thats why it incompatible with other scripts, because scripts are usuall poor coded(no offense to anyone).

In the script you are looking to converte, see if it refers to any method or classes that is in the SDK and add it to your list.

After that go to the SDK and see what methods you can use to improve compability and convert the script.

For example, we are trying to converte an Hud script;

Look at the hud script, and lets say it is overwriting Scene_Map > Main. Now go to the other Default Scene_Map and compare the 2. By comparing you should be able to tell whats new and whats not.

Cut everything new in the  method and paste it to an empty script. Now we look at the code. What does it have?(in this case, same as the Hud from the previous tutorial)

It calls the window and it disposes it.

What are the methods in the SDK you can aliase with to do this?
Thats right;
  • main_draw
  • main_dispose

Now just aliase with them in the script you are converting. Its that simple.

I hope that helped.

Thats is. I hope that helped. Can't say i didn't try ;)

*
Rep:
Level 89
2012 Best RPG Maker User (Story)Project of the Month winner for May 2007Project of the Month winner for July 20082011 Best RPG Maker User (Story)2011 Project of the Year2011 Best RPG Maker User (Creativity)
Nice, I've always wanted to know some of those things you cleared up.

***
Rep:
Level 87
¥¥Death is Peace, and it is your friend¥¥
where do you get sdks?


***
Rep:
Level 87
¥¥Death is Peace, and it is your friend¥¥

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
Yea, No problem.  ;)
Watch out for: HaloOfTheSun

***
Rep:
Level 87
¥¥Death is Peace, and it is your friend¥¥
errrrr one problem, it has several sdk scripts, do it put em as one script, or a whole bunch of scripts  :-[

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
  • SDK Script Overwrite - It rewrites some scripts in the database to increase compability and performance, if used the right way.
Huh? I know the SDK, but I haven't noticed anything that would increase RMXP's performance. Care to explain what you mean by that?

EDIT:

Oh, you should attach a .txt file with the SDK to your post.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
@Blizzard:
SDK 2.1 is the lastest version methinks, anyways:
From: http://www.rmxpu.net/owai/scripts/the_rmxp_sdk_2_doc.txt
Spoiler for:
Code: [Select]
#==============================================================================
  ** 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
 

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Are they fucking serious?! How can using an entire method for one fucking command be an improvement of the performance?!
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Quote
  The following is a list of classes and methods that have been updated by the
  SDK to help improve compatibility:

Didn't read it throughly  ;9

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Only one example:

Code: [Select]
    - 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

Yet another one.

Code: [Select]
    - 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

Those are methods of maybe a few lines if not even only one line of code. Do you SDK guys have ANY idea how a CPU works, how the architecture of a CPU looks like and that this actually does NOT improve performance, but the other way around?!
« Last Edit: March 20, 2007, 01:40:18 PM by Blizzard »
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
I thought that was to ease modifications of the Spriteset_Map...
Anyway I haven't found any stuff that improves performance. (Unless you count human performance :P) Then again, I haven't looked  :-\

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
The SDK does a few nice things with aliasing to improve compatability, and I hear it has some methods built in (never used those).

Personally I don't bother to use it, since I only see one small advantage.

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Wow, so many methods that can serve as tools for scripters. (This is version 1.5, not 2.1)

Code: [Select]
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

I apologize if I am offending anybody by this, but this here is nothing else but the truth:

Quote from: Upcoming tute for intermediate scripters
Interesting 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.
« Last Edit: March 20, 2007, 01:39:12 PM by Blizzard »
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

***
Rep:
Level 86
I hate everyone except the ones I don't hate...
So are we supposed to use it or not??
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!