EDIT: I have upgraded this utility to an RMXP plugin system and uploaded the new code to a Git repository here.
Rxdata Versioning Utility
Version: 1.0.2
By: Raku ([email hidden])
Introduction
Have you ever wanted to work on an RMXP game with a group of friends, but ran into trouble with conflicts when multiple people edit the same rxdata files? If you want to safely and efficiently version the data in your RMXP game, then read on!
I have written a series of Ruby scripts to export all of the RMXP rxdata files (scripts, system data, maps, etc.) into plain-text files which are human-readable and can be easily versioned with a versioning system such as Subversion or Mercurial. I've also written scripts which can read these exported text files and import them back into rxdata files so that RMXP can read them. Now, anytime two people change a map, a script, or any other game data, all of the conflicts can be easily resolved in plain text.
I've been careful to make sure that the RGSS objects are always exported in the same way, so that unnecessary conflicts are avoided. The data files are exported as YAML files and the RGSS scripts are exported as normal Ruby files. This provides other benefits beyond just versioning the data. For example, you could use your favorite text editor outside of RMXP to edit your scripts; just make sure you don't export the scripts before you import your changes. Also, seeing what changed in the YAML files when you do something in RMXP is really helpful in understanding how the game data works!
This is my first script that I've posted here on the forums. Hopefully it's useful! Please give me suggestions or comments if you have any ideas how I could improve this utility.
Features
Downloads
A demo project created using the utility and Subversion (Just run Game.bat, instead of Game.rxproj NOTE: SVN metadata not included in the project).
The RMXP Data Exporter/Importer Utility (follow instructions below to use with your project)
Sample Files
A sample YAML file exported from System.rxdata.
A sample export digest. This file is generated by the RGSS script exporter and is a list of all exported scripts. It is used so they can be re-imported into Scripts.rxdata in the original order later. Notice that the third column (exported Ruby file name) for the second entry is EMPTY. No file is actually exported, since that script in RMXP was actually an empty entry.
A sample config file for the utility.
The default Game.bat importer/exporter runner.
Sample Game.bat output (verbose mode)
Instructions
Requirements
Usage
Automated (recommended)
Manual
What to Version
FAQ
Compatibility
NOTE: I'm currently investigating compatibility with SDK. I'll post an update as soon as I know for sure.
This utility should be compatible with any script modifications, since it runs outside of RMXP and treats scripts as data. However, you may experience problems if you have directly modified any of the classes in the RPG module. In general, one should not directly modify these classes, but in case you have, I've included a Ruby file for RGSS modifications (the default location is /Utility/rmxp/rgss_mod.rb). You will need to add your changes to that file so that they can be automatically picked up by the importer/exporter scripts.
Credits and Thanks
Author's Notes
Terms and Conditions
This utility is free for any use, commercial or otherwise.
Rxdata Versioning Utility
Version: 1.0.2
By: Raku ([email hidden])
Introduction
Have you ever wanted to work on an RMXP game with a group of friends, but ran into trouble with conflicts when multiple people edit the same rxdata files? If you want to safely and efficiently version the data in your RMXP game, then read on!
I have written a series of Ruby scripts to export all of the RMXP rxdata files (scripts, system data, maps, etc.) into plain-text files which are human-readable and can be easily versioned with a versioning system such as Subversion or Mercurial. I've also written scripts which can read these exported text files and import them back into rxdata files so that RMXP can read them. Now, anytime two people change a map, a script, or any other game data, all of the conflicts can be easily resolved in plain text.
I've been careful to make sure that the RGSS objects are always exported in the same way, so that unnecessary conflicts are avoided. The data files are exported as YAML files and the RGSS scripts are exported as normal Ruby files. This provides other benefits beyond just versioning the data. For example, you could use your favorite text editor outside of RMXP to edit your scripts; just make sure you don't export the scripts before you import your changes. Also, seeing what changed in the YAML files when you do something in RMXP is really helpful in understanding how the game data works!
This is my first script that I've posted here on the forums. Hopefully it's useful! Please give me suggestions or comments if you have any ideas how I could improve this utility.
Features
- Exports rxdata files (except Scripts.rxdata) to text files in the YAML data format.
- Exports all scripts contained in Scripts.rxdata to individual Ruby files.
- Imports YAML files back into rxdata files that RMXP can read.
- Imports Ruby scripts previously exported back into a Scripts.rxdata file that RMXP can read.
- Automatic importing/exporting via Game.bat which can import all scripts and run RMXP. When RMXP is closed, all data is exported.
- Utility behavior is configurable via a config.yaml file.
- Only exports rxdata files if they need to be exported (i.e. have been modified since RMXP was opened or haven't been exported yet).
- Only exports scripts if they are not empty (for example, place-holder scripts)
- Cleanup script (called clean.rb) provided to help identify stale scripts (i.e. scripts which are added in RMXP's script editor, exported, and then later removed from the script editor, but still remain in your scripts directory).
Downloads
A demo project created using the utility and Subversion (Just run Game.bat, instead of Game.rxproj NOTE: SVN metadata not included in the project).
The RMXP Data Exporter/Importer Utility (follow instructions below to use with your project)
Sample Files
A sample YAML file exported from System.rxdata.
System.yaml
Show
- ---
- root: !ruby/object:RPG::System
- _: 7829367
- actor_collapse_se: !ruby/object:RPG::AudioFile
- name: 011-System11
- pitch: 100
- volume: 80
- battle_bgm: !ruby/object:RPG::AudioFile
- name: 001-Battle01
- pitch: 100
- volume: 100
- battle_end_me: !ruby/object:RPG::AudioFile
- name: 001-Victory01
- pitch: 100
- volume: 100
- battle_start_se: !ruby/object:RPG::AudioFile
- name: 009-System09
- pitch: 100
- volume: 80
- battle_transition: 003-Blind03
- battleback_name: 003-Forest01
- battler_hue: 0
- battler_name: 001-Fighter01
- buzzer_se: !ruby/object:RPG::AudioFile
- name: 004-System04
- pitch: 100
- volume: 80
- cancel_se: !ruby/object:RPG::AudioFile
- name: 003-System03
- pitch: 100
- volume: 80
- cursor_se: !ruby/object:RPG::AudioFile
- name: 001-System01
- pitch: 100
- volume: 80
- decision_se: !ruby/object:RPG::AudioFile
- name: 002-System02
- pitch: 100
- volume: 80
- edit_map_id: 2
- elements:
- - ""
- - Fire
- - Ice
- - Thunder
- - Water
- - Earth
- - Wind
- - Light
- - Darkness
- - vs Undead
- - vs Snake
- - vs Aquatic
- - vs Beast
- - vs Goblin
- - vs Bird
- - vs Devil
- - vs Angel
- enemy_collapse_se: !ruby/object:RPG::AudioFile
- name: 012-System12
- pitch: 100
- volume: 80
- equip_se: !ruby/object:RPG::AudioFile
- name: 005-System05
- pitch: 100
- volume: 80
- escape_se: !ruby/object:RPG::AudioFile
- name: 010-System10
- pitch: 100
- volume: 80
- gameover_me: !ruby/object:RPG::AudioFile
- name: 005-Defeat01
- pitch: 100
- volume: 100
- gameover_name: 001-Gameover01
- load_se: !ruby/object:RPG::AudioFile
- name: 008-System08
- pitch: 100
- volume: 80
- magic_number: 77323823
- party_members:
- - 1
- - 2
- - 7
- - 8
- save_se: !ruby/object:RPG::AudioFile
- name: 007-System07
- pitch: 100
- volume: 80
- shop_se: !ruby/object:RPG::AudioFile
- name: 006-System06
- pitch: 100
- volume: 80
- start_map_id: 1
- start_x: 10
- start_y: 11
- switches:
- -
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- test_battlers:
- - !ruby/object:RPG::System::TestBattler
- actor_id: 1
- armor1_id: 1
- armor2_id: 5
- armor3_id: 13
- armor4_id: 0
- level: 1
- weapon_id: 1
- - !ruby/object:RPG::System::TestBattler
- actor_id: 2
- armor1_id: 1
- armor2_id: 5
- armor3_id: 13
- armor4_id: 0
- level: 1
- weapon_id: 5
- - !ruby/object:RPG::System::TestBattler
- actor_id: 7
- armor1_id: 0
- armor2_id: 9
- armor3_id: 21
- armor4_id: 0
- level: 1
- weapon_id: 25
- - !ruby/object:RPG::System::TestBattler
- actor_id: 8
- armor1_id: 0
- armor2_id: 9
- armor3_id: 21
- armor4_id: 0
- level: 1
- weapon_id: 29
- test_troop_id: 1
- title_bgm: !ruby/object:RPG::AudioFile
- name: 062-Slow05
- pitch: 100
- volume: 100
- title_name: 001-Title01
- variables:
- -
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- - ""
- windowskin_name: 001-Blue03b2
- words: !ruby/object:RPG::System::Words
- agi: AGI
- armor1: Shield
- armor2: Helmet
- armor3: Body Armor
- armor4: Accessory
- atk: ATK
- attack: Attack
- dex: DEX
- equip: Equip
- gold: G
- guard: Defend
- hp: HP
- int: INT
- item: Item
- mdef: MDEF
- pdef: PDEF
- skill: Skill
- sp: SP
- str: STR
- weapon: Weapon
Expand to see the code.
A sample export digest. This file is generated by the RGSS script exporter and is a list of all exported scripts. It is used so they can be re-imported into Scripts.rxdata in the original order later. Notice that the third column (exported Ruby file name) for the second entry is EMPTY. No file is actually exported, since that script in RMXP was actually an empty entry.
digest.txt
Show
- 91679711 Test_Script Test_Script.rb
- 85299656 --------------------------- EMPTY
- 75819864 Game_Temp Game_Temp.rb
- 61166382 Game_System Game_System.rb
- 65768432 Game_Switches Game_Switches.rb
- 77770996 Game_Variables Game_Variables.rb
- 93212223 Game_SelfSwitches Game_SelfSwitches.rb
- 52755737 Game_Screen Game_Screen.rb
- 79550171 Game_Picture Game_Picture.rb
- 52884295 Game_Battler_1 Game_Battler_1.rb
- 2845129 Game_Battler_2 Game_Battler_2.rb
- 39520892 Game_Battler_3 Game_Battler_3.rb
- 65931833 Game_BattleAction Game_BattleAction.rb
- 93706232 Game_Actor Game_Actor.rb
- 19485474 Game_Enemy Game_Enemy.rb
- 84307861 Game_Actors Game_Actors.rb
- 20162964 Game_Party Game_Party.rb
- 96014404 Game_Troop Game_Troop.rb
- 45114136 Game_Map Game_Map.rb
- 37136841 Game_CommonEvent Game_CommonEvent.rb
- 85238647 Game_Character_1 Game_Character_1.rb
- 91992187 Game_Character_2 Game_Character_2.rb
- 97808837 Game_Character_3 Game_Character_3.rb
- 75787353 Game_Event Game_Event.rb
- 47174434 Game_Player Game_Player.rb
- 76586914 Sprite_Character Sprite_Character.rb
- 35537720 Sprite_Battler Sprite_Battler.rb
- 18621826 Sprite_Picture Sprite_Picture.rb
- 85012817 Sprite_Timer Sprite_Timer.rb
- 2353947 Spriteset_Map Spriteset_Map.rb
- 92516995 Spriteset_Battle Spriteset_Battle.rb
- 30856323 Window_Base Window_Base.rb
- 61843872 Window_Selectable Window_Selectable.rb
- 83996582 Window_Command Window_Command.rb
- 77997554 Window_Help Window_Help.rb
- 97998046 Window_Gold Window_Gold.rb
- 10275269 Window_PlayTime Window_PlayTime.rb
- 73623657 Window_Steps Window_Steps.rb
- 19290161 Window_MenuStatus Window_MenuStatus.rb
- 82366943 Window_Item Window_Item.rb
- 97657 Window_Skill Window_Skill.rb
- 97927834 Window_SkillStatus Window_SkillStatus.rb
- 99822998 Window_Target Window_Target.rb
- 73541260 Window_EquipLeft Window_EquipLeft.rb
- 20193482 Window_EquipRight Window_EquipRight.rb
- 67379761 Window_EquipItem Window_EquipItem.rb
- 42657471 Window_Status Window_Status.rb
- 81494140 Window_SaveFile Window_SaveFile.rb
- 75433349 Window_ShopCommand Window_ShopCommand.rb
- 98941040 Window_ShopBuy Window_ShopBuy.rb
- 52413940 Window_ShopSell Window_ShopSell.rb
- 50042725 Window_ShopNumber Window_ShopNumber.rb
- 42938232 Window_ShopStatus Window_ShopStatus.rb
- 77163696 Window_NameEdit Window_NameEdit.rb
- 74963379 Window_NameInput Window_NameInput.rb
- 12512207 Window_InputNumber Window_InputNumber.rb
- 59899902 Window_Message Window_Message.rb
- 63909912 Window_PartyCommand Window_PartyCommand.rb
- 78381347 Window_BattleStatus Window_BattleStatus.rb
- 18789673 Window_BattleResult Window_BattleResult.rb
- 70270804 Window_DebugLeft Window_DebugLeft.rb
- 74315432 Window_DebugRight Window_DebugRight.rb
- 15695525 Arrow_Base Arrow_Base.rb
- 82011983 Arrow_Enemy Arrow_Enemy.rb
- 716537 Arrow_Actor Arrow_Actor.rb
- 76431274 Interpreter_1 Interpreter_1.rb
- 94946289 Interpreter_2 Interpreter_2.rb
- 21948242 Interpreter_3 Interpreter_3.rb
- 55160522 Interpreter_4 Interpreter_4.rb
- 77288818 Interpreter_5 Interpreter_5.rb
- 2407837 Interpreter_6 Interpreter_6.rb
- 32165528 Interpreter_7 Interpreter_7.rb
- 48831177 Scene_Title Scene_Title.rb
- 29223633 Scene_Map Scene_Map.rb
- 95355584 Scene_Menu Scene_Menu.rb
- 21041870 Scene_Item Scene_Item.rb
- 97256469 Scene_Skill Scene_Skill.rb
- 82235717 Scene_Equip Scene_Equip.rb
- 95739746 Scene_Status Scene_Status.rb
- 71942138 Scene_File Scene_File.rb
- 77130127 Scene_Save Scene_Save.rb
- 58364868 Scene_Load Scene_Load.rb
- 79702758 Scene_End Scene_End.rb
- 4299927 Scene_Battle_1 Scene_Battle_1.rb
- 63449097 Scene_Battle_2 Scene_Battle_2.rb
- 40844727 Scene_Battle_3 Scene_Battle_3.rb
- 33132935 Scene_Battle_4 Scene_Battle_4.rb
- 40350342 Scene_Shop Scene_Shop.rb
- 45690918 Scene_Name Scene_Name.rb
- 52774048 Scene_Gameover Scene_Gameover.rb
- 44960761 Scene_Debug Scene_Debug.rb
- 34503174 Main Main.rb
Expand to see the code.
A sample config file for the utility.
config.yaml
Show
- #===============================================================================
- # Filename: config.yaml
- #
- # Developer: Raku ([email hidden])
- #
- # Description: This file contains all configurable parameters for the RMXP
- # Importer/Exporter Utility.
- #===============================================================================
- ---
- #-------------------------------------------------------------------------------
- # Import/Export Directories
- #-------------------------------------------------------------------------------
- # NOTE: All paths in this file are relative to the directory where the utility
- # scripts are located (and hopefully where this file is located).
- #-------------------------------------------------------------------------------
- # Modify this path to specify where your .rxdata files reside
- rxdata_dir: ../Data
- # Modify this path to specify where you want the game data emitted in YAML
- yaml_dir: ../Data/Yaml
- # Modify this path to specify where you want the RGSS scripts exported to
- scripts_dir: ../Data/Scripts
- # Modify this path to specify the RMXP project directory (where Game.rxproj is)
- project_dir: ..
- #-------------------------------------------------------------------------------
- # Miscellaneous Parameters
- #-------------------------------------------------------------------------------
- # This array specifies all .rxdata files which are to be ignored by the data
- # exporter script. Note that the script exporter doesn't look at this array,
- # since it always exports the Scripts.rxdata file. Add entries to this array
- # if you do not wish to version certain .rxdata files.
- rxdata_ignore_list: ["Scripts.rxdata"]
- # This parameter determines whether the import/export scripts print verbose
- # information such as each filename as it is imported or exported and timing
- # information. Errors are always printed.
- # Valid values: [true || false]
- verbose: true
- # This is the value always used for System object's magic_number field. RMXP
- # changes this value whenever System.rxdata is modified, so having a default
- # value prevents unnecessary conflicts when versioning the System.yaml file.
- # If, for any reason, this causes problems, you can disable the default magic
- # number functionality by setting the value -1.
- magic_number: 77323823
Expand to see the code.
The default Game.bat importer/exporter runner.
Game.bat
Show
- @echo off
- REM #========================================================
- REM # Developed by Raku
- REM #========================================================
- REM # Use this batch file as you please, just give me some
- REM # credit if you do. Thanks and happy scripting!
- REM #========================================================
- REM #========================================================
- REM # Setup the Paths for the Importer/Exporter
- REM #========================================================
- REM # The path to the ruby scripts which import and export
- REM # RPG Maker XP Data
- SET SCRIPTS_DIR="Utility"
- REM #===============================
- REM # Change to Scripts Directory
- REM #===============================
- SET PREV_DIR=%CD%
- CD %SCRIPTS_DIR%
- REM #========================
- REM # RGSS script Importer
- REM #========================
- RUBY script_importer.rb
- REM #======================
- REM # RMXP Data Importer
- REM #======================
- RUBY data_importer.rb
- REM #=======================
- REM # Start RPG Maker XP
- REM #=======================
- RUBY start_rmxp.rb
- REM #======================
- REM # RMXP Data Exporter
- REM #======================
- RUBY data_exporter.rb
- REM #========================
- REM # RGSS Script Exporter
- REM #========================
- RUBY script_exporter.rb
- REM #================================
- REM # Return to Original Directory
- REM #================================
- CD %PREV_DIR%
Expand to see the code.
Sample Game.bat output (verbose mode)
Game.bat Output
Show
- F:\projects\RMXP\TestSvnRepo\RxdataImporterExporterDemo>Game.bat
- --------------------------------------------------------------------------------
- RGSS Script Import
- --------------------------------------------------------------------------------
- Imported Test_Script.rb (001/091)
- Imported Game_Temp.rb (002/091)
- Imported Game_System.rb (003/091)
- Imported Game_Switches.rb (004/091)
- Imported Game_Variables.rb (005/091)
- Imported Game_SelfSwitches.rb (006/091)
- Imported Game_Screen.rb (007/091)
- Imported Game_Picture.rb (008/091)
- Imported Game_Battler_1.rb (009/091)
- Imported Game_Battler_2.rb (010/091)
- Imported Game_Battler_3.rb (011/091)
- Imported Game_BattleAction.rb (012/091)
- Imported Game_Actor.rb (013/091)
- Imported Game_Enemy.rb (014/091)
- Imported Game_Actors.rb (015/091)
- Imported Game_Party.rb (016/091)
- Imported Game_Troop.rb (017/091)
- Imported Game_Map.rb (018/091)
- Imported Game_CommonEvent.rb (019/091)
- Imported Game_Character_1.rb (020/091)
- Imported Game_Character_2.rb (021/091)
- Imported Game_Character_3.rb (022/091)
- Imported Game_Event.rb (023/091)
- Imported Game_Player.rb (024/091)
- Imported Sprite_Character.rb (025/091)
- Imported Sprite_Battler.rb (026/091)
- Imported Sprite_Picture.rb (027/091)
- Imported Sprite_Timer.rb (028/091)
- Imported Spriteset_Map.rb (029/091)
- Imported Spriteset_Battle.rb (030/091)
- Imported Window_Base.rb (031/091)
- Imported Window_Selectable.rb (032/091)
- Imported Window_Command.rb (033/091)
- Imported Window_Help.rb (034/091)
- Imported Window_Gold.rb (035/091)
- Imported Window_PlayTime.rb (036/091)
- Imported Window_Steps.rb (037/091)
- Imported Window_MenuStatus.rb (038/091)
- Imported Window_Item.rb (039/091)
- Imported Window_Skill.rb (040/091)
- Imported Window_SkillStatus.rb (041/091)
- Imported Window_Target.rb (042/091)
- Imported Window_EquipLeft.rb (043/091)
- Imported Window_EquipRight.rb (044/091)
- Imported Window_EquipItem.rb (045/091)
- Imported Window_Status.rb (046/091)
- Imported Window_SaveFile.rb (047/091)
- Imported Window_ShopCommand.rb (048/091)
- Imported Window_ShopBuy.rb (049/091)
- Imported Window_ShopSell.rb (050/091)
- Imported Window_ShopNumber.rb (051/091)
- Imported Window_ShopStatus.rb (052/091)
- Imported Window_NameEdit.rb (053/091)
- Imported Window_NameInput.rb (054/091)
- Imported Window_InputNumber.rb (055/091)
- Imported Window_Message.rb (056/091)
- Imported Window_PartyCommand.rb (057/091)
- Imported Window_BattleStatus.rb (058/091)
- Imported Window_BattleResult.rb (059/091)
- Imported Window_DebugLeft.rb (060/091)
- Imported Window_DebugRight.rb (061/091)
- Imported Arrow_Base.rb (062/091)
- Imported Arrow_Enemy.rb (063/091)
- Imported Arrow_Actor.rb (064/091)
- Imported Interpreter_1.rb (065/091)
- Imported Interpreter_2.rb (066/091)
- Imported Interpreter_3.rb (067/091)
- Imported Interpreter_4.rb (068/091)
- Imported Interpreter_5.rb (069/091)
- Imported Interpreter_6.rb (070/091)
- Imported Interpreter_7.rb (071/091)
- Imported Scene_Title.rb (072/091)
- Imported Scene_Map.rb (073/091)
- Imported Scene_Menu.rb (074/091)
- Imported Scene_Item.rb (075/091)
- Imported Scene_Skill.rb (076/091)
- Imported Scene_Equip.rb (077/091)
- Imported Scene_Status.rb (078/091)
- Imported Scene_File.rb (079/091)
- Imported Scene_Save.rb (080/091)
- Imported Scene_Load.rb (081/091)
- Imported Scene_End.rb (082/091)
- Imported Scene_Battle_1.rb (083/091)
- Imported Scene_Battle_2.rb (084/091)
- Imported Scene_Battle_3.rb (085/091)
- Imported Scene_Battle_4.rb (086/091)
- Imported Scene_Shop.rb (087/091)
- Imported Scene_Name.rb (088/091)
- Imported Scene_Gameover.rb (089/091)
- Imported Scene_Debug.rb (090/091)
- Imported Main.rb (091/091)
- --------------------------------------------------------------------------------
- The total import time: 0.594 seconds.
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- RMXP Data Import
- --------------------------------------------------------------------------------
- Imported Actors.yaml (001/016) 0.093 seconds
- Imported Animations.yaml (002/016) 0.907 seconds
- Imported Armors.yaml (003/016) 0.062 seconds
- Imported Classes.yaml (004/016) 0.016 seconds
- Imported CommonEvents.yaml (005/016) 0.015 seconds
- Imported Enemies.yaml (006/016) 0.063 seconds
- Imported Items.yaml (007/016) 0.016 seconds
- Imported Map001.yaml (008/016) 0.046 seconds
- Imported Map002.yaml (009/016) 0.032 seconds
- Imported MapInfos.yaml (010/016) 0.015 seconds
- Imported Skills.yaml (011/016) 0.078 seconds
- Imported States.yaml (012/016) 0.016 seconds
- Imported System.yaml (013/016) 0.016 seconds
- Imported Tilesets.yaml (014/016) 1.234 seconds
- Imported Troops.yaml (015/016) 0.047 seconds
- Imported Weapons.yaml (016/016) 0.016 seconds
- --------------------------------------------------------------------------------
- The total import time: 2.672 seconds.
- Total YAML load time: 1.173 seconds.
- Total RXDATA dump time: 1.499 seconds.
- --------------------------------------------------------------------------------
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!!DO NOT CLOSE THIS COMMAND WINDOW!!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- --------------------------------------------------------------------------------
- RMXP Data Export
- --------------------------------------------------------------------------------
- Exported Tilesets.rxdata (001/003) 7.703 seconds
- Exported Troops.rxdata (002/003) 0.329 seconds
- Exported Weapons.rxdata (003/003) 0.109 seconds
- --------------------------------------------------------------------------------
- The total export time: 8.141 seconds.
- Total RXDATA load time: 0.718 seconds.
- Total YAML dump time: 7.423 seconds.
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- RGSS Script Export
- --------------------------------------------------------------------------------
- No RGSS scripts need to be exported.
Expand to see the code.
Instructions
Requirements
- Ruby Interpreter - Get the most recent version here. It is required to run the utility scripts outside of RMXP. You will need a version with the YAML and Zlib modules (the latest version should have these).
- RPG Maker XP - Obviously! :)
- Windows XP - Not sure if this utility works on Windows Vista. The only problem I forsee could be the batch file commands. Since I don't have access to a Vista machine, could someone confirm this?
- (Optional) Versioning System - If you want to keep track of versions of your exported data, you will need a versioning system like SVN, Mercurial, or Github.
- Download the RMXP Data Exporter/Importer Utility above.
- Back up your project (just copy it somewhere for safe-keeping). :)
- Extract the archive into your RMXP project directory. NOTE: If you already have a Utility directory in the base directory of your RMXP project, you may want to extract to a temporary directory and change the name of the Utility directory to something else. Just make sure to update the SCRIPTS_DIR environment variable set in Game.bat (see above).
- Optional: Modify any configuration parameters you want, in the config.yaml file, such as output directory paths for the YAML and Ruby files.
Usage
Automated (recommended)
- Just run Game.bat.
- Kick back, relax, and let the batch file do everything for you. NOTE: It will ignore importing the first time it is run, since no data has been exported yet. When you close RMXP, all of the data will be exported (as long as you don't close the command window that Game.bat opened). :)
Manual
- Open a command prompt
- Change to the scripts directory (default name is Utility).
- > ruby script_importer.rb
- > ruby data_importer.rb
- > ruby logtime.rb (This is to log the time we started RMXP to determine if files were modified)
- Open RPG Maker XP
- Close RPG Maker XP
- > ruby data_exporter.rb
- > ruby script_exporter.rb
What to Version
- The exported data YAML files
- The exported Ruby scripts
- The script export digest (digest.txt)
- All RMXP Exporter/Importer Utility scripts (so that everyone sharing your project has them)
- Game.bat (if you are using it - I highly recommend to use it, since it is easy to forget to import or export)
FAQ
- Does this utility work for RMVX? No, it needs to be modified to work with RMVX. I only own RMXP, but if anyone wants to modify it, I will post the RMVX version here too. It should be pretty easy to make the modifications (*knock on wood*).
- What versioning system does this utility work with? Theoretically, all of them. Exported files should be versionable by any versioning system that can version UTF8-encoded text files, which I think is all of them. I've tested this versioning two different RMXP projects with Subversion with no problems.
- When versioning the exported files, why do I get conflicts when there is no change in the files? Probably this is due to editing the exported file in a text editor or diff program which modified the newlines in the file. Try telling your versioning system to ignore new line differences or always convert them automatically.
- Why are my changes not exported after I close RMXP? If you ran the Game.bat file, you may want to check that you have not accidentally closed the command window that says, "DO NOT CLOSE THIS COMMAND WINDOW!!!". The export step should automatically execute from the batch script when you close RMXP. If you're manually running the scripts, then just run the export script (see Usage).
Compatibility
NOTE: I'm currently investigating compatibility with SDK. I'll post an update as soon as I know for sure.
This utility should be compatible with any script modifications, since it runs outside of RMXP and treats scripts as data. However, you may experience problems if you have directly modified any of the classes in the RPG module. In general, one should not directly modify these classes, but in case you have, I've included a Ruby file for RGSS modifications (the default location is /Utility/rmxp/rgss_mod.rb). You will need to add your changes to that file so that they can be automatically picked up by the importer/exporter scripts.
Credits and Thanks
- vgvgf: I modified his Table, Color, and Tone class implementations in Ruby.
- Yeyinde: His forum topic here helped me figured out how to load the compressed scripts from the Scripts.rxdata file.
Author's Notes
- This is the final release of the Rxdata Versioning Utility. I have made an RMXP Plugin System which covers the functionality of this utility, plus much more. I'll post it on the forums shortly.
- THIS UTILITY MODIFIES YOUR PROJECT'S .rxdata FILES! Make sure to back them up before using it.
- If anyone can help me test this utility out on more RMXP projects, I would really appreciate it!
- Since I don't have access to a Vista machine, could someone confirm if this utility works on Vista?
- If you need Ruby implementations of the Table, Color, and Tone classes that can load and dump the .rxdata files that RMXP can read, they are included in the utility in rgss_internal.rb, or you can email me and I'll send them to you. :)
Terms and Conditions
This utility is free for any use, commercial or otherwise.