APB Reloaded: trying to load launcher and game

Questions about Wine on Linux
Locked
Kowak
Level 2
Level 2
Posts: 13
Joined: Sun Sep 19, 2010 12:04 pm

APB Reloaded: trying to load launcher and game

Post by Kowak »

Hello guys,
i found this video on yt
https://www.youtube.com/watch?v=wdqe4p1ONq0
I'm newbie with wine because I installed ubuntu few weeks ago. So what I did is: go to Winetrick and install what this guy says (sometimes there were some pop-ups that showed bugs, during download..), then i put the missing .dll 's in system32 but I didn't understand well about that DEPPOLICY or something about that. After that I tried to open APB Launcher (the Gamersifrst launcher) with Wine but it gives me error.
I have Wine 1.7.7 and Ubuntu 14.04 64 bit with i7 870, 8 gb ram dd3 and EVGA GTX 650 TI BOOST. Can anyone help me to make it run?
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

According to the AppDB entry of APB Reloaded, Someone had success running this game with the non-Steam version.
However, he puts his instructions on the Steam version test results.

His instructions require compiling a patched kernel32.dll (from wine source) to force DEP detection.
When compiling Wine it's always best to go for the latest version.
Also, as you're running a 64 bits Linux you'll have to follow the WineOn64bit compiling instructions for your distro.

Source: WineHQ - APB Reloaded 1.11.0 (Steam), WineOn64bit - The Official Wine Wiki
Kowak
Level 2
Level 2
Posts: 13
Joined: Sun Sep 19, 2010 12:04 pm

Re: APB Reloaded: trying to load launcher and game

Post by Kowak »

So, I have first to follow these instructions: http://wiki.winehq.org/WineOn64bit for 64bit version, then I have to download and use a kernel32.dll from wine source?
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

On the Patching wiki page you can see how to patch and compile Wine, but those instructions do not suit your situation.
You have to follow the WineOn64bits instructions and patch the source before doing configure.

Since there's no patch file you'll have to edit the source files of kernel32.dll manually as per the instructions on the AppDB entry.
The file that contains the GetProcessDEPPolicy function is dlls/kernel32/process.c.
Here is what the patched version looks like:

Code: Select all

/**********************************************************************
 *           GetProcessDEPPolicy     (KERNEL32.@)
 */
BOOL WINAPI GetProcessDEPPolicy(HANDLE process, LPDWORD flags, PBOOL permanent)
{
    FIXME("(%p %p %p): stub(forced to AlwaysOn for APB Reloaded)\n", process, flags, permanent);
    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    *flags = 1;
    *permanent = TRUE;
    return TRUE; 
}
After compiling do not make install or you might break your current Wine that you probably need for other games/apps.
Instead, you leave the patched Wine in its build tree and run it from there when you want to play APB Reloaded.
2.4. Can I install more than one Wine version on my system?

Yes, but you will have to build Wine yourself (see How to compile Wine from source), as it is not possible to have multiple distro packages installed. The easiest way to do this is to run Wine from the build directory (don't do make install)...
Source: Patching - The Official Wine Wiki, FAQ - The Official Wine Wiki
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

My code above is incomplete.
There is a open bug report on bugzilla that has a diff file (in comment #6) which show what needs to be changed in the process.c file.

Source: WineHQ Bugzilla - Bug 24125 - APB Reloaded 1.x (MMORPG) needs better GetSystemDEPPolicy(...)
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

In the meantime I upgraded to Wine 1.7.21.
And rebuild a patched 1.7.21 wine for APB Reloaded.
I managed to install and launch APB Reloaded both from Steam and GamersFirst Live but I ended up with the same error either way.
The game seems to launch fine: I see the splash screen, then the intro videos and then the login menu with a rendered still scene and music plays throughout.
But when I try to log in (or when Steam tries to auto-login) I see a progress bar, then an EULA that flash a second and then the error:
Failed to access local WMI service (error code 10022, case number XXXX) APB requires windows managment instrumentation (WMI) service to be running
(XXXX is incremented on each attempt) followed by a bunch of instructions on how to enable WMI on Windows.
I tried installing WMI Core 1.5 through winetricks but it did not solve the problem.
However, this error shows up frequently on Steam and GamersFirst forums so maybe it's not Wine related.
The fix seems to contact GamersFirst support and then they do something on their part that solves the issue.
I've not tried that yet.
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

GamersFirst published an update for APB Reloaded that solves the WMI error issue.
The update is installed when clicking "repair" in the game launcher.
You have to "repair" to make the "start" button appear in the launcher anyway, so there's nothing special to do to get the update.
Now after login, the game correctly displays the EULA (one time only).
I could chose a faction after looking at the videos and I could build a character.
I've not played any mission yet, though, so I don't know if playing works.
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

I found a way to launch the game without clicking "repair" in the launcher (and having to kill vcredist_2012 process when it hangs):
When the launcher window is visible, open a terminal and launch the game executable directly:

Code: Select all

cd ~/.wine/drive_c/Program Files/Steam/SteamApps/common/APB Reloaded/Binaries
wine APB.exe -language=1033
(adapt path if playing the GamersFirst Live version) You can even change the language with this command (the language selection of the game launcher is unusable).

It appears that PunkBuster gets uninstalled on each attempt to run the game.
I have to run pbsetup.exe (found on http://www.evenbalance.com/) and upgrade PunkBuster before launching the game on each attempt, otherwise I get "PunkBuster kicked player <myplayername> (for 0 minutes) Communication Error: PnkBstrB.exe initialization failed" when connecting to the "world server".

After upgrading PunkBuster (again), I could enter the "world server", which basically is a menu to choose a district.
As a new player I tried to load the social district at the bottom (I forgot the name).
After waiting for the level to load (this game takes ages to load anything), I had time to look around for 1~10 seconds before I was thrown out of the game to the wine desktop, without any error message.
Steam icon was still visible in the bottom panel and I clicked it to open the menu, quit steam and close wine.
There was no error in the terminal output either.

From what I could see during the 1~10 seconds I was in the game, there where some furniture and people floating in the air between some buildings around a patch of green grass on a kind of place.
Looking around was surprisingly very laggy (for a 1024x768 screen size, all graphical options turned off/at lowest settings), but maybe this is just my computer (Intel Dual-core 3Ghz, 3Gb RAM, Nvidia GeForce 9400GT 512Mb).
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

Further update.

I set VideoMemorySize to 512 (my physical vram) and that corrected the graphical glitches.
I have to kill Vivox<whatever> process to avoid the game crash after ~10 seconds of play.
I also found that "Capture the mouse in fullscreen windows" must be enabled in winecfg otherwise the camera would stop turning when the (hidden) mouse cursor reaches the window edges.

What can I say? I can play the game, well sort of.
My computer meets the minimum requirements but even at minimal settings it is barely playable.
Setting the APB.exe process priority to very high helps a little but not much.
As soon as there is some action the game becomes unplayable.
For what I've read on most forums, the game is choppy and laggy by design.

A quad core 2.8Ghz is a minimum requirement.
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: APB Reloaded: trying to load launcher and game

Post by olivierfrdierick »

I compiled Wine 1.7.22 with the DEP patch on a quad core computer on Ubuntu 10.04 Lucid Lynx 64 bit.
I had no problem compiling.

I could install Steam, connect and download the game, but I cannot run the game launcher.
An unhandled exception error pops up about a system.typeexception.

I think this is due to the Ubuntu 10.04 libs being rather old, but I'm not sure.
Locked