Modification

From CoffeeMud Wiki
Jump to navigation Jump to search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Administrator Information=
Installation     Help     Development    Modification     Feature Requests     Mud Grinder     ini     Security     CMARE Share     Wiki

Modifications

Getting Started with Eclipse

  1. Get Eclipse (for Java Developers is enough), run eclipse.exe .
  2. If it complains about missing JDK, install JDK from Oracle Java website.
  3. Install a Subversion provider using About – Eclipse Marketplace; I can recommend Subclipse.
  4. Import the CM source from Subversion repository by selecting File – Import.
  5. Select Subversion source and „Checkout project from SVN“.
  6. 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.
  7. 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).
  8. Click finish.
  9. Select regular Java project (but not the with Ant build file option, because we do not have this file on our disk yet).
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. Now all errors should be gone and „only“ warnings be left.
  16. 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).
  1. Now we can first try to start the MUD by clicking on the green „play“ button.
  2. Connect with a Telnet client or special MUD client.
  3. 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.