From 6266acc4aa27d3ebb6c3e824b1973eec837f0ad6 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Sun, 19 Aug 2018 05:05:33 -0400 Subject: [PATCH] Created Developer Mode (markdown) --- Developer-Mode.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Developer-Mode.md diff --git a/Developer-Mode.md b/Developer-Mode.md new file mode 100644 index 0000000..ad05cd6 --- /dev/null +++ b/Developer-Mode.md @@ -0,0 +1,67 @@ +

westeroscraft

+ +

Developer Mode

+ +

Launch the game with experimental updates to our mods.

+ +Typically, all experimental changes will be live on the test server. If you wish to test the changes before deploying them to test, you can manually set this. + +### Scenario + +You've made changes to WesterosBlocks and wish to test these ingame. + +#### Step 1- Setup the distribution file for our dev launch. + +* Go to `.westeroscraft`. +* Copy `distribution.json` +* Paste it in the same directory and rename the copy `dev_distribution.json` +* Open `dev_distribution.json` and locate the server configuration you wish to modify. +* Locate the module for WesterosBlocks. It should be similar to this. +```JSON +{ + "id": "com.westeroscraft:westerosblocks:3.1.0-alpha-2-138", + "name": "WesterosBlocks", + "type": "ForgeMod", + "artifact": { + "size": 17352677, + "MD5": "b5409aa925a47f67158c8141e71f723f", + "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/WesterosBlocks.jar" + } +} +``` +* The launcher validates each file on startup, so long as the MD5 field is present. Since we want to launch a local file, remove the MD5 hash. We can do this simply by renaming `MD5`. Let's rename it `MD5E` (why not). +* We don't want to conflict with the existing version, we want to use our own. You can set this value to whatever you want, but `test` may be the best value. +* With our changes, we have the following: +```JSON +{ + "id": "com.westeroscraft:westerosblocks:test", + "name": "WesterosBlocks", + "type": "ForgeMod", + "artifact": { + "size": 17352677, + "MD5E": "b5409aa925a47f67158c8141e71f723f", + "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/WesterosBlocks.jar" + } +} +``` +* Save the file. + +### Step 2 - Manually install the modified file. + +* In the distribution, we've set the version of WesterosBlocks to `test`. As a result, we need to copy our modified file to the following directory. The final path should match the following (including the rename). If you've opted to use a different version name, modify accordingly. +```SHELL +.westeroscraft/common/modstore/com/westeroscraft/westerosblocks/test/westerosblocks-test.jar +``` + +#### Step 3 - Turn on dev mode. + +* Open the console and type the following. +```JavaScript +DistroManager.setDevMode(true) +``` + +From here, the game should launch with your modified version of WesterosCraft. Note that the dev_distribution must be manually synced with the main distribution.json. If you let the file sit for weeks without syncing, you may end up downloading outdated versions of other files. + +--- + +See also: [Documentation on the distribution specification](https://github.com/WesterosCraftCode/ElectronLauncher/blob/master/docs/distro.md).