Call of Juarez Gunslinger tweak

Games and gaming tweaks
Forum rules
Behave
Post Reply
User avatar
Grogan
Your Host
Posts: 2168
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Call of Juarez Gunslinger tweak

Post by Grogan »

20250422002523_1.jpg
20250422002523_1.jpg (707.33 KiB) Viewed 4908 times
20250421234157_1.jpg
20250421234157_1.jpg (975.94 KiB) Viewed 4908 times
Notice anything different? :thumbsup:

On the Steam forum for this game, I found a config file tweak that gets rid of the comic book page letterbox, and the black borders around objects, with this game's CEL shader graphics.

AppData/Local/techland/cojgunslinger/out/Settings/Video.scr

It's a text file with Windows style line breaks so on Linux it's probably best to use an editor that doesn't change the encoding. (I used old kwrite from my TDE... I trust that for editing other encoding types)

Anyway, on Linux/Steam that would be:

steam/steamapps/compatdata/204450/pfx/drive_c/users/steamuser/AppData/Local/techland/cojgunslinger/out/Settings/Video.scr

All this time, there was actually a commented section in this file showing these settings for removing that shit. If I'd have looked at that file it would have been staring me in the face.

To the bottom of the file, simply add:

Code: Select all

DisableScreenBorder()
RenderViewportProportion(1920, 1080)
Substitute your screen resolution for those viewport coordinates.

The game looks so much better like that.
User avatar
Zema Bus
Your Co-Host
Posts: 1190
Joined: Sun Feb 04, 2024 1:25 am

Re: Call of Juarez Gunslinger tweak

Post by Zema Bus »

I'll give that a try, it's been quite a while since I last played that one.
User avatar
Grogan
Your Host
Posts: 2168
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Re: Call of Juarez Gunslinger tweak

Post by Grogan »

Well... I showed this tweak to my nephew on Saturday and watched him playing it (on Windows), which renewed my interest. Somewhere between the end of April and now, this game stopped working for me. It starts up, shows a black screen then aborts (no obvious errors... I'd have to run wine debugger which spits out so much crap that it's hard to tell the wheat from the chaff).

It works with Valve Proton 9.0.4.

So I rebought it on GoG for $3 so I could better troubleshoot it and give it a happy environment, with a pure 32 bit wine build, even. On Arch, you're fucked, it's hard to compile older wine now because of toolchain upgrades (gcc 15, mingw gcc 15). I built a wine-tkg 10.0 and it was completely broken (can't even run notepad... kernel32 can't load because of Microsoft Common Controls... a seemingly common error with broken wine builds).

So I tried going back to 9.22 and having to redefine "bool" in a few places (by including a header, #include <stdbool.h> and deleting how they've defined it) as well as the gcc 14 stuff like -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types and got a successful build, but haven't gotten it to run either. I might have to go back to my mingw 14.x packages to build a wine runner for this.

This game used to work with any proton version in Steam... esync, fsync, ntsync, all. It was the second game I ever tried with proton (Wolfenstein II New Colossus was the first), back in the day, and it has always worked.
User avatar
Grogan
Your Host
Posts: 2168
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Re: Call of Juarez Gunslinger tweak

Post by Grogan »

I did build new (old) mingw-w64-binutils 14.2 and mingw-w64-binutils 2.43 packages and now the older wine versions I'm building run. It was likely the mingw binutils rather than the compiler (I did actually have trouble with mingw bintutils 2.44 during that time period), but I didn't want to downgrade just that and use mingw gcc 15.1 as 2.44 is expected now.

However, my game still won't run. Colour me surprised, but wine debugging did actually output useful errors. Now that it's getting this far, I can see that it's fucking wine-gstreamer.

Code: Select all

01d8:err:wmvcore:reader_OpenStream IStream_Stat did not fill the stream size, size from _Seek 7883566.
winegstreamer error: decodebin0: Your GStreamer installation is missing a plug-in.
winegstreamer error: decodebin0: ../gstreamer/subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c(4736): gst_decode_bin_expose (): /GstBin:bin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: Advanced Streaming Format (ASF) (video/x-ms-asf)

0:00:00.013654304 745078 0xd8457800 ERROR                   WINE dlls/winegstreamer/wg_parser.c:1616:wg_parser_connect: Failed to play stream.
winegstreamer error: typefind: Internal data stream error.
winegstreamer error: typefind: ../gstreamer/subprojects/gstreamer/plugins/elements/gsttypefindelement.c(1257): gst_type_find_element_loop (): /GstBin:bin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind:
streaming stopped, reason not-linked (-1)
01d8:err:wmvcore:init_stream Failed to connect parser, hr 0x80004005.
wine: Unhandled exception 0x40000015 in thread 24 at address 7784D635 (thread 0024), starting debugger...
01f8:fixme:dbghelp:elf_search_auxv can't find symbol in module
Monitored process exited.
Initial process has exited (return code: 768)
Exit with return code 768
P.S. Nope, nope, nope. That's not a fatal error, the gstreamer stuff, I've never had gst-plugins-ugly in lib32-gstreamer. That should just cause an intro animation to not play. I think Valve's proton has that in the gstreamer they have in their runtime. I noticed while using Proton 9.0.4 that I was seeing a TV test pattern animation before load screens and stuff, I wouldn't even notice that, just an extra few seconds of black screen without it. I think that is the ASF file :lol:

So it's something else causing the exception.
User avatar
Grogan
Your Host
Posts: 2168
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Re: Call of Juarez Gunslinger tweak

Post by Grogan »

I'm convinced now that it's not Wine here that's the problem, it's something in the lib32 environment that's changed, that's causing the game to abort. I've tried building older wines (that otherwise worked), tried building different wine versions different ways, plain wine, plain wine-staging, pure 32 bit builds, everything (I even tried a wow64 build). It doesn't work with my more native proton builds in Steam and it doesn't work with my wine builds in Lutris.

It works with Valve Proton 9.0-4, Experimental and Valve Proton 10 beta. The difference being Steam's proton builds load library dependencies from the container runtimes.

Therefore, it's got to be something in the lib32 environment. I've tried other 32 bit games with my wine/proton builds and they are working as expected, though.
User avatar
Grogan
Your Host
Posts: 2168
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Re: Call of Juarez Gunslinger tweak

Post by Grogan »

Holy shit, I got it. I was going to just give up and run it with Valve proton on Steam, but I couldn't just leave it. I'd much rather have it on GoG (and also not waste my $3 lol).

It WAS (somehow) lib32-gstreamer related, but something that changed in some lib32 package in the distro. Initially, MY gstreamer hadn't changed, it was an older version that I built because a new one broke my protonmediaconverter. (I'm back on current gstreamer now as that's fixed)

It dawned on me to test theory by building a 32 bit wine-tkg 10.10 runner --without-gstreamer and installing wmp9 codecs into the wine prefix (not wmp10 as winehq database says, which I tried previously). I started from scratch, generated wine prefix with my non-gstreamer wine, installed vcrun2010 into the prefix with winetricks (this game needs that) and ran the GoG installer for the game. Nope, didn't work.

On a hunch I tried installing wmp9 that I saw in the list and blammo, it works. Well, it probably doesn't actually "work" (I'm not seeing the intro animation) but just allows the game to not barf on any dlls. That doesn't affect anything in game, moreover that TV test pattern I see with Valve Proton is likely a dummy video in place of proper transcoding. It throws the same ASF codec errors when output is logged (PROTON_LOG=1) and it shows that it failed to transcode with protonmediaconverter after that. Valve's gstreamer doesn't have that codec, but the game doesn't abort.

I quit and restarted a few times to make sure it wasn't just a fluke, but I now have this game running in Lutris.
User avatar
Grogan
Your Host
Posts: 2168
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

Re: Call of Juarez Gunslinger tweak

Post by Grogan »

Very weird though. As soon as I dropped in my game data from the Steam version, it wouldn't load again. It would start, go to full screen black, then abort for different, unknown reasons. Even after deleting the "Techland" game data directory it wouldn't work again.

So I tore it down and started over from scratch and retraced my steps in the same order. I guess I'll have to start over with current game progress and lose years old stats (collectables, unlocks), but I successfully changed graphics settings, quit and edited Video.scr (the screen borders tweak) and it still works. Twice tested.

I don't understand how just dropping in game data (incompatible though it is, probably has steamcloud local data paths or some shit) can permanently bugger up something. Maybe some other game data elsewhere gets borked that I'm not aware of... or license data.
Post Reply