FANDOM


Configuring your project to work with git (or other CVS)
This tutorial was written by griest024. Please give credit.
Click here for more tutorials!


This tutorial walks you through the configuration of your pokemon essentials project to work with CVS. It utilizes a plugin originally written by Raku to convert .rxdata files into .yaml files, which is just a type of formatted text. You can open .yaml files with any text editor. Upon opening, the plugin imports all the .yaml files to .rxdata format. It then opens RMXP. After the user has closed RMXP, the plugin will export all the .rxdata files to .yaml which you will then presumably commit and push.

Configuration

  • Make sure you have ruby installed. The plugin has been tested with ruby 2.2
  • Download or clone the master branch of the plugin's repo: https://github.com/griest024/PKMNEssentialsPlugin
  • Create a new repo for your project and commit your essentials project. The location of the repo with be your RMXP_PROJECT_ROOT.
  • In the repo's root folder: Edit the game.yaml config file with your preference. Set the yaml_dir and scripts_dir. This is where the plugin will output. EditorScripts will be exported beside the scripts folder. To change see Advanced.
  • Edit game.bat and modify RMXP_PROJECT_ROOT to point to the root of your essentials project.
  • Copy game.bat and game.yaml to the root of your project, so that it sits beside game.exe

Usage

  • Run game.bat. Do no close the command window that opens alongside RMXP. When RMXP is closed, the plugin will export the files and then the window will close.
  • Use a CVS to version the exported files which now reflect the exact contents of the .rxdata files. By default the exported files are in $PROJECT_DIR/src/

Advanced

Here are some advanced usage tips that may help while modifying and debugging the plugin.

  • To edit the location of the config file (game.yaml), open common.rb and set $CONFIG_PATH to your desired location.
  • To modify where the plugin will output the scripts, open script_import_exporter.rb in the plugin folder. Find this line $SCRIPTS_DIR = "src/Scripts/EditorScripts" and edit it to you desire, you may also need to find a similar line further below and edit that to specify where the regular scripts will be exported.
  • The command window will automatically close when the program terminates, often not giving you enough time to read error messages. If the plugin is not working as expected, run it from the command line or run the script start_rmxp.rb with the project directory as a parameter. The window will persists after the program ends.

Recommended folder schemes

In order to version all the data the essentials uses, its recommended that you add the PBS folder to your repo.

This is the recommended folder scheme:

  • PokemonEssentialsDataPlugin/
    • start_rmxp.rb
    • etc..
  • project/
    • Data/
    • Graphics/
    • PBS/
    • ...
    • src/
    • game.rxproj
    • game.bat
    • game.exe
    • etc...

In this scheme, the plugin is one repo and the project is another. They are in the same directory. All the PBS files and graphics and config files are all versioned along with src which contains the .yaml files. I recommend adding Data/ to your .gitignore (or maybe just the .rxdata extension?) since the binary can't, and doesn't need, to be versioned. Note that git ignores .exe files by default. Use git add -f game.exe etc to start tracking them again.

Common Errors

  • Cannot find input or output directory: Inspect the directory path displayed onscreen. Make sure that all of the slashes are consistent. In order to work with the new version of ruby, the plugin has lost the ability to format the input from the command line, causing the directories to be misread. If problem persists, edit start_rmxp.rb and after this line #$PROJECT_DIR = String.new( $PROJECT_DIR ).gsub! "/", "\\" end set the value of PROJECT_DIR manually. Make sure to escape your backslashes. For example I might type $PROJECT_DIR = "..\\project"

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.