markuscicero5 wrote:
The subtitles are centered, but it seems like most game text got pushed to the right.
Edit: Rewrote fix to properly check for shaders present in a scene without weird workarounds. (also rewrote post)
Installation:
Step 1: Open the d3dx.ini and uncomment "include_recursive = Mods".
Step 2: Create a folder called "Mods" next to the game executable.
Step 3: Download this file and put it in the "Mods" folder:
https://gist.githubusercontent.com/mart ... extfix.iniStep 4: Put this (replace if asked) in the ShaderFixes folder:
https://gist.githubusercontent.com/mart ... eplace.txtAdjustments are done in the shader file (da86a094e768f000-vs_replace.txt), it comes with approximately the values for 3440x1440, to adjust it modify "0.2500".
Huge thanks to the amazing people on the Helixmod/3Dmigoto Discord: masterotaku for helping me with the initial fix and DarkStarSword for explaining how to implement if statements correctly.
---
Edit 2: New and improved explanation on how it all works. (also some small but not functionality changing improvements to the mod, no need to update)
How the mods folder works: It's a way to make stuff that would go into d3dx.ini portable (e.g. just copy the file, no need to copy and paste). I think it should be fairly straightforward.
How the mod works:
Code:
[Constants]
global $in_game
^This part allows me to use $in_game to store the state of the HUD (I use it to detect if we are in game or in a cutscene/menu)
Code:
[ShaderOverrideHUDPRESENCE]
hash=9958a636cbef5557
preset=Ingame
This shader checks for the presence of the HUD and if it is there, runs the preset called "ingame"
Code:
[PresetINGAME]
$in_game=1
This just sets $in_game to 1 - the reason we can't do it right in HUDPRESENCE is that due to the order in which 3dmigoto handles different types of shaders, our pixel shader used for hud detection comes after the vertex shader for the hud text.
Code:
[ShaderOverrideFORHUDTEXT]
hash=da86a094e768f000
if $in_game
checktextureoverride=ib
endif
da86... is the vertex shader that contains the text we want to move, to edit the index buffer which the text is using we need to first mark the vertex shader so 3dmigoto can modify the buffer, this is for performance reasons. We are also only doing this when we are in game (if statement).
Code:
[TextureOverrideAPPLYINGAME]
hash=3e4f8614
if $in_game
pre z=1
post z=0
endif
;handling=skip
3e4f... is the index buffer of our text, this part checks if we are in game and if we are, tells the shader (which reads the value of "z") to behave differently when processing this buffer. The part with "post" is so "z" gets reset when we are done (otherwise it is permanently 1), not sure if "pre" really does anything in this case but I just put it there as well.
The commented out "handling=skip" is for testing purposes (it makes the buffer disappear and does so without needing any shader modifications so it's good for finding where something went wrong).
Edit 3:
I totally forgot to add what I did on the shader:
Code:
float4 iniparams = IniParams.Load(0);
This loads the parameter from the mod into the shader. (Note: This line can just be anywhere in the same block as the code below, ideally right above it, idk why it ended up a couple lines above it in my shader file but it shouldn't make a difference.)
Code:
if (iniparams.z==1)
{
o0.x+=0.2500;
}
"o0.x += SOMETHING" normally moves the entire HUD and caused a ton of issues but since it is in the if statement for "z" matching "1" it is only used for the text.