DXOverlay Mod
5 posters
Page 1 of 1
DXOverlay Mod
I posted this in another thread earlier, but we were getting off-topic...
Had a chat with TJDagger last night, and he pointed me to the Dragon Rising Open Programming Project (DROPP). He had been playing with the DirectX Overlay (DXO) module without any success. I was able able to get the example missions working, and I think I know how it's done.
Dschonny (I assume) wrote a new Direct3D library (d3d9.dll) which is a wrapper/pass-through for the standard D3D functions, but also has additional functions for the overlay. Here's an excerpt from a post I found:
DROPP claims to be open-source, and while all the Lua code is available, I don't see any source code for Dschonny's d3d9.dll. If we had access to that code, I think this could be the answer to several modding wishes. Without the source, we may still be able to make some progress, but I fear conflicts between the two hotkey systems. Does anyone around here know Dschonny? There's an active Steam account with this name, but I don't have a Steam account myself!
I found another thread discussing DirectX proxy/wrapper DLL's, and there is even some real basic code available. Unfortunately, my C++ isn't what it used to be, nor do I feel like having to learn all the code needed to draw on the screen! So it would be really great if we could get Dschonny's code. I still have Visual Studio 2010 so we can compile code, and I wouldn't mind tinkering with an existing code base.
Had a chat with TJDagger last night, and he pointed me to the Dragon Rising Open Programming Project (DROPP). He had been playing with the DirectX Overlay (DXO) module without any success. I was able able to get the example missions working, and I think I know how it's done.
Dschonny (I assume) wrote a new Direct3D library (d3d9.dll) which is a wrapper/pass-through for the standard D3D functions, but also has additional functions for the overlay. Here's an excerpt from a post I found:
Just like OWP, the DLL watches a text file for commands related to the overlay. The hotkey functionality is also in this DLL, so there is no need to launch a separate EXE for hotkeys! Of course, it looks like fewer keys are supported than with ofpdr-hotkeys.exe, and it relies on an external config file to specify which function to run, rather than being handled internally as with the EDX.I'm currently working on a code-injection project for OPFlashpoint: DragonRising using a proxy-dll-hook. Target is to make custom UI-Elements available to Mission-Designers, which works pretty well so far. The game uses an edited d3d9.dll placed in the game folder which does the custom drawings and hands over all d3d-functions to the original d3d9.dll in the win/sys32-folder.
DROPP claims to be open-source, and while all the Lua code is available, I don't see any source code for Dschonny's d3d9.dll. If we had access to that code, I think this could be the answer to several modding wishes. Without the source, we may still be able to make some progress, but I fear conflicts between the two hotkey systems. Does anyone around here know Dschonny? There's an active Steam account with this name, but I don't have a Steam account myself!
I found another thread discussing DirectX proxy/wrapper DLL's, and there is even some real basic code available. Unfortunately, my C++ isn't what it used to be, nor do I feel like having to learn all the code needed to draw on the screen! So it would be really great if we could get Dschonny's code. I still have Visual Studio 2010 so we can compile code, and I wouldn't mind tinkering with an existing code base.
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Re: DXOverlay Mod
Initial testing is not showing any conflicts with running ofpdr-hotkeys.exe and loading Dschonny's d3d9.dll. Hotkeys in The Perfect Plan are working as they should.
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Re: DXOverlay Mod
Got the dxoverlay.lua script from DROPP working with the EDX! I noticed there are issues when you restart a mission and dxo.init() gets called again, the screen resolution doesn't come back correct. Not sure if this is a bug in the DLL, but I'll play around more when I have time.
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Re: DXOverlay Mod
nice work dude!
looks like ya really getting stuck into a tool that has boggled a few heads over the years.
looks like ya really getting stuck into a tool that has boggled a few heads over the years.
Re: DXOverlay Mod
if dxo.reset() BEFORE calling it doesn't work
two approaches here - the easy one would be to execute a dxo function that has a simple callback to validate before calling dxo.init() - kind of like what coders did to roll their own fileexists function by trying to open a file that didn't exists
the other is more of a kluge - perhaps a breadcrumb worth of a txtfile with last start date/time in it -
1) the mission script checks if exists, meaning the program didn't exit properly
2) if the time date is significantly diff than current then it is safe to erase it and do line 3
3) after a dxo.init() the script creates the breadcrumb with current time date
4)at end of mission it deletes the breadcrumb
the only other thing is possibly leaving that breadcrumb in a persistent table in memory - like in the DR editor we don't know all of the functions that are exposed.
two approaches here - the easy one would be to execute a dxo function that has a simple callback to validate before calling dxo.init() - kind of like what coders did to roll their own fileexists function by trying to open a file that didn't exists
the other is more of a kluge - perhaps a breadcrumb worth of a txtfile with last start date/time in it -
1) the mission script checks if exists, meaning the program didn't exit properly
2) if the time date is significantly diff than current then it is safe to erase it and do line 3
3) after a dxo.init() the script creates the breadcrumb with current time date
4)at end of mission it deletes the breadcrumb
the only other thing is possibly leaving that breadcrumb in a persistent table in memory - like in the DR editor we don't know all of the functions that are exposed.
Last edited by John J. Stevens on Wed 22 May 2013, 17:28; edited 1 time in total
John J. Stevens- Admin
- Location : WV/PA
Points : 285
Reputation : 22
Join date : 2012-12-19
Re: DXOverlay Mod
What the!!! mate this looks cool but what is this exactly for? is it a menu thing that u can choose what to do in DR? ;o
nepgeargo- Points : 62
Reputation : 0
Join date : 2013-03-20
Re: DXOverlay Mod
JJ --
Found a quick fix for the resolution issue, don't delete 'resolution.dat' after it has been checked! Of course it's not been fully tested, but I can restart missions. I haven't tried changing the resolution and starting a new mission, but I think this will have an issue. Restarting the game will update 'resolution.dat' however, so if you change resolution, re-launch the game.
Omar --
The DirectX Overlay (DXO) will allow you to display your own images and text anywhere on the screen! DROPP has some modules for menus already, and they could be made to work with the EDX. TJDagger and I have been discussing an image-based menu module that would just show different images for each menu screen, rather than dealing with placing and rendering text.
I'm still playing with code for this, but I'll post something soon!
Found a quick fix for the resolution issue, don't delete 'resolution.dat' after it has been checked! Of course it's not been fully tested, but I can restart missions. I haven't tried changing the resolution and starting a new mission, but I think this will have an issue. Restarting the game will update 'resolution.dat' however, so if you change resolution, re-launch the game.
Omar --
The DirectX Overlay (DXO) will allow you to display your own images and text anywhere on the screen! DROPP has some modules for menus already, and they could be made to work with the EDX. TJDagger and I have been discussing an image-based menu module that would just show different images for each menu screen, rather than dealing with placing and rendering text.
I'm still playing with code for this, but I'll post something soon!
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Re: DXOverlay Mod
whoa so i can make menus with DROPP! awesome! time to dig out my copy ill add it into my missions if i can figure out how to use it
nepgeargo- Points : 62
Reputation : 0
Join date : 2013-03-20
Re: DXOverlay Mod
Good luck with DROPP!! Check out the 'dialogs2' example mission for a multi-level menu. Remember that DROPP has its own hotkey system, which I think is a little trickier to setup.
Hopefully between me and tjdagger, we'll get something together for the EDX in the coming weeks, maybe sooner.
Hopefully between me and tjdagger, we'll get something together for the EDX in the coming weeks, maybe sooner.
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Re: DXOverlay Mod
How to Create a CNN-Style News Ticker in Adobe Premiere Pro
maybe you could use this mod for this type of application.
Personally I found the mission updates in some missions were just not noticeable enough.
You had other screen clutter which took away from main objectives.
Use yellow and black font and your a winner.
maybe you could use this mod for this type of application.
Personally I found the mission updates in some missions were just not noticeable enough.
You had other screen clutter which took away from main objectives.
Use yellow and black font and your a winner.
dewi316- Veteran
- Location : swansea
Points : 179
Reputation : 22
Join date : 2012-12-19
Re: DXOverlay Mod
Scrolling text sounds like pain in the ass to code, but you could easily have 'pop-up' messages that display and disappear after a few seconds. Maybe have a hotkey to display the last message. The DXO mod allows the user to pick the font, size, weight, and colors for text. Use a timer to alternate the text color and background color between black and yellow for a real hi-viz message.
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Re: DXOverlay Mod
Regg wrote:Got the dxoverlay.lua script from DROPP working with the EDX! I noticed there are issues when you restart a mission and dxo.init() gets called again, the screen resolution doesn't come back correct. Not sure if this is a bug in the DLL, but I'll play around more when I have time.
Definitely a conflict happening somewhere in this code, screen resolution gone too crap needs looking at.
dewi316- Veteran
- Location : swansea
Points : 179
Reputation : 22
Join date : 2012-12-19
Re: DXOverlay Mod
Dewi-
I haven't posted any code yet! Not sure what you're messing with, but I did encounter a screen resolution issue early on. Check my posts further up. A solution has been found, which neither I nor Tjdagger have had issues with. Of course I think we're the only ones with the working code at this moment! Progress towards release has been steady, as you can see in this thread.
I haven't posted any code yet! Not sure what you're messing with, but I did encounter a screen resolution issue early on. Check my posts further up. A solution has been found, which neither I nor Tjdagger have had issues with. Of course I think we're the only ones with the working code at this moment! Progress towards release has been steady, as you can see in this thread.
Regg- Veteran
- Points : 143
Reputation : 10
Join date : 2013-02-22
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|