Switching editor environments

From Frozenbyte Wiki
Jump to: navigation, search

You may have had several ideas of MODs at the same times, and can't actually work on each of them because either your scripts cancel each others out, or you are asked to include unwanted files into a MOD when exporting it.

So you would like to have something like "several editors at the same time" so you can build and maintain your MODs. This page aims at showing you how.

Note: If you are only editing levels, and not resources or scripts, you don't need this page and can continue doing what you were doing before.

Option 1 : several installs

Pros: It's easy to set up, easy to understand. Great for inexperienced users :)

Cons: Not so clean. Takes up a lot of space because of duplicate files

The idea here is to install the editor several times, and simply switch between installations in order to get the version where the MOD you're working on is. When you install the editor, in the main folder ...\Steam\steamapps\common\Trine 3\ you will see a new file called editor_path.txt, that contains the absolute path on your system where the editor was installed.

If you remove this file, for example by renaming it editor_path_number1.txt the next time you try to launch the editor you will be asked to install again somewhere else. You now have two installed editors and simply by switching the content of the file editor_path.txt you can switch between them.

Option 2 : Git repository

Cons: For advanced users only. I'm assuming you already know what git is and the basics of how to use it.

Pros: Less space, cleaner, easier to maintain. Besides, all the cool kids are doing it.

The goal here is to initialize a git repository where the editor files are, so that you can use a master branch as a blank clean version and branch the git tree for each MOD you will make. Plus all the advantages of working with git, but that's up to you.

Start by installing the editor, and cd your way to the data folder of the editor path. Then initialize a repository.

cd path_to_editor/data
git init

Note: I'm using git-bash for Windows in order to have a linux-like console. There are other softwares out there that do this.

Now you could just add the entire folder, but git doesn't handle shortcuts and symlinks very well, so you will have to manually add the right folders.

git add binds locale mission root script

Congrats, your git repository is set up! Look at how easy it was! Now a quick overview of what you can do:

  • Create a new branch from master for each of your MODs
  • When a new editor update comes out, install it on master and then rebase your MOD on it to keep it updated
  • Commit your changes so you can revert them when you make mistakes (basic version control, actually)
  • Push your MOD to a remote Github or Bitbucket repository so you can share it with the community!

A suggestion for a .gitignore (will be updated in the future):


--LeonardA-L (talk) 18:01, 30 June 2015 (UTC)