It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
As this made me wonder for a minute or two and is a little bit inconvenient, I will mark it as a problem :-) .
The solution is easy. I've just edited dosbox_swarrior_single.conf file and added a line that copy the SW.CFG file from the main directory to ../dragon/ dir where the add-on is started.Here's the excerpt of the :dragon subroutine:

:tdragon
cls
@echo off
cd .\dragon
#tdragon.exe
#sync shadow warrior configuration
@copy ..\SW.CFG
cls
sw.exe
cls
exit


Fortunately the DOSBOX always makes a force copy :-)
No posts in this topic were marked as the solution yet. If you can help, add your reply
avatar
npocmaka: snip
Thanks for this :)
avatar
npocmaka: As this made me wonder for a minute or two and is a little bit inconvenient, I will mark it as a problem :-) .
The solution is easy. I've just edited dosbox_swarrior_single.conf file and added a line that copy the SW.CFG file from the main directory to ../dragon/ dir where the add-on is started.Here's the excerpt of the :dragon subroutine:

:tdragon
cls
@echo off
cd .\dragon
#tdragon.exe
#sync shadow warrior configuration
@copy ..\SW.CFG
cls
sw.exe
cls
exit


Fortunately the DOSBOX always makes a force copy :-)
There is no fix for this.

The method you provided doesnt even work. It does copy the .conf I guess but that dont mean that version or it at all is used.

Cause your game will still launch with the music off.

So there technically is no fix to make it stay on after each session.
The music turning off has nothing to do whatsoever with this. The music always turns itself off when starting Twin Dragon, with or without this, and god knows why.
avatar
SFJake: The music turning off has nothing to do whatsoever with this. The music always turns itself off when starting Twin Dragon, with or without this, and god knows why.
Yep.I've made the .CFG file read only with turned on music to prevent any changes by the game , but Twin Dragon starts without a music.Even the other launcher (TDRAGON.EXE)
does not help. Ancient Chinese Mystery .
avatar
npocmaka: As this made me wonder for a minute or two and is a little bit inconvenient, I will mark it as a problem :-) .
The solution is easy. I've just edited dosbox_swarrior_single.conf file and added a line that copy the SW.CFG file from the main directory to ../dragon/ dir where the add-on is started.
Personally I think that GOG had a reason for using a separate config file for Twin Dragon while Shadow Warrior and Wanton Destruction share one. Are you sure there's not some option exclusive to Twin Dragon which will be missing from the config file if you just use the SW.CFG?
Yes there's a reason - wnaton destruction has some assets (levels , monsters etc - try to chose original Shadow Warrior levels from and the monsters will be different) with same names as original game- so it should be started in different folder to avoid the mess.
But there are no additional options in config file or something like this (even more - the music properties are not taken into account) .As the initial values are the same in both config files you can check the content with any DIFF tool.
avatar
npocmaka: Yes there's a reason - wnaton destruction has some assets (levels , monsters etc - try to chose original Shadow Warrior levels from and the monsters will be different) with same names as original game- so it should be started in different folder to avoid the mess.
Uhm... but Wanton Destruction is the expansion that DOES share one folder, setup program and configuration file with the main game, which is kinda weird since AFAIK it is indeed the addon which does replace some of the original game's assets while Twin Dragon doesn't do it.

Btw, something very weird I just noticed when comparing the contents of the two game folders: running the main game or Wanton Destruction does somehow modify the SW.EXE (the date when it was modified is changed each time you run it, not the size, however). Nothing like this happens to any EXE file when running Twin Dragon, though. I don't know any other game where running it does changes to the main executable. What's up with that?

I'm wondering whether it is somehow tied to the startup limit of the shareware version (which IIRC could only be run 30 times). A wild guess would be that the routine which tracked how many times the shareware version was run and kept it from running at some point did so by modifying the SW.EXE and that this stuff is still present in the full version but doesn't serve any purpose anymore.
avatar
F4LL0UT: Uhm... but Wanton Destruction is the expansion that DOES share one folder, setup program and configuration file with the main game, which is kinda weird since AFAIK it is indeed the addon which does replace some of the original game's assets while Twin Dragon doesn't do it.

Btw, something very weird I just noticed when comparing the contents of the two game folders: running the main game or Wanton Destruction does somehow modify the SW.EXE (the date when it was modified is changed each time you run it, not the size, however). Nothing like this happens to any EXE file when running Twin Dragon, though. I don't know any other game where running it does changes to the main executable. What's up with that?

I'm wondering whether it is somehow tied to the startup limit of the shareware version (which IIRC could only be run 30 times). A wild guess would be that the routine which tracked how many times the shareware version was run and kept it from running at some point did so by modifying the SW.EXE and that this stuff is still present in the full version but doesn't serve any purpose anymore.
Aaahhmm.. Yes my mistake.
Both wanton desturction andoriginal game renew the SW.EXE here are dos box script excerpts:

:wanton
cls
@echo off
@COPY wanton.dat sw.exe
cls
sw.exe
cls
exit

and

:swarrior
cls
@echo off
@COPY sw.dat sw.exe
cls
sw.exe
cls
exit

May be the separated maps are the reason for the second folder .Or the second twin dragon launcher that's is not used by GOG at the moment (..\Shadow Warrior Complete\dragon\TDRAGON.EXE) . I should test this to see what will happen if I mix both folders :-)
Post edited January 11, 2013 by npocmaka
avatar
npocmaka: Aaahhmm.. Yes my mistake.
Both wanton desturction andoriginal game renew the SW.EXE here are dos box script excerpts:
Indeed, I had already taken a quick look at the file earlier but hadn't given any thought to it. I feel stupid now. I was wondering how it's possible that sw.exe is modified upon running it (which would be technically impossible). I should have known that the modification is done by DosBox before the executable is run. :P

A few things make more sense now but one thing still doesn't. The reason why the GOG team chose to always replace sw.exe is clear - Wanton Destruction uses all of the original game's files except the executable. So instead of giving it a subfolder which includes unnecessary copies of all the original files they just replace the executable to preserve space. However, the whole procedure would only make sense if it was important for Wanton Destruction's executable to be named "sw.exe" to run properly - but of course it's not. So I just eliminated the whole procedure from my configuration files, renamed Wanton's executable to "wd.exe" and changed the configs to run that one whenever I choose to play Wanton Destruction. Works like a charm. I have no idea why GOG included such an unnecessary procedure if simply renaming the executable does the trick (and is much cleaner).

Btw, I just discovered why Twin Dragon needs its separate folder. Have you tried putting the *.map files into the main game folder? Just move $WHIRL.MAP there and both Shadow Warrior and Wanton Destruction will load this level instead of their own ones (for the funniest effect run Wanton Destruction - you will play the first level of Twin Dragon with music and the enemy sprites from Wanton Destruction ^^). Anyway, I am VERY confused now. Obviously all the executables are programmed to scan the game folder for *.map files during startup. I thought that maybe the *.map files can include some instruction that tells the game to use them in the single player campaign but here it comes: renaming the map files keeps them from being used in the campaign. This means that something is telling any of the executables to specifically use the Twin Dragon maps if they are present and I have no idea what, it may even be hardcoded into the game. It blows my mind, especially in case of the original game since Twin Dragon is newer than that one.

Also I think I just solved the big mystery concerning the music in Twin Dragon. Obviously it's hardcoded into Twin Dragon's exe to turn off the music upon running it. I think I know why. Note that the official description of Twin Dragon states that it has a new soundtrack with music by a fella named Simon Castles. Twin Dragon was released to the public only as a download in 1998 though, obviously without the soundtrack (for the same reasons why Shadow Warrior's shareware edition didn't include it - only 3D Realms went through the hassle of adding alternative MIDI music for that one). My theory is this: upon learning that Twin Dragon would only be released as a downloadable freebie the developers did some changes to the game that correspond with that kind of release - this included the choice to force the music off on startup since the soundtrack wouldn't be included anyway.

There, ancient Chinese secret solved. Perhaps.
avatar
F4LL0UT:
Nice analysis . I've changed the launcher from Twin Dragon with this one from the original game.The game started with music , but in the new game menu start point is not "Twin Dragon" but the name of the first map.

Gog chose copying instead of renaming because of robustness - if dosbox or the game crash the launchers will stay with their new names.This way they have consistent files for each run

Your post gave me an idea - I've changed a little bit the dosbox_swarrior_single.conf file and I've added a new subroutine that will launch "Wanton Dragon" - the twin dragon campaign with wanton destruction monsters.I'm copying wanton.dat (the launcher as wl.exe) ,wanton.exe and WT.GRP needed by wanton destruction and run wanton launcher . Unfortunately in the menu name of the campaign is not changed , nut anyway - you can play twin dragon with wanton destruction monsters without affect other campaigns :-)

@ECHO 
@ECHO ----------------------------
@ECHO Shadow Warrior Complete Pack
@ECHO ----------------------------
@ECHO on
@ECHO off
@ECHO 1) Shadow Warrior
@ECHO 2) Twin Dragon
@ECHO 3) Wanton Destruction
@ECHO 4) Wanton Dragon
@ECHO on
@ECHO off
@ECHO ----------------------------
@ECHO 5) exit program
@ECHO ----------------------------
@ECHO 
@ECHO on
@ECHO off
@choice /c12345 /s Which game do you want to run? [1-5]: /n
if errorlevel 5 goto exit
if errorlevel 4 goto wdragon
if errorlevel 3 goto wanton
if errorlevel 2 goto tdragon
if errorlevel 1 goto swarrior

:swarrior
cls
@echo off
@COPY sw.dat sw.exe
cls
sw.exe
cls
exit

:tdragon
cls
@echo off
cd .\dragon
#tdragon.exe
#sync shadow warrior configuration
@copy ..\SW.CFG
cls
sw.exe
cls
exit

:wdragon
cls
@echo off
cd .\dragon
#tdragon.exe
#sync shadow warrior configuration
@copy ..\SW.CFG
#start with wanton dragon exec
#dos box does not provide a native way to check existence of the files
@COPY ..\wanton.dat WL.exe
@COPY ..\wanton.exe wanton.exe
@COPY ..\WT.GRP WT.GRP
cls
WL.exe
cls
exit

:wanton
cls
@echo off
@COPY wanton.dat sw.exe
cls
sw.exe
cls
exit

:exit
exit
Post edited March 22, 2013 by npocmaka
avatar
npocmaka: Gog chose copying instead of renaming because of robustness - if dosbox or the game crash the launchers will stay with their new names.This way they have consistent files for each run
Don't know what you mean and also don't see how this is beneficial. The game crashing is basically the same as exiting it manually. Unless DosBox crashes completely it will even perform all operations it is supposed to do after the game ends but since there aren't any except killing itself there's no harm in that.

And maybe I didn't make myself clear, I did not make DosBox rename the files or anything on startup. I completely eliminated the necessity for DosBox to modify any files, I just renamed the files manually once and made DosBox simply run sw.exe if I choose Shadow Warrior from the menu and run wd.exe when choosing Wanton Destruction. To my understanding this is the safest and cleanest way to do it since the last startup doesn't determine what files are located in the folder. You're always free to run either the main game or Wanton without the need to ever modify any files again (which is as good as it gets).

With GOG's solution there's another flaw: if you run the setup program shared by both Shadow Warrior and Wanton Destruction choosing to directly launch the game from the setup program will launch either the main game or Wanton depending on which one you played last. Now that's inconsistent and especially confusing for any user who does not know the routines performed by DosBox when trying to play Shadow Warrior. And since the setup program will always say "launch Shadow Warrior" that's the one that should always be launched.

avatar
npocmaka: Your post gave me an idea - I've changed a little bit the dosbox_swarrior_single.conf file and I've added a new subroutine that will launch "Wanton Dragon" - the twin dragon campaign with wanton destruction monsters.I'm copying wanton.dat (the launcher as wl.exe) ,wanton.exe and WT.GRP needed by wanton destruction and run wanton launcher.
Lol, now that's an odd thing to do. ^^ Also you said it in the comment located in the code: you will always unnecessarily overwrite the WT.GRP on every launch which is not a clean solution. You could make it a little more sensible though by deleting the file after the game ends. This way you preserve space on the disk drive whenever the file isn't necessary and copying the file whenever you run "WDRAGON" is justified (the only exception being when DosBox is closed directly instead of exiting the game or the if DosBox fully crashes).

Btw, I just came up with another solution that eliminates the necessity for two separate setup programs. I made this alteration to the file named "dosbox_swarrior_settings.conf":

[autoexec]
# Lines in this section will be run at startup.
@echo off
cls
mount C ..
c:
imgmount d ".\GAME.DAT" -t iso
cls
setup.exe
cd .\dragon
@copy ..\SW.CFG
exit

This way just running the setup and saving the changes will instantly generate the same cfg file for all three games. There is one catch though which makes your solution more secure: with my solution if the user chooses to run Shadow Warrior directly from the setup program and he closes DosBox instead of exiting the game through the internal option Twin Dragon's cfg file will remain unchanged. The best thing to do would be using both your solution and mine. This way just running the setup program and leaving it will instantly modify Twin Dragon's cfg file and your routine will make sure that Twin Dragon will use the latest cfg file even if the user chose to run Shadow Warrior and aborted DosBox or DosBox crashed.

Doing GOG's work is fun. :D
The only way how things could get any better would be by writing a setup program of our own the way source ports do it. Only with the benefit of playing an unaltered DOS version through DosBox. ^^
Post edited January 12, 2013 by F4LL0UT
Thank you NPCOMAKA. This worked great for me.