I can't test any of this out from where I'm at, but this will hopefully get you on the right track. (If anyone has any corrections, let me know).
Random Art in MapGen2
If you look at terrain.xml, some entries have an "ArtKey" entry. For example, the Lava terrain has the entry ArtKey="Lava".
The data/artdefinitions directory contains XML files with the random artwork associated with each type of terrain. "ArtKey" from terrain.xml is a file name that matches up with the same file name in your data/artdefinitions folder. Looking there, you'll find a file called "Lava.xml".
Examining Lava.xml, you'll see categories of random art which will be placed on Lava terrain as defined in terrain.xml.
Code:
<?xml version="1.0" encoding="utf-8"?>
<RandomArtWork Chance="3">
<RandomArt Name="Sparks" Weight="1">
<Tile ID="6773" OffsetX="0" OffsetY="0" OffsetZ="0" Hue="0" />
</RandomArt>
<RandomArt Name="Open Fire" Weight="1">
<Tile ID="6571" OffsetX="0" OffsetY="0" OffsetZ="0" Hue="0" />
</RandomArt>
<RandomArt Name="Sparks" Weight="1">
<Tile ID="13401" OffsetX="0" OffsetY="0" OffsetZ="0" Hue="0" />
</RandomArt>
<RandomArt Name="Bubbling Lava" Weight="1">
<Tile ID="13371" OffsetX="0" OffsetY="0" OffsetZ="0" Hue="0" />
</RandomArt>
<RandomArt Name="Bubbling Lava" Weight="1">
<Tile ID="13383" OffsetX="0" OffsetY="0" OffsetZ="0" Hue="0" />
</RandomArt>
</RandomArtWork>
Chance is a number from 0-100, and is the percentage chance that any entry in that section will be placed on a given tile of terrain. 100 would give you an item on every tile, and a 1 would give you an item on 1 out of every 100 tiles (approximately). A 0 means it will never be there. The densest terrain types, such as jungles, have a RandomArtWork Chance of around 17.
Name is a user assigned name for that type of art. This can be anything you decide.
Weight is the degree that this item is more (or less) likely to appear than the others within this same group. If Weight isn't present, it defaults to 1. If you give it a 3, it is the same as having entered it three times.
To give you an idea of how weight works: When MapGen2 reads all the entries in that section, it add the weights together, and then determines a random number from 1 to the total. Where that number falls in the list determines which item it will place. For example: If there are 3 items in the list, one weighted 10 and two weighted 5, there is a total of 20. MapGen2 picks a number between 1 and 20. There is a 10 out of 20 chance it will be the first entry, and a 5 out of 20 chance of each of the other two.
TileID is the ID of the random art. You can get this from InsideUO or any other UO art browsing utility.
X, Y, and Z Offsets are offsets to use when placing the art, based on the terrain X/Y/Z. For example, if you wanted the art to be placed 3 zplanes higher than the terrain's zplane, you could use OffSetZ="3".
Hue is the color to hue this art item. It is optional. If not present, it will default to 0 (no hue). UO color ID numbers can also be viewed in InsideUO.
_________________
-= HellRazor =-
Shattered Sosaria is coming!
http://www.shatteredsosaria.com