Page 1 of 1

MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 07:28
by Agetian
For those of you who were/are fans of Microprose's Magic: The Gathering game (the single player quest mode of which was commonly referred to as "Shandalar"), here's a utility that allows you to convert Shandalar sounds from your existing installation of the game for use in Forge.

Instructions:

IMPORTANT: This utility requires Java Runtime Environment 7 (JRE 7) in order to operate. If you're getting launch errors while starting this program, it's because your JRE version is older than 7.

1. You must have Microprose's Magic the Gathering (Shandalar) installed on your PC. This utility is tested only on the version with both expansion packs installed (Spells of the Ancients and Duels of the Planeswalkers).
2. You must have Forge installed on your PC.
3. Launch the ShandalarConv.jar file from the archive (e.g. from your operating system interface or via the console command: java -jar ShandalarConv.jar).
4. In the program GUI, choose the paths to the root folders of both Shandalar and Forge.
5. Click "Convert" and confirm (WARNING: this operation overwrites your current sound set, you may want to make a backup!)
6. In Forge, go to the game options and make sure you enable sounds (the "Enable Sounds" checkbox should be on).
7. Play the game and enjoy Shandalar sounds in your Forge installation!

The Java source code for this utility is included in the archive.
Your feedback is welcome.

- Agetian

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 14:26
by goonjamin
Tried loading this up on my windows 7 machine by double clicking it and got the attached error? Am I doing something wrong?

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 14:34
by Agetian
Hmm this is strange... I tried it on two different PCs and it worked fine every time, though neither of my computers has Windows 7 on them. Anyhow, please take a look at this post on StackOverflow, it seems to be related to your issue (actually, it's the same issue as you're describing) and the first solution described for it helped the original poster there:

http://stackoverflow.com/questions/5428 ... g-jar-file

I hope this helps.

P.S. Also, if all else fails, try running the application from the command line with the command:
java -jar ShandalarConv.jar
and see if it makes the difference. If it runs from the command line but doesn't run when you double-click it, then it must be some file association issue, similar to the one described in that post I linked above.

- Agetian

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 14:45
by goonjamin
running from the command line I get the following.

Code: Select all
C:\Users\Mike\Downloads\ShandalarConv_v10>java -jar ShandalarConv.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: shandalarconv
/ConvWnd : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: shandalarconv.ConvWnd. Program will exit.
Also I checked the file association and it looks normal and forge and other java apps have no issues on my system?

Code: Select all
C:\Users\Mike\Downloads\ShandalarConv_v10>ftype | find "jarfile"
jarfile="C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %*
What version of Java are you running? I am running version 6 update 35.

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 15:01
by Agetian
I'm on version 7 update 9, maybe that's the issue. Let me recompile targeting JRE 1.6, I'll upload a new version in a few minutes.

- Agetian

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 15:10
by Agetian
Ok, I uploaded the version that is functionally the same as the original one, but targets JRE 6. Hope it works now! :)

- Agetian

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 16:52
by goonjamin
Hi,

This version now loads fine but when I click the button to select the root directory I get the following error and nothing shows up in the path box?

Code: Select all
C:\Users\Mike\Downloads\ShandalarConv_v10_JRE6>java -jar ShandalarConv.jar
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: java/nio/
file/Paths
        at shandalarconv.ConvWnd$2.actionPerformed(ConvWnd.java:81)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$400(Unknown Source)
        at java.awt.EventQueue$2.run(Unknown Source)
        at java.awt.EventQueue$2.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.nio.file.Paths
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 37 more

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 17:18
by Agetian
Yes, well - unfortunately, that's because the program utilizes Java 7-specific classes in its operation (in particular, some NIO methods for obtaining file paths, copying files etc.) that are not part of Java 6. I'm afraid I can't really do anything with that, at least not at the moment, you'd have to upgrade to JRE 7 to make it work... I'll see if I can rework the program to avoid JRE 7-specific functionality, but it might take quite a while.

- Agetian

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 17:54
by friarsol
Agetian wrote:I'm afraid I can't really do anything with that, at least not at the moment, you'd have to upgrade to JRE 7 to make it work...
We probably shouldn't be recommending that, considering Java 7 has a flaky history with Forge.

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 18 Nov 2012, 18:03
by Agetian
Hmm, interesting... I recall I had some problems with that a very long time ago (like, about a year ago or so, I think), but since then I've upgraded to 7 (several months ago) and I didn't have an issue playing the game with JRE 7 as my primary Java runtime yet since then. Is it really still the case that there might be some issues with Forge and Java 7 not playing very well together?

P.S. I'll see if I can make the converter JRE 6-compatible a bit later, but the idea of reworking the convenient NIO classes into old-fashioned byte-by-byte stream copy operations, as well as forgetting about the Paths class and using manual construction of path strings sounds a bit tedious, so it might take me a bit to get to it... :\

- Agetian

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 20 Nov 2012, 05:20
by Xitax
Hey, this is cool and all, but I just don't get it. You can download the Shandalar installer right here, so why not just post the converted sound files?

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 20 Nov 2012, 09:05
by moomarc
Xitax wrote:Hey, this is cool and all, but I just don't get it. You can download the Shandalar installer right here, so why not just post the converted sound files?
Because we don't necessarily condone using that installer. Mostly we want to do as much as possible to placate the sleeping giant.

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 20 Nov 2012, 10:07
by saturnine
moomarc wrote:
Xitax wrote:Hey, this is cool and all, but I just don't get it. You can download the Shandalar installer right here, so why not just post the converted sound files?
Because we don't necessarily condone using that installer. Mostly we want to do as much as possible to placate the sleeping giant.
Host them off-site and link to them? AFAIK just linking would be fine ;)

Re: MTG Shandalar Sound Converter for Forge

PostPosted: 24 Nov 2012, 15:24
by Agetian
UPDATE: Updated the Shandalar Converter to v1.1, added support for the Blocker Assigned and Token Created sounds.

- Agetian