April 18, 2024, 03:09:07 PM

Username
Password

Pages: [1] 2   Go Down
Print
Author Topic: xslots ddraw.dll/ddmod.dll not working on GameRanger  (Read 22772 times)
0 Members and 1 Guest are viewing this topic.
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« on: July 07, 2015, 03:26:23 PM »

So Ghabry's Mod Selector darkpatch.dll (in C:\Progam Files (x86)\Dark Omen\PRG_ENG folder) successfully works with GameRanger to redirect the game files to new Mod folders. However, Aqrit's ddraw.dll that provides extra slots for sprites, banners and 3d portrait heads (via xslots.txt also in PRG_ENG along with ddraw/darkpatch.dlls ) sadly doesn't get picked up by GameRanger. Therefore the new Dark Elves v Skaven armies only work on normal LAN and Hamachi but not GameRanger. The darkpatch.dll redirects to the Skaven&DarkElves mod folder on GameRanger

C:\Program Files (x86)\Dark Omen\Mods\Skaven&DarkElvesBETA  

and should use the modded xslots.txt in the Mods own PRG_ENG folder

C:\Program Files (x86)\Dark Omen\Mods\Skaven&DarkElvesBETA\PRG_ENG
 
Ghabry advises " "it's not about location it's about the working directory that is set by GameRanger when GR sets the working dir to C:\Programs\GameRanger\ then opening xslots.txt will open xslots in C:\Programs\GameRanger\xslots.txt because there is no absolute path"

Any help would be greatly appreciated as we are 98% complete on releasing an ultimate Mod containing all of our alternate campaigns, new sprites, maps and 3d heads but really need it working on GameRanger if possible please.

Thanks

Smiley      
« Last Edit: October 18, 2015, 10:03:50 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
aqrit
Developer
*
Offline Offline

Posts: 85



View Profile WWW
« Reply #1 on: July 07, 2015, 08:52:12 PM »

xslots.txt currently should get loaded from the "current directory".
If it is not being loaded then that is fixable by either loading it at a different point in time or by explicitly supplying the file path.

Also xslots.txt gets loaded by my proxy ddraw.dll... not by darkpatch.dll
It is possible that the real ddraw.dll is being loaded instead of mine... which would be slightly harder to fix but is basically the same problem as above.



« Last Edit: October 18, 2015, 09:45:40 PM by olly » Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #2 on: July 07, 2015, 09:55:31 PM »

Hi Aqrit,

yeah xslots does usually work fine being loaded from current directory on LAN and Hamachi, so yes please if it could be reloaded at perhaps the multiplayer lobby screens before selecting map and army, as that's where GameRanger takes you to. New Armies can be successfully made already when starting the game manually (xslots gets loaded) for selecting Dark Elves and Skaven troops, as does all single player stuff.  

It's so great to battle new armies on new maps! Many thanks again
Multiplayer Skaven V Dark Elves on LAN and Hamachi but sadly not on GameRanger

* DarkElves2.jpg (162.94 KB. 640x480 - viewed 964 times.)


New custom map building guide soon ->

* DoWorking.jpg (132.81 KB. 640x480 - viewed 918 times.)


Smiley

« Last Edit: October 18, 2015, 09:45:51 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #3 on: July 26, 2015, 12:08:19 PM »

I tried the theory of renaming ddraw.dll to doMod.dll and then renaming the 2 occurrences of ddraw.dll in ENGRel.exe to instead call doMod.dll but unfortunately it still didn't get picked up and call xslots.txt on GameRanger although LAN and Hamachi worked as usual and successfully loaded the new Dark Elves and Skaven.


* AqritdoModGRxslotFix.jpg (56.38 KB. 669x181 - viewed 839 times.)


xslots (doMod.dll or ddraw.dll) does get called on Hamachi multiplayer but not on GameRanger

* AqritdoModGRxslotFixComparison2.jpg (182.4 KB. 887x419 - viewed 883 times.)



****UPDATE******
Thanks to Aqrit we can now use a Voodoo wrapper draw.dll (renamed to ddgv2.dll) along with his own renamed ddraw.dll (domod.dll) to play full 3d on cheap graphics cards (expensive ones already play full 3d mode using his ddraw.dll) but sadly xslots.txt still does not get loaded when playing on GameRanger (only single player, LAN and Hamachi) so no Dark Elves v Skaven yet

http://forum.dark-omen.org/help-section/3d-mode-and-win87-dark-omen-t1164.0.html;msg13336;topicseen#msg13336

« Last Edit: October 18, 2015, 09:56:11 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #4 on: October 27, 2015, 02:35:56 PM »

So to test you install original Dark Omen and add in our mod pack

http://forum.dark-omen.org/help-section/3d-mode-and-win87-dark-omen-t1164.0.html;msg12090#msg12090

and to test xslots add in my Dark Elves v Skaven Multiplayer Beta Mod and play on GameRanger when a fix has been made
https://www.dropbox.com/s/aecxsex83dsxbu4/DarkElvesTest.zip?dl=0

We've been trying to Build Aqrit's ddraw.dll in VS2008/2010 but it appears that windowed.cpp is missing from the Source code. I've removed any links to windowed.cpp within the code until Aqrit has time to see this and perhaps locate windowed.cpp (although I maybe wrong). However, the code can now build a new ddraw.dll that appears to work (load xslots in Single Player, LAN/Hamachi but still not GameRanger until we make the path absolute and not relative.

Ghabry kindly provided the following advice ->

"The problem is that the working directory is wrong, so the obvious solution is (like I do everywhere else in my code, see modmenu.cpp e.g.): Change the working directory to the one where EngRel.exe is or better: Get the path to EngRel.exe and prepend it to the filename.

Go to line 215 (which is const char path[] = { "xslots.txt" };) in xslots.cpp and replace it with:


Code:
char xslots_buffer[MAX_PATH + 1] = { 0 };
GetModuleFileNameA(NULL, xslots_buffer, MAX_PATH);
std::string darkomenExePath = xslots_buffer;
std::string xslots_path = darkomenExePath.substr(0, darkomenExePath.find_last_of("\\/")) + "\\xslots.txt";
const char* path = xslots_path.c_str();

Open project proxy_dll.vcproj with VS2010 (I don't have this compiler anymore, so you must do) and compile it.

When it complains about "std::string being unknown" add #include <string> to the top of the file.

Untested, hope this works."

but i get new errors when ammending xslots.cpp with Ghabry's code which I will post later the error codes about linking "error lnk2019" then I can test the theory and see if xslots works on GameRanger.

Aqrit's modified Source Code by me that does now compile ddraw.dll but only in VS2008 not VS2010 yet
https://www.dropbox.com/s/fuzeors99sbxlme/Dark-Omen-Mod-Selector-master%20%282%29.zip?dl=0

Any help will be greatly received.

Smiley


Error Code after adding Ghabry's suggested code into Modified Aqrit's ddraw.dll (with all references to windowed.cpp removed).

1>------ Build started: Project: proxy_dll, Configuration: Release Win32 ------
1>Compiling...
1>xslots.cpp
1>e:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
1>.\xslots.cpp(22) : warning C4201: nonstandard extension used : nameless struct/union
1>Linking...
1>   Creating library C:\Users\olive_000\Downloads\Aqrit\Dark-Omen-Mod-Selector-master\Dark-Omen-Mod-Selector-master\src\Release\ddraw.lib and object C:\Users\olive_000\Downloads\Aqrit\Dark-Omen-Mod-Selector-master\Dark-Omen-Mod-Selector-master\src\Release\ddraw.exp
1>xslots.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "void __cdecl xslots::Load(void)" (?Load@xslots@@YAXXZ)
1>xslots.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) referenced in function "void __cdecl xslots::Load(void)" (?Load@xslots@@YAXXZ)
1>xslots.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::substr(unsigned int,unsigned int)const " (__imp_?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z) referenced in function "void __cdecl xslots::Load(void)" (?Load@xslots@@YAXXZ)
1>xslots.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::find_last_of(char const *,unsigned int)const " (__imp_?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z) referenced in function "void __cdecl xslots::Load(void)" (?Load@xslots@@YAXXZ)
1>xslots.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int const std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::npos" (__imp_?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB)
1>xslots.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) referenced in function "void __cdecl xslots::Load(void)" (?Load@xslots@@YAXXZ)
1>C:\Users\olive_000\Downloads\Aqrit\Dark-Omen-Mod-Selector-master\Dark-Omen-Mod-Selector-master\src\Release\ddraw.dll : fatal error LNK1120: 6 unresolved externals
1>Build log was saved at "file://c:\Users\olive_000\Downloads\Aqrit\Dark-Omen-Mod-Selector-master\Dark-Omen-Mod-Selector-master\src\Release\BuildLog.htm"
1>proxy_dll - 7 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
« Last Edit: October 27, 2015, 11:27:07 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #5 on: October 28, 2015, 11:00:20 PM »

This issue was kindly fixed by Aldark by converting CRL to STL links - our combined eternal thanks to him!

FixedxslotsDDraw_dll
https://www.dropbox.com/s/nfx212qzd037glq/FixedxslotsDDraw_dll.zip?dl=0

Aldark's source code
https://github.com/metamaker/Dark-Omen-Mod-Selector

So we can now play xslots Dark Elves v Skaven on GameRanger!

New ultimate mod coming soon and Illidan's World of Steam

Smiley

Massive thanks to Aqrit & Ghabry as always for originally creating such great tools!

Youtube tutorials of creating new 3d portrait heads, sprites and maps on way
« Last Edit: November 03, 2015, 11:43:40 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #6 on: October 29, 2015, 04:04:01 PM »

So the fix was to add MSVCRT.lib to the dependencies.
Logged

olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #7 on: October 29, 2015, 10:50:37 PM »

Is there an alternative way to avoid having to manually copy and paste multiplayer army files from 2parm folder into armytmp, when using ddraw.dll. It's great it works but new players find it hard to remember each time they choose another army.


Copy and paste new multiplayer army army000.arm from

C:\Program Files (x86)\Dark Omen\Mods\Skaven\GAMEDATA\2parm

and paste into

C:\Program Files (x86)\Dark Omen\Mods\Skaven\armytmp

and rename to player0.arm if you are the Host or rename to player1.arm if you Join to Host


\\Client pc who is joining game, should have a player0.arm in Main Dark Omen armytmp folder C:\program Files (x86)\Dark Omen\armytmp  and should have player1.arm in Mods\Skaven\armytmp folder

\\Host should have a player0.arm in Main Dark Omen armytmp folder C:\program Files (x86)\Dark Omen\armytmp  and should only have player0.arm in Mods\Skaven\armytmp folder
 
Aqrit's comments in armytmp.cpp say "repoint armytmp to a folder in the game directory somewhere that doesn't require admin rights to write to folder is created if missing. " Which is why ddraw.dll requires you to create new armytmp folders in both main Dark Omen folder and Mods\Skaven\armytmp.


Original Dark Omen would set its Registry Path for ARMYTMP to C:\Windows\Temp where you would find both players army files (Player0 (Host) & Player1 (Join) ). However, it changes to c:\program files (x86)\dark omen\armytmp when using ddraw.dll and then darkpatch.dll will successfully redirect to Mods\Skaven\armytmp where you have manually copied and renamed your army001.arm, to player0 or player1.

We maybe lucky that we can copy army001.arm from Mods\Skaven\2Parm and rename it as both Player0 and Player1 in Mods\Skaven\armytmp since the opponent's army file overwrites the one in your own armytmp. This also allows us to inspect our opposition's army, after the Battle.

Smiley
« Last Edit: October 31, 2015, 02:48:32 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #8 on: October 30, 2015, 12:09:56 PM »

This looks like some strange redirection issue. Maybe it uses an API function the is not hooked.
Potential candidates are (without checking) CopyFile or MoveFile because the two APIs to handle file reading (CreateFile and MapViewOfFile) are already redirected.
Logged

Aldark
Developer
*
Offline Offline

Posts: 3



View Profile
« Reply #9 on: October 30, 2015, 04:12:38 PM »

So the fix was to add MSVCRT.lib to the dependencies.

Not quite. There was an issue with optimizer too, I had to disable it.

I totally don't understand the reason, why original developer created `mini_crt.cpp` (optimizer issue was connected with functions from this file: compiler expected functions memcp, strstr, ... to be intrinsic).

Also, no manifest file was injected into .dll, so resulting .dll didn't understand where to search for MSVCRT90.dll and MSVCP90.dll. Fixed that too. Smiley
« Last Edit: October 30, 2015, 04:28:41 PM by Aldark » Logged
illidan
Developer
*
Offline Offline

Posts: 298



View Profile
« Reply #10 on: October 31, 2015, 06:08:26 PM »

eternal thanks to Aldark , xslots will soon open the way to new multiplayer mod Smiley
« Last Edit: November 03, 2015, 11:44:02 PM by olly » Logged
aqrit
Developer
*
Offline Offline

Posts: 85



View Profile WWW
« Reply #11 on: November 01, 2015, 12:19:30 AM »

I was avoiding the ms crt mess because the vc libraries break backward compatibility with old versions of windows.

rant:
It looks like MS is trying fix their shit on Win10 using ucrt which *might* be useful once *everyone* migrates to win10.
MinGW compiled stuff links directly to mscrt.dll which microsoft says not to do.
... Today I learned, mingw seems to declare printf with "C++" linkage to prevent gcc from replacing it with its own intrinsics
/facepalm   


Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #12 on: November 01, 2015, 01:03:35 AM »

Hi Aqrit,

big thanks again for xslots and all the other fixes, very exciting times ahead. Aside from investigating armytmp, any chance you could take a look at adding more custom maps please. As I'm releasing a How to guide on creating 3d portrait heads and new battle maps.  I think it is one of the few remaining tasks, amazing what has been achieved! Total remake sequel coming soon.  

Smiley

« Last Edit: November 03, 2015, 11:44:17 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
cuthalion
Campaign Creator
*
Offline Offline

Posts: 385


View Profile
« Reply #13 on: November 01, 2015, 03:05:33 PM »

Cool fix Aldrak, thanks! Now Olly can add more armies to multiplayer w/o need to rename 2PARM files.
Ghabry and Aqrit - you must have collected a huge sack of 'thanks' already, but still - thank you again Smiley
« Last Edit: November 03, 2015, 11:44:38 PM by olly » Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #14 on: November 02, 2015, 12:14:17 AM »

Ghabry's new darkpatch.dll fixes the armytmp issue!

http://forum.dark-omen.org/tools/mod-selector-t1118.0.html;msg13354#msg13354

Many thanks! Fans can now select their xslots custom armies without any copy and pasting.

We played Dark Elves v Skaven on the Fortress map B5_01B it should also now allow new maps to be added.

Smiley
« Last Edit: November 03, 2015, 11:44:52 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Pages: [1] 2   Go Up
Print
Jump to: