Title: Mod Selector Post by: Ghabry on May 01, 2012, 09:38:20 PM This program allows you to select between different Dark Omen Mods without overwriting any original files.
Please report any problems!!! Mod Selector (http://en.dark-omen.org/downloads/view-details/1.-modding-tools/4.-miscellaneous-tools/mod-selector.html) Latest version: [attachment=2] Sourcecode: https://github.com/Ghabry/Dark-Omen-Mod-Selector/ (https://github.com/Ghabry/Dark-Omen-Mod-Selector/) Installation: Extract EngRel.exe and darkpatch.dll into your PRG_ENG directory (or any other subdirectory of Dark Omen folder, yes it must be a subdirectory). To install Mods create a folder "Mods" in your Dark Omen directory. In this directory create a subdirectory (name not important, but its recommended to not use special chars). In this subdirectory create a File "Mod.ini". Open the file in a texteditor and write the name of your mod in the first line of the file. Save it. (If the file is missing or empty your mod will be ignored!). (If you want you can write your name in the 2nd line, it's currently ignored but will be probably used later). Place all your mod files in this subdirectory (structure must be the same as Dark Omen directory layout!). E.g. if you have a modified PLYR_ALL.arm, you must place it in [subdir]\GameData\1parm\. If you have a modded Engrel place your EngRel.exe in a folder "PRG" in your mod directory, the mod selector will then use this file. Now start EngRel.exe, click "Select Mod", select your mod in the list and press "load". (if "Select Mod" is disabled it couldnt find the "Mods"-folder). The currently active mod is selected in the list when the "Select Mod" screen is loaded btw. Notes for Singleplayer Mods: The SaveGame directory is always redirected, this prevents loading incorrect savegames. That folder is autocreated when missing. To load a custom WHMTG script place a "whmtg.txt" in your mod directory (the one with mod.ini). Modifying an existing whmtg.txt is recommened: [attachment=1] Notes for Multiplayer Mods: The GameData\2parm directory is always redirected, so you can only load armies of that mod. If you dont supply any *.aud-files the original ones will be used. That folder is autocreated when missing. If you are having problems: Create a file called trace.txt in the folder where EngRel.exe is. Execute EngRel and try to load your mod. Then close EngRel and paste the content of trace.txt somewhere, e.g. on pastebin.com. Make sure that you got the file extension right, Windows hides it by default: Select Tools -> Folder Options and Untick "Hide extensions for known file types" in the Windows explorer 2parm folder must be placed inside GameData, not directly in your mods folder! How it works: Basicly the program checks if the file Dark Omen tries to access exists in the moddir. If it exists it will use the modfile, otherwise it uses the original file. If the original file is also missing (not checked by mod selector) it will usually trigger the default Dark Omen behaviour for error handling (= crash). File access to 2parm and Savegame is always redirected to the moddir. This allows you to have unique savegames and multiplayer armies for every mod. The last used mod is saved and will be loaded on startup. This allows you to use these mods in Game Ranger. Sample Files: Mod Selector Sample Files (http://en.dark-omen.org/downloads/view-details/1.-modding-tools/4.-miscellaneous-tools/mod-selector-sample-files.html) Contains a Mods-Folder with Fair Omen, Flaks Goblin and Dwarf campaign, Rise of the Dead and Chaos Dwarf invasion. Release Notes 2012-05-01: First Release 2012-05-11: Fix redirecting of some files 2012-05-19: Support modded EngRel files, use original *.are and *.aud files if they are missing. 2012-05-20: Redirect DeleteFile. EngRel patched when started from GameRanager (untested). Added debug trace. 2013-11-25: Add overhead map patch (kudos to aqrit) 2013-12-08: Add WHMTG compiler, add 3D mode fix (kudos to aqrit) 2015-01-10: Works with Windows 8 now 2015-11-01: Redirect Get/SetFileAttributes and CopyFile 2015-11-05: Redirect GetSetCurrentDirectory and WindowProc. Fix crash when window loses focus by filtering focus messages. Title: Re: Mod Selector Post by: olly on May 01, 2012, 09:51:38 PM wow this is great news, just downloading and reading about it, can't wait to try it out!
Thank you :) *This is amazing and makes it so easy to switch between Mods! Big Thanks on behalf of all the Dark Omen Community* (http://img215.imageshack.us/img215/4514/screenjy.jpg) (http://imageshack.us/photo/my-images/215/screenjy.jpg/) Title: Re: Mod Selector Post by: kilowic on May 01, 2012, 10:29:39 PM Cool !!! Can't wait to check it
Title: Re: Mod Selector Post by: cuthalion on May 11, 2012, 02:04:26 PM Hm, I tried it with my new campaign.
It doesn't pick up army file and ctl file from modded B1_01 though seems to have picked up .btb file: Those 4 default units from B1_01 had new positions. Sprite files, picture files seem to work alright (at least what I managed to see after B1_01 start) I had only 3 modded files from B1_01 at first: btb, ctl, arm. Now I tried to copy all B1_01 files in my Mod subdirectory, including unchanged .prj and others, but it doesn't work this way either. Title: Re: Mod Selector Post by: Ghabry on May 11, 2012, 05:39:39 PM Should be fixed now. Everybody: PLEASE REDOWNLOAD!!! (Note: You only need the new darkpatch.dll)
Sometimes Dark Omen used relative paths, I'm converting now everything to absolute paths, should fix this... Not sure if this fixes everything, report it if still something fails. Title: Re: Mod Selector Post by: kilowic on May 15, 2012, 08:08:04 AM I don't know how to create .ini file :( I put all mods and campaign to the "Mods" folder in Dark Omen directory (without .ini file so far). Next part of the instructions I just don't understand. Could you put some more "help" how to do it ? For somebody who is'nt very good at making such things ?
Title: Re: Mod Selector Post by: Ghabry on May 15, 2012, 08:52:23 AM Download the linked Sample Files and look how its done there.
If you have file extensions disabled you will see Mod as a filename btw. Basicly you just create a file that has the filename Mod.ini in your mods subdirectory. And in the first line of this file you write the name of your mod. Title: Re: Mod Selector Post by: kilowic on May 15, 2012, 09:07:47 AM So if I have 4 mods I have to make 4 .ini files ? Ok I will just copy .ini files from sample files :)
Title: Re: Mod Selector Post by: kilowic on May 15, 2012, 09:16:08 AM It works :) I got problem now with this:
"Notes for Singleplayer Mods: Create a (empty) folder SaveGame in your moddir otherwise you cant save. Notes for Multiplayer Mods: Create a folder GameData\2parm and place the three *.aud and *.are files in it otherweise you cant save or it will crash." What's "moddir" ? And in my Gamedata\2parm there are many files *.aud and *.are already. I added three files *.aud and *.are but Fair Omen crash when I want to edit army. Title: Re: Mod Selector Post by: Ghabry on May 15, 2012, 10:10:36 AM Moddir is the dir where you placed the Mod.ini (so its a subdir of the Mods-Folder).
So savegame must be created under [your moddir]/SaveGame and multiplayer stuff under [your moddir]/GameData/2parm Title: Re: Mod Selector Post by: kilowic on May 15, 2012, 11:04:18 AM It still crashes :( maybe it's becouse I made those *.aud and *.are files by copying those from the orginal DO and just changing their names to "1" "2" "3". I just don't know how to make such files without copying something that already exists
Title: Re: Mod Selector Post by: Ghabry on May 15, 2012, 11:26:23 AM dont rename the *.are files, they are template files for new armies.
You just have to copy them from the original because the mod selector always redirects the 2parm-folder. Maybe its worth to improve this in the next version of the map selector (use original are-files if they are missing) Title: Re: Mod Selector Post by: kilowic on May 15, 2012, 12:06:52 PM In my Fair Omen "moddir" there are already 3 files *.are and *.aud. If i want copy more from orginal DO it wants to overwrite them. Should I do it ? It crashes all the time.
I think I know what you mean becouse when I run the game - pick Fair Omen - go to multiplayer, there are no default armies. And this is the problem right ? Title: Re: Mod Selector Post by: cuthalion on May 15, 2012, 01:18:32 PM Hi,
In case you didn't figure out everything yet, I advise you to look at the subfolder structure of my Chaos Dwarf Invasion. It uses Ghabry's mod selector, and all the campaign files (.ini file including) are placed in right order to work with the mod. Basically, the campaign files are placed in the same subfolders as original files, but those campaign subfolders are placed inside mods/MODNAME/ subfolder. So you just copy Fair Omen patch into 'Dark Omen/mods/Fair Omen/' But now there is a problem with the fact that Fair Omen uses modified EngRel.exe, and it's not directly compatible with Ghabry's Mod Selector. There are a few ways out, the easiest of them - if you ask Ghabry or me to make EngRel.exe that's compatible with both Mod Selector and Fair Omen. I can try to make such file tomorrow. Title: Re: Mod Selector Post by: kilowic on May 16, 2012, 07:25:29 PM I tried making all mods again and now everything works fine :) It must have been my mistake.
Fair Omen doesn't crash but prices of items didn't change. Title: Re: Mod Selector Post by: Ghabry on May 16, 2012, 09:31:15 PM But now there is a problem with the fact that Fair Omen uses modified EngRel.exe, and it's not directly compatible with Ghabry's Mod Selector. There are a few ways out, the easiest of them - if you ask Ghabry or me to make EngRel.exe that's compatible with both Mod Selector and Fair Omen. I can try to make such file tomorrow. Prices are in EngRel ^^Title: Re: Mod Selector Post by: Ghabry on May 19, 2012, 01:30:52 AM New Version released
Adds support for modded EngRel (place it at [your moddir]\PRG\EngRel.exe). My quick tests showed that this works, but please check by yourself. The modded EngRel must be an English one, otherwise this will crash. ^^ Only the data segment (0xBD000 to 0xFF3FF) is applied, other parts of the file are ignored (this prevents overwriting of executable code from EngRel with possibly malicious/untrusted code, only the Mod Selector is trusted enough to overwrite code segments ;)). The modified EngRel will not be applied when its started from GameRanger. I don't see this as an issue yet, but will be fixed later. Other changes: If one of the *.aud or *.are files is missing in 2parm it will use the original files (arm-files are still always redirected to the mod dir). Title: Re: Mod Selector Post by: hari8 on May 19, 2012, 12:18:44 PM The modded EngRel must be an English one, otherwise this will crash. ^^ Every modder uses the English one, so no problem ^.^ Title: Re: Mod Selector Post by: cuthalion on May 19, 2012, 07:03:02 PM Will it correctly pick up my modified engrel? ATM I only have engrel with included dll file in the dwarf campaign. Or shall I use the same tool. To exclude the DLL?
Title: Re: Mod Selector Post by: Ghabry on May 19, 2012, 07:27:19 PM The modified EngRel works.
I actually made the tests using your EngRel. Just tested it with the Fair Omen EngRel: Works, magic item prices are changed. Title: Re: Mod Selector Post by: kilowic on May 20, 2012, 08:43:58 AM My prices didn't change :/ I put it in mods/fair omen/prg and nothing :/
Title: Re: Mod Selector Post by: Ghabry on May 20, 2012, 12:21:16 PM Have you renamed the file to EngRel.exe?
Title: Re: Mod Selector Post by: kilowic on May 20, 2012, 01:01:21 PM Yes
Title: Re: Mod Selector Post by: Ghabry on May 20, 2012, 09:05:22 PM Program updated, please redownload
This fixes a critical bug: DeleteFile was not redirected, this caused deletion of original savegames and armies instead of the ones of the mod. @kilowic Create a file called trace.txt in the folder where EngRel.exe is. Execute EngRel and load Fair Omen. Then close EngRel and paste the content of trace.txt somewhere (or try to resolve it yourself by reading the debug output), e.g. on pastebin.com. Title: Re: Mod Selector Post by: cuthalion on May 21, 2012, 11:18:59 AM At the moment, Mods that don't have subdirectory ./gamedata/2parm/ (even though there are no modified files from there) block EngRel.exe start.
Test Case: 1. start Engrel 2. load any mod that doesn't have 2parm 3. quit and restart engrel. 4. it tries to load last selected mod and 'error occured, please reinstall DO' message appears. Title: Re: Mod Selector Post by: cuthalion on May 21, 2012, 11:29:56 AM Also, it doesn't pick up my Chaos Dwarf Engrel at the moment. Either I do something wrong or it doesn't work.
What I did was -reinstall DO clean -create mods and all the rest -place modded engrel into ./mods/chaos dwarves/prg/EngRel.exe -start EngRel.exe taken from this Mod Selector -select chaos dwarves as a Mod -start new campaign: armies, ctl scripts are taken from my mod, but unit names on the battle field are not modified. Original names go instead. here's my trace: Title: Re: Mod Selector Post by: Ghabry on May 21, 2012, 01:05:18 PM The problem is
Quote [10:22:30] CreateFile: D:\do\PRG\EngRel.exe Because EngRel exists in the Mod path too it gets redirected. As a temporary fix: Rename PRG in "do" to something else. The original game uses PRG_ENG as the folder name, so this problem doesnt happen there ^^.[10:22:30] Redirected to: D:\do\Mods\Chaos Dwarves\PRG\EngRel.exe My DLL uses the normal C file api and this calls CreateFile indirectly. I could provide a quick fix but this can cause problems later. So I will rewrite the whole DLL instead to call the original CreateFile directly instead. And do you have the latest version? Quote [10:22:30] Redirected to: D:\do\Mods\Chaos Dwarves\GameData\2parm I made more then one update yesterday (redownload). The first FindFirstFile call to 2parm should not be redirected. Reason: DO makes an initial check at startup if all folders exists. If the folder is missing in the current mod dir you get a "There is an error with the installation" error.Update Download link was wrong, if you downloaded it before 14:00 GMT+1: Redownload! Title: Re: Mod Selector Post by: Ghabry on June 01, 2012, 01:02:55 PM Rob suggested, that I can use PhysFS (http://icculus.org/physfs/) to handle the redirecte file input/output. For now the link must be enough, I will tell you the advantages when the new version is ready (not in the next days ^^).
For now the implementation (calling PhysFS functions for any file input/output in the Dark Omen directory) is good enough to allow starting of dark omen. Folder enumeration (to get savegames and army files) is missing, but this generated this nice error I have never seen before: [attachment=1] But I guess you can also get this by deleting Battles.Eng... Title: Re: Mod Selector Post by: Debeul on July 14, 2012, 10:34:49 AM Is it possible to upload the sample files again?
thx Title: Re: Mod Selector Post by: Ghabry on July 14, 2012, 01:13:40 PM The downloads can be found in our download section:
Mod Selector (http://en.dark-omen.org/downloads/view-details/1.-modding-tools/4.-miscellaneous-tools/mod-selector.html) and Mod Selector Sample Files (http://en.dark-omen.org/downloads/view-details/1.-modding-tools/4.-miscellaneous-tools/mod-selector-sample-files.html) Title: Re: Mod Selector Post by: Debeul on July 29, 2012, 09:50:09 AM Thx:)
Title: Re: Mod Selector Post by: Ghabry on July 23, 2013, 10:01:37 PM Havn't updated the mod selector since over a year.
But here is the sourcecode for reference: https://github.com/Ghabry/Dark-Omen-Mod-Selector (https://github.com/Ghabry/Dark-Omen-Mod-Selector) Title: Re: Mod Selector Post by: Ghabry on November 25, 2013, 10:59:21 PM New release:
Adds the overhead map view by aqrit. Title: Re: Mod Selector Post by: olly on November 25, 2013, 11:07:16 PM Confirmed it works with Aqrit's camera fix - Thanks
:) Title: Re: Mod Selector Post by: Ghabry on December 08, 2013, 07:56:42 PM New release.
- Cleaned up the code to be less messy ;) - Fixed that annoying bug that resulted in EngRel.exe not being patched when the real exe was called Prg.exe. - SaveGame and 2parm are created on-the-fly when missing - Adds aqrits WHMTG compiler (with a few changes by myself to allow on-the-fly patching). - Add the 3D mode fix (that debug flag that switches to windowed mode) + resolution switch. [attachment=1] Title: Re: Mod Selector Post by: olly on March 05, 2014, 02:29:15 PM Not an urgent update required but as previously discussed, we find that Game Ranger launches Dark Omen in small window when using a modified full 3d EngRel.exe (something to do with 16bit if I remember correctly).
However, I found that by creating a new DO Orig folder within the Mods folder (with its own 3d EngRel.exe) does actually then launch the game in Full screen mode. I think we also discussed a possible future update that saves custom army files into the correct mod folder (although I think the latest mod selector does do this but doesn't work with 16bit/3d ?) http://www.mediafire.com/download/n7ekz66459dbpj5/DO+Orig.zip (http://www.mediafire.com/download/n7ekz66459dbpj5/DO+Orig.zip) Still an amazing mod! Thanks also to GXQ7 for testing with me. :) Title: Re: Mod Selector Post by: olly on June 14, 2014, 06:44:37 PM Update-> As we know GameRanger requires a separate mod selector folder (DOOrig) to launch Dark Omen in full 3d mode (Win 8 16bit) and there is a small issue of not being able to select the correct multiplayer army (even though it does now save to correct mod 2parm folder).
However the solution is to manually copy and paste your custom army001.ARM file from C:\Program Files (x86)\Dark Omen\Mods\DO Orig\GameData\2parm into the DOOrig mod folder armytemp folder C:\Program Files (x86)\Dark Omen\Mods\DO Orig\armytmp and rename it to player0 if you are the Host or player1 if you are joining a Hosted game :) http://www.mediafire.com/download/17j7dcb1k4adi7z/DOGR3dArmyFix.zip (http://www.mediafire.com/download/17j7dcb1k4adi7z/DOGR3dArmyFix.zip) Nvidia Graphics card users on Win 7/8 - Download and extract the 3 folders and then paste into C:\Program Files (x86)\Dark Omen Save your original PRG_ENG folder, by renaming it before replacing it with this new PRG_ENG folder, that allows 3d mode and mod Selector. Remember to right click on both the new EngRel.exe found within the new PRG_ENG and Mods\DO Orig\PRG folders to set compatibility settings to 16bit colour and run as Administrator with 640x480 screen resolution (Win 8 ) or set desktop to 16bit (Win7 ). Remember to manually start Dark Omen and select the DOOrig mod, then quit and host a game on GameRanger, which will auto launch the game in DOOrig mode to allow full 3d! Any problems delete the 3 new folders and rename your original PRG_ENG folder back to how it was, or replace the new 3d enabled EngRel.exe with the EngRelno3d.exe and rename them to be EngRel.exe instead, which will disable 3d and run Dark Omen in CPU mode. For more information about full 3d mode see below -> http://forum.dark-omen.org/help-section/3d-mode-and-win8-dark-omen-t1164.0.html (http://forum.dark-omen.org/help-section/3d-mode-and-win8-dark-omen-t1164.0.html) Title: Re: Mod Selector Post by: olly on December 28, 2014, 11:21:37 PM Malus has been creating a new alternate campaign which mods the WHTMG meeting script but he found the Mod Selector darkpatch.dll on the Main Website Downloads section doesn't work but Ghabry's earlier post above in this section does ->
http://forum.dark-omen.org/tools/mod-selector-t1118.0.html;msg12352#msg12352 (http://forum.dark-omen.org/tools/mod-selector-t1118.0.html;msg12352#msg12352) However, I have also found that it only works on my Win 7 64bit laptop and not my Win8 64bit desktop. If you get a spare moment could you kindly investigate the possible cause please. [attachment=1] Google suggests it maybe C++ Redist but I think I have them all and have tried running in all compatibility modes [attachment=2] However, the earlier version of darkpatch.dll that added the overhead map fix worked with Win8 64bit http://forum.dark-omen.org/tools/mod-selector-t1118.0.html;msg12296#msg12296 (http://forum.dark-omen.org/tools/mod-selector-t1118.0.html;msg12296#msg12296) Thanks :) ***Answer = Ghabry informs me that the cause was a new 16bit enforcer that needs to removed for Win 8 version of darkpatch.dll and left in to assist 3d mode on Win 7, so we can offer 2 versions depending on operating system*** Title: Re: Mod Selector Post by: Ghabry on January 10, 2015, 03:21:12 PM New release working under Windows 8: [attachment=1]
Title: Re: Mod Selector Post by: olly on January 10, 2015, 05:29:17 PM Thanks for updating darkpatch.dll and also in the main downloads section version. All Works perfectly on both Win7 & Win 8, many thanks!
:) Title: Re: Mod Selector Post by: Malus on January 10, 2015, 06:29:22 PM Very cool, thx Ghabry.
Title: Re: Mod Selector Post by: cuthalion on April 28, 2015, 07:27:04 PM Ghabry, a question on whmtg.txt
Last time I edited EngRel.exe main campaign script, there was an issue: I could not add more actions to it as I was limited by overall room reserved for script in EngRel.exe Does the same issue still remain now? What if I add a block or 2 to whmtg.txt and do not remove anything, would you expect any problem? or, if a problem occurs, it will only mean that something is wrong inside my block but not with overall space used? Title: Re: Mod Selector Post by: olly on April 28, 2015, 08:14:44 PM It should be fine to add more to the whmtg.txt, as I think Malus' Rise Of The Dead 2 mod already has
http://forum.dark-omen.org/campaigns/rise-of-the-dead-2-beta-t1252.0.html (http://forum.dark-omen.org/campaigns/rise-of-the-dead-2-beta-t1252.0.html) Title: Re: Mod Selector Post by: aqrit on April 29, 2015, 07:33:58 AM The whmtg script has been externalized. The mod currently reserves enough space to fit a script 3 times larger than the original.
Title: Re: Mod Selector Post by: cuthalion on April 29, 2015, 09:03:41 AM This is fine :)
Title: Re: Mod Selector Post by: Oggrr on May 30, 2015, 07:29:32 PM Ello there. Tried to "install" this mod selector but can't get it to work. Having the same problems with Fair Omen, when i mod the game with either Fair or Mod Selector, I am unable to run the game. All i get is a black screen and a total computer freeze wich can only be fixed with a manual reset with the restart button.
Title: Re: Mod Selector Post by: cuthalion on May 30, 2015, 09:00:22 PM Hi,
you have a working Dark Omen have not you? If so, just go to http://forum.dark-omen.org/tools/mod-selector-t1118.0.html (http://forum.dark-omen.org/tools/mod-selector-t1118.0.html) and download latest mod selector. Place 2 files where Ghabry instructs. Another way: download http://forum.dark-omen.org/tools/mod-selector-t1118.0.html (http://forum.dark-omen.org/tools/mod-selector-t1118.0.html) and place it on top of a working DO installation (rename the installation just in case overwrite fails to run). This is a version with integrated bug fixes and mod selector. Title: Re: Mod Selector Post by: Oggrr on May 30, 2015, 09:28:01 PM Yes I do. I've tried other mods and all works fine, all done on a fresh clean DO install. The only problem i've had has been with Mod Selector and Fair Omen, and they both give me the same error.
Title: Re: Mod Selector Post by: Oggrr on June 01, 2015, 06:37:21 PM Forgot to say that I'm playing on Windows 7 64 bit.
Title: Re: Mod Selector Post by: Ghabry on June 20, 2015, 03:21:47 PM Not tested, this is just this one byte change suggested by aqvid, hope this fixed WHMTG_RemoveMagic
Finally fixes Win8 Title: Re: Mod Selector Post by: olly on June 20, 2015, 07:49:11 PM Works perfectly on Win 8 thanks!
:) Title: Re: Mod Selector Post by: Ghabry on November 01, 2015, 11:30:01 PM Long time passed but here is a new version.
Sorry I don't have VS2010 anymore, this version will only work under Vista and newer! This hooks CopyFile, GetFileAttributes and SetFileAttributes so they are redirected to the mod directory. I hope Get/SetFileAttributes fixed not detected map files... and CopyFile armytmp issues. Note that you need Compatibility 640x480 and 16bit from Win8 and newer Title: Re: Mod Selector Post by: Ghabry on November 02, 2015, 12:14:07 AM Code: CopyFile: d:\spiele\dark omen\gamedata\2parm\allied1.arm to d:\spiele\dark omen\armytmp\player1.arm Title: Re: Mod Selector Post by: olly on November 02, 2015, 12:15:53 AM Worked perfectly Dark Elves v Skaven on Fortress map and fans can now select their armies without any copy and pasting of army files. I will look forward to adding new maps.
:) Title: Re: Mod Selector Post by: Aldark on November 02, 2015, 12:13:46 PM BOOL WINAPI MyCopyFileA(LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, BOOL bFailIfExists) Nicely done! :) Title: Re: Mod Selector Post by: Ghabry on November 03, 2015, 04:21:18 PM Losing focus under Windows 10 results in Dark Omen crashing. Makes debugging almost impossible. In case somebody wants to fix this before I invest time in it. ;)
Title: Re: Mod Selector Post by: olly on November 03, 2015, 11:24:02 PM Have been adding new maps with Ghabry using his latest darkpatch.dll
1) Add an empty folder named B6_01 into C:\Program Files (x86)\Dark Omen\GameData\1pbat 2) Add a new mod map named B6_01 into C:\Program Files (x86)\Dark Omen\Mods\Skaven&DarkElvesBETA\GAMEDATA\1pbat 3) Add B6_01 to the Battles.eng list in the Skaven 1pbat 4) Copy and Paste Trading Post script in WHMTG and rename B1_01 to B6_01 and the game will load the new map as 1st mission. His hope is to no longer need to make the dummy empty folders in original Dark Omen 1pbat. However, it's fantastic that it works, so I now have my new mod map as B6_01 and my Fortress map as B6_02 :) Title: Re: Mod Selector Post by: Ghabry on November 04, 2015, 01:43:00 AM The reason is that the developers use (no idea why) SetCurrentDirectory to move into the map directory and then work with relative paths (e.g. "B1_01.prj").
The problem is now that SetCurrentDirectory fails, because the directory does not exist (and succeeds when the empty directory exists). This can be worked around by remembering which directory they wanted to change to and just prepend it to the filenames BUT this fails for reading BTB files because instead of opening "B1_01.btb" directly they get the current working directory (which is the wrong one because the call failed) and append "B1_01.btb" and then pass the full pathname (!) to CreateFile. This means besides SetCurrentDirectory also GetCurrentDirectory must be hooked because they use the result of Get once to generate the BTB path... WTF, why do they do this, was the BTB part written by a different person??? New version! (Sourcecode follows during the next days) Olly, you can delete the empty folders now ;) Also fixes the focus lost crash. Guess I can take a break now again... all bugs fixed. Title: Re: Mod Selector Post by: olly on November 04, 2015, 06:38:22 PM Excellent all works perfectly!
Many thanks :) Title: Re: Mod Selector Post by: Ghabry on November 05, 2015, 06:02:55 PM Better solution that only hooks SetCurrentDirectory...
But this is really the final final version ;) Is directly in the download section Mod Selector (http://en.dark-omen.org/downloads/view-details/1.-modding-tools/4.-miscellaneous-tools/mod-selector.html) Title: Re: Mod Selector Post by: hari8 on December 05, 2015, 05:18:50 PM Just tried to played one of the campaigns in the mod selector, but half of the screen is flickering purple :( doent matter which campaign (probably), 16-bit-colors enabled
Title: Re: Mod Selector Post by: olly on December 05, 2015, 05:20:43 PM Tell us which campaign and what version of windows you are using and try this mod pack instead ->
http://forum.dark-omen.org/help-section/ultimate-dark-omen-xpvistawin7win81win10-game-fixes-t111.0.html (http://forum.dark-omen.org/help-section/ultimate-dark-omen-xpvistawin7win81win10-game-fixes-t111.0.html) I'm thinking you may have to set 16bit colour on the EngRel.exe within each of the Mod folders PRG_ENG :) Title: Re: Mod Selector Post by: hari8 on December 10, 2015, 11:20:35 PM I'm thinking you may have to set 16bit colour on the EngRel.exe within each of the Mod folders PRG_ENG Did it with the installed modpack (i installed that one in octobe with you i think), didnt helped (with any mod), restarted pc, didnt helped. After that i installed the mod pack nov15, but identical issue Title: Re: Mod Selector Post by: olly on December 10, 2015, 11:30:18 PM Pop into Chat channel and I can always remote onto your pc via Teamviewer.
Title: Re: Mod Selector Post by: hari8 on December 12, 2015, 10:45:22 PM I will, just have to find time when you are there yet :)
Title: Re: Mod Selector Post by: Ghabry on April 30, 2017, 02:49:12 PM Update!
Download (http://forum.dark-omen.org/index.php?action=dlattach;topic=1118.0;attach=2609) This version merges aqrits changes provided by his ddraw.dll into darkpatch.dll This means: Delete ddraw.dll before running EngRel otherwise bad things will happen! XSlots works now without restarting Dark Omen after switching a mod (at least I think so, tell me if you observe any unexpected behaviour). New: Custom handler for CTL OpCode 0xf1, see the CTL thread. Title: Re: Mod Selector Post by: olly on April 30, 2017, 05:53:26 PM Very cool, thanks. Will test with Game Ranger and is there now chance to get the voodoo ddraw.dll working again please
Title: Re: Mod Selector Post by: Ghabry on April 30, 2017, 06:21:31 PM Well I meant that you have to remove the ddraw.dll of aqrit which provides XSlots because our codes conflict now.
So ddraw.dll is free for other things like this dgvoodoo lib. Title: Re: Mod Selector Post by: olly on April 30, 2017, 06:24:31 PM great, will try it out.
:) Title: Re: Mod Selector Post by: olly on April 30, 2017, 07:05:36 PM Thanks Ghabry, your new darkpatch.dll allows in-game changing of mods really easy now and xslots & 3d still works fine as does Multiplayer LAN & Multiplayer Game Ranger using Dark Omen 2 mod. I've just updated the mod pack and currently testing dgvoodoo's ddraw.dll
:) Title: Re: Mod Selector Post by: Ghabry on May 29, 2017, 11:44:39 PM About the Battles.ENG size issue. Looks like the buffer where the map list is copied to has a fixed size but the application doesn't check it and the additional map data is written into other Dark Omen data structures and corrupting them o.O
No idea why but I can't get the pre-battle scene (where you select army and map) to open. It automatically closes and returns me to the first multiplayer-scene (Play/Edit Army). So I will try to fix this blind. In theory I know what must be modified :). Will increase the limit to 200 entries. Title: Re: Mod Selector Post by: olly on May 30, 2017, 08:45:36 AM Sounds promising thanks and I found that adding too many maps beyond its limit of 2 extra maps, would also return me to the first multiplayer screen.
I have added 2 files in the latest mod pack within Dark Omen 2 mod, that has the new Battles.ENG for all the new maps and also a BattlesLimit.ENG for comparison, that has 2 extra maps added to the original list. Download latest mod pack http://forum.dark-omen.org/help-section/read-me-ultimate-dark-omen-xpvistawin7win81win10-game-fixes-t111.0.html (http://forum.dark-omen.org/help-section/read-me-ultimate-dark-omen-xpvistawin7win81win10-game-fixes-t111.0.html) issue relating to new mod maps http://forum.dark-omen.org/maps/mark-of-chaos-map-modding-t1369.0.html;msg14234#msg14234 (http://forum.dark-omen.org/maps/mark-of-chaos-map-modding-t1369.0.html;msg14234#msg14234) Title: Re: Mod Selector Post by: Ghabry on May 30, 2017, 10:39:17 AM Ah, thats a side effect of too many maps? Okay, because my test file contained 100 :D.
Good then I will know that I fixed it ^^ Should work now. I updated the "latest version" link in the 1st post of the topic. https://github.com/Ghabry/Dark-Omen-Mod-Selector/commit/0ab78f307a240db003055328ee02863916a2561d (https://github.com/Ghabry/Dark-Omen-Mod-Selector/commit/0ab78f307a240db003055328ee02863916a2561d) Title: Re: Mod Selector Post by: olly on May 30, 2017, 07:13:44 PM Works perfectly! Many thanks again and for the advice concerning correct whitespace, "between B0_00, mb_00 and "The name" must be tabulator, not space"
:) 2 Tabs 1Tab B1_01 mb1_01 Trading Post B1_02 mb1_02 Border Counties B1_03 mb1_03 Grissburg town B1_04 mb1_04 The road to Bogenhafen B1_05 mb1_05 Bogenhafen Town B1_05 mb1_05b Bogenhafen Town X-treme B1_07 mb1_07 Helmgart Castle B1_08 mb1_08 Axebite pass B2_01 mb2_01 The Empire B2_02 mb2_02 Great Forest at Night B2_04 mb2_04 Great Forest B2_05 mb2_05 Blighted Towers B2_07 mb2_07 Sylvania B2_08 mb2_08 Drakenhof Castle B3_01 mb3_01 Forest before Kislev B3_02 mb3_02 Goblin Camp B3_06 mb3_06 The road to Kislev B3_07 mb3_07 Troll-Land B3_07 mb3_07b Troll-Land (Hills) B3_08 mb3_08 The Northern wastes B3_09 mb3_09 Basin of Frozen Blood B4_01 mb4_01 Return to Axebite pass B4_02 mb4_02 The Bretonnian river B4_03 mb4_03 Vingtienne B4_05 mb4_05 Loren Forest - Holy Shrine B4_06 mb4_06 Loren Lake B4_06 mb4_06b Loren Lake (Balanced) B4_08 mb4_08 Loren Forest - Clearing B4_09 mb4_09 The road to Moussillon B4_10 mb4_10 Town of the Dead - Moussillion B5_01b mb5_01b The Black Pyramide B5_01b mb5_02b The Black Pyramide (Large DeplZone) B5_01b mb5_03b The Black Pyramide (Sideways) B5_01b mb5_04b The Black Pyramide (25 Regiments) SPARE9 mspare9 Tutorial B6_01 mb6_01 Expansionmultiplayer1 B6_02 mb6_02 Ec4chaostraditional1 B6_03 mb6_03 Emerget000 B6_04 mb6_04 Expansionmultiplayer7 B6_05 mb6_05 Expansionmultiplayer2 B6_06 mb6_06 Generalconflict1v1traditional B6_07 mb6_07 Empirechapter1village1 B6_08 mb6_08 Chaos2skavensiege B6_09 mb6_09 Empirechapter4highelfsiege B7_01 mb7_01 Reinfbattle B7_02 mb7_02 Watchoverford B7_03 mb7_03 Thebalancetraditional B7_04 mb7_04 Struggle1v1reinfbattle B7_05 mb7_05 Twohills1v1reinfbattle B7_06 mb7_06 BloodonSnow B7_07 mb7_07 Expansionmultiplayer4 B7_08 mb7_08 Expansionmultiplayerprosperity2teams B7_09 mb7_09 Empirechapter2besiegedfortress B8_01 mb8_01 Expansionmultiplayer5 B8_02 mb8_02 Expmulticaravanconflict B8_03 mb8_03 Exp_multi3reinf B8_04 mb8_04 Expmulti6reinf B8_05 mb8_05 Expreinfbattle8 B8_06 mb8_06 Fortress Title: Re: Mod Selector Post by: olly on May 31, 2017, 09:34:21 PM I recently tried the coloured cursors mod which only seems to work when overwriting the originals, instead of within Dark Omen 2 mods. It seems strange since it does successfully redirect the folders according to trace.txt
[attachment=1] Download Coloured Cursors mod to replace Black & White originals, to avoid turning on coloured cursors in Options [attachment=2] [attachment=3] Title: Re: Mod Selector Post by: Ghabry on June 01, 2017, 12:22:28 AM Do you also see entries of ".CUR" or ".ANI" files in "Dark Omen\Graphics\Cursors" redirected? FindFirstFile is usually part of the "Your DO install is incomplete" check.
Looks like Cursors are created with "LoadCursorFromFileA" and if this doesn't go indirectly through CreateFile or MapViewOfFile it's not redirected. And looks like the cursors are only initialized on Dark Omen startup, so changing the mod would not change them back. Actually I like that they aren't redirected because this is imo a user decision which kind of cursors they want. Title: Re: Mod Selector Post by: olly on June 01, 2017, 06:01:04 PM Thanks for investigating and no I don't get any .CUR or .ANI appearing just the .bmp files in Trace.txt and sounds like its not worth pursuing if only loaded on startup, and as Evgen reminded me that it used to cause lag for a few players, when I recently dug the coloured cursors mod out the archives for DOR project. I'm tempted to include them in the Mod Pack as an optional extra but I fear someone may inadvertently end up turning on coloured cursors from the Main Options which will crash the game etc.
:) Title: Re: Mod Selector Post by: Malus on June 08, 2019, 10:26:42 AM I kindly request the following features for WHMTG scripting
A) Increase var_xx up to 32 (or more) It's currently maxed at 24 total, var_00 to var_23. Very easy to run out of vars in more advanced mods. B) CaseSwitch for var_xx I only tested var values up to 32 but this already leaves so many possible values that the simple var check Code: ReadVariable var_00 C) Add/Sub value to/from var_xx There is currently only SetVariable var_xx Y. This means that to add a value, like 22+1, currently all possible values need to be checked first, to then set the var one greater/smaller. D) Unit deploy limit PC default is 10, ps1 uses 8. Would be nice to have this flexible for certain battles. I know its possible to do this with CTL script but it would be much better used here for easy modding. E) Remove x-gold with check for 0/overflow Current max gold is 2^16-1, to subtract gold we have to add 2^16-1-"value to subtract". There is no check for 0/overflow. Would also be nice so that if gold is added over the cap it's to be "ignored", or lots of gold is lost. F) Modify some basic unit stats Would be nice if we could change current/max number, alive/dead, armour, stats M,WS,etc For example SOTHR has a mission where units with armour below 3 get +1 armour G) Add exp to unit I feel bad for asking so much :P Title: Re: Mod Selector Post by: olly on June 08, 2019, 10:55:56 PM Would be great but not sure if it's all possible but will investigate.
:) Title: Re: Mod Selector Post by: Ghabry on June 28, 2019, 10:08:01 AM It's summer so I'm highly unmotivated but I like the ideas.
I kindly request the following features for WHMTG scripting Right, new features for WHMTG scripting are also possible. A) Increase var_xx up to 32 (or more) It's currently maxed at 24 total, var_00 to var_23. Very easy to run out of vars in more advanced mods. If you just use them for flags (0 or 1): You can store 32 flags in one variable (think binary, 1, 2, 4, 8, etc.) but there are no good function to handle bitflags. Well extending them is possible, just have to relocate where it is stored in memory like I did to fix the multiplayer map list. B) CaseSwitch for var_xx I only tested var values up to 32 but this already leaves so many possible values that the simple var check Code: ReadVariable var_00 This is complecated because this is a new code-flow feature in the WHMTG interpreter. Wasn't <= and >= also supported as operators? C) Add/Sub value to/from var_xx There is currently only SetVariable var_xx Y. This means that to add a value, like 22+1, currently all possible values need to be checked first, to then set the var one greater/smaller. That sounds easy D) Unit deploy limit PC default is 10, ps1 uses 8. Would be nice to have this flexible for certain battles. I know its possible to do this with CTL script but it would be much better used here for easy modding. The problem is that this will be incompatible with the current code because currently I reset the deployment limit when the battle begins loading. Maybe I can move it to the battle end handler, then this problem is solved. What I could also propose is a "Read WHMTG Variable" function which reads a WHMTG variable into a CTL global variable and then using this to set the deployment limit. E) Remove x-gold with check for 0/overflow Current max gold is 2^16-1, to subtract gold we have to add 2^16-1-"value to subtract". There is no check for 0/overflow. Would also be nice so that if gold is added over the cap it's to be "ignored", or lots of gold is lost. Sounds good F) Modify some basic unit stats Would be nice if we could change current/max number, alive/dead, armour, stats M,WS,etc For example SOTHR has a mission where units with armour below 3 get +1 armour That's also a WHMTG feature I guess? Otherwise this would be chaos when possible in live battle :D G) Add exp to unit Well basicly the same as the feature before. Title: Re: Mod Selector Post by: Malus on June 29, 2019, 02:05:33 PM There is no hurry, enjoy the summer :)
Was mere ideas/problems is struggled with in the Enhanced Edition mod. It's all WHMTG script related which is already awesome but could really use more functions. Its kinda feature incomplete atm. Especially if we ever want to have SOTHR ported to Dark Omen. The campaign there can go so many different ways. Checking a variable for all possible values can easy bloat the WHMTG file. Like i do atm to check time passed before most missions to process different events and dialogues. File size is quite close to the size cap which is 3 times the original size i believe. Operators "=<" and "=>" are not supported i think. At least i never saw those used in the original which rarely uses logic and variables. Quote What I could also propose is a "Read WHMTG Variable" function which reads a WHMTG variable into a CTL global variable and then using this to set the deployment limit. Sure, whatever works best/easy to implement. I tried to make the feature requests close to existing functions which could use some extensions like. "GetUnitStatus unitID" function checks if unit is alive/dead (offset 0 size 2 in regiment data block). Maybe this could be used to make a "SetUnitByte unitID value" function to set specific bytes. Like leader attributes @offset 127 size 9. from Wiki: http://wiki.dark-omen.org/do/ARM (http://wiki.dark-omen.org/do/ARM) Also one other feature came into my mind: H) "multiple choice" in dialogues There is currently only a binary choice "yes"/"no" with var_23 set 0 or 1. "PlaySFX "Choice one" "Choice two" 29 1 "H_KZ001" 0" Which can be used to build a binary tree but it gets confusing very fast and looks cheap. SOTHR got i think up to 5 mission choices. Thanks for reading ;) Title: Re: Mod Selector Post by: Ghabry on January 02, 2020, 04:12:47 PM I have no idea why there is a patched EngRel.exe distributed instead of just adding the dgvoodoo code patches to the DLL.... o.O
The new version of the DLL applies now the patches. Happy new year. Needs hardware cursor (not crashing anymore, wow) enabled to fix flickering cursor issues when resolution is forced. Title: Re: Mod Selector Post by: olly on January 02, 2020, 04:34:32 PM Great will test it tonight, many thanks.
**works perfectly and will add into the latest mod pack and create a new Help fix guide and video. [attachment=1] :) |