Modding:Worlds

defines many of the important zones on the world map. This includes both static mapped content (such as the Joppa village layout) as well as dynamic zone builders (such as the builders that are used to generate underground caves).

The game's primary "world", called JoppaWorld, contains most of the game content, but it is theoretically possible to add additional worlds.

In addition to the XML, the game code includes a few hooks that a programmer can use to modify the world state during the world generation process. These hooks are particularly useful if you're planning to add dynamically generated content similar to villages, lairs, sultan historical sites, etc, because they give you access to the same data that the core game uses to create that kind of content.

XML Structure
has the following general structure:

World Generation Code
The game exposes two interfaces that a modder may hook into to apply custom logic before or after the world generation process.

JoppaWorldBuilderExtension
This interface is called before and after JoppaWorld generation.

WorldBuilderExtension
This interface is called before and after the overall world generation process runs (it is not specific to JoppaWorld).

The format is pretty much identical to JoppaWorldBuilderExtension above, except that the attribute is  and the interface is.