Menu

Generators

skaterzero807

Generator Files

Generator files are located in the "generators" folder.
Generator files are .jar files which contain the code, schematics and settings files for a specific generator.
They can be edited using WinRAR or similar program.

How to Modify

Step 1: Copy

First, it is recommended to make a copy of a generator (e.g. "Default.jar") in the "generators" folder and rename it to something like "My Generator.jar".

Step 2: Modify

Then, copy any files you want to modify in the generator .jar. For example, you could make a copy of a settings file to change to your liking. Or, you could create new schematics files of your own buildings. Lastly, you can edit the thumbnail image that is in the jar.

Step 3: Replace

Replace the files in the .jar with your new settings files or schematics. You can paste them using CTRL + V right in WinRAR and it will add them to the jar.

Step 4: Run

Run the HGMG.jar and you should now see a new generator "My Generator" (or whatever you renamed it) in the list of generators to choose from.

Suggestions for Writing a Generator

Note, this is for advanced users only with a working knowledge of Java.

  • Copy the generator source code from the downloads to help you figure out what is going on.
  • There needs to be a World Generator class which has a method called "generate". See the source code for the "WorldGenerator" class for an example. There should also be a public version and description field in this class.
  • There also needs to be a World Settings class which has the settings declared.
    • Any public field will show up in the generator as an option to change (the field must be of type boolean, integer, float or integer array).
    • Any protected field will be loaded from the settings file. If it doesn't exist in the settings file, it will print out an error.
    • Any private field will not be loaded from a settings file or be changeable from the generator window.

Again, this is not supported fully but if you know Java and look at the source code for the generator, you can simply replace my code in the "WorldGenerator" class with your own for a custom generator.


Related

Wiki: Chest Items File
Wiki: Home
Wiki: Schematics
Wiki: Settings File

Discussion

  • Anonymous

    Anonymous - 2012-06-24

    I can't open the generators!

     
    • skaterzero807

      skaterzero807 - 2012-06-25

      Please be more specific. What exactly is the problem you are having? Also, are you using a Mac or PC?

       
  • Anonymous

    Anonymous - 2012-06-26

    I have a blank window with "Choose a generator". That's all :/

    Win7 64bits, Java 6.

     
  • skaterzero807

    skaterzero807 - 2012-06-27

    Did you extract the .zip folder?

     
  • Anonymous

    Anonymous - 2012-07-14

    im having the same problem where do i extract to? I may sound like a total noob right now

     
    • skaterzero807

      skaterzero807 - 2012-07-16

      You can extract the files anywhere you want, just make sure you keep the HGMG.jar and generators folder together in the same folder.

       
  • Anonymous

    Anonymous - 2012-09-15

    what does it mean when it says: Copy the configurations file for your plugin and replace the file in your server's plugins folder.

     
    • skaterzero807

      skaterzero807 - 2012-11-06

      You have to copy the files in the configs folder into your Bukkit server so the plugin you are using knows where to put players on the map. So copy the .yml files in whatever folder corresponds to the plugin you are using into the folder of your Bukkit server for that plugin.

       
  • Anonymous

    Anonymous - 2012-10-08

    can you make a video tourorial

     
    • skaterzero807

      skaterzero807 - 2012-11-06

      Check the main page for a link.

       
  • Anonymous

    Anonymous - 2012-10-08

    can you make a swamp generator?
    or just more biome generators. or make a bunch of buildings and then randomize them to make a city/town map. my point is can you make more generators with cool builds/biomes. thank you for your consideration. :D

     
    • skaterzero807

      skaterzero807 - 2012-11-06

      I'm working on a city generator now, it could be a while before it's done though.

       
  • Anonymous

    Anonymous - 2013-04-17
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.