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[]
colorTopo
level to preview color mapdouble[][]
depths
per point water depth (Z units)double[][]
erode
per point erosion/depostion (Z units)static int
FLORA_BRUSH
static int
FLORA_GRASS
static int
FLORA_NONE
static int
FLORA_TREES
java.lang.String[]
floraNames
map from ecotope types to namesint[][]
floraTypes
per point flora typedouble[][]
heights
per point height (Z units)int[][]
levels
per point terrain leveldouble[][]
soil
per point soil typedouble
Tsummer
seasonal mean temperaturesdouble
Twinter
seasonal mean temperaturesint[]
typeMap
mapping from levels to TerrainTypesint
x_points
map dimensions (in tiles)int
y_points
map 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 double
direction(int row, int col)
compass orientation of facedouble
dZdX(int row, int col)
slope (upwards to the east)double
dZdY(int row, int col)
slope (upwards to the south)void
erodeMap(double[][] erode)
Up-load the net erosion/deposition for every tileint
export_height()
return the export height (in tiles)int
export_width()
return the export width (in tiles)void
faunaMap(double[][] soil, java.lang.String[] names)
Up-load the fauna type for every tilevoid
floraMap(double[][] flora, java.lang.String[] names)
Up-load the (integer) flora type for every tilevoid
floraQuotas(double grass, double brush, double trees)
set the fraction of tiles for each flora classvoid
heightMap(double[][] heights)
Up-load the altitude of every tilevoid
highlandLevels(int aboveGround)
set parameters that define the altitude->level mappingint
neededInfo()
return list of needed map up-loadsvoid
position(double lat, double lon)
Set the lat/lon of the region being exportedvoid
preview(Exporter.WhichMap chosen, java.awt.Color[] colormap)
generate an export preview, mapping levels to colorsvoid
rainMap(double[][] rain)
Up-load the annual rainfall for every tiledouble
slope(int row, int col)
aggregate slopevoid
soilMap(double[][] soil, java.lang.String[] names)
Up-load the soil type for every tilevoid
temps(double meanTemp, double meanSummer, double meanWinter)
Set seasonal temperature range for region being exportedvoid
tileSize(int meters)
Set the size of a single tilejava.awt.Color
waterColor(int terrainType)
water colors for flora previewsvoid
waterMap(double[][] depths)
Up-load the surface-water-depth for every tileboolean
writeFile(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:
neededInfo
in interfaceExporter
-
export_width
public int export_width()
return the export width (in tiles)- Specified by:
export_width
in interfaceExporter
-
export_height
public int export_height()
return the export height (in tiles)- Specified by:
export_height
in 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
-
-
-