https://wiki.archlinux.org/api.php?action=feedcontributions&user=Bobo38&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:03:18ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User_talk:Svito&diff=508154User talk:Svito2018-01-21T18:12:35Z<p>Bobo38: /* Wine software sent to Archives */ cosmetics</p>
<hr />
<div>== ArchWiki:Reports ==<br />
<br />
Here's a taco for being the one who finally tackled the defunct ArchWiki:Reports: [https://recipethis.com/wp-content/uploads/Slow-Cooked-Pulled-Turkey-Mexican-Tacos.jpg] Cheers -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 17:23, 17 November 2017 (UTC)<br />
<br />
== Wine software sent to Archives? maybe link to lastest frozen content ==<br />
<br />
Hi, Svito, I've discovered yesterday while I was wanting to point the StarCraft 2 page to some guy on the web that is was archived. I understand the will to clean-up in general to ensure higher quality standards against outdated information or misleading content or actual content quality. It a tough work to go after all those documentation stuff, and Arch's wiki is the best place on the Web to find Linux based OS technicals<br />
<br />
In my opinion for this particular page we got more information that the install procedure we could get from WineHQ (which is messy as hell). There were especially some hacks that could be made to play around the actual popular Windows application. I've found the old content after a bit of browsing, it could be helpful to get a direct link to the archived content</div>Bobo38https://wiki.archlinux.org/index.php?title=User_talk:Svito&diff=508153User talk:Svito2018-01-21T18:11:49Z<p>Bobo38: /* Wine software sent to Archives */ new section</p>
<hr />
<div>== ArchWiki:Reports ==<br />
<br />
Here's a taco for being the one who finally tackled the defunct ArchWiki:Reports: [https://recipethis.com/wp-content/uploads/Slow-Cooked-Pulled-Turkey-Mexican-Tacos.jpg] Cheers -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 17:23, 17 November 2017 (UTC)<br />
<br />
== Wine software sent to Archives ==<br />
<br />
Hi, Svito, I've discovered yesterday while I was wanting to point the StarCraft 2 page to some guy on the web that is was archived. I understand the will to clean-up in general to ensure higher quality standards against outdated information or misleading content or actual content quality. It a tough work to go after all those documentation stuff, and Arch's wiki is the best place on the Web to find Linux based OS technicals<br />
<br />
In my opinion for this particular page we got more information that the install procedure we could get from WineHQ (which is messy as hell). There were especially some hacks that could be made to play around the actual popular Windows application. I've found the old content after a bit of browsing, it could be helpful to get a direct link to the archived content</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=494678StarCraft 22017-11-01T21:00:48Z<p>Bobo38: /* Use temporary XKB options */ add the xkb option to turn CapsLock into an additional Ctrl key</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
{{Warning|This double key repeat usage for RapidFire inject is no longer possible since LoTV release}}<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.<br />
You may consider tune your .SC2Hotkeys file with one of those command lines:<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Use temporary XKB options ====<br />
<br />
This tip could be used to perform some modifications:<br />
* map CapsLock to Backspace with {{ic|1=caps:backspace}}<br />
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}<br />
* turn CapsLock into an additional Control key with {{ic|1=caps:ctrl_modifier}}<br />
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"<br />
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}<br />
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}<br />
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
{{Warning|scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
{{Tip|you may consider using this tip to use wheel for previous/next subgroup browsing}}<br />
{{Tip|for more 5+ button, you may consider use {{ic|evrouter}} to apply the same tip and map buttons to other usages}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=494677StarCraft 22017-11-01T21:00:00Z<p>Bobo38: /* Use temporary XKB options */ add the xkb option to turn CapsLock into an additional Ctrl key</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
{{Warning|This double key repeat usage for RapidFire inject is no longer possible since LoTV release}}<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.<br />
You may consider tune your .SC2Hotkeys file with one of those command lines:<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Use temporary XKB options ====<br />
<br />
This tip could be used to perform some modifications:<br />
* map CapsLock to Backspace with {{ic|1=caps:backspace}}<br />
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}<br />
* use CapsLock as Control {{ic|1=caps:ctrl_modifier}}<br />
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"<br />
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}<br />
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}<br />
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
{{Warning|scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
{{Tip|you may consider using this tip to use wheel for previous/next subgroup browsing}}<br />
{{Tip|for more 5+ button, you may consider use {{ic|evrouter}} to apply the same tip and map buttons to other usages}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=494283StarCraft 22017-10-29T09:26:49Z<p>Bobo38: /* Enable Scrollclick */ some notes about mouse usage</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
{{Warning|This double key repeat usage for RapidFire inject is no longer possible since LoTV release}}<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.<br />
You may consider tune your .SC2Hotkeys file with one of those command lines:<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Use temporary XKB options ====<br />
<br />
This tip could be used to perform some modifications:<br />
* map CapsLock to Backspace with {{ic|1=caps:backspace}}<br />
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}<br />
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"<br />
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}<br />
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}<br />
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
{{Warning|scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
{{Tip|you may consider using this tip to use wheel for previous/next subgroup browsing}}<br />
{{Tip|for more 5+ button, you may consider use {{ic|evrouter}} to apply the same tip and map buttons to other usages}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=494282StarCraft 22017-10-29T09:15:02Z<p>Bobo38: /* Enable double-key Rapid Fire Hotkey behaviour */ add warning about deprecated usage</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
{{Warning|This double key repeat usage for RapidFire inject is no longer possible since LoTV release}}<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.<br />
You may consider tune your .SC2Hotkeys file with one of those command lines:<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Use temporary XKB options ====<br />
<br />
This tip could be used to perform some modifications:<br />
* map CapsLock to Backspace with {{ic|1=caps:backspace}}<br />
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}<br />
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"<br />
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}<br />
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}<br />
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
{{Tip|The same method could make "forward mouse button" and "back mouse button" available on a 3 buttons mouse, to be bound to Next/Previous subgroups (like in TheCore/TheCore Lite); as scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=494281StarCraft 22017-10-29T09:12:08Z<p>Bobo38: /* Enable Scrollclick */ clarify some tip</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.<br />
You may consider tune your .SC2Hotkeys file with one of those command lines:<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Use temporary XKB options ====<br />
<br />
This tip could be used to perform some modifications:<br />
* map CapsLock to Backspace with {{ic|1=caps:backspace}}<br />
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}<br />
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"<br />
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}<br />
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}<br />
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
{{Tip|The same method could make "forward mouse button" and "back mouse button" available on a 3 buttons mouse, to be bound to Next/Previous subgroups (like in TheCore/TheCore Lite); as scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=494280StarCraft 22017-10-29T09:10:28Z<p>Bobo38: /* Hints for advanced hotkeys settings */ add description of XKB option override</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey with xmodmap ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used.<br />
You may consider tune your .SC2Hotkeys file with one of those command lines:<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Use temporary XKB options ====<br />
<br />
This tip could be used to perform some modifications:<br />
* map CapsLock to Backspace with {{ic|1=caps:backspace}}<br />
* swap left Control and Alt keys with {{ic|1=ctrl:swap_lalt_lctl}}<br />
$ setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//'),ctrl:swap_lalt_lctl,caps:backspace"<br />
{{Tip| All possible options could be found looking in /usr/share/X11/xkb/rules/base.lst}}<br />
{{Tip| to get back to the default XKB options, once you exit the game you can use the following code in a script}}<br />
setxkbmap -option -option "$(localectl | grep Options | sed -e 's/.*Options:\s*//')"<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
{{Tip|The same method could make "forward mouse button" and "back mouse button" available on your stupid 3 mouse buttons, to be bound to Next/Previous subgroups (like in TheCore/TheCore Lite); as scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=493272StarCraft 22017-10-15T11:06:25Z<p>Bobo38: /* Hints for advanced hotkeys settings */ point to new github project of TheCoreLite in place of old TeamLiquid.net</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:StarCraft 2]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}}, {{Pkg|lib32-gnutls}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [https://github.com/bobo38/TheCoreLite TheCore Lite]<br />
<br />
Some other unmaintained options:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
{{Tip|The same method could make "forward mouse button" and "back mouse button" available on your stupid 3 mouse buttons, to be bound to Next/Previous subgroups (like in TheCore/TheCore Lite); as scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=478342StarCraft 22017-05-26T06:14:53Z<p>Bobo38: /* Enable Scrollclick */ some note about using wheel for subgroups</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Blizzard App (former Battle.net App) ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Blizzard App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Blizzard App than trying to install the game from DVD. Simply install the app, select your region, log in with a Blizzard Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
{{Note|You need to install {{Pkg|lib32-gnutls}} in order to use the online-mode of the [[Battle.net|Blizzard App]].}}<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
{{Tip|The same method could make "forward mouse button" and "back mouse button" available on your stupid 3 mouse buttons, to be bound to Next/Previous subgroups (like in TheCore/TheCore Lite); as scrollclick applications previously demoed could be better executed with RapidFire Key method}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=459540StarCraft 22016-12-18T20:47:54Z<p>Bobo38: /* Enable CapsLock as a Rapid Fire Hotkey */ use a less exotic key, more sed suggestion</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "Backspace" character.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = BackSpace"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "Backspace" as an alternate wherever CapsLock is used<br />
$ sed -i -e "s:CapsLock:Backspace:" <file>.SC2Hotkeys # replacement of CapsLock by BackSpace<br />
$ sed -i -e "s:CapsLock:CapsLock,Backspace:" <file>.SC2Hotkeys # easy command copy<br />
$ sed -i -e "s:\([=,]\([=,]\)*CapsLock\):\1,\2Backspace:" <file>.SC2Hotkeys # this one copies any modifier with CapsLock to equivalent with BackSpace<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior, once you exit the game}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=455405StarCraft 22016-10-29T14:17:07Z<p>Bobo38: /* Preliminary */ remove redundant sentence</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "!" character that cannot be used by Starcraft2 in any case.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = exclam"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "!" as an alternate wherever CapsLock is used<br />
$ sed -i -e "s:CapsLock:CapsLock,OEM8:g" <file>.SC2Hotkeys<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=455404StarCraft 22016-10-29T14:16:38Z<p>Bobo38: /* Preliminary */ add reference to DarkGrid</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using [[Wine]].<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular {{Pkg|wine}}, you might prefer {{Pkg|wine-staging}} - [[Wine#CSMT_patch|enabling CSMT via the Staging tab in winecfg]] may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008 vcrun2015<br />
<br />
==== Configuration ====<br />
<br />
If you have a GPU which doesn't properly report the amount of memory available (older integrated or early AMD APUs), you'll need to tell Wine how much VRAM you have available. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'' (right-click on Wine and New -> Key, ''Direct3D'', Enter, if it doesn't exist) right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. <br />
If the game crashes see troubleshooting section.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys].<br />
* [http://www.teamliquid.net/forum/sc2-strategy/257590-darkgrid-layout DarkGrid]<br />
<br />
All of them are projects aiming at creating more ergonomic hotkeys for SCII.<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "!" character that cannot be used by Starcraft2 in any case.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = exclam"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "!" as an alternate wherever CapsLock is used<br />
$ sed -i -e "s:CapsLock:CapsLock,OEM8:g" <file>.SC2Hotkeys<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
* You may want to start the game without the launcher: <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (or <code>Support64</code> for the 64-bit version) and <code>wine SC2Switcher.exe</code> - this might make debugging easier, but you may have to select your region in-game. Furthermore, if your game is not up-to-date, you'll be unable to log in, and no error message will be shown - simply start the Battle.net Launcher and let the game update completely.<br />
* If SC2 instacrashes, or crashes upon game start, try clicking on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>, or '''uncheck''' it if it's already checked.<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=425406StarCraft 22016-03-12T16:28:00Z<p>Bobo38: /* Hints for advanced hotkeys settings */ Enable CapsLock as a Rapid Fire Hotkey</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Should the game instacrash, click on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (not <code>Support64</code>) and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable CapsLock as a Rapid Fire Hotkey ====<br />
TheCore and TheCore Lite hotkeys rely on CapsLock to be a rapid fire hotkey.<br />
This does not work by default under Linux.<br />
To make it work, CapsLock key could be remapped to another key with [[xmodmap]].<br />
Hereafter an example with "!" character that cannot be used by Starcraft2 in any case.<br />
$ xmodmap -e "remove Lock = Caps_Lock" -e "keycode 66 = exclam"<br />
<br />
The .SC2Hotkeys file would need to be modified, to take it into account to add "!" as an alternate wherever CapsLock is used<br />
$ sed -i -e "s:CapsLock:CapsLock,OEM8:g" <file>.SC2Hotkeys<br />
<br />
{{Tip| {{ic|1= xmodmap -e "add Lock = Caps_Lock" -e "keycode 66 = Caps_Lock" }} to get back to default CapsLock behavior}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [[Xmodmap#Reverse_scrolling|Xmodmap]], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=420385StarCraft 22016-02-13T08:02:44Z<p>Bobo38: /* Hints for advanced hotkeys settings */ Enable double-key Rapid Fire Hotkey behaviour section added</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Should the game instacrash, click on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (not <code>Support64</code>) and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Unit Preloader ====<br />
SC2 never fully loads the game initially, but rather streams and loads required files on demand. Unit Preloader is a special map which forces SC2 to load '''all''' units, animations and effects, '''causing high RAM usage''', but prevents loading the data (and massive framerate drops) during multiplayer matches. Open ''Arcade'' and search for ''Unit Preloader''. There are 3 versions - start the one which corresponds to the game edition you'll want to play in multiplayer and wait for the Victory screen. All data will be preloaded until you exit the game to desktop.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable double-key Rapid Fire Hotkey behaviour ====<br />
Fancy double-key Rapid Fire Trick are not possible by default for Linux.<br />
The [https://git.framasoft.org/bobo/xkb_repeat/tree/master xkb_repeat] git project may help you unlock this behaviour, providing patches to recompile your X server.<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [https://wiki.archlinux.org/index.php/Xmodmap#Reverse_scrolling Xmodmap], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=Dwm&diff=415873Dwm2016-01-17T08:41:18Z<p>Bobo38: /* Tips and tricks */</p>
<hr />
<div>{{DISPLAYTITLE:dwm}}<br />
[[Category:Dynamic WMs]]<br />
[[de:Dwm]]<br />
[[es:Dwm]]<br />
[[fr:DWM]]<br />
[[ja:Dwm]]<br />
[[ru:Dwm]]<br />
[[zh-CN:Dwm]]<br />
{{Related articles start}}<br />
{{Related|dmenu}}<br />
{{Related|wmii}}<br />
{{Related articles end}}<br />
[http://dwm.suckless.org/ dwm] is a dynamic window manager for [[Xorg]]. It manages windows in tiled, stacked, and full-screen layouts, as well as many others with the help of [[#Patches|optional patches]]. Layouts can be applied dynamically, optimizing the environment for the application in use and the task being performed. dwm is extremely lightweight and fast, written in C and with a stated design goal of remaining under 2000 source lines of code. It provides [[multihead]] support for [[xrandr]] and Xinerama.<br />
<br />
== Installation ==<br />
<br />
{{note|If dwm is not compiled from source, opportunities for customization are lost since dwm's configuration is performed by editing its source code. See [[#Configuration]] for more information.}}<br />
<br />
[[Install]] the {{Pkg|dwm}} package. Alternatively, compile dwm from source using [[ABS]] or the {{AUR|dwm-git}} package (for the development version), making changes to the source code as desired. You may also want to install [[dmenu]], a fast and lightweight dynamic menu for [[Xorg]].<br />
<br />
== Starting dwm ==<br />
<br />
Select ''Dwm'' from the menu in a [[display manager]] of choice.<br />
<br />
Alternatively, to start dwm with {{Ic|startx}} or the [[SLiM]] login manager, simply append the following to {{ic|~/.xinitrc}}: <br />
exec dwm<br />
<br />
== Configuration ==<br />
<br />
As mentioned in [[#Installation]], dwm is configured at compile-time by editing some of its source files, namely {{ic|config.h}} and {{ic|config.mk}} and also {{ic|dwm.c}}.<br />
<br />
Once changes have been made, update the checksums in the PKGBUILD, see [[PKGBUILD#Integrity]]. Alternatively, you can skip integrity checks by calling ''makepkg'' with the {{ic|--skipinteg}} switch.<br />
<br />
Then, compile and reinstall dwm:<br />
$ makepkg -fi<br />
<br />
Assuming the configuration changes were valid, the command above will compile dwm, build and reinstall the resulting package. If problems were encountered, review the output for specific information.<br />
<br />
Finally, restart dwm in order to apply the changes.<br />
<br />
{{Tip|To recompile easily, make an alias by putting {{ic|alias redwm<nowiki>=</nowiki>'cd ~/dwm; updpkgsums; makepkg -fi --noconfirm; killall dwm'}} in your {{ic|.bashrc}} file.}}<br />
<br />
=== Patches ===<br />
<br />
The official website has a number of [http://dwm.suckless.org/patches/ patches] that can add extra functionality to dwm. These patches primarily make changes to the {{ic|dwm.c}} file but also make changes to the {{ic|config.h}} file where appropriate. For information on applying patches, see [[Patching in ABS]].<br />
<br />
==== Window tiling patches ====<br />
<br />
The [http://dwm.suckless.org/patches/bottom_stack Bottom Stack] patch provides an additional tiling mode that splits the screen horizontally, as opposed to the default vertically oriented tiling mode. Similarly, bstack horizontal splits the tiles horizontally. The [http://dwm.suckless.org/patches/gapless_grid gaplessgrid patch] allows windows to be tiled like a grid.<br />
<br />
The default behaviour of dwm is to apply the currently selected layout for all tags. To have different layouts for different tags use the [http://dwm.suckless.org/patches/pertag pertag] patch.<br />
<br />
=== Customizing config.h ===<br />
<br />
The {{ic|config.h}} file is where the general dwm preferences are stored. Most settings within the file should be self-explanatory. For detailed information on these settings, see the [http://dwm.suckless.org/customisation/ dwm website].<br />
<br />
==== Adding custom keybinds/shortcuts ====<br />
<br />
Two entries are needed in {{ic|config.h}} to create custom keybinds. One under the {{ic|/* commands */}} section, and another under the {{ic|1=static Key keys[] = {}} section.<br />
<br />
static const char *''keybindname''[] = { "''command''", "''flags''", "''arguments''", NULL };<br />
<br />
{{ic|''keybindname''}} can be anything; {{ic|''command''}}, {{ic|''flags''}} and {{ic|''arguments''}} can be anything but they have to be individually enclosed in {{ic|""}}.<br />
<br />
Some examples:<br />
<br />
{{ic|1={ MODKEY, XK_''key'', spawn, {.v = ''keybindname'' } <nowiki>}</nowiki>}} would bind {{ic|Mod+''key''}} to the command defined previously.<br />
<br />
{{ic|1={ MODKEY<nowiki>|</nowiki>ShiftMask, XK_''key'', spawn, {.v = ''keybindname'' } <nowiki>}</nowiki>}} would bind {{ic|Mod+Shift+''key''}} Use ControlMask for {{ic|Ctrl}} key.<br />
<br />
Single keys such as {{ic|Fn}} or multimedia keys have to be bound with the hex codes obtainable from the program ''xev''.<br />
<br />
{{ic|1={ 0, 0xff00, spawn, {.v = ''keybindname'' } <nowiki>}</nowiki>}} would bind foo key {{ic|0xff00}} to {{ic|''keybindname''}}.<br />
<br />
See [[Extra keyboard keys#Keycodes]] for information on finding keycodes.<br />
<br />
=== Customizing config.mk ===<br />
<br />
{{Warning|Installing software directly from source without creating a package is '''not recommended''' as [[pacman]] will not be able to track the installed files.}}<br />
<br />
The {{ic|config.mk}} file is included by Makefile. It allows you to configure how GNU ''make'' is going to compile and install dwm.<br />
<br />
If you are installing dwm directly from source, without creating a package first, then be sure to alter {{ic|config.mk}} to set the correct prefixes:<br />
<br />
Modify {{Ic|PREFIX}}:<br />
PREFIX = /usr<br />
The X11 include folder:<br />
X11INC = /usr/include/X11<br />
And the the X11 lib directory:<br />
X11LIB = /usr/lib/X11<br />
<br />
{{Tip|If you only wish to test configuration changes without affecting systemwide dwm, change {{ic|PREFIX}} to a local directory such as {{ic|${HOME}/.local}}. Note that if you are compiling using the {{Pkg|dwm}} [[PKGBUILD]], you should change the {{ic|PREFIX}} in the PKGBUILD instead as this will take precedence over {{ic|config.mk}} - see the ''package()'' function - and you should also change the {{ic|pkgname}}.}}<br />
<br />
=== Statusbar configuration ===<br />
<br />
{{Note|The following requires the {{Pkg|xorg-xsetroot}} package to be installed.}}<br />
<br />
Dwm reads the name of the root window and redirects it to the statusbar. The root window is the window within which all other windows are drawn and arranged by the window manager. Like any other window, the root window has a title/name, but it is usually undefined because the root window always runs in the background. <br />
<br />
The information that you want dwm to show in the statusbar should be defined with {{ic|xsetroot -name ""}} command in {{ic|~/.xinitrc}} or {{ic|~/.xprofile}} (if you are using a [[display manager]]). For example: <br />
{{bc|xsetroot -name "Thanks for all the fish!"}}<br />
<br />
Dynamically updated information should be put in a loop which is forked to background - see the example below:<br />
{{bc|<br />
# Statusbar loop<br />
while true; do<br />
xsetroot -name "$( date +"%F %R" )"<br />
sleep 1m # Update time every minute<br />
done &<br />
<br />
# Autostart section<br />
pcmanfm & <br />
<br />
exec dwm<br />
}}<br />
In this case the date is shown in [[wikipedia:ISO_8601|ISO 8601]] format and [[PCManFM]] is launched at startup. <br />
<br />
{{note|It is not recommended to set the update interval equal to zero or remove the "sleep" line entirely since this will cause CPU usage to rise substantially (you can assess the effect with ''top'' and [[powertop]]).}}<br />
<br />
==== Examples of statusbar configuration ====<br />
<br />
This example shows battery state (note that it depends on the {{Pkg|acpi}} package):<br />
{{bc|<nowiki><br />
while true ; do<br />
xsetroot -name "$(acpi -b | awk 'sub(/,/,"") {print $3, $4}')"<br />
sleep 1m<br />
done &<br />
exec dwm<br />
</nowiki>}}<br />
<br />
Below is another example that displays also the [[ALSA]] volume and the battery state. The latter is displayed only when the system is off-line.<br />
{{bc|<nowiki>#set statusbar<br />
while true<br />
do<br />
if acpi -a | grep off-line > /dev/null; then<br />
xsetroot -name "Bat. $(awk 'sub(/,/,"") {print $3, $4}' <(acpi -b)) \<br />
| Vol. $(awk '/dB/ { gsub(/[\[\]]/,""); print $5}' <(amixer get Master)) \<br />
| $(date +"%a, %b %d %R")"<br />
else<br />
xsetroot -name "Vol. $(awk '/dB/ { gsub(/[\[\]]/,""); print $5}' <(amixer get Master)) \<br />
| $(date +"%a, %b %d %R")"<br />
fi<br />
sleep 1s <br />
done &<br />
</nowiki>}}<br />
<br />
Alternatively, you could create a script with variables for each type of data to be displayed - this should improve readability and maintainability. See the example below: <br />
{{bc|<nowiki><br />
while true; do<br />
<br />
# Power/Battery Status<br />
if [ "$( cat /sys/class/power_supply/AC0/online )" -eq "1" ]; then<br />
DWM_BATTERY="AC";<br />
DWM_RENEW_INT=3;<br />
else<br />
DWM_BATTERY=$(( `cat /sys/class/power_supply/BAT0/energy_now` * 100 / `cat /sys/class/power_supply/BAT0/energy_full` ));<br />
DWM_RENEW_INT=30;<br />
fi;<br />
<br />
# Wi-Fi eSSID<br />
if [ "$( cat /sys/class/net/eth1/rfkill1/state )" -eq "1" ]; then<br />
DWM_ESSID=$( /sbin/iwgetid -r ); <br />
else<br />
DWM_ESSID="OFF";<br />
fi;<br />
<br />
# Keyboard layout<br />
if [ "`xset -q | awk -F \" \" '/Group 2/ {print($4)}'`" = "on" ]; then <br />
DWM_LAYOUT="ru"; <br />
else <br />
DWM_LAYOUT="en"; <br />
fi; <br />
<br />
# Volume Level<br />
DWM_VOL=$( amixer -c1 sget Master | awk -vORS=' ' '/Mono:/ {print($6$4)}' );<br />
<br />
# Date and Time<br />
DWM_CLOCK=$( date '+%e %b %Y %a | %k:%M' );<br />
<br />
# Overall output command<br />
DWM_STATUS="WiFi: [$DWM_ESSID] | Lang: [$DWM_LAYOUT] | Power: [$DWM_BATTERY] | Vol: $DWM_VOL | $DWM_CLOCK";<br />
xsetroot -name "$DWM_STATUS";<br />
sleep $DWM_RENEW_INT;<br />
<br />
done &<br />
</nowiki>}}<br />
<br />
Example output from the script above: <br />
{{bc|<nowiki>WiFi: [OFF] | Lang: [en] | Power: [96] | Vol: [on][31%] | 10 Jan 2014 Fri | 23:01<br />
</nowiki>}}<br />
<br />
{{note|In the script above the "sleep" interval is adjusted automatically depending on whether your laptop is running on battery or not. For desktop computers without a battery, this section is not necessary.}}<br />
<br />
==== Conky statusbar ====<br />
<br />
[[Conky]] can be printed to the statusbar with {{Ic|xsetroot -name}}:<br />
(conky | while read LINE; do xsetroot -name "$LINE"; done) &<br />
exec dwm<br />
<br />
To do this, conky needs to be told to output text to the console only. The following is a sample conkyrc for a dual core CPU, displaying several usage statistics:<br />
{{bc|<br />
out_to_console yes<br />
out_to_x no<br />
background no<br />
update_interval 2<br />
total_run_times 0<br />
use_spacer none<br />
<br />
TEXT<br />
$mpd_smart :: ${cpu cpu1}% / ${cpu cpu2}% ${loadavg 1} ${loadavg 2 3} :: ${acpitemp}c :: $memperc% ($mem) :: ${downspeed eth0}K/s ${upspeed eth0}K/s :: ${time %a %b %d %I:%M%P}<br />
}}<br />
<br />
For icons and color options, see [[dzen]].<br />
<br />
== Basic usage ==<br />
<br />
Besides the following sections, also consult the [http://dwm.suckless.org/tutorial dwm tutorial] for information on basic dwm usage.<br />
<br />
=== Using dmenu ===<br />
<br />
To start [[dmenu]], press {{ic|Mod1}} + {{ic|P}} ({{ic|Mod1}} should be the {{ic|Alt}} key by default). This can be changed if you so desire. Then, simply type in the first few characters of the binary you wish to run until you see it along the top bar. Use your left and right arrow keys to navigate to the binary and press enter.<br />
<br />
=== Controlling windows ===<br />
<br />
==== Giving another tag to a window ====<br />
<br />
Changing a window's tag is simple. To do so, simply bring the window into focus by hovering over it with your cursor. Then press {{ic|Shift}} + {{ic|Mod1}} + {{ic|x}}, where {{ic|x}} is the number of the tag to which you want to move the window. {{ic|Mod1}} is, by default, the {{ic|Alt}} key.<br />
<br />
==== Closing a window ====<br />
<br />
To cleanly close a window using dwm, simply press {{ic|Shift}} + {{ic|Mod1}} + {{ic|c}}.<br />
<br />
==== Window layouts ====<br />
<br />
By default, dwm will operate in tiled mode. This can be observed by new windows on the same tag growing smaller and smaller as new windows are opened. The windows will, together, take up the entire screen (except for the menu bar) at all times. There are, however, two other modes: floating and monocle. Floating mode should be familiar to users of non-tiling window managers; it allows users to rearrange windows as they please. Monocle mode will keep a single window visible at all times.<br />
<br />
To switch to floating mode, simply press {{ic|Mod1}} + {{ic|F}}. {{ic|Mod1}} is, by default, the {{ic|Alt}} key. To check if you are in floating mode, you should see something like this next to the numbered tags in the top right corner of the screen: ><>.<br />
<br />
To switch to monocole mode, press {{ic|Mod1}} + {{ic|M}}. To check if you are in monocle mode, you can see an M in square brackets (if no windows are open on that tag) or a number in square brackets (which corresponds with the number of windows open on that tag). Thus, a tag with no windows open would display this: [M], and a tag with 'n' windows open would display this: [n].<br />
<br />
To return to tiled mode, press {{ic|Mod1}} + {{ic|T}}. You will see a symbol which looks like this: []= .<br />
<br />
For using alternate window layouts, see [[#Window tiling patches]].<br />
<br />
=== Exiting dwm ===<br />
<br />
To cleanly exit dwm, press {{ic|Shift}} + {{ic|Mod1}} + {{ic|q}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Restart dwm without logging out or closing programs ===<br />
<br />
For restarting dwm without logging out or closing applications, change or add a startup script so that it loads dwm in a ''while'' loop, see below:<br />
{{bc|<br />
while true; do<br />
# Log stderror to a file <br />
dwm 2> ~/.dwm.log<br />
# No error logging<br />
#dwm >/dev/null 2>&1<br />
done<br />
}}<br />
<br />
dwm can now be restarted without destroying other X windows by pressing the usual Mod-Shift-Q combination.<br />
<br />
It is a good idea to place the above startup script into a separate file, {{ic|~/bin/startdwm}} for instance, and execute it through {{ic|~/.xinitrc}}. From this point on, when you wish to end the X session, simply execute {{Ic|killall xinit}}, or bind it to a convenient key. Alternatively, you could setup your dwm session script so that it relaunches dwm only if the binary changes. This could be useful in the case where you change a setting or update the dwm code base.<br />
<br />
{{bc|1=<br />
# relaunch DWM if the binary changes, otherwise bail<br />
csum=$(sha1sum $(which dwm))<br />
new_csum=""<br />
while true<br />
do<br />
if [ "$csum" != "$new_csum" ]<br />
then<br />
csum=$new_csum<br />
dwm<br />
else<br />
exit 0<br />
fi<br />
new_csum=$(sha1sum $(which dwm))<br />
sleep 0.5<br />
done<br />
}}<br />
<br />
=== Make the right Alt key work as if it were Mod4 (Windows Key) ===<br />
<br />
When using Mod4 (the Super/Windows Key) as the {{Ic|MODKEY}}, it may be equally convenient to have the right Alt key ({{ic|Alt_R}}) act as {{ic|Mod4}}. This will allow you to perform otherwise awkward keystrokes one-handed, such as zooming with {{ic|Alt_R}}+{{ic|Enter}}. <br />
<br />
First, find out which keycode is assigned to {{ic|Alt_R}}:<br />
xmodmap -pke | grep Alt_R<br />
<br />
Then simply add the following to the startup script (e.g. {{ic|~/.xinitrc}}), changing the keycode ''113'' if necessary to the result gathered by the previous {{Ic|xmodmap}} command:<br />
xmodmap -e "keycode 113 = Super_L" # reassign Alt_R to Super_L<br />
xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group<br />
<br />
After doing so, any functions that are triggered by the {{ic|Super_L}} key press will also be triggered by an {{ic|Alt_R}} key press.<br />
<br />
{{note|There is a #define option in [[#Customizing config.h|config.h]] which also allows you to switch the modkey}}<br />
<br />
=== Space around font in dwm's bar ===<br />
<br />
By default, dwm's bar adds 2px around the size of the font. To change this, modify the following line in {{ic|dwm.c}}:<br />
{{bc|1=bh = dc.h = dc.font.height + 2;}}<br />
<br />
=== Disable focus follows mouse behaviour ===<br />
<br />
To disable focus follows mouse behaviour comment out the following line in definiton of struct handler in {{ic|dwm.c}} <br />
{{bc|1=[EnterNotify] = enternotify, }}<br />
Note that this change can cause some difficulties; the first click on an inactive window will only bring the focus to it. To interact with window contents (buttons, fields etc) you need to click again. Also, if you have several monitors, you may notice that the keyboard focus does not switch to another monitor activated by clicking.<br />
<br />
=== Make some windows start floating ===<br />
<br />
For some windows, such as preferences dialogs, it does not make sense for these windows to be tiled - they should be free-floating instead. For example, to make Firefox's preferences dialog float, add the following to your rules array in {{ic|config.h}}:<br />
{ "Firefox", NULL, "Firefox Preferences", 1 << 8, True, -1 },<br />
<br />
<br />
=== Prevent display manager to change default background color ===<br />
<br />
Display managers tend to change default background. You can restore default background adding this one-liner:<br />
xsetroot -solid black<br />
either in ~/.xinitrc or in an autostart.sh script, with this method you're stuck with a reduce set of colors. The other trick is to setup a wallpaper, see [[List_of_applications#Wallpaper_setters]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Fixing misbehaving Java applications ===<br />
<br />
As of JRE 6u20, Java applications may misbehave in dwm because dwm is not a known window manager for [[Java]]. The misbehavior may include menus closing when the mouse is released and other minor issues. Firstly, install the {{Pkg|wmname}} package.<br />
<br />
Now use ''wmname'' to set a WM name that Java recognizes:<br />
$ wmname LG3D<br />
<br />
{{Note|This may cause some programs to behave oddly when tiled (specifically [[Chromium]]).}}<br />
This setting is not persistent so you may want to add this command to your {{ic|.xinitrc}} or {{ic|.xprofile}}.<br />
<br />
Alternatively, it is also possible to change enable {{ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}<br />
<br />
=== Fixing the extra topbar that does not disappear when changing resolution/monitors ===<br />
<br />
{{Note|this patch is intended for dwm-6.0 which is currently in the [[official repositories]]. The development version of dwm has already implemented this.}}<br />
<br />
When resizing or connecting/disconnecting different monitors there may be a remnant of the topbar stuck on the screen which cannot be removed. To fix this bug, rebuild dwm with [http://ix.io/fea this patch].<br />
<br />
=== Fixing gaps around terminal windows ===<br />
<br />
If there are empty gaps of desktop space outside terminal windows, it is likely due to the terminal's font size. Either adjust the size until finding the ideal scale that closes the gap, or toggle {{Ic|resizehints}} to ''False'' in {{ic|config.h}}:<br />
static Bool resizehints = False; /* True means respect size hints in tiled resizals */<br />
<br />
This will cause dwm to ignore resize requests from all client windows, not just terminals. The downside to this workaround is that some terminals may suffer redraw anomalies, such as ghost lines and premature line wraps, among others.<br />
<br />
== See also ==<br />
<br />
* [http://dwm.suckless.org/ dwm's official website]<br />
* [http://www.youtube.com/watch?v=GQ5s6T25jCc Introduction to dwm video]<br />
* [[dmenu]] - Simple application launcher from the developers of dwm<br />
* The [https://bbs.archlinux.org/viewtopic.php?id=57549/ dwm thread] on the forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=92895/ Hacking dwm thread]<br />
* Check out the forums' [https://bbs.archlinux.org/viewtopic.php?id=57768/ wallpaper thread] for a selection of dwm wallpapers<br />
*[https://bbs.archlinux.org/viewtopic.php?id=74599 Show off your dwm configuration forum thread]<br />
* [http://wongdev.com/blog/dwm-tags-are-not-workspaces/ dwm: Tags are not workspaces]</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=408962StarCraft 22015-11-11T22:59:22Z<p>Bobo38: /* Hints for Performance Tuning */ Direct3D configuration added out of 2 links found</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[Pacman|install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Should the game instacrash, click on the Battle.net logo in the Launcher -> Settings -> Game Settings -> Check <code>Launch 32-bit client (instead of 64-bit)</code>. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> (not <code>Support64</code>) and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
==== Direct3D configuration ====<br />
<br />
Direct3D settings could be tuned through "wine regedit". It seems possible to use opengl for DirectDrawRender.<br />
$ echo -e "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]\n\"DirectDrawRenderer\"=\"opengl\"" | wine regedit -<br />
$ echo -e "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]\n\"Multisampling\"=\"enabled\"" | wine regedit -<br />
$ echo -e "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]\n\"OffscreenRenderingMode\"=\"pbuffer\"" | wine regedit -<br />
$ echo -e "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]\n\"UseGLSL\"=\"enabled\"" | wine regedit -<br />
$ echo -e "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]\n\"VertexShaderMode\"=\"hardware\"" | wine regedit -<br />
<br />
Another key may be added for Direct3D : "VideoMemorySize" with a string value of the memory size you graphic card has. To know this value :<br />
# dmesg | grep VRAM<br />
<br />
'''sources :'''<br />
* [https://appdb.winehq.org/objectManager.php?sClass=version&iId=20882 config shared on winehq SC2 page]<br />
* [http://ubuntuforums.org/showthread.php?t=1824006 some Ubuntu thread about "DirectDrawRenderer"]<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [https://wiki.archlinux.org/index.php/Xmodmap#Reverse_scrolling Xmodmap], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=407119StarCraft 22015-10-27T08:35:27Z<p>Bobo38: /* Enable Scrollclick */ space change</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[Pacman|install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
Using [https://wiki.archlinux.org/index.php/Xmodmap#Reverse_scrolling Xmodmap], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=407118StarCraft 22015-10-27T08:32:25Z<p>Bobo38: /* Enable Scrollclick */ details about scroll click settings</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[Pacman|install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable Scrollclick ====<br />
Some scrollclick demo videos:<br />
* [https://www.youtube.com/watch?v=7pQKnS1CPEQ infestor spawning infested terran]<br />
* [https://www.youtube.com/watch?v=9aPd8_9_vB4 scrollclick applied to protoss]<br />
<br />
<br />
Using [https://wiki.archlinux.org/index.php/Xmodmap#Reverse_scrolling Xmodmap], it possible to set your regular 3-buttons mouse with scroll wheel to practice scrollclick.<br />
First change scroll fonction to "forward mouse button" and "back mouse button":<br />
$ xmodmap -e "pointer = 1 2 3 8 9 6 7 4 5"<br />
Then add alternate key SCII hotkeys for:<br />
* Global=>Unit Management=>Choose Ability or AI target<br />
* Global=>Unit Management=>Smart Command<br />
{{Tip|{{ic|1=xmodmap -e "pointer = default"}} resets to default mouse functionality}}<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=407116StarCraft 22015-10-27T08:06:23Z<p>Bobo38: /* Rapid Fire Hotkey throughput */ details about X autorepeat settings</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[Pacman|install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
[[Xorg]] keyboard autorepeat can be modified. It may make sense to reduce delay before autorepeat starts (default=660 [ms]). Increasing a bit the repeat rate (default=25 [/s]) is a trade-off: speed vs accuracy.<br />
<br />
To apply the settings:<br />
$ xset r rate <delay_to_activate_in_ms> <nb_of_repeats_per_second><br />
<br />
{{Tip| {{ic|xset r rate}} get X back to default autorepeat settings}}<br />
{{Tip| {{ic|xset q}} let you know the current X settings}}<br />
<br />
==== Enable Scrollclick ====<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=407115StarCraft 22015-10-27T07:51:17Z<p>Bobo38: advanced hotkey settings: preliminary infos to point at relevant URLs</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[Pacman|install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
==== Preliminary ====<br />
Have a look at projects aiming at creating more ergonomic hotkeys for SCII:<br />
* [http://www.teamliquid.net/forum/sc2-strategy/341878-thecore-advanced-keyboard-layout TheCore]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/333891-thecore-lite-advanced-keyboard-layout TheCore Lite]<br />
* [http://www.teamliquid.net/forum/sc2-strategy/404476-fleet-keys-refined-hotkey-systems Fleet Keys]. All of them are projects aiming at creating more ergonomic hotkeys for SCII<br />
[http://www.teamliquid.net/forum/sc2-strategy/446530-rapid-fire-hotkey-trick Rapid Fire] Hotkeys are implemented in those hotkeys settings.<br />
<br />
==== Rapid Fire Hotkey throughput ====<br />
<br />
==== Enable Scrollclick ====<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=StarCraft_2&diff=407114StarCraft 22015-10-27T07:40:06Z<p>Bobo38: </p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
<br />
[http://eu.battle.net/sc2/en/ StarCraft II] is a real-time strategy game from Blizzard Entertainment released in 2010. A native Linux version isn't available, but the game is fully playable using Wine.<br />
<br />
== Installation ==<br />
<br />
==== Packages ====<br />
<br />
You need to [[Pacman|install]] {{Pkg|wine}}, {{Pkg|lib32-libjpeg-turbo}}, {{Pkg|lib32-libpng}} and {{Pkg|lib32-libldap}}. If you are using [[PulseAudio]], install {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}} available in [[multilib]]. Optionally, instead of regular Wine, you might prefer [[Wine#CSMT_via_wine-staging|Wine-Staging]] - enabling CSMT via the Staging tab in winecfg may greatly improve performance, but is not required. You'll also need to use {{Pkg|winetricks}} and install the following components (to use the Map Editor and avoid crashes on certain system configurations):<br />
<br />
$ winetricks corefonts vcrun2005 vcrun2008<br />
<br />
==== Configuration ====<br />
<br />
You'll need to tell Wine how much VRAM you have. Open the Registry Editor:<br />
<br />
$ regedit<br />
<br />
Go to ''HKEY_CURRENT_USER/Software/Wine/Direct3D'', right-click on ''Direct3D'' (if such a key doesn't exist, right-click on ''Wine'', New -> Key, ''Direct3D'', OK), select New -> String Value, ''VideoMemorySize'', which you should set to the amount of VRAM your GPU has, in MB (for example, "1024" or "2048"). If you're using an integrated GPU, try to preallocate a fair amount of RAM for your GPU in BIOS/UEFI Setup and use the same value here (512 is good enough for low-medium settings).<br />
<br />
* If the Battle.net App doesn't work, use a new Wine prefix.<br />
* '''If you are asked to install Gecko, then click Install to do so.'''<br />
* If the Battle.net App window is white, open ''winecfg'', go to ''Applications'' and set ''Windows Version'' to "Windows XP". You may do so for Battle.net.exe only, as SC2 itself works fine with this being set to anything newer.<br />
<br />
==== Installing with the Battle.net App ====<br />
<br />
Recent SC2 versions require the [http://eu.battle.net/en/app/ Battle.net App] to be installed, as it replaced the launchers for all Blizzard games. Furthermore, recent patches massively changed the file structure in their newer games - if you have a fast enough internet connection, it might be faster to download a new copy from the Battle.net App than trying to install the game from DVD. Simply install the app, select your region, log in with a Battle.net Account, then select StarCraft II on the left and click Install. You'll be able to select your game language and installation location. (Installing the game on a native Linux filesystem instead of NTFS might improve loading times.)<br />
<br />
==== Installing from DVD ====<br />
<br />
{{Note|If you have a reasonable internet connection (10Mbps or better), redownload the game. Recent patches were massive and you'll literally spend more time waiting for the game to reconfigure and patch than just redownloading the whole game again. Furthermore, you can stream the game while playing.}}<br />
<br />
* Mount DVD/DVD Image, (unhide invisible data), for example:<br />
$ mount -o ro,unhide,uid=1000 /dev/dvd /media/dvd (for the DVD)<br />
$ mount -o loop,ro,unhide,uid=''your_id'' ''starcraft.iso'' /media/dvd (for an image) <br />
* Start the installer:<br />
$ wine start /unix /media/dvd/Installer.exe<br />
<br />
==== Playing StarCraft II ====<br />
<br />
Launch the game from the Battle.net App. Alternatively, you may <code>cd ~/.wine/drive_c/Program\ Files/StarCraft\ II\Support</code> and <code>wine SC2Switcher.exe</code> to start the game without the launcher - this will make debugging easier, but you may have to select your region in-game.<br />
<br />
== Hints for Performance Tuning ==<br />
<br />
* {{ic|Ctrl+Alt+F}} shows FPS.<br />
* Make sure that you are using the latest available graphics drivers. Nvidia drivers should be 256.35 or later (drivers in repositories are up to date).<br />
* Edit the variables.txt in your My Documents/Starcraft II/ following the guide [http://www.teamliquid.net/forum/viewmessage.php?topic_id=142046 here].<br />
* If you're using Intel HD Graphics 3000, you may have to set the VideoMemorySize to 128 (see the Configuration above). The game will complain about not enough VRAM otherwise.<br />
* If you have problems updating the game and see the following in the output:<br />
{{bc|<nowiki>Agent started on port #6882<br />
Executing operation: disable_firewall applicationPath="C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe" applicationName="Battle.net Update Agent"<br />
AgentAsAdmin failed to add a firewall exception for 'C:\users\Public\Application Data\Battle.net\Agent\Agent.4432\Agent.exe'.<br />
Registered Event: "shutdown event"<br />
Registered Event: "database flush event"<br />
PostTo succeeded status: 0 for url: http://enGB.patch.battle.net:1119/patch<br />
Post Data:<br />
<version program="Agnt"><record program="Bnet" component="Win" version="1" /><record program="Agnt" component="cdn" version="1" /><record program="Agnt" component="cfg" version="1" /><record program="Agnt" component="Win" version="1199" /></version><br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:<br />
<br />
DownloadTo failed error: 0 of article: from:</nowiki>}}<br />
Launch Agent.exe --nohttpauth:<br />
$ killall Agent.exe && wine ~/.wine/drive_c/users/Public/AppData/Battle.net/Agent/Agent.exe --nohttpauth<br />
You can now restart the Battle.net App. The updater should proceed smoothly.<br />
<br />
== Hints for advanced hotkeys settings ==<br />
<br />
== Troubleshooting ==<br />
<br />
* For some, in-game resolution changing does not work. Editing 'width=x' and 'height=y' in Variables.txt in My Documents/Starcraft II solves this issue. Replace x and y with the prefered resolution.<br />
* Should you experience graphics problems (no 3D background in menu, blue non-texturized units and other glitches), launch the game without Battle.net App (see above) like this: <code>force_s3tc_enable=true wine SC2Switcher.exe</code>. You can also add this option to the .desktop entry in ~/.local/share/applications/wine/Programs/StarCraft II, or edit your <code>~/.drirc</code> file to enable this setting permanently for all apps. Using {{Pkg|driconf}}, you may just enable this setting with a simple GUI.<br />
<br />
== See also ==<br />
<br />
* [https://appdb.winehq.org/objectManager.php?sClass=application&iId=11123 StarCraft II] (WineHQ AppDB)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23806 StarCraft II crashes because of ACCESS_VIOLATION before the loading screen] (WineHQ bug tracking database)<br />
* [http://bugs.winehq.org/show_bug.cgi?id=23323 World of Warcraft crashes upon login after 3.3.5 patch.] (WineHQ bug tracking database)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=101822 starcraft2 crashing on loading] (Arch Linux forums)<br />
* [https://bbs.archlinux.org/viewtopic.php?id=103354 starcraft2 fails to update to patch 1.03] (Arch Linux forums)<br />
* [http://eu.battle.net/sc2/en/forum/topic/283440977 Patch News] (battle.net EU forums)</div>Bobo38https://wiki.archlinux.org/index.php?title=Bash&diff=390422Bash2015-08-08T07:50:54Z<p>Bobo38: /* Fast word movement with Ctrl */</p>
<hr />
<div>[[Category:Command shells]]<br />
[[de:Bash]]<br />
[[es:Bash]]<br />
[[it:Bash]]<br />
[[ja:Bash]]<br />
[[ru:Bash]]<br />
[[zh-CN:Bash]]<br />
{{Related articles start}}<br />
{{Related|Bash/Functions}}<br />
{{Related|Environment variables}}<br />
{{Related|Readline}}<br />
{{Related|Color Bash Prompt}}<br />
{{Related|Fortune}}<br />
{{Related|Pkgfile}}<br />
{{Related articles end}}<br />
'''Bash''' (Bourne-again Shell) is a [[command-line shell]]/programming language by the [[GNU Project]]. Its name is a homaging reference to its predecessor: the long-deprecated Bourne shell. Bash can be run on most UNIX-like operating systems, including GNU/Linux.<br />
<br />
== Invocation ==<br />
<br />
{{Poor writing|Some duplication left, cryptic explanations}}<br />
<br />
{{Expansion|Expand on non-interactive shells, see [[Talk:Bash#Return in non interactive mode]]}}<br />
<br />
Bash behaviour can be altered depending on how it is invoked. Some descriptions of different modes follow.<br />
<br />
If Bash is spawned by {{ic|login}} in a tty, by an [[SSH]] daemon, or similar means, it is considered a '''login shell'''. This mode can also be engaged using the {{ic|-l}}/{{ic|--login}} command line option.<br />
<br />
Bash is considered an '''interactive shell''' if it is started neither with the {{ic|-c}} option nor any non-option arguments, and whose standard input and error are connected to terminals.<br />
<br />
=== Legacy mode ===<br />
<br />
In Arch {{ic|/bin/sh}} (which used to be the Bourne shell executable) is symlinked to {{ic|/bin/bash}}. If Bash is invoked with the name {{ic|sh}}, it tries to mimic the startup behavior of historical versions of {{ic|sh}}, including POSIX compability.<br />
<br />
A login shell run in legacy mode sources {{ic|/etc/profile}}, then {{ic|~/.profile}}.<br />
<br />
=== Configuration files ===<br />
<br />
{| class="wikitable"<br />
! File<br />
! When file commands are read and executed (''sourced'')<br />
|-<br />
| {{ic|/etc/profile}}<br />
| An ''interactive'' shell that is also a ''login'' shell (for example, from {{ic|/usr/bin/login}}). Sources application settings in {{ic|/etc/profile.d/*.sh}}, and {{ic|/etc/bash.bashrc}}.<br />
|-<br />
| {{ic|/etc/bash.bashrc}}<br />
| An interactive shell (for example, a [[terminal emulator]]). Depends on the {{ic|1=-DSYS_BASHRC="/etc/bash.bashrc"}} compilation flag. Sources {{ic|/usr/share/bash-completion/bash_completion}}.<br />
|-<br />
| {{ic|~/.bash_profile}}<br />
| An interactive shell that is also a login shell. Per-user, after {{ic|/etc/profile}}. If this file does not exist, {{ic|~/.bash_login}} and {{ic|~/.profile}} are checked in that order. The skeleton file {{ic|/etc/skel/.bash_profile}} also sources {{ic|~/.bashrc}}.<br />
|-<br />
| {{ic|~/.bashrc}}<br />
| An interactive shell. Per-user, after {{ic|/etc/bash.bashrc}}.<br />
|-<br />
| {{ic|~/.bash_logout}}<br />
| After exit of a login shell.<br />
|}<br />
<br />
In short, all interactive shells source {{ic|/etc/bash.bashrc}} and {{ic|~/.bashrc}}, while interactive ''login'' shells also source {{ic|/etc/profile}} and {{ic|~/.bash_profile}}.<br />
<br />
{{Note|While interactive, non-login shells do ''not'' source {{ic|~/.bash_profile}}, they still inherit the environment from their parent process (which may be a login shell). See [http://mywiki.wooledge.org/ProcessManagement#On_processes.2C_environments_and_inheritance] for details.}}<br />
<br />
See the ''INVOCATION'' section of {{ic|man 1 bash}} or [http://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files] for the complete sequence.<br />
<br />
=== Shell and environment variables ===<br />
<br />
{{Merge|#Configuration files|Duplication}}<br />
<br />
The behavior of Bash and programs run by it can be influenced by a number of environment variables. [[Environment variables]] are used to store useful values such as command search directories, or which browser to use. When a new shell or script is launched it inherits its parent's variables, thus starting with an internal set of shell variables[http://www.kingcomputerservices.com/unix_101/understanding_unix_shells_and_environment_variables.htm ].<br />
<br />
These shell variables in Bash can be exported in order to become environment variables:<br />
<br />
VARIABLE=content<br />
export VARIABLE<br />
<br />
or with a shortcut<br />
<br />
export VARIABLE=content<br />
<br />
Environment variables are conventionally placed in {{ic|~/.profile}} or {{ic|/etc/profile}} so that all bourne-compatible shells can use them.<br />
<br />
See [[Environment variables]] for more general information.<br />
<br />
== Command line ==<br />
<br />
Bash command line is managed by the separate library called [[Readline]]. Readline provides a lot of shortcuts for interacting with the command line i.e. moving back and forth on the word basis, deleting words etc. It is also Readline's responsibility to manage [[Readline#History|history]] of input commands. Last, but not least, it allows you to create [[Readline#Macros|macros]].<br />
<br />
=== Tab completion ===<br />
<br />
[[Wikipedia:Command-line_completion|Tab completion]] is the option to auto-complete partial typed commands by pressing {{ic|Tab}} twice (enabled by default).<br />
<br />
==== Single-tab ability ====<br />
<br />
For single press {{ic|Tab}} results for when a partial or no completion is possible:<br />
<br />
{{hc|~/.inputrc|<br />
set show-all-if-ambiguous on<br />
}}<br />
<br />
Alternatively, for results when no completion is possible:<br />
<br />
{{hc|~/.inputrc|<br />
set show-all-if-unmodified on<br />
}}<br />
<br />
==== Additional programs and options ====<br />
<br />
Bash has native support for for tab completion of: commands, filenames, and variables. This functionality can be extended with the package {{Pkg|bash-completion}}; it extends its functionality by adding a subset of tab completions to popular commands and their options. With {{Pkg|bash-completion}} know that normal completions (such as {{ic|$ ls file.*<tab><tab>}}) will behave different; however, they can be re-enabled with {{ic|$ compopt -o bashdefault <prog>}} (see [https://bbs.archlinux.org/viewtopic.php?id=128471] and [https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html] for more detail). Also for older systems {{Pkg|bash-completion}} may not be resourcefully convenient.<br />
<br />
==== Additional programs and options manually ====<br />
<br />
For basic completion use lines in the form of {{ic|complete -cf your_command}} (these will conflict with the {{Pkg|bash-completion}} settings):<br />
<br />
{{hc|~/.bashrc|<br />
complete -cf sudo<br />
complete -cf man<br />
}}<br />
<br />
=== History completion ===<br />
<br />
History completion bound to arrow keys (down, up) (see: [[Readline#History]] and [https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Readline Init File Syntax]):<br />
<br />
{{hc|~/.bashrc|<br />
bind '"\e[A": history-search-backward'<br />
bind '"\e[B": history-search-forward'<br />
}}<br />
<br />
or:<br />
<br />
{{hc|~/.inputrc|<br />
"\e[A": history-search-backward<br />
"\e[B": history-search-forward<br />
}}<br />
<br />
=== Fast word movement with Ctrl ===<br />
<br />
Bash allows to quickly move between words with {{ic|Ctrl+Left}} and {{ic|Ctrl+Right}}.<br />
<br />
{{hc|~/.inputrc|<br />
"\e[1;5C": forward-word<br />
"\e[1;5D": backward-word<br />
"\e[5C": forward-word<br />
"\e[5D": backward-word<br />
"\e\e[C": forward-word<br />
"\e\e[D": backward-word<br />
}}<br />
<br />
Note that those lines are already part of /etc/inputrc. For urxvt user, please add [https://snarfed.org/control_arrow_keys_in_rxvt_tcsh_and_emacs thoses lines]:<br />
{{hc|~/.inputrc|<br />
"\eOd": backward-word<br />
"\eOc": forward-word<br />
}}<br />
<br />
=== Mimic Zsh run-help ability ===<br />
<br />
Zsh can invoke the manual for the written command pushing {{ic|Alt+h}}.<br />
A similar behaviour is obtained in Bash by appending this line in your {{ic|inputrc}} file:<br />
{{hc|/etc/inputrc|<br />
"\eh": "\C-a\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"<br />
}}<br />
<br />
== Aliases ==<br />
<br />
[[Wikipedia:Alias_(command)|alias]] is a command, which enables a replacement of a word with another string. It is often used for abbreviating a system command, or for adding default arguments to a regularly used command. <br />
<br />
Personal aliases are preferably stored in {{ic|~/.bashrc}}, and system-wide aliases (which affect all users) belong in {{ic|/etc/bash.bashrc}}. See [https://gist.github.com/anonymous/a9055e30f97bd19645c2] and [[Pacman tips#Shortcuts]] for example aliases.<br />
<br />
For functions, see [[Bash/Functions]].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Prompt customization ===<br />
<br />
{{Expansion|Mention {{ic|PS2}} to {{ic|PS4}}[http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html]}}<br />
{{Merge|Color Bash Prompt}}<br />
<br />
The Bash prompt is governed by the variable {{ic|$PS1}}. To colorize the Bash prompt, use:<br />
{{hc|~/.bashrc|2=<br />
#PS1='[\u@\h \W]\$ ' # To leave the default one<br />
#DO NOT USE RAW ESCAPES, USE TPUT<br />
reset=$(tput sgr0)<br />
red=$(tput setaf 1)<br />
blue=$(tput setaf 4)<br />
green=$(tput setaf 2)<br />
<br />
PS1='\[$red\]\u\[$reset\] \[$blue\]\w\[$reset\] \[$red\]\$ \[$reset\]\[$green\] '<br />
}}<br />
This {{ic|$PS1}} is useful for a root Bash prompt, with red designation and green console text. The {{ic|\[}} and {{ic|\[}} should wrap non-printing characters sequences to avoid wrong estimation of PS1 size which leads to display issues when navigating through history and editing the command line. For more info, see: [[Color Bash Prompt]].<br />
<br />
==== Customize title ====<br />
<br />
The {{ic|$PROMPT_COMMAND}} variable allows you to execute a command before the prompt. For example, this will change the title to your full current working directory:<br />
<br />
{{hc|~/.bashrc|<nowiki><br />
export PROMPT_COMMAND='echo -ne "\033]0;$PWD\007"'<br />
</nowiki>}}<br />
<br />
This will change your title to the last command run, and make sure your history file is always up-to-date:<br />
{{hc|~/.bashrc|<nowiki><br />
export HISTCONTROL=ignoreboth<br />
export HISTIGNORE='history*'<br />
export PROMPT_COMMAND='history -a;echo -en "\e]2;";history 1|sed "s/^[ \t]*[0-9]\{1,\} //g";echo -en "\e\\";'<br />
</nowiki>}}<br />
<br />
=== Command-not-found (AUR) ===<br />
<br />
[[pkgfile]] includes a "command not found" hook that will automatically search the official repositories, when entering an unrecognized command.<br />
An alternative "command not found" hook is provided by {{AUR|command-not-found}}. Usage example:<br />
<br />
{{hc|$ abiword|<br />
The command 'abiword' is been provided by the following packages:<br />
'''abiword''' (2.8.6-7) from extra<br />
[ abiword ]<br />
'''abiword''' (2.8.6-7) from staging<br />
[ abiword ]<br />
'''abiword''' (2.8.6-7) from testing<br />
[ abiword ]<br />
}}<br />
<br />
To load it automatically:<br />
<br />
{{hc|''~/.bashrc'' or ''~/.zshrc''|<br />
[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh<br />
}}<br />
<br />
=== Disable Ctrl+z in terminal ===<br />
<br />
You can disable the {{ic|Ctrl+z}} feature (pauses/closes your application) by wrapping your command like this:<br />
<br />
#!/bin/bash<br />
trap "" 20<br />
''adom''<br />
<br />
Now when you accidentally press {{ic|Ctrl+z}} in {{AUR|adom}} instead of {{ic|Shift+z}} nothing will happen because {{ic|Ctrl+z}} will be ignored.<br />
<br />
=== Clear the screen after logging out ===<br />
<br />
To clear the screen after logging out on a virtual terminal:<br />
{{hc|~/.bash_logout|<br />
clear<br />
reset<br />
}}<br />
<br />
=== ASCII historical calendar ===<br />
<br />
To install [http://www.openbsd.org/cgi-bin/man.cgi?query=calendar&sektion=1 calendar] files in your {{ic|~/.calendar}} directory you will need the {{Pkg|rpmextract}} package installed. Then from your home directory, run the following:<br />
<br />
$ mkdir -p ~/.calendar<br />
$ curl -o calendar.rpm ftp://ftp.univie.ac.at/systems/linux/fedora/epel/5/x86_64/calendar-1.25-4.el5.x86_64.rpm<br />
$ rpm2cpio calendar.rpm | bsdtar -C ~/.calendar --strip-components=4 -xf - ./usr/share/c*<br />
<br />
This will then print out the calendar items:<br />
<br />
$ sed -n "/$(date +%m\\/%d\\\|%b\*\ %d)/p" $(find ~/.calendar /usr/share/calendar -maxdepth 1 -type f -name 'c*' 2>/dev/null);<br />
<br />
=== Auto "cd" when entering just a path ===<br />
<br />
Bash can automatically prepend {{ic|cd }} when entering just a path in the shell. For example:<br />
{{hc|$ /etc|<br />
bash: /etc: Is a directory<br />
}}<br />
<br />
But after:<br />
{{hc|~/.bashrc|<br />
shopt -s autocd<br />
}}<br />
<br />
You get:<br />
[user@host ~] $ /etc<br />
cd /etc<br />
[user@host etc]<br />
<br />
== Troubleshooting ==<br />
<br />
=== Line wrap on window resize ===<br />
<br />
When resizing a [[terminal emulator]], Bash may not receive the resize signal. This will cause typed text to not wrap correctly and overlap the prompt. The {{ic|checkwinsize}} shell option checks the window size after each command and, if necessary, updates the values of {{ic|LINES}} and {{ic|COLUMNS}}.<br />
<br />
{{hc|~/.bashrc|<br />
shopt -s checkwinsize<br />
}}<br />
<br />
=== Shell exits even if ignoreeof set ===<br />
<br />
If you have set the {{ic|ignoreeof}} option and you find that repeatedly hitting {{ic|ctrl-d}} causes the shell to exit, it is because this option only allows 10 consecutive invocations of this keybinding (or 10 consecutive EOF characters, to be precise), before exiting the shell.<br />
<br />
To allow higher values, you have to use the IGNOREEOF variable.<br />
<br />
For example:<br />
export IGNOREEOF=100<br />
<br />
== See also ==<br />
<br />
* [https://www.gnu.org/software/bash/manual/bashref.html Bash Reference]<br />
* [https://www.gnu.org/software/bash/manual/bash.html Bash manual page]<br />
* [https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html Readline Init File Syntax]<br />
* [http://www.aosabook.org/en/bash.html The Bourne-Again Shell] - The third chapter of ''The Architecture of Open Source Applications''<br />
* [http://shellcheck.net Shellcheck] - Check bash scripts for common errors<br />
<br />
=== Tutorials ===<br />
<br />
* [http://mywiki.wooledge.org/BashGuide BashGuide on Greg's Wiki]<br />
* [http://mywiki.wooledge.org/BashFAQ BashFAQ on Greg's Wiki]<br />
* [http://wiki.bash-hackers.org/doku.php Bash Hackers Wiki]<br />
* [http://tldp.org/LDP/abs/html/ Advanced Bash Scripting Guide]<br />
* [http://www.ibm.com/developerworks/linux/library/l-bash.html Bash Scripting by Example]<br />
* [http://www.grymoire.com/Unix/Quote.html Quote Tutorial]<br />
* [http://linuxtutorial.todolistme.net Introduction to Bash]<br />
<br />
=== Community ===<br />
<br />
* [irc://irc.freenode.net#bash An active and friendly IRC channel for Bash]<br />
* [http://bashscripts.org Bashscripts.org]<br />
<br />
=== Examples ===<br />
<br />
* [http://tldp.org/HOWTO/Xterm-Title-4.html How to change the title of an xterm]</div>Bobo38