{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 11013,
      "game_id": 18262,
      "game_slug": "freelancer",
      "name": "Freelancer",
      "year": 2003,
      "runner": "wine",
      "slug": "freelancer-cdrom",
      "version": "CDROM",
      "description": "Includes the following:\r\n\r\n- Official 1.1 patch\r\n- Jason's Freelancer Patch (for widescreen support)\r\n- Draw distance extender (optional)",
      "notes": "I haven't set wine version as any recent one will work. An esync supporting version is recommended for slightly better performance.",
      "created_at": "2018-11-28T16:50:23.911000Z",
      "updated_at": "2021-12-10T18:28:02.398150Z",
      "draft": false,
      "published": true,
      "published_by": 51687,
      "is_playable": null,
      "script": {
        "files": [
          {
            "officialpatch": "https://r.je/freelancer/flpatch.exe"
          },
          {
            "jflp": "https://r.je/freelancer/jflp.exe"
          },
          {
            "nocd": "https://r.je/freelancer/Freelancer.exe"
          },
          {
            "perfoptions": "https://r.je/freelancer/PerfOptions.ini"
          },
          {
            "msacm32": "https://r.je/freelancer/msacm32.dll"
          },
          {
            "highdrawexe": "https://r.je/freelancer/Freelancer_IncreasedDrawDistance.exe"
          },
          {
            "hidpifontsfix": "https://r.je/freelancer/hidpi_fonts.ini"
          },
          {
            "wmfdist": "https://r.je/freelancer/WMFDIST.EXE"
          }
        ],
        "game": {
          "arch": "win32",
          "exe": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe",
          "prefix": "$GAMEDIR"
        },
        "installer": [
          {
            "task": {
              "arch": "win32",
              "description": "Creating Wine prefix",
              "name": "create_prefix",
              "prefix": "$GAMEDIR"
            }
          },
          {
            "insert-disc": {
              "requires": "setup.exe"
            }
          },
          {
            "task": {
              "description": "Installing Freelancer. Please choose \"Express install\".",
              "executable": "$DISC/setup.exe",
              "name": "wineexec",
              "prefix": "$GAMEDIR",
              "return_code": 256
            }
          },
          {
            "execute": {
              "command": "mkdir -p '$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/'",
              "description": "Creating configuration directory"
            }
          },
          {
            "move": {
              "description": "Creating configuration file",
              "dst": "$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini",
              "src": "perfoptions"
            }
          },
          {
            "task": {
              "description": "Installing 1.1 patch",
              "executable": "officialpatch",
              "name": "wineexec",
              "prefix": "$GAMEDIR"
            }
          },
          {
            "task": {
              "description": "Installing required audio codecs (prevents in-game stuttering)",
              "executable": "wmfdist",
              "name": "wineexec",
              "prefix": "$GAMEDIR"
            }
          },
          {
            "move": {
              "description": "Installing no-cd",
              "dst": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe",
              "src": "nocd"
            }
          },
          {
            "move": {
              "description": "Adding msacm32.dll (saves downloading a 300mb file from winetricks)",
              "dst": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/msacm32.dll",
              "src": "msacm32"
            }
          },
          {
            "task": {
              "description": "Installing Jason's Freelancer Patch for widescreen support",
              "executable": "jflp",
              "name": "wineexec",
              "prefix": "$GAMEDIR"
            }
          },
          {
            "execute": {
              "command": "echo \"Setting in game resolution to $RESOLUTION_WIDTH x $RESOLUTION_HEIGHT...\"\n\nsed \"s/size\\s*=.*/size=$RESOLUTION_WIDTH, $RESOLUTION_HEIGHT /\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i  \nsed \"s/color_bpp\\s*=.*/color_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/depth_bpp\\s*=.*/depth_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i  \necho \"...done\"\n\nif [ $RESOLUTION_HEIGHT -gt 1500 ]\nthen\n  echo \"Your resolution's height is larger than 1500 pixels, this causes Freelancer to render fonts incorrectly on both windows and linux\"\n  echo \"Applying font patch...\"\n  cp $CACHE/hidpi_fonts.ini \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/FONTS/fonts.ini\"\n  echo \"...done\"\nfi\n# Symlink steamuser to the main user directory so Proton uses the same PerfOptions.ini\nln -sf \"$GAMEDIR/drive_c/users/$USER\" \"$GAMEDIR/drive_c/users/steamuser\"\necho \"Complete!\"\n",
              "description": "Setting game resolution your screen's native resolution"
            }
          },
          {
            "input_menu": {
              "description": "Increase draw distances?",
              "id": "DRAWDISTANCE",
              "options": [
                {
                  "y": "Yes"
                },
                {
                  "n": "No"
                }
              ],
              "preselect": "y"
            }
          },
          {
            "execute": {
              "command": "if [ $INPUT = 'n' ]\nthen\n  echo \"...skipping\"\nfi\nif [ $INPUT = 'y' ]\nthen\n  echo \"Increasing game draw distance...\"\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SHIPS/shiparch.ini\" -i\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SHIPS/rtc_shiparch.ini\" -i\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SOLAR/solararch.ini\" -i\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/select_equip.ini\" -i\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/weapon_equip.ini\" -i\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/misc_equip.ini\" -i\n  sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/st_equip.ini\" -i\n  cp $CACHE/Freelancer_IncreasedDrawDistance.exe \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\"\n\n  echo \"...done\"\nfi\necho \"Complete!\"\n",
              "description": "Draw distance patch"
            }
          },
          {
            "execute": {
              "command": "echo \"Fixing color depth\"\n\nsed \"s/color_bpp\\s*=.*/color_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/depth_bpp\\s*=.*/depth_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i  \necho \"...done\"",
              "description": "Fix color depth"
            }
          },
          {
            "task": {
              "arch": "win32",
              "key": "SampleCount",
              "name": "set_regedit",
              "path": "HKEY_CURRENT_USER\\Software\\Wine\\Direct3D",
              "prefix": "$GAMEDIR",
              "type": "REG_DWORD",
              "value": "00000008"
            }
          }
        ],
        "wine": {
          "overrides": {
            "msacm32.dll": "n,b"
          }
        }
      },
      "content": "files:\n- officialpatch: https://r.je/freelancer/flpatch.exe\n- jflp: https://r.je/freelancer/jflp.exe\n- nocd: https://r.je/freelancer/Freelancer.exe\n- perfoptions: https://r.je/freelancer/PerfOptions.ini\n- msacm32: https://r.je/freelancer/msacm32.dll\n- highdrawexe: https://r.je/freelancer/Freelancer_IncreasedDrawDistance.exe\n- hidpifontsfix: https://r.je/freelancer/hidpi_fonts.ini\n- wmfdist: https://r.je/freelancer/WMFDIST.EXE\ngame:\n  arch: win32\n  exe: $GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\n  prefix: $GAMEDIR\ninstaller:\n- task:\n    arch: win32\n    description: Creating Wine prefix\n    name: create_prefix\n    prefix: $GAMEDIR\n- insert-disc:\n    requires: setup.exe\n- task:\n    description: Installing Freelancer. Please choose \"Express install\".\n    executable: $DISC/setup.exe\n    name: wineexec\n    prefix: $GAMEDIR\n- execute:\n    command: mkdir -p '$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/'\n    description: Creating configuration directory\n- move:\n    description: Creating configuration file\n    dst: $GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\n    src: perfoptions\n- task:\n    description: Installing 1.1 patch\n    executable: officialpatch\n    name: wineexec\n    prefix: $GAMEDIR\n- task:\n    description: Installing required audio codecs (prevents in-game stuttering)\n    executable: wmfdist\n    name: wineexec\n    prefix: $GAMEDIR\n- move:\n    description: Installing no-cd\n    dst: $GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\n    src: nocd\n- move:\n    description: Adding msacm32.dll (saves downloading a 300mb file from winetricks)\n    dst: $GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/msacm32.dll\n    src: msacm32\n- task:\n    description: Installing Jason's Freelancer Patch for widescreen support\n    executable: jflp\n    name: wineexec\n    prefix: $GAMEDIR\n- execute:\n    command: \"echo \\\"Setting in game resolution to $RESOLUTION_WIDTH x $RESOLUTION_HEIGHT...\\\"\\\n      \\n\\nsed \\\"s/size\\\\s*=.*/size=$RESOLUTION_WIDTH, $RESOLUTION_HEIGHT /\\\" \\\"$GAMEDIR/drive_c/users/$USER/Documents/My\\\n      \\ Games/Freelancer/PerfOptions.ini\\\" -i  \\nsed \\\"s/color_bpp\\\\s*=.*/color_bpp=32/\\\"\\\n      \\ \\\"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\\\"\\\n      \\ -i\\nsed \\\"s/depth_bpp\\\\s*=.*/depth_bpp=32/\\\" \\\"$GAMEDIR/drive_c/users/$USER/Documents/My\\\n      \\ Games/Freelancer/PerfOptions.ini\\\" -i  \\necho \\\"...done\\\"\\n\\nif [ $RESOLUTION_HEIGHT\\\n      \\ -gt 1500 ]\\nthen\\n  echo \\\"Your resolution's height is larger than 1500 pixels,\\\n      \\ this causes Freelancer to render fonts incorrectly on both windows and linux\\\"\\\n      \\n  echo \\\"Applying font patch...\\\"\\n  cp $CACHE/hidpi_fonts.ini \\\"$GAMEDIR/drive_c/Program\\\n      \\ Files/Microsoft Games/Freelancer/DATA/FONTS/fonts.ini\\\"\\n  echo \\\"...done\\\"\\\n      \\nfi\\n# Symlink steamuser to the main user directory so Proton uses the same\\\n      \\ PerfOptions.ini\\nln -sf \\\"$GAMEDIR/drive_c/users/$USER\\\" \\\"$GAMEDIR/drive_c/users/steamuser\\\"\\\n      \\necho \\\"Complete!\\\"\\n\"\n    description: Setting game resolution your screen's native resolution\n- input_menu:\n    description: Increase draw distances?\n    id: DRAWDISTANCE\n    options:\n    - y: 'Yes'\n    - n: 'No'\n    preselect: y\n- execute:\n    command: \"if [ $INPUT = 'n' ]\\nthen\\n  echo \\\"...skipping\\\"\\nfi\\nif [ $INPUT =\\\n      \\ 'y' ]\\nthen\\n  echo \\\"Increasing game draw distance...\\\"\\n  sed \\\"s/LODranges.*/LODranges\\\n      \\ = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SHIPS/shiparch.ini\\\"\\\n      \\ -i\\n  sed \\\"s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program\\\n      \\ Files/Microsoft Games/Freelancer/DATA/SHIPS/rtc_shiparch.ini\\\" -i\\n  sed \\\"\\\n      s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft\\\n      \\ Games/Freelancer/DATA/SOLAR/solararch.ini\\\" -i\\n  sed \\\"s/LODranges.*/LODranges\\\n      \\ = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/select_equip.ini\\\"\\\n      \\ -i\\n  sed \\\"s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program\\\n      \\ Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/weapon_equip.ini\\\" -i\\n  sed\\\n      \\ \\\"s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft\\\n      \\ Games/Freelancer/DATA/EQUIPMENT/misc_equip.ini\\\" -i\\n  sed \\\"s/LODranges.*/LODranges\\\n      \\ = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/st_equip.ini\\\"\\\n      \\ -i\\n  cp $CACHE/Freelancer_IncreasedDrawDistance.exe \\\"$GAMEDIR/drive_c/Program\\\n      \\ Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\\\"\\n\\n  echo \\\"...done\\\"\\\n      \\nfi\\necho \\\"Complete!\\\"\\n\"\n    description: Draw distance patch\n- execute:\n    command: \"echo \\\"Fixing color depth\\\"\\n\\nsed \\\"s/color_bpp\\\\s*=.*/color_bpp=32/\\\"\\\n      \\ \\\"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\\\"\\\n      \\ -i\\nsed \\\"s/depth_bpp\\\\s*=.*/depth_bpp=32/\\\" \\\"$GAMEDIR/drive_c/users/$USER/Documents/My\\\n      \\ Games/Freelancer/PerfOptions.ini\\\" -i  \\necho \\\"...done\\\"\"\n    description: Fix color depth\n- task:\n    arch: win32\n    key: SampleCount\n    name: set_regedit\n    path: HKEY_CURRENT_USER\\Software\\Wine\\Direct3D\n    prefix: $GAMEDIR\n    type: REG_DWORD\n    value: 00000008\nwine:\n  overrides:\n    msacm32.dll: n,b\n"
    }
  ]
}