Difference between revisions of "Modification"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
* See also: [[Debugging]] | * See also: [[Debugging]] | ||
− | =Getting Started with Eclipse= | + | ==Getting Started with Eclipse== |
# Get [http://www.eclipse.org/downloads/ Eclipse] (for Java Developers is enough), run eclipse.exe . | # Get [http://www.eclipse.org/downloads/ Eclipse] (for Java Developers is enough), run eclipse.exe . | ||
# If it complains about missing JDK, install JDK from [http://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle Java website]. | # If it complains about missing JDK, install JDK from [http://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle Java website]. | ||
Line 26: | Line 26: | ||
# Connect with [http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html a Telnet client] or special MUD client. | # Connect with [http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html a Telnet client] or special MUD client. | ||
# To stop the MUD, connect with a Telnet or MUD client, log in and enter the Archon command „shutdown“, then confirm. | # To stop the MUD, connect with a Telnet or MUD client, log in and enter the Archon command „shutdown“, then confirm. | ||
+ | |||
+ | ==Adding new MSP Sound files== | ||
+ | MSP tags look something like !!SOUND(filename.wav U=http://myhost.com/sounds). | ||
+ | When the client sees this, it FIRST checks to see if it has filename.wav locally cached. If it finds it, it plays it. If it does not find it, it downloads it from the URL, and then plays it. | ||
+ | |||
+ | So, what happens if you create some new wav file, and save it as the same "filename.wav" name on the server? | ||
+ | The server may not know that you changed it, and may keep dishing out the OLD filename.wav content. | ||
+ | Even if the server knows the file changed, the CLIENT will not, so it will just keep using the OLD filename.wav. | ||
+ | The answer therefore, is to not replace existing .wav files. Make new ones, with new names. |
Latest revision as of 15:16, 14 December 2023
CoffeeMUD |
---|
Administrator Builder Player |
=CoffeeMUD Administrator Information= |
---|
Installation Help Development Modification Feature Requests Mud Grinder ini Security CMARE Share Wiki |
Modifications
- Matthew's Starting Development Tips
- See also: Debugging
Getting Started with Eclipse
- Get Eclipse (for Java Developers is enough), run eclipse.exe .
- If it complains about missing JDK, install JDK from Oracle Java website.
- Install a Subversion provider using About – Eclipse Marketplace; I can recommend Subclipse.
- Import the CM source from Subversion repository by selecting File – Import.
- Select Subversion source and „Checkout project from SVN“.
- Enter the URL of the repository; this is currently svn:coffeemud.net/public/CoffeeMud and if asked what to import, click on the root, top-most entry in the Select Folder step.
- Select import using New Project Wizard, not the Import Existing Project option (otherwise it will not recognize it as a Java project because there are no Eclipse project files in SVN, which is fine though).
- Click finish.
- Select regular Java project (but not the with Ant build file option, because we do not have this file on our disk yet).
- Enter Project name, use default jre. Import is Project layout: „Use project folder as root for sources and class files“ or CoffeeMud will not find many of its files like database, classes to load, .ini file, web files, etc.
- Click finish. Some warning can pop up, but since our project directory is empty and there is no .project file in SVN, we can ignore this with „OK“. All files should now be imported.
- Right-click the CoffeeMud project (the most top-level item in the project file tree) and select Properties and in the new window, Build Path and Libraries.
- Add the libraries in the „lib“ path (javascript library and compression library; two jar files). Then Eclipse should rebuild the workspace and all errors called „cannot resolve type“ should disappear.
- The problems / errors, which remain are all in fakedb. Select all the red ones, right-click and select „quick fix“ and in the new window, select „add unimplemented methods“ (because some JDBC database interface requires these), then click on Finish.
- Now all errors should be gone and „only“ warnings be left.
- Now click the down arrow on the green „play“ button in the toolbar, select run configurations. Select „Java application“, then search for the main class as starting point. The correct one is the MUD class in the „application“ folder / package. Under „Arguments“ enter (with quotes): „NameOfYourMud“.
- If this parameter is not given, then the MUD will fail to start with a NullPointerException, even though the name of the MUD is already defined in the coffeemud.ini file (or should be, is it?) (TODO fix – both mud name would be better defined in ini file not cmd parameter ... and fix the error handling code, which fails to work properly, in case cmd parameter is not given).
- Now we can first try to start the MUD by clicking on the green „play“ button.
- Connect with a Telnet client or special MUD client.
- To stop the MUD, connect with a Telnet or MUD client, log in and enter the Archon command „shutdown“, then confirm.
Adding new MSP Sound files
MSP tags look something like !!SOUND(filename.wav U=http://myhost.com/sounds). When the client sees this, it FIRST checks to see if it has filename.wav locally cached. If it finds it, it plays it. If it does not find it, it downloads it from the URL, and then plays it.
So, what happens if you create some new wav file, and save it as the same "filename.wav" name on the server? The server may not know that you changed it, and may keep dishing out the OLD filename.wav content. Even if the server knows the file changed, the CLIENT will not, so it will just keep using the OLD filename.wav. The answer therefore, is to not replace existing .wav files. Make new ones, with new names.