Kaldaien / UnX

"Untitled" Project X - Technical Fixes and Enhancements for Final Fantasy X | X-2 HD Remaster
MIT License
197 stars 20 forks source link

Can't get texture inject to work #26

Open Red86 opened 8 years ago

Red86 commented 8 years ago

Hello, I've downloaded unx latest version, and unzipped it in the folder of FFXHD and while features like the language changing, mute background audio and hiding the mouse cursor work, I can't, for the life of me figure out how to get texture injection to work.

In the folder where the executable for the games are, there's also an "UnX_Res" folder. Inside that,there's another one called inject and inside that one another called textures. This is where I placed the textures I intend to replace but in game, there's no difference whatsoever.

The configuration in the unx.ini is by all intent and purposes correct but, it ain't working in game. Here is what it reads:

[UnX.Textures] ResourceRoot=UnX_Res Dump=false Inject=true

The textures I am trying to inject are the ones for the HD models of Tidus and Lulu, even running the game as administrator produces no effect.

Kaldaien commented 8 years ago

If you look at logs/dxgi.log, you should see lines like this:

05/23/2016 08:58:19.366:  >> Device = 0x0982EF2Ch
05/23/2016 08:58:20.957: [D3D11 TexMgr] Enumerating dumped...     1117 files (264.2 MiB -- 40.4:223.8 MiB Un:Compressed)
05/23/2016 08:58:20.964: [D3D11 TexMgr] Enumerating injectable... 3326 files (1790.4 MiB)

If it's working, you'll see the bottom line somewhere. The top probably not, since dumping is disabled.

qu3becker commented 8 years ago

I can't get inject to work either since v2.0 iirc. Here's my log and I noticed that Inject=true is there by default anyway so I didn't change it. Running Windows 10. GPU is AMD R9 280x and CPU is Intel core i5 2500k.

05/23/2016 20:02:04.149: dxgi.log created
-----------------------------------------------------------------------------------
05/23/2016 20:02:04.149: >> (FFX.exe) [dxgi.dll] <<

05/23/2016 20:02:04.149: Loading user preferences from dxgi.ini... done!
-----------------------------------------------------------------------------------
05/23/2016 20:02:04.149:  System Directory:           C:\WINDOWS\SysWOW64
05/23/2016 20:02:04.149:  Loading default dxgi.dll:  (C:\WINDOWS\SysWOW64\dxgi.dll)
-----------------------------------------------------------------------------------
05/23/2016 20:02:04.235:   * Loading Early Custom Import unx.dll... success!

05/23/2016 20:02:04.716: Initializing NvAPI:  Failed

05/23/2016 20:02:04.718: Initializing ADL:    Success

05/23/2016 20:02:04.821:   * Number of Installed AMD GPUs: 6 (2 are active)
05/23/2016 20:02:04.821:   NvOptimusEnablement..................: UNDEFINED
05/23/2016 20:02:04.821:   AmdPowerXpressRequestHighPerformance.: UNDEFINED

05/23/2016 20:02:04.821: Importing CreateDXGIFactory{1|2}
05/23/2016 20:02:04.821: ================================
05/23/2016 20:02:04.821:   CreateDXGIFactory:  6C5818E0h
05/23/2016 20:02:04.821:   CreateDXGIFactory1: 6C581AB0h
05/23/2016 20:02:04.821:   CreateDXGIFactory2: 6C581BD0h
05/23/2016 20:02:04.837: === Initialization Finished! ===

05/23/2016 20:02:04.837:  [WMI] Spawning Process Monitor...  tid=0x2178
05/23/2016 20:02:04.838: [!] CreateDXGIFactory2 (0x80000000, IDXGIFactory, 0018F214h) -- [Calling Thread: 0x0900]
05/23/2016 20:02:04.838:   Calling original function: (ret=S_OK)

05/23/2016 20:02:04.852: [!] CreateDXGIFactory2 (0x80000000, IDXGIFactory, 0018F204h) -- [Calling Thread: 0x0900]
05/23/2016 20:02:04.852:   Calling original function: (ret=S_OK)

05/23/2016 20:02:04.867: [!] IDXGIFactory4::CreateSwapChain (010BA054h, 01B44F78h, 01B44F74h) -- [Calling Thread: 0x0900]
05/23/2016 20:02:04.867:   SwapChain: (1920x1080 @ 60.0 Hz - Scaling: Unspecified) - {Windowed} [1 Buffers] :: Flags=0x0002, SwapEffect: Discard
05/23/2016 20:02:04.867:  >> Using Traditional Presentation Model  [Waitable: No]
05/23/2016 20:02:04.867:   Calling original function: (ret=S_OK)

05/23/2016 20:02:15.651:   # Found window in 10.8 seconds, installing keyboard hook...
05/23/2016 20:02:15.691:   * Installed keyboard hook for command console... 1 try (0 ms!)
05/23/2016 20:02:24.373: [!] IDXGIFactory4::EnumAdapters (010A7828h, 0, 0018F42Ch) -- [Calling Thread: 0x0900]
05/23/2016 20:02:24.373:   Calling original function: (ret=S_OK)

05/23/2016 20:02:24.374:    @ Returning Adapter 0: 'AMD Radeon R9 200 Series' (LUID: 00000000:000075C1) <Hardware>
05/23/2016 20:02:24.378: [!] IDXGIFactory4::EnumAdapters (010A7828h, 0, 0018F42Ch) -- [Calling Thread: 0x0900]
05/23/2016 20:02:24.378:   Calling original function: (ret=S_OK)

05/23/2016 20:02:24.379:    @ Returning Adapter 0: 'AMD Radeon R9 200 Series' (LUID: 00000000:000075C1) <Hardware>
05/23/2016 20:02:24.654: [!] IDXGISwapChain::ResizeBuffers (1,1920,1080,...,0x0000001C,0x00000002) -- [Calling Thread: 0x0900]
05/23/2016 20:02:24.654:   Calling original function: (ret=S_OK)

05/23/2016 20:02:24.687: [!] IDXGISwapChain::ResizeBuffers (1,1920,1080,...,0x0000001C,0x00000002) -- [Calling Thread: 0x0900]
05/23/2016 20:02:24.687:   Calling original function: (ret=S_OK)

05/23/2016 20:04:17.633: [RTSS] Exhausted Connection Attempts... disabling OSD!
05/23/2016 20:05:17.581: Unloading Custom Import unx.dll... success!
05/23/2016 20:05:17.583: [RTSS] Closing RivaTuner Statistics Server connection... done!
05/23/2016 20:05:17.584:  [WMI] Shutting down Process Monitor... done!
05/23/2016 20:05:17.584: Saving user preferences to dxgi.ini... done!
05/23/2016 20:05:17.586: Shutting down Steam API... done!
05/23/2016 20:05:17.589: Custom dxgi.dll Detached (pid=0x1390)
Kaldaien commented 8 years ago

Judging by this, button texture overrides will not work either.

You have some bad third-party software installed that is removing my hooks. I do not know what it is from the log you listed, but no D3D11 stuff is working correctly on your system.

As far as the mod knows, you don't have a render window. You need to get whatever is breaking D3D11 sorted out. Possibly a custom proxy DLL such as ReShade.

Red86 commented 8 years ago
`05/23/2016 14:40:11.563: dxgi.log created
-----------------------------------------------------------------------------------
05/23/2016 14:40:11.563: >> (FFX.exe) [dxgi.dll] <<

05/23/2016 14:40:11.563: Loading user preferences from dxgi.ini... done!
-----------------------------------------------------------------------------------
05/23/2016 14:40:11.563:  System Directory:           C:\Windows\SysWOW64
05/23/2016 14:40:11.563:  Loading default dxgi.dll:  (C:\Windows\SysWOW64\dxgi.dll)
-----------------------------------------------------------------------------------
05/23/2016 14:40:11.648:   * Loading Early Custom Import unx.dll... success!

05/23/2016 14:40:11.746: Initializing NvAPI:  Success

05/23/2016 14:40:11.748:  >> NVIDIA Driver Version: 365.19
05/23/2016 14:40:11.748:   * Number of Installed NVIDIA GPUs: 1 (0 are in SLI mode)

05/23/2016 14:40:11.748:   NvOptimusEnablement..................: UNDEFINED
05/23/2016 14:40:11.748:   AmdPowerXpressRequestHighPerformance.: UNDEFINED

05/23/2016 14:40:11.748: Importing CreateDXGIFactory{1|2}
05/23/2016 14:40:11.748: ================================
05/23/2016 14:40:11.748:   CreateDXGIFactory:  700A18E0h
05/23/2016 14:40:11.748:   CreateDXGIFactory1: 700A1AB0h
05/23/2016 14:40:11.748:   CreateDXGIFactory2: 700A1BD0h
05/23/2016 14:40:11.757: === Initialization Finished! ===

05/23/2016 14:40:11.757:  [WMI] Spawning Process Monitor...  tid=0x2a94
05/23/2016 14:40:11.757: [!] CreateDXGIFactory2 (0x80000000, IDXGIFactory, 0018F2A4h) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:11.758:   Calling original function: (ret=S_OK)

05/23/2016 14:40:11.765: [!] D3D11CreateDeviceAndSwapChain (void) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:11.765:  Preferred Feature Level(s): <3> -  11_0 10_1 10_0
05/23/2016 14:40:11.765: [!] CreateDXGIFactory (IDXGIFactory, 0018F6E8h) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:11.765:   Calling original function: (ret=S_OK)

05/23/2016 14:40:11.766:    $ Spawning DXGI 1.4 Memory Budget Change Thread.: tid=0x08e0
05/23/2016 14:40:11.766:    % Setting up Budget Change Notification.........: eid=0x2fc, cookie=1

05/23/2016 14:40:11.766:    [DXGI 1.2]: GPU Scheduling...: Pre-Emptive (DMA Buffer)

05/23/2016 14:40:11.766:    [DXGI 1.4]: Local Memory.....: Node0 (Reserve:     0 /  2721 MiB - Budget:     0 /  5140 MiB)
05/23/2016 14:40:11.766:    [DXGI 1.4]: Non-Local Memory.: Node0 (Reserve:     0 /  3867 MiB - Budget:     0 /  7327 MiB)

05/23/2016 14:40:11.766:   SwapChain: (1920x1080@60 Hz - Scaling: Unspecified) - [1 Buffers] :: Flags=0x0002, SwapEffect: Discard
05/23/2016 14:40:11.766:   Calling original function: 05/23/2016 14:40:11.786: [!] IDXGIFactory4::CreateSwapChain (00EF0294h, 017D4F78h, 017D4F74h) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:11.786:   SwapChain: (1920x1080 @ 60.0 Hz - Scaling: Unspecified) - {Windowed} [1 Buffers] :: Flags=0x0002, SwapEffect: Discard
05/23/2016 14:40:11.786:  >> Using Traditional Presentation Model  [Waitable: No]
05/23/2016 14:40:11.786:   Calling original function: (ret=S_OK)

(ret=S_OK)

05/23/2016 14:40:11.786:  >> Device = 0x00EF0294h
05/23/2016 14:40:12.261: [D3D11 TexMgr] Enumerating injectable... 4 files (40.0 MiB)
05/23/2016 14:40:12.414:   # Found window in 0.7 seconds, installing keyboard hook...
05/23/2016 14:40:12.463:   * Installed keyboard hook for command console... 1 try (0 ms!)
05/23/2016 14:40:21.335: [!] IDXGIFactory4::EnumAdapters (00E5BD08h, 0, 0018F4BCh) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:21.335:   Calling original function: (ret=S_OK)

05/23/2016 14:40:21.335:    @ Returning Adapter 0: 'NVIDIA GeForce GTX 980 Ti' (LUID: 00000000:0000B0FF) <Hardware>
05/23/2016 14:40:21.340: [!] IDXGIFactory4::EnumAdapters (00E5BD08h, 0, 0018F4BCh) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:21.340:   Calling original function: (ret=S_OK)

05/23/2016 14:40:21.340:    @ Returning Adapter 0: 'NVIDIA GeForce GTX 980 Ti' (LUID: 00000000:0000B0FF) <Hardware>
05/23/2016 14:40:21.801: [!] IDXGISwapChain::ResizeBuffers (1,1920,1080,...,0x0000001C,0x00000002) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:21.801:   Calling original function: (ret=S_OK)

05/23/2016 14:40:21.802: [!] IDXGISwapChain::ResizeBuffers (1,1920,1080,...,0x0000001C,0x00000002) -- [Calling Thread: 0x28a4]
05/23/2016 14:40:21.802:   Calling original function: (ret=S_OK)

05/23/2016 14:41:02.029: Unloading Custom Import unx.dll... success!
05/23/2016 14:41:02.029: [RTSS] Closing RivaTuner Statistics Server connection... done!
05/23/2016 14:41:02.029: [DXGI] Shutting down DXGI 1.4 Memory Budget Change Thread... done!
05/23/2016 14:41:02.030:  [WMI] Shutting down Process Monitor... done!
05/23/2016 14:41:02.030: Saving user preferences to dxgi.ini... done!
05/23/2016 14:41:02.030: Shutting down Steam API... done!
05/23/2016 14:41:02.033: Custom dxgi.dll Detached (pid=0x1a7c)
`

It seems that the its picking up the textures and injecting them but, they ain't showing up ingame

Kaldaien commented 8 years ago

What did you have to do to fix that, by the way?

There's a huge difference between that and what you showed originally.

If button mods work, then texture injection will be too. The only thing I can do is add a line of text every time a texture is injected, but I think that'd be a performance bottleneck.

Kaldaien commented 8 years ago

Oh, it just occurred to me that this isn't even the same hardware :P One of those systems has an AMD GPU and the other an NVIDIA.

Red86 commented 8 years ago

Yeah, the AMD one is just another person with my same problem that added its own issue. Does my log seems correct to you? I just noticed that despite seeming fine to me, not even the button overlays work but, they did in a previous version (i have installed the newest version by overwriting all the files in the FFX folder)

Kaldaien commented 8 years ago

Yes, everything looks right.

There's probably some third-party software removing my hooks at runtime. Dxtory is notorious for this, but some other software like Raptr/AMD Gaming Evolved can do it also (I have the software setup to disable Raptr's overlay, so that probably isn't to blame).

sayamonz commented 7 years ago

i had the same problem, what fixed it for me was that i had a pathing problem, make sure your path is like this( Final Fantasy X-X2 - HD Remaster\UnX_Res\inject\textures\UnX_Old) UnX_Old needs to be in textures folder not Unx_New folder. then just dump all your textures in UnX_Old. that is how i got mine working.