 |
 |
 |
 |
| Gamers' Lounge Talk about gaming on Fedora and linux. |

7th August 2005, 01:41 AM
|
|
Registered User
|
|
Join Date: Jun 2005
Posts: 15

|
|
|
Playing Warcraft II for DOS on Fedora
Got an old CD for Warcraft II:Tide of Darkness? Want to play it on Linux?
In this document, I'm going to refer to the original Warcraft II:Tides of Darkness as WC2:ToD and the expansion pack Warcraft II:Beyond the Dark Portal as WC2:BtDP. These are the MS-DOS versions. If you have the newer, windows-based Battlenet version it wont work.
We're going to use two software packages today; Stratagus and Wargus . These have to be two of the most painfully undocumented packages I've ever tried to work with. Hence, my attempt here to at least save you some time and effort. Stratagus is a tile-based, real-time strategy engine. Wargus is a utility to extract game data from the DOS version of Warcraft 2. Either the WC2:ToD or WC2:BtDP will work. I have both so I did some testing. Apparenly, Blizzard included all the game data for WC2:ToD on WC2:BtDP (I assume so you don't need to swap discs to play either), therefore if you extract from WC2:BtDP you can play both campaign sets.
You should be aware that we're only using the graphics, maps, and sounds from the CD. The authors of Stratagus and Wargus had to re-write the game logic and AI from scatch. It's an imitation, not a port, of Warcraft II; but a convincing one.
The Software:
Go to http://stratagus.sourceforge.net and download stratagus-2.1-linux.tar.gz.
Go to http://wargus.sourceforge.net and download wargus-2.1-linux.tar.gz.
Installation:
Extract them someplace. Since I don't share my PC with other accounts, I just tend to stick games in a ~/apps/games directory.
$ cd apps/games/
$ tar xvzf stratagus-2.1-linux.tar.gz
$ tar xvzf wargus-2.1-linux.tar.gz
$ cd wargus-2.1
At this point, stick in your old warcraft CD. My Fedora 4 mounts CD's at /media/recorder. Extract the game data with:
$ ./build.sh -p /media/cdrecorder/ -o ../stratagus-040702/data
There's a "-v" option to extract the videos also, but Stratagus does not seem to support them. You may get some warnings about not finding a couple files if you're using WC2:ToD. Don't sweat them. We're done with Wargus at this point. It extracted the game data and bundled it with custom game logic (written in Lua) into a data directory for Stratagus. So let's play:
$ cd ../stratatagus-040702
$ ./stratagus
Music:
We can rip the original music tracks into OGG Vorbis files and tell Stratagus to play them. I used Sound Juicer which comes with Fedora 4. Here's the tracks on the WC2:ToD CD and the filenames you could rip them to:
1 game data (don't rip this)
2 Human_Battle_1.ogg
3 Human_Battle_2.ogg
4 Human_Battle_3.ogg
5 Human_Battle_4.ogg
6 Human_Battle_5.ogg
7 Human_Briefing.ogg
8 Human_Victory.ogg
9 Human_Defeat.ogg
10 Orc_Battle_1.ogg
11 Orc_Battle_2.ogg
12 Orc_Battle_3.ogg
13 Orc_Battle_4.ogg
14 Orc_Battle_5.ogg
15 Orc_Briefing.ogg
16 Orc_Victory.ogg
17 Orc_Defeat.ogg
Place your OGG Vorbis sound files in data/music.
Next, edit data/scripts/sounds.lua and change this section like so (observe we're changing the cd-mode to "defined"):
------------------------------------------------------------------------------
-- (set-cd-mode!) set how your CD is played.
-- all plays all tracks
-- random plays random tracks
-- defined play according to playlist below
-- off turns cd player off
--SetCdMode("all")
--SetCdMode("random")
SetCdMode("defined")
--SetCdMode("off")
------------------------------------------------------------------------------
Then change the section below it to read:
------------------------------------------------------------------------------
-- (define-play-sections) set the playlist for different
-- sections of the game
--
DefinePlaySections("type", "main-menu", "no-cd", {"order", "all", "files", {"music/Human_Briefing.ogg"}})
DefinePlaySections("race", "human", "type", "game","no-cd", {"order", "all", "files", {"music/Human_Battle_1.ogg"}})
DefinePlaySections("race", "human", "type", "briefing","no-cd", {"order", "all", "files", {"music/Human_Briefing.ogg"}})
DefinePlaySections("race", "human", "type", "stats-victory","no-cd", {"order", "all", "files", {"music/Human_Victory.ogg"}})
DefinePlaySections("race", "human", "type", "stats-defeat","no-cd", {"order", "all", "files", {"music/Human_Defeat.ogg"}})
DefinePlaySections("race", "orc", "type", "game","no-cd", {"order", "all", "files", {"music/Orc_Battle_1.ogg"}})
DefinePlaySections("race", "orc", "type", "briefing","no-cd", {"order", "all", "files", {"music/Orc_Briefing.ogg"}})
DefinePlaySections("race", "orc", "type", "stats-victory","no-cd", {"order", "all", "files", {"music/Orc_Victory.ogg"}})
DefinePlaySections("race", "orc", "type", "stats-defeat","no-cd", {"order", "all", "files", {"music/Orc_Defeat.ogg"}})
------------------------------------------------------------------------------
I tried to set up a rotation of music files for human and orc "game", but Stratagus would crash if I did. So you may want to listen to [Human|Orc]_Battle_[1-5].ogg and pick your favorite.
Lastly, if you decide to compile Statagus from source and are missing any of the required libs, you can install them with:
$ su
# yum install SDL
# yum install libpng
# yum install zlib
# yum install libogg
# yum install libvorbis
# yum install libmad
# yum install bzip2-libs
# yum install lua
# yum install mikmod-devel
# yum install flac-devel
|

23rd January 2008, 01:50 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
doesn't work on F8 :-)
|

23rd January 2008, 01:55 AM
|
 |
Administrator (yeah, back again)
|
|
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 67
Posts: 21,221

|
|
|
(moved to Gamers Lounge...although looks like it's not working...)
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651
Don't use any of my solutions on working computers or near small children.
|

23rd January 2008, 02:13 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929

|
|
Quote:
|
Originally Posted by bob
(moved to Gamers Lounge...although looks like it's not working...)
|
Guess better late than never, op is almost 3 years old  (Wasn't FC3 and 4 in 2005?)
|

23rd January 2008, 02:23 AM
|
 |
Administrator (yeah, back again)
|
|
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 67
Posts: 21,221

|
|
|
Yeah, but we didn't have a Gamers Lounge in those days. We move 'em as we find 'em.
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651
Don't use any of my solutions on working computers or near small children.
|

23rd January 2008, 02:23 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
lol yeah but google isn't being much help at the moment
|

23rd January 2008, 02:27 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929

|
|
Quote:
|
Originally Posted by blittle
lol yeah but google isn't being much help at the moment
|
`yum install stratagus` (didn't check repo - could be in Livna). Wargus you have to sort out yourself, it's not in repos and I have no interest to find out what it is.
|

23rd January 2008, 02:34 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
installed those, wine and dosbox, none of them will launch.
|

23rd January 2008, 02:42 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929

|
|
Quote:
|
Originally Posted by blittle
installed those, wine and dosbox, none of them will launch.
|
Ah, checked the SF site. Stratagus is actually a game engine (not a game) so no wonder you can't "launch" it.
If you read the op, you need to have original game CD to be able to install and run Wargus. Also it says so on the site:
Quote:
|
You should be aware that we're only using the graphics, maps, and sounds from the CD.
|
Quote:
|
Wargus uses the data from the warcraft CD's (DOS CD's only) and has similar gameplay.
|
|

23rd January 2008, 02:44 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
I do have the original CDs.
build.sh fails with this:
bash: ./build.sh: /bin/sh^M: bad interpreter: No such file or directory
after issuing this command: ./build.sh -p /media/WAR1/
|

23rd January 2008, 02:52 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929

|
|
Quote:
|
Originally Posted by blittle
/bin/sh^M:
|
The files are in DOS format (with Windows line endings), run dos2unix on that build.sh and you'll be able to run it (you may need to run all of them files through dos2unix - keep eye on errors for that)
|

23rd January 2008, 02:54 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
forgive my ignorance, but what exactly are you saying to do?
copy these files to the hard drive and run some kind of conversion app on them? (dos2unix)
then try and reinstall?
|

23rd January 2008, 02:56 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
oh good tip :-)
now I'm getting
[root@id10t wargus-2.2.4]# ./build.sh -p /media/WAR1/
./build.sh: line 99: ./wartool: No such file or directory
|

23rd January 2008, 02:58 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,929

|
|
Quote:
|
Originally Posted by blittle
oh good tip :-)
|
Good :0
Quote:
|
Originally Posted by blittle
now I'm getting
[root@id10t wargus-2.2.4]# ./build.sh -p /media/WAR1/
./build.sh: line 99: ./wartool: No such file or directory
|
Sorry, that's where my help stops - not interested about the game in question.
What the error message is saying is that there is no such directory in where you extracted the files. Maybe those are stuff you need from the CD?
|

23rd January 2008, 03:17 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 397

|
|
|
well crap...
I actually didn't extract anything and the only war tool file I can find is in the stratagus and wargus directories.
I guess this just isn't maintained anymore which really sucks.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 11:43 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|