Repository navigation
v0.3.0 Changes
I can finally increase the minor version to v0.3.0. You must replace your old .ini , see notes for why.
I've ported all the applicable fixes from Shogun 2 OG to CE, now both versions are at-parity for the same type of fixes whenever they apply.
Both
- Both OG and CE now have improve signature checks when patching the game. Fixes are grouped together so that fixes can be applied / undone as a feature. This should improve mod compatibility that touches the binary.
- cpuplace: when it has nothing to do (no CCD with a larger L3, or
ccd=off), the log says "off" instead of "refused".
Shogun 2 Original
- New: s2prof.dll now does its own setup as it loads d3d11.dll is only a proxy loader now. Another loader (an ASI loader, for
example) should be able to load s2fix as long as it loads s2fix before the game creates its graphics device.- Only one copy of s2fix runs per game: a second one (from another loader, or under another name) refuses to load.
- Loaded too late (injected while the game runs): a message says some fixes are off for that session.
- DirectX 9: s2fix stays off and a message says so; the game runs unchanged. If the game falls back from DirectX 11
to DirectX 9 on its own, the fixes are undone and the same message appears. - This path is lightly tested, I don't play with ASI loaders, but this should work.
- Fix: changing display settings (resolution, window mode) in game keeps the flip model. The game rebuilds its graphics
device; s2fix now rebuilds with it. If that ever fails, a message asks you to restart the game, and the game closes. - Fix: borderless windowed at any resolution. The game renders at the resolution set in its options, scaled to fill the
monitor, and the mouse is scaled to match, so clicks land where the cursor is. (#3, #4)
Shogun 2 Complete Edition
- New: works alongside mods that change the game's engine, as the original has since v0.2.3. If
empire.retail.x64.dllis a different build or another mod's copy of it, a warning asks whether to launch (Launch Game
/ Exit Game); to skip it, setignore_build_check=1under[s2prof]ins2prof.ini. Each fix checks the engine code
it depends on before it installs and stays off if that code was changed; a fix that can't install completely is fully
undone. The log ends with how many fixes installed, were off or were refused. - New: Same s2prof.dll loading patch as OG.
- New fixes from the original:
- camprelations and campappearance for the campaign map (the same cached faction-record and appearance lookups as the
original's). - listkeep: the render lists keep their per-thread buffers between frames instead of regrowing them every frame.
- maincore: the main thread gets a CPU core of its own; the game's other threads stay off it.
- buildingblock: skips work the building draw throws away every frame (most noticeable with damaged buildings in
sieges and towns). - The render sort uses a faster counting sort when a list has few distinct keys.
- camprelations and campappearance for the campaign map (the same cached faction-record and appearance lookups as the
- Faster startup: installing the fixes took over 3 s on a busy PC; it now takes about 30 ms.
- Fix: the overhaul could silently fail to install when other DLLs in the game had used up the first 64 thread-local
storage slots. - Changed: in
s2prof.ini, the[proxy]section is now[device](the samemultithreaded_deviceandwrap_context
settings).
Notes
- Complete Edition: when updating, let the zip overwrite
s2prof.ini. An old one with a[proxy]section leaves the
multithreaded device off, and the overhaul then runs without its worker threads.
Thanks @Dat-Boi-G2 for reporting #3 and #4. #3 was a lot deeper than it first looked, but it lead to a pretty neat discovery on how the game handles d3d11 devices (and how we can prevent a crash).
Thanks @Darknight367 for testing out signature checking while trying to chase down #1, glad it was fixed.