Warcraft II Forum

Warcraft II => Mods & Development => Topic started by: fois on July 12, 2019, 01:00:41 AM

Title: Warcraft II Config program
Post by: fois on July 12, 2019, 01:00:41 AM
Just copy it into the game folder, then run it to configure you rendering settings.


(https://forum.war2.ru/index.php?action=dlattach;topic=5015.0;attach=3974)
Title: Re: Warcraft II Config program
Post by: Lambchops on July 12, 2019, 09:47:11 AM
Cool idea. Looks nice.  :thumbsup:

Sorry I can't test it because my wc2 box is an oldskool XP32, and the config needs .NET, but it should be very useful for people using new OS.

Title: Re: Warcraft II Config program
Post by: Warbux on July 12, 2019, 05:20:44 PM
so when i switch to open gl it said... the process cannot access the file c:\war2combat\ddraw.dll because it is being ued by another process... should i take my draw out?
Title: Re: Warcraft II Config program
Post by: fois on July 12, 2019, 05:53:37 PM
Cool idea. Looks nice.  :thumbsup:

Sorry I can't test it because my wc2 box is an oldskool XP32, and the config needs .NET, but it should be very useful for people using new OS.




Yeah on XP you'll have to install .NET 2.0 manually, on vista/7/8/10 you don't have to do anything though.

You can get it here if needed http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe (http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe)


so when i switch to open gl it said... the process cannot access the file c:\war2combat\ddraw.dll because it is being ued by another process... should i take my draw out?


Make sure you don't have the game running, otherwise it can't replace the ddraw.dll cause the game is using it
Title: Re: Warcraft II Config program
Post by: fois on August 09, 2019, 04:22:26 AM
Updated with support for the latest cnc-ddraw - https://github.com/CnCNet/cnc-ddraw

Source code is now also included in the first post.
Title: Re: Warcraft II Config program
Post by: fois on August 19, 2019, 07:04:43 PM
Updated with a few new display modes for upscaling.
OpenGL / Direct3D 9 will now detect when a player joins battle.net and automatically switch to windowed mode while battle.net is open (it will switch back to fullscreen when you join a game).
Tooltips were added in English and Russian (translated by iL)
Title: Re: Warcraft II Config program
Post by: Nox on August 20, 2019, 12:33:22 AM
Make my war2 crash, had to reinstall it.
Title: Re: Warcraft II Config program
Post by: iL on August 20, 2019, 08:35:44 AM
Make my war2 crash, had to reinstall it.
do you have crush dump? war2_directory\Errors\*.ERR
Title: Re: Warcraft II Config program
Post by: fois on August 20, 2019, 03:16:42 PM
Make my war2 crash, had to reinstall it.

Did it crash with all 4 renderers? (GDI/OpenGL/Direct3D9/DirectDraw)

Make sure you don't have any compatibility modes enabled for Warcraft II BNE.exe, some of them can cause crashes
Title: Re: Warcraft II Config program
Post by: Nox on August 20, 2019, 03:40:13 PM
Make my war2 crash, had to reinstall it.

Did it crash with all 4 renderers? (GDI/OpenGL/Direct3D9/DirectDraw)

Make sure you don't have any compatibility modes enabled for Warcraft II BNE.exe, some of them can cause crashes

I dont know, i try every renders but i finally decide to play with the original one.

And on almost every early games it make me crash.

I desinstall my war2 and install a new one without it and now it work fine again.

Maybe its only me too, better wait for others comments.
Title: Re: Warcraft II Config program
Post by: fois on November 18, 2019, 09:20:17 AM
Updated! Fixed some bugs related to alt+tab and alt+enter (alt key was sticking sometimes after you returned to the window)
Title: Re: Warcraft II Config program
Post by: fois on November 22, 2019, 08:59:32 AM
Update: OpenGL and Direct3D9 renderer will now show a popup and ask if you really want to exit the game if you hit the X button to close the game in windowed mode

Note: Make sure you open the config program and select your renderer again, then press ok (Otherwise it won't update the ddraw)

(https://i.imgur.com/6tm5sGA.png)
Title: Re: Warcraft II Config program
Post by: fois on December 01, 2019, 06:08:00 PM
Update: Fixed a bug with the OpenGL and Direct3D renderers where sometimes the game would randomly minimize or switch to windowed mode after pressing Esc or Enter.

Note: Make sure you open the config program and select your renderer again, then press ok (Otherwise it won't update the ddraw)
Title: Re: Warcraft II Config program
Post by: fois on December 15, 2019, 01:53:58 PM
Update: Fixed a bug with multi monitor setups where the cursor wasn't locked to the primary screen anymore after alt+tab

Note: Make sure you open the config program and select your renderer again, then press ok (Otherwise it won't update the ddraw)
Title: Re: Warcraft II Config program
Post by: fois on December 31, 2019, 06:17:55 AM
Update:

Added a new .ini setting "SingleProcAffinity=Yes" for the GDI renderer, this should help to avoid crashes with 3rd party utils (e.g. old war2observe)
Title: Re: Warcraft II Config program
Post by: Nox on December 31, 2019, 11:17:48 AM
Update: Fixed a bug with multi monitor setups where the cursor wasn't locked to the primary screen anymore after alt+tab

Note: Make sure you open the config program and select your renderer again, then press ok (Otherwise it won't update the ddraw)

I got this probleme, how to fix it?
Title: Re: Warcraft II Config program
Post by: fois on December 31, 2019, 01:22:10 PM
Update: Fixed a bug with multi monitor setups where the cursor wasn't locked to the primary screen anymore after alt+tab

Note: Make sure you open the config program and select your renderer again, then press ok (Otherwise it won't update the ddraw)

I got this probleme, how to fix it?

Get the latest war2 config from the first post, extract it into your game folder and overwrite the old one and then start it and press ok so it can update the files
Title: Re: Warcraft II Config program
Post by: Nox on December 31, 2019, 06:56:10 PM
Updated with a few new display modes for upscaling.
OpenGL / Direct3D 9 will now detect when a player joins battle.net and automatically switch to windowed mode while battle.net is open (it will switch back to fullscreen when you join a game).
Tooltips were added in English and Russian (translated by iL)

this one?
Title: Re: Warcraft II Config program
Post by: fois on January 01, 2020, 08:14:53 AM
Updated with a few new display modes for upscaling.
OpenGL / Direct3D 9 will now detect when a player joins battle.net and automatically switch to windowed mode while battle.net is open (it will switch back to fullscreen when you join a game).
Tooltips were added in English and Russian (translated by iL)

this one?

Nope, you don't have to change any settings, it's enough if you just copy the new config program in and the press ok (it will then update the files)
Title: Re: Warcraft II Config program
Post by: Muz on January 03, 2020, 01:36:31 PM
Is there ddraw that could be use for other Blizzard game such as Starcraft?
Title: Re: Warcraft II Config program
Post by: fois on January 03, 2020, 02:44:10 PM
Is there ddraw that could be use for other Blizzard game such as Starcraft?

Yeah you can also use Warcraft II Config for starcraft 1, diablo 1 and diablo 2... but only the opengl and direct3d renderer will work for these games.

Latest version of starcraft and latest version of diablo 2 are not using directdraw anymore so you can't use it for these, older versions work fine though.

A lot other games are working too, here are some examples:

Command & Conquer Gold
Command & Conquer: Red Alert
Command & Conquer: Tiberian Sun
Command & Conquer: Red Alert 2
Carmageddon
Carmageddon 2
Warcraft 2
StarCraft
Diablo
Diablo 2
Age of Empires
Age of Empires II
Theme Hospital
Populous: The Beginning
Outlaws
Dungeon Keeper
Dark Reign: The Future of War
Star Wars: Galactic Battlegrounds
Atomic Bomberman
Dune 2000
Oddworld: Abe's Oddysee
Commandos
Red Baron 3D
F-16 Multirole Fighter
F-22 Raptor
Nox
...
Title: Re: Warcraft II Config program
Post by: 8)MikulZ(8 on June 04, 2020, 02:54:24 PM
Updated with a few new display modes for upscaling.
OpenGL / Direct3D 9 will now detect when a player joins battle.net and automatically switch to windowed mode while battle.net is open (it will switch back to fullscreen when you join a game).
Tooltips were added in English and Russian (translated by iL)
Can I disable the automatic windowed mode in battle.net so it's always fullscreen?
Title: Re: Warcraft II Config program
Post by: fois on June 24, 2020, 07:14:04 PM
Updated with a few new display modes for upscaling.
OpenGL / Direct3D 9 will now detect when a player joins battle.net and automatically switch to windowed mode while battle.net is open (it will switch back to fullscreen when you join a game).
Tooltips were added in English and Russian (translated by iL)
Can I disable the automatic windowed mode in battle.net so it's always fullscreen?


Right now that's not possible with OpenGL / Direct3D 9, you would have to use the GDI renderer for that.


Are you sure you actually really need OpenGL / Direct3D 9? The main advantage of these two renderers is that both of them fix the laggy cursor (input lag) on windows 8+10. If you don't mind the input lag then GDI is just fine.
Title: Re: Warcraft II Config program
Post by: 8)MikulZ(8 on July 10, 2020, 03:57:25 PM
Updated with a few new display modes for upscaling.
OpenGL / Direct3D 9 will now detect when a player joins battle.net and automatically switch to windowed mode while battle.net is open (it will switch back to fullscreen when you join a game).
Tooltips were added in English and Russian (translated by iL)
Can I disable the automatic windowed mode in battle.net so it's always fullscreen?


Right now that's not possible with OpenGL / Direct3D 9, you would have to use the GDI renderer for that.


Are you sure you actually really need OpenGL / Direct3D 9? The main advantage of these two renderers is that both of them fix the laggy cursor (input lag) on windows 8+10. If you don't mind the input lag then GDI is just fine.


The problem with GDI for me is that it doesn't display the game (or just cursor not sure) in 144fps but (30?)fps, and i'm so spoiled by smooth cursor of 144hz display I can't stand laggy cursor of 60hz monitors anymore lol. If there is some way to change GDI to display 144hz then it should be fine too.
Title: Re: Warcraft II Config program
Post by: 8)MikulZ(8 on August 09, 2020, 12:28:18 PM
@fois
Title: Re: Warcraft II Config program
Post by: fois on August 09, 2020, 07:49:59 PM
@fois

Yeah sorry, I still need to check how often the game is redrawing the cursor (Might have to patch it...)

You can use the new version I made a couple months ago for now, this one does at least fix the input lag and also has the frame rate limiter removed
Title: Re: Warcraft II Config program
Post by: Nox on August 14, 2020, 03:14:30 AM
I dont know if you can work on this, but here an idea for a future patch..

I know that when we use two screens that the mouse lock in the game and you cant switch to the second screen just with your mouse without alt tab.

Maybe you can try to fix that, i see in some 2020 games thats the mouse lock on first screen when your IN GAME, but it delock when you are on the lobby channel and you can switch to the second screen with only your mouse !

Dont know if it's possible with an old game like that, thank you.

Title: Re: Warcraft II Config program
Post by: fois on September 09, 2020, 08:45:27 PM
I dont know if you can work on this, but here an idea for a future patch..

I know that when we use two screens that the mouse lock in the game and you cant switch to the second screen just with your mouse without alt tab.

Maybe you can try to fix that, i see in some 2020 games thats the mouse lock on first screen when your IN GAME, but it delock when you are on the lobby channel and you can switch to the second screen with only your mouse !

Dont know if it's possible with an old game like that, thank you.



Yeah I will add that, one of the ddraws already got something like this but I didn't update it for war2 yet
Title: Re: Warcraft II Config program
Post by: fois on February 27, 2021, 07:52:04 PM
@8)MikulZ(8

Do you still need a high refresh cursor? I got something done and need testers :P


Edit: made a dedicated thread for it: http://forum.war2.ru/index.php/topic,6190.new.html#new (http://forum.war2.ru/index.php/topic,6190.new.html#new)
Title: Re: Warcraft II Config program
Post by: fois on March 01, 2021, 07:55:03 AM
Updated the config program with the latest version of both ddraws.

war2 ddraw changelog:

Does now fully support the Hardware cursor plugin: https://forum.war2.ru/index.php/topic,6190.0.html (AdjustMouseSensitivity=Yes)
Maximize button can now integer upscale the window size (MaximizeScaleX=2)
Saving window size on game exit can now be disabled (SaveSettings=No)
When switching between game/bnet windows it does now remember the window positions properly

cnc-ddraw changelog
Does now fully support the Hardware cursor plugin: https://forum.war2.ru/index.php/topic,6190.0.html (adjmouse=true)
Maximize button is working now

Title: Re: Warcraft II Config program
Post by: Available on March 08, 2021, 03:50:08 AM
updated the ddraws/config

Tested a bit.
Maximize button disables sometimes, but title doubleclick still works if the desktop size allows double size, but...

It would be nice if this function:
1. Ignore window frame/header sizes (as it works now: a few extra useless header/border pixels can turn off IntMaximize feature at all)
2. Take into account the OnTop state (in this case ignore taskbar, use max possible screen size)


And... would be very good if:
1. Alt+Backspace for Minimize will be used again (all hotkeys very useful w/o window frames)

2. There would be a hotkey to turn AlwaysOnTop ON/OFF without game restarting

3. There would be a hotkey (? Alt+F9) for IntMaximized/100% switch.
(? or maybe Alt+Enter switch 3 modes: 100% / IntMaximized / FullScreen [? if the corresponding mode allowed by the option])

Title: Re: Warcraft II Config program
Post by: fois on March 09, 2021, 12:11:49 AM
Tested a bit.
Maximize button disables sometimes, but title doubleclick still works if the desktop size allows double size, but...

It would be nice if this function:
1. Ignore window frame/header sizes (as it works now: a few extra useless header/border pixels can turn off IntMaximize feature at all)
2. Take into account the OnTop state (in this case ignore taskbar, use max possible screen size)

It does already ignore the frame and titlebar (it adds 20 on top of the height instead, so you will need 1280x980), I tested it on win 7/10 with 1280x1024 and big taskbar size and it worked fine. What OS/Settings did you use to break maximize on 1280x1024?

I just changed it now to use 100% if IntMaximized doesn't fit into the screen.


And... would be very good if:
1. Alt+Backspace for Minimize will be used again (all hotkeys very useful w/o window frames)

2. There would be a hotkey to turn AlwaysOnTop ON/OFF without game restarting

3. There would be a hotkey (? Alt+F9) for IntMaximized/100% switch.
(? or maybe Alt+Enter switch 3 modes: 100% / IntMaximized / FullScreen [? if the corresponding mode allowed by the option])

Alt+Backspace is now working again with ShowWindowBorder=No

Not sure about the other things... I think it will get too complicated and no one will know about all these hotkeys. Maybe I can add some more buttons to the titlebar instead, I have to think about it
Title: Re: Warcraft II Config program
Post by: Available on March 09, 2021, 03:28:50 PM
it adds 20 on top of the height
I used big taskbar in win7 and 1680x1050. It leave 8 extra pixels for Y, 968 total. :(


"MaximizeScaleX=2"
Hmm, why X?

if i understand correctly, by analogy with the cursor size, then there may be something like:
MaximizeIntScale
0 - max.possible non-integer scale
1 - max.possible integer scale (something like 3840x2880 for really big ones :) )
2+ - directly stated scale factor


too complicated
OK, i don't really care about maximizing, but the hotkey for ontop might come in handy


I just changed it now to use 100% if IntMaximized doesn't fit into the screen
In the previous version it was like that,
now (with ontop=No) it works like this: the window expands and "fields" are formed on the left and right
Title: Re: Warcraft II Config program
Post by: fois on March 09, 2021, 06:36:46 PM
In the previous version it was like that,
now (with ontop=No) it works like this: the window expands and "fields" are formed on the left and right

I thought you meant the full screen size with 100%, but you meant the original game resolution 640x480 instead. Anyways I changed it now...

Alt+F9 opens the screen recorder on win 10 if you have it set up, so i used Alt+End for AlwaysOnTop toggle now
Title: Re: Warcraft II Config program
Post by: eleison on March 11, 2021, 06:59:56 AM
Hey, is there anyway to use OPENGL and make window fullscreen in lobby??

Thanks!
Title: Re: Warcraft II Config program
Post by: fois on March 11, 2021, 07:07:49 AM
Hey, is there anyway to use OPENGL and make window fullscreen in lobby??

Thanks!

I can answer your first question from the other thread:

What is the best renderer to use for war2? How do I prevent the war2 window to not resize to small size when in lobby? I want fullscreen all the time but the possibility to use alt+enter for going to window mode, but always full screen.


OpenGL and Direct3d 9 used to be the best because they both fixed the laggy cursor on windows 8/10 and I've been using Direct3d 9 for a long time. The only problem is they can only fix the issue by running the lobby in a window (there isn't any good solution to solve the problem unfortunately).

I just recently updated the renderers/config program and the new best renderer is now GDI with "Hardware Cursor" enabled. With this new update you don't have a laggy cursor anymore and at the same time you can also have the lobby in fullscreen now as well.

Get the Warcraft 2 Config.zip from the first post, extract it into your game folder. Then run Warcraft 2 Config and make sure your renderer is set to GDI and Hardware Cursor is enabled and you'll have what I use now as well


Oh, and yes... you can alt+enter whenever you want with GDI. The latest version also got a maximize button now as well
Title: Re: Warcraft II Config program
Post by: eleison on March 11, 2021, 08:45:05 AM
Hey, is there anyway to use OPENGL and make window fullscreen in lobby??

Thanks!

I can answer your first question from the other thread:

What is the best renderer to use for war2? How do I prevent the war2 window to not resize to small size when in lobby? I want fullscreen all the time but the possibility to use alt+enter for going to window mode, but always full screen.


OpenGL and Direct3d 9 used to be the best because they both fixed the laggy cursor on windows 8/10 and I've been using Direct3d 9 for a long time. The only problem is they can only fix the issue by running the lobby in a window (there isn't any good solution to solve the problem unfortunately).

I just recently updated the renderers/config program and the new best renderer is now GDI with "Hardware Cursor" enabled. With this new update you don't have a laggy cursor anymore and at the same time you can also have the lobby in fullscreen now as well.

Get the Warcraft 2 Config.zip from the first post, extract it into your game folder. Then run Warcraft 2 Config and make sure your renderer is set to GDI and Hardware Cursor is enabled and you'll have what I use now as well


Oh, and yes... you can alt+enter whenever you want with GDI. The latest version also got a maximize button now as well


Thanks for fast reply! If I press alt+enter with GDI, I get a small screen and the maximize button is not working. Would be nice to just keep it full screen but mouse free to go to other monitor. I run latest Windows 10.
Title: Re: Warcraft II Config program
Post by: eleison on March 11, 2021, 08:46:30 AM
I like the borderless with OPENGL, is it possible to get that with GDI?
Title: Re: Warcraft II Config program
Post by: fois on March 11, 2021, 04:51:43 PM
Thanks for fast reply! If I press alt+enter with GDI, I get a small screen and the maximize button is not working. Would be nice to just keep it full screen but mouse free to go to other monitor. I run latest Windows 10.

I like the borderless with OPENGL, is it possible to get that with GDI?

Borderless mode does what you want and keeps it fullscreen on alt+tab, but the battle.net lobby will be in a small window with all renderers, GDI can't fix that either.
Title: Re: Warcraft II Config program
Post by: Nox on March 16, 2021, 12:24:56 AM
Sorry to ask you again, but did you work on this, it would be really good for streamer, thanks.


I dont know if you can work on this, but here an idea for a future patch..

I know that when we use two screens that the mouse lock in the game and you cant switch to the second screen just with your mouse without alt tab.

Maybe you can try to fix that, i see in some 2020 games thats the mouse lock on first screen when your IN GAME, but it delock when you are on the lobby channel and you can switch to the second screen with only your mouse !

Dont know if it's possible with an old game like that, thank you.
Title: Re: Warcraft II Config program
Post by: fois on March 16, 2021, 04:38:41 AM
Sorry to ask you again, but did you work on this, it would be really good for streamer, thanks.

Yeah I've been testing something the last days and it almost works perfectly, just got a little bug left that i need to fix. It's using window capture in OBS and you can leave the screen without it minimizing


It's a bit more difficult to set up, you need 5 sources now in obs, but you only need to set it up once though

(https://forum.war2.ru/index.php?action=dlattach;topic=5015.0;attach=3985)
Title: Re: Warcraft II Config program
Post by: Available on March 16, 2021, 04:41:17 AM
Alt+End for AlwaysOnTop toggle
Thanks. It's sad about 20 pixels. Everything else works.
Maybe add vertical centering without taking into account the titlebar (in case 20px(?) of header still fits on the screen) to let game seems really centered, not too low.



Quote
cant switch to the second screen
... to add some hotkey to unlock mouse

upd: ohhh forgot,
there are Ctrl+TAB already
Title: Re: Warcraft II Config program
Post by: Available on March 16, 2021, 05:32:09 AM
you need 5 sources now


There are streamer version with all layers marked.
Let's Synchronize names at least (txt files). :)

(https://forum.war2.ru/index.php?action=dlattach;topic=5015.0;attach=3988)


Sample video (Named version, not for unknown smurfs):
http://ftp.war2.ru/war2/Temp/BNE_mod4OBS_demo_draft.mp4 (http://ftp.war2.ru/war2/Temp/BNE_mod4OBS_demo_draft.mp4)
Title: Re: Warcraft II Config program
Post by: fois on March 16, 2021, 09:09:24 AM
Thanks. It's sad about 20 pixels. Everything else works.
Maybe add vertical centering without taking into account the titlebar (in case 20px(?) of header still fits on the screen) to let game seems really centered, not too low.

Not sure if that will work on 1280x1024, have to try it later


There are streamer version with all layers marked.
Let's Synchronize names at least (txt files). :)

Yeah, my idea was similar (giving names to the windows), but in my version many windows share the same name so you don't need many sources (e.g. Channel/Create/Join/Ladder are all "Bnet Overlay 2"). I can't know which window is what so it wouldn't work to use the same names anyways (i only know the size and the order they were created).



Anyways, I might have a better solution now. You can now record with just 1 source and window capture...
Title: Re: Warcraft II Config program
Post by: fois on March 16, 2021, 09:15:29 AM
How to stream Warcraft II


1. Create a twitch account here: https://www.twitch.tv/ (https://www.twitch.tv/)

2. Download and install OBS: https://obsproject.com/download (https://obsproject.com/download)

3. Start OBS and go through the Auto-Configuration Wizard to set everything up

4. Download Warcraft II Config.zip (https://forum.war2.ru/index.php/topic,5015.0.html) and extract it into your game folder (Make sure the game is not running before you extract it)

5. Start the game and then press Alt+Enter to go to windowed mode (Do NOT minimize the window!)

6. In OBS click on the + button on "Sources" and select "Window Capture" click ok then choose the window named "[Warcraft II BNE.exe]: Warcraft II"

7. Select the window capture in OBS and upscale it to fit the screen, you can press CTRL+F to keep black bars or CTRL+S to stretch to fullscreen

8. Go back to Warcraft II and press Alt-Enter again to switch back to fullscreen and start streaming



Note: Do not use Alt+Tab while streaming, use Alt+Enter instead (or else your stream will stop displaying the game) and make sure you never click on the minimize button in the window.
Title: Re: Warcraft II Config program
Post by: Nox on March 17, 2021, 03:51:01 AM
Thanks alot im gonna try this  :hug: :thumbsup:
Title: Re: Warcraft II Config program
Post by: Nox on March 17, 2021, 08:08:47 AM
It's not bad at all!! But there only one major probleme.. Every time at alt tab my obs came back to my first screen, is there any way to let it lock in the second screen? Because it's really annoying to always bring it back to my second screen lol.

Title: Re: Warcraft II Config program
Post by: fois on March 18, 2021, 02:06:26 AM
It's not bad at all!! But there only one major probleme.. Every time at alt tab my obs came back to my first screen, is there any way to let it lock in the second screen? Because it's really annoying to always bring it back to my second screen lol.



Ah damn, I only got one monitor right now so I can't test it... But try this new ddraw.dll here, maybe it works
Title: Re: Warcraft II Config program
Post by: Nox on March 18, 2021, 03:39:56 AM
It's not bad at all!! But there only one major probleme.. Every time at alt tab my obs came back to my first screen, is there any way to let it lock in the second screen? Because it's really annoying to always bring it back to my second screen lol.



Ah damn, I only got one monitor right now so I can't test it... But try this new ddraw.dll here, maybe it works

Wow work like a charm ty very much!

Last thing, if you still want to improve it and have time...

When you swtich between control s and control f.... When you goes in control f, you can see the personal desktop in the background, i dont know if its possible or any way to put full black boarder.

Maybe there a simple way and i just dont know it too, maybe something in obs?
Title: Re: Warcraft II Config program
Post by: fois on March 18, 2021, 03:55:24 AM
Wow work like a charm ty very much!

Last thing, if you still want to improve it and have time...

When you swtich between control s and control f.... When you goes in control f, you can see the personal desktop in the background, i dont know if its possible or any way to put full black boarder.

Maybe there a simple way and i just dont know it too, maybe something in obs?

Nice! Did you delete your old "display capture"? Normally it should be black with CTRL+F with window capture as long as you don't have a display capture somewhere still in OBS
Title: Re: Warcraft II Config program
Post by: Available on March 18, 2021, 03:57:31 AM
just 1 source and window capture

There are several problems:

1a. Ctrl + TAB does not work after exiting the game itself to "BNE"
1b. it would be better if the mouse released automatically in this case

2. is it possible to somehow increase the rendering performance of all "BNEs"? sometimes the image is not drawn completely correctly or have lacks, most likely because something is going too slowly

3. it would be nice if the new "obs" one-window feature to be optional, because interface mod allows to work with each BNE window separately, including NOT displaying the login and password inputs etc, whatever user wants.


and, if possible, a request for a special option:
if it is possible to create all BNE windows creates as a "100% transparent" by default (also good thing if this feature can be somehow switched "on the fly", same as OnTop),
then i can make/finish a wrapper interface of any size (less / more than 640, depending on the user's current task: chatting / working with the tournament / etc) with the necessary functions, much more convenient than regular interface, faster than conventional drawing.
Title: Re: Warcraft II Config program
Post by: fois on March 18, 2021, 04:08:15 AM
1a. Ctrl + TAB does not work after exiting the game itself to "BNE"
1b. it would be better if the mouse released automatically in this case

I had it like this once but some complained and i reverted it. I can probably add it again for windowed mode though

2. is it possible to somehow increase the rendering performance of all "BNEs"? sometimes the image is not drawn completely correctly or have lacks, most likely because something is going too slowly

3. it would be nice if the new "obs" one-window feature to be optional, because interface mod allows to work with each BNE window separately, including NOT displaying the login and password inputs etc, whatever user wants.

I already fixed some redrawing bugs and also made the overlay FPS configurable via war2_ddraw.ini (0 = disabled) after watching eqs stream yesterday a bit (check first post for latest version)

Edit: Using window capture on the BNE windows will cause drawing glitches randomly (I had that problem too, don't have a solution for yet). But the 1-source trick doesn't have this problem though

and, if possible, a request for a special option:
if it is possible to create all BNE windows creates as a "100% transparent" by default (also good thing if this feature can be somehow switched "on the fly", same as OnTop),
then i can make/finish a wrapper interface of any size (less / more than 640, depending on the user's current task: chatting / working with the tournament / etc) with the necessary functions, much more convenient than regular interface, faster than conventional drawing.

Yeah I can try to add that
Title: Re: Warcraft II Config program
Post by: fois on March 18, 2021, 04:49:52 AM
and, if possible, a request for a special option:
if it is possible to create all BNE windows creates as a "100% transparent" by default (also good thing if this feature can be somehow switched "on the fly", same as OnTop),
then i can make/finish a wrapper interface of any size (less / more than 640, depending on the user's current task: chatting / working with the tournament / etc) with the necessary functions, much more convenient than regular interface, faster than conventional drawing.

Alt+End to toggle it.

Set "OverlayFPS=0", otherwise you can't see if it worked
Title: Re: Warcraft II Config program
Post by: fois on March 18, 2021, 05:02:42 AM
Here another one, this one got Alpha = 1 rather than Alpha = 0 and you can still click on the buttons with this one
Title: Re: Warcraft II Config program
Post by: Nox on March 18, 2021, 11:59:56 AM
Wow work like a charm ty very much!

Last thing, if you still want to improve it and have time...

When you swtich between control s and control f.... When you goes in control f, you can see the personal desktop in the background, i dont know if its possible or any way to put full black boarder.

Maybe there a simple way and i just dont know it too, maybe something in obs?

Nice! Did you delete your old "display capture"? Normally it should be black with CTRL+F with window capture as long as you don't have a display capture somewhere still in OBS

Yeah it was the probleme, thanks alot, work perfectly now!
Title: Re: Warcraft II Config program
Post by: Available on March 19, 2021, 04:50:44 AM
Alpha = 1
Sounds exactly right, but doesn't work(still no any transparent effect), regardless of whether "OverlayFPS = 0" or something else is used, also tried "Alpha=1" as ini file option. (win7 / xp - same no effect, can't try on win10 atm)

Am I doing the right thing by renaming this file to ddraw.dll?
Title: Re: Warcraft II Config program
Post by: fois on March 19, 2021, 05:44:11 AM
Sounds exactly right, but doesn't work(still no any transparent effect), regardless of whether "OverlayFPS = 0" or something else is used, also tried "Alpha=1" as ini file option. (win7 / xp - same no effect, can't try on win10 atm)

Am I doing the right thing by renaming this file to ddraw.dll?

Seems to work only with top level windows on xp/vista/7, but not with child windows.

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setlayeredwindowattributes
Quote
Windows 8:  The WS_EX_LAYERED style is supported for top-level windows and child windows. Previous Windows versions support WS_EX_LAYERED only for top-level windows.

However, I just tested it on win 7 and it seems to work fine on all windows

Added a .ini setting for it and changed the hotkey to Alt+Home
Title: Re: Warcraft II Config program
Post by: fois on July 13, 2021, 12:28:22 AM
then i can make/finish a wrapper interface of any size (less / more than 640, depending on the user's current task: chatting / working with the tournament / etc) with the necessary functions, much more convenient than regular interface, faster than conventional drawing.

Did that work out @Available ? If not, then maybe we could create multiple battle.snp files (each one with a different resolution)
Title: Re: Warcraft II Config program
Post by: Available on July 13, 2021, 03:23:01 AM
Did that work out
It's not in good condition for now.
I can instant join/create some games, i can use some chat features and so on, but all this still too raw.
Too many things needs to be fixed/reworked, at least "guaranteed" info delivery by BNE chat.


Common problem depending on ddraw:
while at least one BNE window exist,
all war2 windows (including main) need to be same alpha=0 (transparent for mouse clicks)
BNE not exist - main return to normal/default War2Alpha

I will be appreciated for version like this
   
maybe good to have options in war2_ddraw.ini
War2Alpha=255 ;  ~ 16 to 255 ; default common transparency for war2
BNEAlpha=255; same for bne mode, 0 - invisible/non clickable ALL war2 windows while BNE exist
for testing/working period at least...


multiple battle.snp files
I tried to just double all the sizes/coords in the dialogs resources to get 1280x960, but War2 still switching to 640 when BNE appears then crashed.
What needs to be done so that war2 does not crash?
Title: Re: Warcraft II Config program
Post by: Available on July 13, 2021, 03:29:33 AM
And some mad idea.  ???

Maybe would be good to enable/disable transparency and other stuff by WM_USER message ("RegisterWindowMessage")

for example, at start ddraw register/post msg like a "war2control" (aka "DDRAWHere", lol)
periodically do PostMessage ( 0xFFFF, ... ):
   
if some program answered by special code - do what for code is intended
maybe there are some control codes can be added later

if no one answered on posted msg - means program closed/crashed or whatever, so ddraw automatically switch to some default/safe settings that controlled by these codes
Title: Re: Warcraft II Config program
Post by: fois on July 13, 2021, 05:53:45 PM
Did that work out
It's not in good condition for now.
I can instant join/create some games, i can use some chat features and so on, but all this still too raw.
Too many things needs to be fixed/reworked, at least "guaranteed" info delivery by BNE chat.


Common problem depending on ddraw:
while at least one BNE window exist,
all war2 windows (including main) need to be same alpha=0 (transparent for mouse clicks)
BNE not exist - main return to normal/default War2Alpha

I will be appreciated for version like this
   
maybe good to have options in war2_ddraw.ini
War2Alpha=255 ;  ~ 16 to 255 ; default common transparency for war2
BNEAlpha=255; same for bne mode, 0 - invisible/non clickable ALL war2 windows while BNE exist
for testing/working period at least...


Do you have a test version so I can see what you are trying to do and get a better understanding of it? Maybe makes it easier then for me to think about a good solution



I tried to just double all the sizes/coords in the dialogs resources to get 1280x960, but War2 still switching to 640 when BNE appears then crashed.
What needs to be done so that war2 does not crash?


I don't remember how i done it but i had it working before (only in windowed mode though). I think you need to test it with cnc-ddraw, gdi ddraw has too many hardcoded "640x480" stuff.
I changed the text size and let it auto scale, that was easier to do
Title: Re: Warcraft II Config program
Post by: Available on July 14, 2021, 02:34:37 AM
changed the text size and let it auto scale
I tried different options with 'cnc'

Maximum achieved with font size changing:
1024 x 670 with related artifacts due to this - unusable
(picture attached)

~Maximum(?) by resizing the window:
7500(? and more) x 684
not tried more than 7500, because no sense while Y-size is so limited

Anyway I think this is a dead end branch, because it will not allow to choose a resolution with pixel precision.



Do you have a test version
So far, even the test version is very bad and I'm ashamed to show it :-[
The chat doesn't work now because I killed the basic functionality of the old version to rewrite it from scratch, but still haven't created new one.

Because of this, I did a little demo of how a "fast host" can work.
Hopefully this shows why all war2 layers have to be transparent at some point.

http://ftp.war2.ru/war2/Temp/hidden_bne_quickhost_demo.7z (http://ftp.war2.ru/war2/Temp/hidden_bne_quickhost_demo.7z)

There are the same principles:
as soon as BNE disappears, the main war2 window becomes visible
and vice versa
while war2 in BNE mode - all windows are completely hidden, so that no one can click in the wrong place
so I free to display the chat and other functions in a window of any size,
separate windows or tabs for private chats,
etc...


PS: Alpha option(if introduced) can be useful by itself, for example: to set common "visible" state to alpha=192, not only alpha=255... and so on.
true translucency (rather than fake as in modern OS window headers) is sometimes handy
Title: Re: Warcraft II Config program
Post by: fox on April 10, 2022, 02:03:21 AM
...could this program have the ability to change the move screen keys to WASD instead of the arrow keys?

Using AutoHotKey, I wrote a brief program to make WASD act as arrows (can be toggled on/off using caps lock). It works in all other programs and all warcraft screens until the actual gameplay screen. Cannot figure out how to get it to work in this game.  Drives me insane.