Package worldBuilder
Class RPGMTiler
- java.lang.Object
-
- worldBuilder.RPGMTiler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface worldBuilder.Exporter
Exporter.WhichMap
-
-
Field Summary
Fields Modifier and Type Field Description java.awt.Color[]colorTopolevel to preview color mapdouble[][]depthsper point water depth (Z units)double[][]erodeper point erosion/depostion (Z units)static intFLORA_BRUSHstatic intFLORA_GRASSstatic intFLORA_NONEstatic intFLORA_TREESjava.lang.String[]floraNamesmap from ecotope types to namesint[][]floraTypesper point flora typedouble[][]heightsper point height (Z units)int[][]levelsper point terrain leveldouble[][]soilper point soil typedoubleTsummerseasonal mean temperaturesdoubleTwinterseasonal mean temperaturesint[]typeMapmapping from levels to TerrainTypesintx_pointsmap dimensions (in tiles)inty_pointsmap dimensions (in tiles)
-
Constructor Summary
Constructors Constructor Description RPGMTiler(java.lang.String tileRules, int width, int height)create a new output writer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledirection(int row, int col)compass orientation of facedoubledZdX(int row, int col)slope (upwards to the east)doubledZdY(int row, int col)slope (upwards to the south)voiderodeMap(double[][] erode)Up-load the net erosion/deposition for every tileintexport_height()return the export height (in tiles)intexport_width()return the export width (in tiles)voidfaunaMap(double[][] soil, java.lang.String[] names)Up-load the fauna type for every tilevoidfloraMap(double[][] flora, java.lang.String[] names)Up-load the (integer) flora type for every tilevoidfloraQuotas(double grass, double brush, double trees)set the fraction of tiles for each flora classvoidheightMap(double[][] heights)Up-load the altitude of every tilevoidhighlandLevels(int aboveGround)set parameters that define the altitude->level mappingintneededInfo()return list of needed map up-loadsvoidposition(double lat, double lon)Set the lat/lon of the region being exportedvoidpreview(Exporter.WhichMap chosen, java.awt.Color[] colormap)generate an export preview, mapping levels to colorsvoidrainMap(double[][] rain)Up-load the annual rainfall for every tiledoubleslope(int row, int col)aggregate slopevoidsoilMap(double[][] soil, java.lang.String[] names)Up-load the soil type for every tilevoidtemps(double meanTemp, double meanSummer, double meanWinter)Set seasonal temperature range for region being exportedvoidtileSize(int meters)Set the size of a single tilejava.awt.ColorwaterColor(int terrainType)water colors for flora previewsvoidwaterMap(double[][] depths)Up-load the surface-water-depth for every tilebooleanwriteFile(java.lang.String filename)write out an RPGMaker map
-
-
-
Field Detail
-
FLORA_NONE
public static final int FLORA_NONE
- See Also:
- Constant Field Values
-
FLORA_GRASS
public static final int FLORA_GRASS
- See Also:
- Constant Field Values
-
FLORA_BRUSH
public static final int FLORA_BRUSH
- See Also:
- Constant Field Values
-
FLORA_TREES
public static final int FLORA_TREES
- See Also:
- Constant Field Values
-
x_points
public int x_points
map dimensions (in tiles)
-
y_points
public int y_points
map dimensions (in tiles)
-
Tsummer
public double Tsummer
seasonal mean temperatures
-
Twinter
public double Twinter
seasonal mean temperatures
-
heights
public double[][] heights
per point height (Z units)
-
erode
public double[][] erode
per point erosion/depostion (Z units)
-
depths
public double[][] depths
per point water depth (Z units)
-
soil
public double[][] soil
per point soil type
-
levels
public int[][] levels
per point terrain level
-
floraTypes
public int[][] floraTypes
per point flora type
-
typeMap
public int[] typeMap
mapping from levels to TerrainTypes
-
floraNames
public java.lang.String[] floraNames
map from ecotope types to names
-
colorTopo
public java.awt.Color[] colorTopo
level to preview color map
-
-
Method Detail
-
neededInfo
public int neededInfo()
return list of needed map up-loads- Specified by:
neededInfoin interfaceExporter
-
export_width
public int export_width()
return the export width (in tiles)- Specified by:
export_widthin interfaceExporter
-
export_height
public int export_height()
return the export height (in tiles)- Specified by:
export_heightin interfaceExporter
-
floraQuotas
public void floraQuotas(double grass, double brush, double trees)set the fraction of tiles for each flora class- Parameters:
grass- ... fraction of squares eligible for grassbrush- ... fraction of squares eligible for brushtrees- ... fraction of squares eligible for trees
-
highlandLevels
public void highlandLevels(int aboveGround)
set parameters that define the altitude->level mapping- Parameters:
aboveGround- number of above-GROUND levels
-
writeFile
public boolean writeFile(java.lang.String filename)
write out an RPGMaker map
-
preview
public void preview(Exporter.WhichMap chosen, java.awt.Color[] colormap)
generate an export preview, mapping levels to colors
-
slope
public double slope(int row, int col)aggregate slope- Parameters:
row- (tile) within the export regioncol- (tile) within the export region- Returns:
- aggregate slope (dZdTILE) of that tile
-
dZdX
public double dZdX(int row, int col)slope (upwards to the east)- Parameters:
row- (tile) within the export regioncol- (tile) within the export region- Returns:
- slope upwards to the east
-
dZdY
public double dZdY(int row, int col)slope (upwards to the south)- Parameters:
row- (tile) within the export regioncol- (tile) within the export region- Returns:
- slope upwards to the south
-
direction
public double direction(int row, int col)compass orientation of face- Parameters:
row- (tile) within the export regioncol- (tile) within the export region- Returns:
- compass orientation (0-359) of face
-
tileSize
public void tileSize(int meters)
Set the size of a single tile
-
position
public void position(double lat, double lon)Set the lat/lon of the region being exported
-
temps
public void temps(double meanTemp, double meanSummer, double meanWinter)Set seasonal temperature range for region being exported
-
heightMap
public void heightMap(double[][] heights)
Up-load the altitude of every tile
-
erodeMap
public void erodeMap(double[][] erode)
Up-load the net erosion/deposition for every tile
-
rainMap
public void rainMap(double[][] rain)
Up-load the annual rainfall for every tile
-
soilMap
public void soilMap(double[][] soil, java.lang.String[] names)Up-load the soil type for every tile
-
waterMap
public void waterMap(double[][] depths)
Up-load the surface-water-depth for every tile
-
floraMap
public void floraMap(double[][] flora, java.lang.String[] names)Up-load the (integer) flora type for every tile
-
faunaMap
public void faunaMap(double[][] soil, java.lang.String[] names)Up-load the fauna type for every tile
-
waterColor
public java.awt.Color waterColor(int terrainType)
water colors for flora previews- Parameters:
terrainType-
-
-