Ошибка bad serial number given in setup

  1. Home
  2. Arma 2: Operation Arrowhead
  3. Steam


Arma 2: Operation Arrowhead

Steam

There are several possible fixes for this issue.

First, run Arma 2 once. Then try to run Arma OA (without beta or DayZ).  If that won’t help you can try to verify game cache of the Arma 2 and Arma OA.

1.) If that will not help, follow this guide:

  1. RUN STEAM AS ADMINISTRATOR
  2. Exit Steam.
  3. Right-click on Steam icon.
  4. Left-click on «Run As Administrator».
  5. If the problem persists, reboot your computer and try the procedure again.

2.) DELETE ARMA 2 OA REGISTRY ENTRIES

  1. Exit Steam, open Start menu and type this directly into the menu (in Windows XP, you will have to click on «Run» first) regedit
  2. Press Enter.
  3. In regedit window, click on HKEY_LOCAL_MACHINE.
  4. Press CTRL+F to bring up search.
  5. Look for «ArmA» (without the quotes).
  6. Delete all the «ArmA» entries you find from the registry.
  7. Run Steam as Administrator.
  8. Right-click on the game in Steam Library.
  9. Click on «Properties».
  10. Select «Local files» tab and click on «Verify integrity of game cache files» button.
  11. Please wait, the process can take several minutes.

3) REINSTALL STEAM

  1. Go to Steam’s installation folder.
  2. Delete everything there except «steam.exe» and «steamapps» folder.
  3. Run «steam.exe» — Steam will reinstall itself automatically.

С основами по использованию Wine можно ознакомиться здесь: https://noostyche.ru/blog/2020/04/30/ispolzovanie-wine-dlya-zapuska-windows-programm-v-linux/

На Wine и Proton проблема характерна для Arma: Cold War Assault (Operation Flashpoint), Arma 1 и 2, кроме Arma 2: Operation Arrowhead (с ней всё в порядке). Она заключается в том, что установочный скрипт (xxxxx_install.vdf) не может сгенерировать специальный код в шестнадцатеричной системе счисления из ключа (серийного номера) игры и подставить его в реестр Windows, то есть в файл реестра в префиксе. Решение заключается в генерации кода из лицензионного ключа и добавлении его в реестр вручную.

Генератор кода из ключа можно подсмотреть здесь: https://github.com/ValveSoftware/Proton/issues/767#issuecomment-508957522

Альтернативный вариант решения проблемы: https://github.com/ValveSoftware/Proton/issues/1308

Генератор кода представлен скриптом на языке perl:

echo 1234-56789-ABCDE-FGHIJ-KLMNO | perl -ne 's/-//g; tr/IO/10/; for $i (0..2) { $res = 0; for $j (0..7) { $res += index("0123456789ABCDEFGHJKLMNPRSTVWXYZ", substr($_, $i * 8 + $j, 1)) << (5 * $j); }; printf("%010x", $res); }; print("\n");'

Примечание: Интерпретатор perl всё ещё присутствует во многих дистрибутивах Linux, поэтому команду можно выполнить в терминале и сразу получить результат. Альтернативным вариантом является возможность воспользоваться онлайн-сервисом.

В первом фрагменте команды можно увидеть буквенно-цифровую строку из 24 символов — здесь должен быть ваш лицензионный ключ игры, который можно посмотреть в Steam: ПКМ на игре в «Библиотеке» / Управление / Цифровые ключи.

После выполнения команды в выводе терминала окажется код подобный этому: 41cc520c4183dcd62d4905ab49c831

Это 15 пар символов в шестнадцатеричной системе счисления. Именно этот код необходимо добавить в реестр префикса игры.

Чтобы префикс был создан, нужно запустить игру один раз, полюбоваться на ошибку и закрыть её.

Для Arma: Cold War Assault префикс и файл реестра по умолчанию располагаются здесь:

/home/$USER/.local/share/Steam/steamapps/compatdata/65790/pfx/system.reg

Для обычной Arma 2:

/home/$USER/.local/share/Steam/steamapps/compatdata/33910/pfx/system.reg

Примечание: Номером префикса является ID игры в Steam.

Отредактировать файл реестра можно двумя способами: через графическую Wine-программу regedit и через редактирование обычным текстовым редактором (nano, gedit, kate и подобными).

Примечание по Arma 2.

С этой игрой есть довольно неприятная особенность. Установочно-конфигурационный скрипт 33910_install.vdf, который находится в корневом каталоге игры, при запуске игры каждый раз стирает(!) запись ключа (шестнадцатеричное значение) из реестра, что приводит к той самой «Bad serial given in setup». Чтобы он не осуществлял эту диверсию, необходимо лишить пользователя прав его выполнять и читать. Пример:

sudo chmod 000 "/home/$USER/.local/share/Steam/steamapps/common/Arma 2/33910_install.vdf"

Или через графический интерфейс:

Всё, диверсионная деятельность скрипта пресечена. Теперь можно приступить к редактированию реестра.

Wine. Редактирование файла реестра с помощью regedit.

Начнём с Arma 2.

WINEPREFIX="/home/$USER/.local/share/Steam/steamapps/compatdata/33910/pfx" wine regedit

Примечание: Если будет предложено установить в префикс Mono и Gecko — отказываемся, для префикса игры это ни к чему.

  1. Перейти в HKEY_LOCAL_MACHINE\Software\Wow6432Node\bohemia interactive studio\arma 2
  2. Выбрать строку key.
  3. ПКМ / Изменить…
  4. В появившемся окне в текстовое поле переписать сгенерированный код. В данном примере это 41cc520c4183dcd62d4905ab49c831.
  5. Подтвердить изменения.
  6. Закрыть окно «Редактора реестра».

Теперь можно запустить игру и ошибки «Bad serial given in setup» более не будет.

Для Arma: Cold War Assault алгоритм действий тот же. Разница только в пути до префикса и до записи в реестре.

WINEPREFIX="/home/$USER/.local/share/Steam/steamapps/compatdata/65790/pfx" wine regedit

Путь до записи в реестре: HKEY_LOCAL_MACHINE\Software\Wow6432Node\bohemia interactive studio\coldwarassault

Редактирование реестра текстовым редактором.

Для Arma 2.

Открываем файл реестра, как текстовый документ:

/home/$USER/.local/share/Steam/steamapps/compatdata/33910/pfx/system.reg

Необходимо найти строку:

[Software\\Wow6432Node\\bohemia interactive studio\\arma 2]

Ниже будет строка:

«key»=hex:

Это то самое место, куда нужно скопировать сгенерированный код. Пример записи:

«key»=hex:41,cc,52,0c,41,83,dc,d6,2d,49,05,ab,49,c8,31

Важно обратить внимание, что код разбит на пары символов, которые отделены запятой без пробела.

Сохранить изменения в файле.

Теперь проблема с «Bad serial given in setup» решена.

Для Arma: Cold War Assault.

/home/$USER/.local/share/Steam/steamapps/compatdata/65790/pfx/system.reg

Искомый блок в реестре:

[Software\\Wow6432Node\\bohemia interactive studio\\coldwarassault]

В строку «KEY»=hex: прописать сгенерированный код:

«KEY»=hex:41,cc,52,0c,41,83,dc,d6,2d,49,05,ab,49,c8,31

Сохранить изменения в файле.

Готово.

Теперь можно без проблем наслаждаться играми серии Arma на Linux.

  1. Home
  2. Arma 2: Operation Arrowhead
  3. Steam


Arma 2: Operation Arrowhead

Steam

There are several possible fixes for this issue.

First, run Arma 2 once. Then try to run Arma OA (without beta or DayZ).  If that won’t help you can try to verify game cache of the Arma 2 and Arma OA.

1.) If that will not help, follow this guide:

  1. RUN STEAM AS ADMINISTRATOR
  2. Exit Steam.
  3. Right-click on Steam icon.
  4. Left-click on «Run As Administrator».
  5. If the problem persists, reboot your computer and try the procedure again.

2.) DELETE ARMA 2 OA REGISTRY ENTRIES

  1. Exit Steam, open Start menu and type this directly into the menu (in Windows XP, you will have to click on «Run» first) regedit
  2. Press Enter.
  3. In regedit window, click on HKEY_LOCAL_MACHINE.
  4. Press CTRL+F to bring up search.
  5. Look for «ArmA» (without the quotes).
  6. Delete all the «ArmA» entries you find from the registry.
  7. Run Steam as Administrator.
  8. Right-click on the game in Steam Library.
  9. Click on «Properties».
  10. Select «Local files» tab and click on «Verify integrity of game cache files» button.
  11. Please wait, the process can take several minutes.

3) REINSTALL STEAM

  1. Go to Steam’s installation folder.
  2. Delete everything there except «steam.exe» and «steamapps» folder.
  3. Run «steam.exe» — Steam will reinstall itself automatically.

С основами по использованию Wine можно ознакомиться здесь: https://noostyche.ru/blog/2020/04/30/ispolzovanie-wine-dlya-zapuska-windows-programm-v-linux/

На Wine и Proton проблема характерна для Arma: Cold War Assault (Operation Flashpoint), Arma 1 и 2, кроме Arma 2: Operation Arrowhead (с ней всё в порядке). Она заключается в том, что установочный скрипт (xxxxx_install.vdf) не может сгенерировать специальный код в шестнадцатеричной системе счисления из ключа (серийного номера) игры и подставить его в реестр Windows, то есть в файл реестра в префиксе. Решение заключается в генерации кода из лицензионного ключа и добавлении его в реестр вручную.

Генератор кода из ключа можно подсмотреть здесь: https://github.com/ValveSoftware/Proton/issues/767#issuecomment-508957522

Альтернативный вариант решения проблемы: https://github.com/ValveSoftware/Proton/issues/1308

Генератор кода представлен скриптом на языке perl:

echo 1234-56789-ABCDE-FGHIJ-KLMNO | perl -ne 's/-//g; tr/IO/10/; for $i (0..2) { $res = 0; for $j (0..7) { $res += index("0123456789ABCDEFGHJKLMNPRSTVWXYZ", substr($_, $i * 8 + $j, 1)) << (5 * $j); }; printf("%010x", $res); }; print("n");'

Примечание: Интерпретатор perl всё ещё присутствует во многих дистрибутивах Linux, поэтому команду можно выполнить в терминале и сразу получить результат. Альтернативным вариантом является возможность воспользоваться онлайн-сервисом.

В первом фрагменте команды можно увидеть буквенно-цифровую строку из 24 символов — здесь должен быть ваш лицензионный ключ игры, который можно посмотреть в Steam: ПКМ на игре в «Библиотеке» / Управление / Цифровые ключи.

После выполнения команды в выводе терминала окажется код подобный этому: 41cc520c4183dcd62d4905ab49c831

Это 15 пар символов в шестнадцатеричной системе счисления. Именно этот код необходимо добавить в реестр префикса игры.

Чтобы префикс был создан, нужно запустить игру один раз, полюбоваться на ошибку и закрыть её.

Для Arma: Cold War Assault префикс и файл реестра по умолчанию располагаются здесь:

/home/$USER/.local/share/Steam/steamapps/compatdata/65790/pfx/system.reg

Для обычной Arma 2:

/home/$USER/.local/share/Steam/steamapps/compatdata/33910/pfx/system.reg

Примечание: Номером префикса является ID игры в Steam.

Отредактировать файл реестра можно двумя способами: через графическую Wine-программу regedit и через редактирование обычным текстовым редактором (nano, gedit, kate и подобными).

Примечание по Arma 2.

С этой игрой есть довольно неприятная особенность. Установочно-конфигурационный скрипт 33910_install.vdf, который находится в корневом каталоге игры, при запуске игры каждый раз стирает(!) запись ключа (шестнадцатеричное значение) из реестра, что приводит к той самой «Bad serial given in setup». Чтобы он не осуществлял эту диверсию, необходимо лишить пользователя прав его выполнять и читать. Пример:

sudo chmod 000 "/home/$USER/.local/share/Steam/steamapps/common/Arma 2/33910_install.vdf"

Или через графический интерфейс:

Всё, диверсионная деятельность скрипта пресечена. Теперь можно приступить к редактированию реестра.

Wine. Редактирование файла реестра с помощью regedit.

Начнём с Arma 2.

WINEPREFIX="/home/$USER/.local/share/Steam/steamapps/compatdata/33910/pfx" wine regedit

Примечание: Если будет предложено установить в префикс Mono и Gecko — отказываемся, для префикса игры это ни к чему.

  1. Перейти в HKEY_LOCAL_MACHINESoftwareWow6432Nodebohemia interactive studioarma 2
  2. Выбрать строку key.
  3. ПКМ / Изменить…
  4. В появившемся окне в текстовое поле переписать сгенерированный код. В данном примере это 41cc520c4183dcd62d4905ab49c831.
  5. Подтвердить изменения.
  6. Закрыть окно «Редактора реестра».

Теперь можно запустить игру и ошибки «Bad serial given in setup» более не будет.

Для Arma: Cold War Assault алгоритм действий тот же. Разница только в пути до префикса и до записи в реестре.

WINEPREFIX="/home/$USER/.local/share/Steam/steamapps/compatdata/65790/pfx" wine regedit

Путь до записи в реестре: HKEY_LOCAL_MACHINESoftwareWow6432Nodebohemia interactive studiocoldwarassault

Редактирование реестра текстовым редактором.

Для Arma 2.

Открываем файл реестра, как текстовый документ:

/home/$USER/.local/share/Steam/steamapps/compatdata/33910/pfx/system.reg

Необходимо найти строку:

[Software\Wow6432Node\bohemia interactive studio\arma 2]

Ниже будет строка:

«key»=hex:

Это то самое место, куда нужно скопировать сгенерированный код. Пример записи:

«key»=hex:41,cc,52,0c,41,83,dc,d6,2d,49,05,ab,49,c8,31

Важно обратить внимание, что код разбит на пары символов, которые отделены запятой без пробела.

Сохранить изменения в файле.

Теперь проблема с «Bad serial given in setup» решена.

Для Arma: Cold War Assault.

/home/$USER/.local/share/Steam/steamapps/compatdata/65790/pfx/system.reg

Искомый блок в реестре:

[Software\Wow6432Node\bohemia interactive studio\coldwarassault]

В строку «KEY»=hex: прописать сгенерированный код:

«KEY»=hex:41,cc,52,0c,41,83,dc,d6,2d,49,05,ab,49,c8,31

Сохранить изменения в файле.

Готово.

Теперь можно без проблем наслаждаться играми серии Arma на Linux.

Comments

@kcb2k5

Arma 2 exited with «Bad serial number given in setup» error after a few seconds after launch. When I opened «regedit», I saw that field «Key» in «HKEY_LOCAL_MACHINESoftwarebohemia interactive studioarma 2» is empty. Any workarounds suggested for windows version of the Steam and Arma2 had no effect in my case. Arma2: Operation Arrowhead works well.
The only way for me to get it works is: install win-version of steam and arma2 in wine and copy the registry entry «Key» to Proton prefix through Proton regedit. But it resets every time the game updating.

@kisak-valve
kisak-valve

changed the title
Arma 2 Bad serial number given in setup

Arma 2 Bad serial number given in setup (33900)

Sep 8, 2018

@mvalente

@ziman

The following worked for me:

  1. I used the Sethioz Industries ArmA 2 key conversion tool to convert my Product Key into Hex.
  2. Below, I assume these environment variables. Reorganise them as you see fit.
    SA=~/.local/share/Steam/steamapps
    WINE=${SA}/common/Proton 4.2/dist/bin/wine
    export WINEPREFIX=${SA}/compatdata/${GAME_ID}/pfx
  3. I edited that value into the Windows Registry using ${WINE} regedit with WINEPREFIX as above. You need to edit HKEY_LOCAL_MACHINESoftwarebohemia interactive studioarma 2, key Key. You should find it empty before you edit.
  4. Don’t run the game via Steam. When Steam launches the game, it clears the key from the registry for some reason.
  5. Run the game using ${WINE} ${SA}/common/Arma 2/arma2.exe, with WINEPREFIX as above.

I also observed that during the installation of the game, the installer displays the Product Key for you to copy and then it opens the Explorer window in the «My Computer» view. That’s strange because I don’t know what to do there and I have to close the Explorer window to let the installer continue. I suppose that this is a result of some installer script gone wrong and that instead of prompting you for the Product Key, it opens Explorer instead, which leaves the key empty in the Steam configuration. Steam then saves this empty key into the registry every time you run the game, I guess.

@ryao

@ziman That worked for me too, although in my case, my appid was 33910, not 33900. Here are some commands that might make starting arma 2 easier:

protontricks -c 'wine /path/to/ARMA2_Keychanger.exe' 33910
protontricks -c 'wine regedit' 33910
protontricks -c "wine $HOME/.local/share/Steam/steamapps/common/Arma 2/arma2.exe" 33910

Also, the key is under HKEY_LOCAL_MACHINESoftwareWow6432Nodebohemia interactive studioarma 2 on proton 4.11-1.

By the way, Arma 2 hangs when I try to exit. I had to switch to a virtual terminal to kill it after trying to use the in-game exit option in the menu. Alt tabbing and killing the protontricks command will make it exit cleanly though.

@ryao

I made a small executable script called arma2.sh with the following contents:

#!/bin/sh
exec protontricks -c "wine $HOME/.local/share/Steam/steamapps/common/Arma 2/arma2.exe" 33910

I then added it to steam as a non-steam game and renamed it to Arma 2 (protontricks). I am now able to launch Arma 2 from steam using that. I have access to the steam overlay. I can exit the game by force quitting via the steam overlay.

@LevitatingBusinessMan

@ryao I didn’t get it working myself but why not just run the program mentioned by @ziman through protontricks directly? It should be able to set the key itself.

Edit: Actually it did work for me, but it set the key for arma2 oa both times.

@LevitatingBusinessMan

Hey but @ryao seeing as this is a common issue with ArmA 2 in general I think you should close this issue, nothing proton can do about it…

@ysblokje

I got so annoyed by this bug I started writing a workaround that should be as easy as possible. It does require a few things. but after that it should more or less work out of the box.

runarma2

@ryao

@LevitatingBusinessMan This is a late response, but the following ProtonDB report indicates that the issue is partially caused by steam running the start script for this game at every launch on Linux:

https://www.protondb.com/app/33900#o20Z765PX6

I am not sure if the game properly installs the key into the registry at first start, although it presumably does on Windows. if it does on Linux, it gets clobbered by this script it on first start (and every subsequent start). Removing read permissions (and possibly) execute permissions will keep the script from being run according to that report and I can confirm that it works. It feels like this could be a bug in steam.

@AlexD2016the2nd

@ryao How do I remove read permissions and execute permisions from Steam on Linux ? And will this affect other Windows games and cause them to not launch properly ?

@madewokherd

@kisak-valve
kisak-valve

changed the title
Arma 2 Bad serial number given in setup (33900)

Arma 2 (33900)

Jun 5, 2021

@Zekromaster

@ryao How do I remove read permissions and execute permisions from Steam on Linux ? And will this affect other Windows games and cause them to not launch properly ?

chmod 000 <file_location>

You don’t give permissions to software. You associate them to files.

@kisak-valve

Arma 2 Color Shift

Issue transferred from #5419.
@l4dbill8745 posted on 2021-12-18T02:52:29:

I have been able to get Arma 2 working with a solution found in Arma 2 (33900). However I have encountered another issue with the game being completely red shifted.
red shifted
I am not sure if proton is the source of this issue but I am making issue reports on the softwares that I think could be responsible.

I am using Proton 6.3-8, on Manjaro 21.2c. I have not had this issue with any other games and I have not done anything to my knowledge that could be causing this.

Edit with addition possibly helpful information
Additionally, I have been running every game I play, with proton, with the PROTON_USE_WINED3D option because if I do not use this option the games crash instantly. I use this setting for every game and have not seen a similar effect in any.

@kisak-valve

Hello @l4dbill8745, it should be noted that the PROTON_USE_WINED3D launch option is unsupported, which makes your issue a non-starter here. If you want to see wine’s DirectX to OpenGL render path improved, then you need to reproduce the issue with vanilla wine and report the issue to the upstream issue tracker at winehq. After the issue is resolved upstream, then the fix will get pulled into Proton along with everything else in a major Proton version bump.

@l4dbill8745

I am unable to reproduce the issue on a vanilla wine installation. However, vanilla wine runs too slowly for the game to be playable. The issue of the red shift only occurs on Proton. At this time I am unable to verify if the issue would persist without PROTON_USE_WINED3D however I have been using proton for quiet sometime with that setting enabled for most every game and have never encountered an issue before.

@cihlarma

@madewokherd #1308 (comment)

This should be fixed by Wine Mono 6.2.0.

There’s currently no Proton release that includes the new Wine Mono, but the MSI can be manually installed for a specific game. @redmcg has a helpful guide here: https://github.com/redmcg/wine-mono/wiki#install-later-version

Could anyone confirm this was indeed the case? I’m still experiencing the issue of the registry key containing the serial being wiped when using both Proton 6.3-8 (Mono 6.4.1) and 7.0-1 (Mono 7.1.2).

@Blisto91

fwiw i’ve been able to launch fine with 7.0-3 and play a little single player.

@cihlarma

Even with Proton 7.0-3, the binary value named key located in the HKEY_LOCAL_MACHINESoftwareWow6432NodeBohemia Interactive StudioArma 2 OA key is still being wiped on every launch.

@Zelete

Your system information

  • Steam client version (build number or date): Aug 23 2018, at 19:47:27
  • Distribution (e.g. Ubuntu): Manjaro with Xfce
  • Opted into Steam client beta?: [Yes/No] Yes
  • Have you checked for system updates?: [Yes/No] Yes

Please describe your issue in as much detail as possible:

Arma: Cold War Assault doesn’t detect the game’s CD-key. Steam starts the game, I get a split second of the Bohemia Interactive logo to show up and lastly a popup windows is shown with «Bad serial number is given in Setup».

crop

Steps for reproducing this issue:

  1. Just start the game in Steam with Steam Play in Linux.

More information:

I tried validating game files, but the error remains.

After some research it seems the game stores the CD-key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Codemasters, but there is no way that I know to enter the key somewhere.

@1heghost

@kisak-valve
kisak-valve

changed the title
Arma: Cold War Assault (bad serial number in setup)

Arma: Cold War Assault (bad serial number in setup) (65790)

Aug 27, 2018

@Zelete

@1heghost You are correct, thank you for linking the store page.

I did not know about that since it is not in my library, however:

  • I did not plan on buying the game twice just to test if it works.
  • For me personally this is an issue that is worth reporting because this should, in theory, just work.
  • I switched from Windows to Manjaro just after the news about SteamPlay and would like to help development.

@Zelete

I fixed this by doing the following:

  1. Edit /mnt/sdb1/Steam Library/steamapps/compatdata/65790/pfx/system.reg
  2. In your favorite text editor type ctrl-f to find «Bohemia»
  3. You should see a line like this:

[Software\Wow6432Node\bohemia interactive studio\coldwarassault] 1535396194
#time=1d43e37aceb57e2
«main»=»Z:\mnt\sdb1\Steam Library\steamapps\common\ARMA Cold War Assault»

  1. Edit the line to include your CD-key:

[Software\Wow6432Node\bohemia interactive studio\coldwarassault] 1535396194
#time=1d43e37aceb57e2
«KEY»=hex:62,aa,38,3f,bc,fd,30,76,5e,60,f8,ab,cd,ef,gh
«main»=»Z:\mnt\sdb1\Steam Library\steamapps\common\ARMA Cold War Assault»

Note: The CD-key is in binary, I also changed most of the CD-key values here so people cannot use it.

@veikk0

@maciejmrozinski

@Zelete Can You describe exactly how did You convert normal CD-key to this binary one? I tried many possible ways without success.

@Zelete

@maciejmrozinski

I’m sorry, but I really don’t understand how to do this.

I’m copying key presented by Steam as ARMA: Cold War Crisis game key (in Steam app). Lets say it looks like this: AB5R-P3MRA-2WXCQ-I7ENC-URWMS (key is not real, but the format and characters are used by my key — uppercase letters, numbers, 4-5-5-5-5 format). I tried to decode letters to ASCII codes (uppercase, lowercase, stripping ‘-‘ sign, leave it). Then I tried to convert this codes to hex form. It’s all not working. I have correct registry key value, because I was able to install this game on Windows machine and copy it, but I want to know if it’s so simple transformation or not. I’m closer to conclusion that serial cannot be simply converted to registry key, but game (or Steam) is doing some magic work on it, before entering to registry.

Correct me if I’m wrong.

@bazarassa

@maciejmrozinski you can install the original OFP:CWC game in wine and get the hexed CD-KEY at [hkey_local_machine/software/codemasters/operation flashpoint/KEY] value. Use «Export» feature in wine regedit, and try to insert it into steamapp registry.

@MKZY

OK, so I managed to find how to convert the CD-key into a Hex-Key to put in the registry as described by another comment above.
User Gator96100 posted on https://www.unknowncheats.me/forum/arma-2-a/99874-release-multithreaded-key-checker.html a program with source code that could convert a CD-key into Hex for the ARMA series.

I did not manage to make the program run on my Ubuntu under Wine, but it worked fine on a Windows session and gave me the right key (same as an installation gave via Windows Steam, confirmed this by pasting the key in my Ubuntu ARMA Cold War Assault registry and managed to start and play without any issues).

The program is written in C#, which I have no experience in. If I can, I’ll try and convert the script into something useful that can be run in the terminal on a Linux system, but I am a poor programmer. I will post the relevant part of the C# code below so others may help.

using System;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;

public class KeyConverter {
    private static readonly String szTemplate = "0123456789ABCDEFGHJKLMNPRSTVWXYZ";

    public String getHexKey(String arma2key) {
        var upperkey = arma2key.Trim().ToUpper().Replace('O', '0').Replace('I', '1').Replace("-", "");
        var bResult = new Byte[15];
        if (upperkey.Length != 24)
            throw new Exception("Invalid key length");

        for (var i = 0; i < 3; ++i) {
            UInt64 qwResult = 0;
            for (var j = 0; j < 8; ++j) {
                var cChar = upperkey[i * 8 + j];
                var szPos = szTemplate.IndexOf(cChar);
                qwResult |= (UInt64)szPos << (j * 5);
            }
            for (var j = 0; j < 5; ++j) {
                bResult[i * 5 + 5 - 1 - j] = (Byte)(qwResult & 0xFF);
                qwResult >>= 8;
            }
        }

        return BitConverter.ToString(bResult); ;
    }

@MKZY

@maciejmrozinski Forgot to mention you since you where asking about the magic work being done on the hex

@liskin

Here’s a shorter version of the «magic» that doesn’t require C#:

echo 1234-56789-ABCDE-FGHIJ-KLMNO | perl -ne 's/-//g; tr/IO/10/; for $i (0..2) { $res = 0; for $j (0..7) { $res += index("0123456789ABCDEFGHJKLMNPRSTVWXYZ", substr($_, $i * 8 + $j, 1)) << (5 * $j); }; printf("%010x", $res); }; print("\n");'

I successfully used this to convert my key and start the Windows/Proton version of Arma.

xDShot, bazarassa, forked-from-1kasper, LVH-27, RaviGhaghada, Comandeer, vchrm, sglorch, Fl4shb4ng, balamakka, and 3 more reacted with thumbs up emoji

ArmA 3 — это тактический шутер от Bohemia Interactive, выпущенный в 2013 году. Он стал очень популярным среди игроков и получил множество положительных отзывов от критиков за свою уникальность и аутентичность.

Однако, как и любая игра, ArmA 3 может столкнуться с ошибками и проблемами. Игроки могут сталкиваться с вылетами из игры, проблемами с подключением к серверам и другими техническими проблемами. В этой статье мы рассмотрим несколько основных проблем, с которыми могут столкнуться игроки ArmA 3, и предложим возможные решения.

Ошибка «Bad serial number given in setup»

Одна из наиболее распространенных проблем — это ошибка «Bad serial number given in setup», которая может возникнуть при попытке входа в игру. Эта ошибка может появляться, если у вас есть неправильно введенный ключ продукта, копия игры или проблемы с загрузкой.

Чтобы решить эту проблему, вам нужно убедиться, что у вас есть правильный ключ продукта. Если вы купили игру на Steam, убедитесь, что вы вводите правильный ключ в Steam. Если вы купили игру на диске, проверьте, что вы вводите правильный ключ с диска.

Если ключ продукта верен, то проблема может быть связана с вашим файлом конфигурации. Чтобы исправить это, попробуйте удалить папку с настройками игры в вашей директории пользователя и перезапустите игру, чтобы она снова создала эту папку со стандартными настройками.

Проблемы с DirectX

Еще одна распространенная проблема, с которой сталкиваются игроки ArmA 3, — это проблемы с DirectX. Эти проблемы могут возникать при запуске игры или во время игры, и могут приводить к вылетам, замедлению производительности и другим проблемам.

Чтобы исправить это, попробуйте обновить версию DirectX на вашем компьютере. Если DirectX уже установлен, попробуйте переустановить его, чтобы убедиться, что у вас установлена последняя версия.

Ошибка «Session lost» при подключении к серверу

Игроки могут также столкнуться с проблемой «Session lost», когда они пытаются подключиться к серверу. Это может быть связано с проблемами соединения или настройками маршрутизатора.

Чтобы решить эту проблему, попробуйте перезапустить ваш маршрутизатор и компьютер. Убедитесь, что ваше соединение с интернетом стабильно, и что маршрутизатор настроен правильно, чтобы подключиться к игровым серверам.

Заключение

Это лишь несколько примеров проблем, с которыми могут столкнуться игроки ArmA 3. Однако важно понимать, что большинство проблем являются обычными техническими проблемами, которые можно легко решить с помощью немного исследований и терпения. Если вы не можете решить свою проблему, обратитесь за помощью к сообществу игры ArmA 3 или к службе поддержки Bohemia Interactive.

Понравилась статья? Поделить с друзьями:
  • Ошибка bad request код ошибки 400 amocrm
  • Ошибка bas esp на мерседес w163
  • Ошибка bad pool header что это
  • Ошибка bas esp w208
  • Ошибка bad player name dayz