Skip to content

Testing New Engine Releases in BAR

Beherith edited this page Feb 12, 2024 · 13 revisions

OBSOLETE

This method is clunky and deprecated compared using the https://github.com/beyond-all-reason/bar_debug_launcher instead.

Its only left here for documenting on how to edit the launcher's config.json.

Windows Instructions

Locate your BAR install folder from the launcher by clicking Open install Directory:

image

Download the latest testing engine release from: https://github.com/beyond-all-reason/spring/releases

Unzip this engine to BAR/data/engine/[engineversion]/ folder, so it looks like this:

image

Then, make a config-dev.json file in BAR/data/config-dev.json, and replace the "engines" with the value of the engine field with [engineversion]

{
    "title" : "Beyond All Reason",
    "setups" : [
        {
            "package": {
                "id": "dev-lobby",
                "display": "Dev Lobby"
            },
            "downloads": {
                "engines" : [ "spring_bar_.BAR105.105.1.1-931-g91ee57e_windows-64-minimal-portable" ]
            },
            "no_start_script" : true,
            "no_downloads" : true,
            "auto_start": true,
            "launch": {
                "start_args" : ["--menu", "rapid://byar-chobby:test"]
            }
        }
    ]

}

Also, create and empty devmode.txt file in BAR/data/

Then, make a shortcut to Beyond-all-reason.exe:

image

Then, change where the shortcut points to to:

C:\Users*\AppData\Local\Programs\Beyond-All-Reason\Beyond-All-Reason.exe -c C:/Users/*/AppData/Local/Programs/Beyond-All-Reason/data/config-dev.json

image

You can then launch the shortcut, which should open up the lobby. Test the features of the new engine by going through the engine testing checklist:

  • Test starting skirmish
  • Test saving skirmish
  • Test loading skirmish
  • Sync test online in engine testing autohost (usually engine testing 14)
  • Test that barbarians actually do things
  • Look for any visual bugs or artefacts
  • Scour infolog for unusual warnings

Also, you can only play online on the ENGINE TESTING autohost. If you do not see it, its probably because you need to enable "show wrong engines" in the Developer tab of the Lobby settings (should now be visible with devmode.txt in place)

Linux Instructions

  1. Download newest engine release from https://github.com/beyond-all-reason/spring/releases -- you want the linux64-minimal-portable one.

  2. Make a new directory under the engine/ subdirectory within your BAR install and unzip. The directory name can be arbitrary but must be replicated in a couple spots. I use the engine version as the directory name.

Beyond All Reason/engine/ENGINE_DIRECTORY_NAME
  1. Create a custom JSON configuration file to point to the new engine version. This can be named anything.json and live anywhere, I put it in the main BAR directory for sanity. The content should be as follows:
{
    "title" : "Beyond All Reason",
    "setups" : [
        {
            "package": {
                "id": "dev-lobby",
                "display": "Dev Lobby"
            },
            "downloads": {
                "engines" : [ "ENGINE_DIRECTORY_NAME" ]
            },
            "no_start_script" : true,
            "no_downloads" : true,
            "auto_start": true,
            "launch": {
                "start_args" : ["--menu", "rapid://byar-chobby:test"]
            }
        }
    ]

}

replacing ENGINE_DIRECTORY_NAME with the directory you created in step 2. Not the full path, just the final directory name.

  1. Create the empty file "devmode.txt" in your BAR's root folder.

  2. You're all done, now just launch BAR with the launch option -c to specify a config file, and then provide the full path to your custom .json config file. For me this is:

beyondallreason -c /home/user/Documents/Beyond\ All\ Reason/config-dev.json

You should of course alter this to fit your configuration, and you may want to put this in a script if you don't want to type it out every time you want to run your dev build.

  1. Same as above -- Test the features of the new engine by going through the engine testing checklist:
  • Test starting skirmish
  • Test saving skirmish
  • Test loading skirmish
  • Sync test online in engine testing autohost (usually engine testing 14)
  • Test that barbarians actually do things
  • Look for any visual bugs or artifacts
  • Scour infolog for unusual warnings

Also, you can only play online on the ENGINE TESTING autohost. If you do not see it, its probably because you need to enable "show wrong engines" in the Developer tab of the Lobby settings (should now be visible with devmode.txt in place)

Linux instructions

These instructions are for flatpaks. Instructions for appimages will come later, they should more or less be the same though.

Note:- ** You can't use 2 engines at the same time **

Instructions:

Download the latest testing engine release from: https://github.com/beyond-all-reason/spring/releases

Run this command in the terminal:- nano ~/.var/app/info.beyondallreason.bar/data/config-dev.json

Then paste the following codeblock

    "title" : "Beyond All Reason",
    "setups" : [
        {
            "package": {
                "id": "dev-lobby",
                "display": "Dev Lobby"
            },
            "downloads": {
                "engines" : [ "spring_bar_.BAR105.105.1.1-931-g91ee57e_linux-64-minimal-portable" ]
            },
            "no_start_script" : true,
            "no_downloads" : true,
            "auto_start": true,
            "launch": {
                "start_args" : ["--menu", "rapid://byar-chobby:test"]
            }
        }
    ]

}

Make sure to replace the engine version number with what you downloaded!

Press Ctrl+o, Hit enter Then hit Ctrl+x

Then run, nano devmode.txt

Press Ctrl+o, Hit enter Then hit Ctrl+x

(You can use any text editor that you want to use. I'm just using nano for demonstration purposes)

Next,

Locate your BAR install folder from the launcher by clicking the "Open install Directory" button.

Alternatively, you could execute this command in the terminal

cd ~/.var/app/info.beyondallreason.bar

then, go to the data directory and then the engine directory from there.

This is where you need to extract the original 7z file from earlier.

After extraction, delete or move the contents of the current engine folder and replace it with the contents of the folder from the extracted 7z file.

Test the features of the new engine by going through the engine testing checklist:

  • Test starting skirmish
  • Test saving skirmish
  • Test loading skirmish
  • Sync test online in engine testing autohost (usually engine testing 14)
  • Test that barbarians actually do things
  • Look for any visual bugs or artifacts
  • Scour infolog for unusual warnings

That's all :D