DX Loader 2.03

Dedicated to the discussion of OTP and Deus Ex in general.

Moderators: Master_Kale, TNM Team

ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

DX Loader 2.03

Post by ggrotz »

I did a rewrite of the DX Loader and am putting it here. Please let me know if you run into anything, as I've added quite a bit of code from the last version in rewriting it.
Screen shot of Deus Ex Loader 2.00
Screen shot of Deus Ex Loader 2.00
As you can see from the screen shot, lots is new about it. So what's new do you ask?

1. Big one is that you can edit all the configurations from within the program. This is the biggest addition of code, so feel free to play around and let me know if you run into issues.
2. There are no INI files distributed with the EXE. Default ones will be written if they don't exist, assuming no other processes stop it. If you test, please let me know if that happens. If it's enough of a problem, I might just have to distribute the files and then copy them instead of write them from the program.
3. There are three INI files (Loader.ini, Mods.ini, Renderers.ini), which will be written to the local user's app path in the DXLoader\ folder.
4. If you remember, I wrote a little program that I posted on the forums which lets you save some substantial space on your drive if you have it NTFS formatted. It processes all your saved games it finds and then for each of the duplicate files, it deletes them and replaces them with hard links. You can also check "Compress" and it will NTFS compress the unique files. I included this functionality within the program as well.

I think that covers it. Please let me know if there are issues. Note: I did fix a handful of bugs between the "beta" and this release, so be sure to re-download if you are one of the three that got the "beta".
Attachments
dxloader203.zip
DX Loader 2.03
(158.32 KiB) Downloaded 824 times
Last edited by ggrotz on Sun Mar 01, 2015 4:34 pm, edited 17 times in total.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Re: DX Loader

Post by Jonas »

That looks pretty awesome. Does it have any of Kentie's fixes too? Might want to use it for TNM 1.0.5 :-)
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

Jonas wrote:That looks pretty awesome. Does it have any of Kentie's fixes too? Might want to use it for TNM 1.0.5 :-)
Cool, thanks. I still need to look at some of the other loaders and see if I forgot something or not, since I just did what I knew from the changes I've made manually to my own DX installs. Those renderer settings I put in the config file probably need work, since I really didn't find too many good sources for "suggested settings". It could probably use detections for the renderers themselves.

Since I'm still working on it, if anyone has any ideas on things to add/change I'm welcome to them.
bobby 55
Illuminati
Posts: 6354
Joined: Wed Jun 24, 2009 9:15 am
Location: Brisbane Australia

Re: DX Loader

Post by bobby 55 »

I'm speaking from total ignorance, so laugh if you want to. :)

When OpenGL is selected as the renderer would it be possible for the loader to change the ini to UsesSt3C=true? It's no hardship manually doing it but people forget and the files are in my documents not the game folder in Windows 7. Just a thought by someone who knows very little.
Growing old is inevitable.......Growing up is optional
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: DX Loader

Post by G-Flex »

What about the dual-core fix, or whatever that was?

You might also want to implement some kind of FoV adjustment so that the crosshairs/view work properly in e.g. widescreen resolutions. You could either go kentie's route (pick from a set of default FoVs based on common aspect ratios) or the route I use in my mod (calculate the FoV necessary for a given resolution, although for this you'd want the player to be able to choose resolution through the launcher too). I'd suggest the latter, as it's more accurate/precise and works for all possible resolutions. FoV for binoculars and scoped weapons will still be screwed up for non-4:3 resolutions, but that's not something you can really solve without modding the scripts in DeusEx.u, so that's out of the bounds of a launcher.
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

bobby 55 wrote:When OpenGL is selected as the renderer would it be possible for the loader to change the ini to UsesSt3C=true?
You can do it through the copied settings in the loader ini. However, I have been thinking about forcing DetailTextures=True and UseST3C=True for the current renderer. Might be worth it?
bobby 55 wrote:the files are in my documents not the game folder in Windows 7.
I saw the Kentie launcher does this. I don't know if it's necessary or not (not having Vista or 7 here to test with), but I can copy things there if it is without too much trouble.
G-Flex wrote:What about the dual-core fix, or whatever that was?
The loader ties the process to one processor upon running by default (CPU 0). I believe that was the multiple core fix, but I could be wrong...
G-Flex wrote: You might also want to implement some kind of FoV adjustment so that the crosshairs/view work properly in e.g. widescreen resolutions.
I have a function which calculates and sets FOV based on the resolution selected for the common FOV dimensions (4/3, 5/4, 16/9, 16/10). It's already happening behind the scenes (though I could probably make it user-settable if necessary).

I looked at Kentie's stuff and found a few things this launcher isn't setting. I'll probably add those in the next revision (which will hopefully come in the next few days).
bobby 55
Illuminati
Posts: 6354
Joined: Wed Jun 24, 2009 9:15 am
Location: Brisbane Australia

Re: DX Loader

Post by bobby 55 »

Yeah there's a couple of games with bits and pieces in My Documents on my PC with Windows 7. It's kinda weird what game files it puts there.
Growing old is inevitable.......Growing up is optional
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

ggrotz wrote:I looked at Kentie's stuff and found a few things this launcher isn't setting. I'll probably add those in the next revision (which will hopefully come in the next few days).
Which I just got done. I don't know if there's anything else that needs done in terms of fix settings, but I'll probably go ahead and clean up a couple of things and post what I have here now very soon.
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

I posted the current build on this loader. Be sure to check your DXLoader.Ini if you are running HDTP and double-check your DXINI at least once for testing purposes.

Changes
1) Split up HDTP Paths into Texture Path and System Path, since I don't know how the final build of that will look. Better to do that and be flexible than have to change this when HDTP is released.
2) The loader now deletes and replaces Paths lines (New Vision, HDTP, Shifter) in response to a problem I noticed in the old method.
3) Added FPS Limit, Sound Latency, and "Disable Mouse Acceleration" options.

Questions
1) Are there any other settings that need added or fixes that need done?
2) Should detail textures be forced in the render settings?
3) Do files need to be set to the "My Documents" folder?
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: DX Loader

Post by G-Flex »

ggrotz wrote:I have a function which calculates and sets FOV based on the resolution selected for the common FOV dimensions (4/3, 5/4, 16/9, 16/10). It's already happening behind the scenes (though I could probably make it user-settable if necessary).
Why just the common aspect ratios, though? If you have a correct working formula, it should work for any possible resolution. This is especially useful if someone happens to be playing using, say, one of those not-quite-16:9 resolutions on some notebooks, and in general would be better practice, in my opinion.

I don't have time at the moment, but later tonight I'll probably dig through my source code and find you the formula I use (which I got off some very useful website regarding photography and geometric projections).


EDIT: Okay, the information I based my math on is from here: http://wiki.panotools.org/Field_of_view (specifically "Conversion from horizontal to vertical and vice versa")

Code: Select all

desiredVFOV = 1.044413;
newDefaultFOV = 57.2957795 * (2 * atan(tan(desiredVFOV/2.00) * (rootWindow.width/rootWindow.height)));
desiredVFOV is the vertical FOV angle we want to retain, in radians (i.e. the vertical FOV that vanilla DX has on a 4:3 screen), so that things look right. newDefaultFOV is the new horizontal FOV we're calculating, rootWindow.width and rootWindow.height are the resolution, and that "57.2957795" is just a conversion factor from radians into Unreal angle units. In my tests it seems to work fine (and theoretically should be perfect unless I did something disastrously wrong), and in fact gives better values than kentie's launcher.
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

G-Flex wrote: Why just the common aspect ratios, though? If you have a correct working formula, it should work for any possible resolution.
I really didn't see a relationship for the FOV values I knew based on common aspect ratios and didn't find one too easily on search, so I figured the best thing would be to just compute the aspect ratio and then substitute the value. Not the best thing, but the best thing I knew to do at the time.
G-Flex wrote: EDIT: Okay, the information I based my math on is from here: http://wiki.panotools.org/Field_of_view (specifically "Conversion from horizontal to vertical and vice versa")
Thanks for the formula. I will definitely make use of it in the launcher.
User avatar
kdawg88
MJ12
Posts: 322
Joined: Wed Mar 18, 2009 10:50 pm

Re: DX Loader

Post by kdawg88 »

This looks very useful. It's about time DX got a launcher like this.
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

Latest beta version of the loader posted (build #3).

Changes
1) Forces DetailTextures=True and UseS3TC=True in the renderer settings for dxini, no matter what is set in the dxloader ini. This should be helpful from a support standpoint if this loader is used with New Vision (and maybe HDTP).
2) A custom resolution may now be set within the menu system. For full screen, this will not be of too much use, since DX will correct the resolution to the closest supported thing (in other words one of the resolutions already listed by the detection routine), but for windowed screens this can be helpful if someone wants a setting that isn't auto-detected as supported by the video card and display.
3) The formula G-Flex posted in this thread is now being used to calculate the FOV based on the resolution that is entered.

Questions (Answered and not)
1) Do files need to be set to the "My Documents" folder? Kentie does this through changes to the Unreal DX launcher code which forces DX to look there instead of DX/System for files. Given the number of customizations that I'm sure have been made by other mods, it'd probably be questionable to try and make a similar modification. Research into whether there are other ways to do this might be warranted.
2) Are there any other settings that need added or fixes that need done? For example, would forcing Vsync=True be helpful?

If there isn't anything else or any bugs that need fixed, this should be close to finished now.
nerdenstein
Illuminati
Posts: 1591
Joined: Thu Apr 24, 2008 7:40 pm
Location: Leicester, England, UK.

Re: DX Loader

Post by nerdenstein »

I've had a few issues with the My Documents thing.
But I think if you were include it, allow it to make a new folder for each individual mod; I don't think Kentie's mod does do that.

As for issues I've had with it, it seems that it doesn't copy the .ini to My Documents after the folder has been created when you launch the .exe for the first time. Maybe someway of checking differences between the two files to make them both sync up-to-date. I know we've been caught out previously when people have needed help installing NV to make sure they've added the UseS3TC=True line to the .ini in the Documents folder rather than in the System folder.
The real trouble with reality is that there's no background music.
ggrotz
X-51
Posts: 780
Joined: Tue Nov 10, 2009 12:55 am

Re: DX Loader

Post by ggrotz »

nerdenstein wrote: But I think if you were include it, allow it to make a new folder for each individual mod; I don't think Kentie's mod does do that.
That's what I'd want to do if I figured out what needed to happen to make it work.
nerdenstein wrote: As for issues I've had with it, it seems that it doesn't copy the .ini to My Documents after the folder has been created when you launch the .exe for the first time. Maybe someway of checking differences between the two files to make them both sync up-to-date.
The DX launcher code is a little heavy-handed in this regard, since it forces DX/System as a path. Kentie's launcher solves this by forcing the paths in the DX code for INI and LOG to My Documents, placing the default DX ini files there if they do not exist already. In doing this, the rest of the DX code treats it like a new install with the ini files present in My Documents. While this was good for vanilla DX if there are issues that require those files in My Documents, the elemental problem I'm seeing in this fix is duplicating this without touching the original DeusEx.Exe code like Kentie did. Given that there are mods which probably modified the original Deusex.exe as well, one would have to manage the change with a very light hand to not break anything else.

(as a thought, something I might try is putting Kentie's exe in place of TNM.EXE or 2027.EXE and see whether that breaks something)
Post Reply