The forum

New Installer for Age of Conan: Unchained

Author Replies
Skjeggape Thursday 12 December 2024 at 20:47
SkjeggapeAnonymous

Hope this is the right place to submit this. I'v been hacing away at Dadu042's Age of Conan Installer to enable dxvk and hopfully working DX10. This will be my first time so be kind :)

Theres a few things I want to take before going to the script. For simplyfing testing i'm calling dxvk and directx dll's directly in the script  as i for testing i'v been trough dll's and dxvk versions not available yet. These would need to bve made available befor finializing and publishing. I'v got dx9 working with DXVK using wine 8.1-staging (64bit prefix)(newest wine version i could find available besides system wine. and DXVK 2.4.1 (DXVK2.5 and 2.5.1 is broken as detailed in script). Pleas help me testing and maybe we can get DX10 working also.

here is my script so far. going to clean up further as I test and your comments.

Bugs

-DX10 broken

-need to set graphics & enable audio before restarting launcher for values to be enabled. on my system 1920x1080 resolution shows at first launch. but dxvk sets it to 1600x1200 if launch game without restarting launcher to verify resolutin first. also audio is not eneabled at first run of launcher.

 

EDIT: Turns out DX10 sadly is not somthing i can make work. but heres a working updated version that for me makes DXVK run nicly DirectX 9 of AOC removing missing sky textures. Hope  the POL_Install_DXVK_2_4_1 gets aproved so Script can be cleaned up, and hopefully aproved as it POL is the best alternative for getting Age of Conan running on linux. 

#!/bin/bash
# Date : (17.12.2024)
# Script rewritten from Dadu042's script targeting updating to use Wine 10.0 with DXVK 2.5+ in attempt to get better preformance and graphics
# http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_9:_Standardization#Advanced_Standardization
# DXVK version used : 2.4.1
# Author : Skjeggape
# Licence : Retail
# Only For : http://www.playonmac.com
# Distribution used to test :
# Skjeggape: -Fedora41 KDE Desktop
#            -Kernel v6.12 - 64bit
#            -Nvidia Geforce GTX1070 8GB Ram - NVIDIA 565.77 - X11.
#
#
# TESTED Editions: 17.12.2024, in 'Version.txt' there is: Conan_v5.01.0@602248_ConanLiveWin32_2021_12_17-01_13_Rev(602248)
#
# Middlewares used by this software : d3dx9_41, d3dx9_43, d3dcompiler_43, DXVK v2.4.1
#
###########################################################
# Big Thanks to Dadu042 for providing the original script #
###########################################################
# CHANGELOG
# [Skjeggape] (17.12.2024)
# - rewritten script to enable DXVK, update to wine 8.1-staging, enable 64bit runtime.
#
# KNOWN ISSUES : WINE 8.1-staging
# - Assertion Failed error at launcher start, known common issue. Can safly be ignored.
# - DXVK 2.5 and 2.5.1 Crashes game due to https://github.com/doitsujin/dxvk/issues/4474
# - Correct resolution values needs to be set in launceher by opening and closing it in order to save config values.
# - DX10 Crash - unknown reason

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

#General Information
TITLE="Age of Conan: Unchained"
EDITOR="Funcom"
GAME_URL="https://www.ageofconan.com/"
AUTHOR="Skjeggape"
SHORTCUT_FILENAME="ConanPatcher.exe"
SOFTWARE_CATEGORIES="Game;RolePlaying;MMORPG"
DOCUMENT_FILE="$WINEPREFIX/drive_c/Program Files/Funcom/Age of Conan/manual.pdf"

#System variables
PREFIX="Age-of-Conan-Unchained"
WINEVERSION="8.1-staging"
OSVERSION="win10"
SYSTEM_ARC="auto"

# Starting the script
POL_SetupWindow_Init

# Starting debugging API
POL_Debug_Init

# Open dialogue box
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
POL_RequiredVersion "4.4.3" || POL_Debug_Fatal "$APPLICATION_TITLE $VERSION is required to install $TITLE"

# Installing Wine
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "$SYSTEM_ARC"
POL_Wine_PrefixCreate "$WINEVERSION"
Set_OS "$OSVERSION"
POL_System_TmpCreate "$PREFIX"

#######################################
#  Hacks                              #
#######################################

# Patcher needs d3dx9_43, d3dcompiler_43 for correct lightning/glow of text, buttons etc.
# Game needs d3dx9_41.
# Direct scripted install due to missing POL_Install Functions
#   -DXVK 2.4.1

#################################
# INSTALL Needed DirectX DLL's  #
#################################

POL_Call POL_Install_d3dx9_41
POL_Call POL_Install_d3dx9_43
POL_Call POL_Install_d3dcompiler_43

####################
# INSTALL DXVK     #
####################

###################################
# POL_Call POL_INSTALL_DXVK_2_4_1 #   <----- Needs to be approved
###################################

# Based on https://www.playonlinux.com/en/app-4602-POL_Install_DXVK_2_3.html by Dadu042
# Changes: added dx8 override and removed d3d10 and d3d10_1 overides as instructed at https://github.com/doitsujin/dxvk?tab=readme-ov-file#how-to-use
#
# How to adapt this part of the script for a newer version:
# #1 in a text editor, do search for '2.3' (example) replace it to '2.6' (example).
# #2 download the file manually, then make its checksum (linux: 'md5sum filename'), replace it at the end of 'POL_Download_Resource'.

POL_SetupWindow_message "Warning: DXVK software can not work without Vulkan driver (on your OS), we can not automate this." "$TITLE"

#DXVK_VERSION="2.5.1" MD5SUM="50eea8e68e6efd5ea41fcb850c3452c1" --defunk do to gcc13.1.0
#DXVK_VERSION="2.5" MD5SUM="b7d523232ab4ca1c78dd9fb5e099d192" -defunk do to gcc13.1.0
DXVK_VERSION="2.4.1" MD5SUM="f2bb1a1a24b432c507304c77bce9f69d"

# Downloading DXVK files
POL_Download_Resource "https://github.com/doitsujin/dxvk/releases/download/v$DXVK_VERSION/dxvk-$DXVK_VERSION.tar.gz" "$MD5SUM"

# Installing DLL
POL_SetupWindow_wait_next_signal "$(eval_gettext 'Installing DXVK files...')" "$TITLE"

cd "$WINEPREFIX/drive_c/windows/temp"

tar -xvzf "$POL_USER_ROOT/ressources/dxvk-$DXVK_VERSION.tar.gz"

if [ "$POL_ARCH" == "amd64" ]; then
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d8.dll" "$WINEPREFIX/drive_c/windows/syswow64"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d9.dll" "$WINEPREFIX/drive_c/windows/syswow64"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d10core.dll" "$WINEPREFIX/drive_c/windows/syswow64"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d11.dll" "$WINEPREFIX/drive_c/windows/syswow64"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/dxgi.dll" "$WINEPREFIX/drive_c/windows/syswow64"

        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d8.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d9.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d10core.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/d3d11.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x64/dxgi.dll" "$WINEPREFIX/drive_c/windows/system32"
else
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d8.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d9.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d10core.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/d3d11.dll" "$WINEPREFIX/drive_c/windows/system32"
        cp -f "$WINEPREFIX/drive_c/windows/temp/dxvk-$DXVK_VERSION/x32/dxgi.dll" "$WINEPREFIX/drive_c/windows/system32"
fi

# Overriding dlls
POL_Debug_Message "Overriding DXVK-DirectX DLL's"
POL_Call POL_Function_OverrideDLL "native" "d3d8"
POL_Call POL_Function_OverrideDLL "native" "d3d9"
POL_Call POL_Function_OverrideDLL "native" "d3d10core"
POL_Call POL_Function_OverrideDLL "native" "d3d11"
POL_Call POL_Function_OverrideDLL "native" "dxgi"

#######################################
#  Main part of this script           #
#######################################

# Choose between Local Installer or Download
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

POL_SetupWindow_message "Warning: do not install DirectX. DirectX 10 dosn't work." "$TITLE"

# Begin game installation

if [ "$INSTALL_METHOD" == "DOWNLOAD" ]; then
        cd "$WINEPREFIX/drive_c"

        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: this script will download the installer .')" "$TITLE"
        POL_Download "http://aoc-us-update.live.ageofconan.com/download/AoC/EU/ageofconan-en.exe" "f6b69a1e3f36d253be92e78e02de901d"
        POL_Wine "ageofconan-en.exe"
        POL_Wine_WaitBefore "$TITLE"

        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"

        cd "$WINEPREFIX/drive_c"
        rm ageofconan-en.exe

        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

elif [ "$INSTALL_METHOD" == "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the installation file (.EXE)')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"

        # POL_SetupWindow_message "$(eval_gettext '\n\nNote: do NOT install DirectX.')" "$TITLE"

        POL_Wine start /unix "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"

        POL_Shortcut "$SHORTCUT_FILENAME" "$TITLE" "" "" "$SOFTWARE_CATEGORIES"
        POL_Shortcut_QuietDebug "$TITLE"
        POL_Shortcut_Document "$TITLE" "$DOCUMENT_FILE"

fi

###########
#FINISHING#
###########

POL_SetupWindow_message "$(eval_gettext 'Installation is finished.')" "$TITLE"

# POL_SetupWindow_message "$(eval_gettext 'WARNING: to avoid to have a huge log file, you should type \ninto Debug flags : fixme-all')" "$TITLE"

# Fail ?
# POL_SetupWindow_message "$LNG_FIN" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit 0

 

Edited by Skjeggape

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com