Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- makebiome.py
- #/usr/bin/env python
- import random
- import sys
- vowels = ['a', 'e', 'i', 'o', 'u']
- consonants = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z']
- hexchar = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
- surfaceblocks = ['1', '2', '3', '4', '5', '12', '13', '17', '18', '19', '20', '24', '25', '35', '43', '45', '47', '48', '60', '79', '80', '86', '87', '88', '89', '97', '98', '103', '110', '112', '123', '125']
- groundblocks = ['1', '2', '3', '4', '5', '12', '13', '17', '19', '20', '24', '25', '35', '43', '45', '47', '48', '60', '79', '80', '86', '87', '88', '89', '97', '98', '103', '110', '112', '123', '125']
- oreblocks = ['CLAY', 'GRAVEL', '3', '14', '15', '16', '21', '46', '56', '14', '15', '16', '21', '56', '4', '19', '30', '73', '87', '88', '89']
- uw_oreblocks = ['CLAY', 'COAL_ORE', 'GOLD_ORE', 'SAND', '79', '49']
- plantblocks = ['RED_ROSE', 'YELLOW_FLOWER', 'LONG_GRASS', '104', '105', '89']
- liquidblocks = ['Water', 'Lava']
- isleborders = ['Ocean', 'Desert', 'Forest', 'Plains', 'Taiga']
- treetypes = ['Tree', 'BigTree', 'Foreset', 'HugeMushroom', 'SwampTree', 'Taiga1', 'Taiga2', 'JungleTree', 'GroundBush']
- def _vowel():
- return random.choice(vowels)
- def _consonant():
- return random.choice(consonants)
- def _cv():
- return _consonant() + _vowel()
- def _cvc():
- return _cv() + _consonant()
- def _syllable():
- return random.choice([_vowel, _cv, _cvc])()
- def create_fake_word():
- syllables = []
- for x in range(random.randint(2,3)):
- syllables.append(_syllable())
- return ''.join(syllables)
- def _hexchar():
- return random.choice(hexchar)
- def _colorval():
- colorvalues = []
- for x in range(0,6):
- colorvalues.append(_hexchar())
- return ''.join(colorvalues)
- def _minsize():
- return abs(int(round(random.randint(1,50),0)))
- def _maxsize():
- return abs(int(round(random.randint(51,128),0)))
- def _minalt():
- return abs(int(round(random.randint(1,50),0)))
- def _maxalt():
- return abs(int(round(random.randint(51,128),0)))
- def _frequency():
- return abs(int(round(random.randint(1,25),0)))
- def _rarity():
- return abs(int(round(random.randint(1,25),0)))
- def _oresize():
- return abs(int(round(random.randint(4,64),0)))
- def _dungeonfreq():
- return abs(int(round(random.gauss(4, 16),0)))
- if __name__ == '__main__':
- isisle = []
- filename = 'WG-'
- if random.randint(0,10) > 6 :
- isisle = 1
- filename += 'Isle-'
- filename += str.capitalize(create_fake_word())
- filename += 'BiomeConfig.ini'
- fo = open(filename, 'wb')
- biomesize = 'BiomeSize:'
- biomesize += str(int(round(random.gauss(5,0.5),1)))
- fo.write(biomesize)
- fo.write('\n')
- biomerarity = 'BiomeRarity:'
- biomerarity += str(int(abs(round(100-(random.lognormvariate(1,2))))))
- fo.write(biomerarity)
- fo.write('\n')
- islebiome = ''
- if isisle == 1 :
- islebiome += random.choice(isleborders)
- fo.write('IsleInBiome:')
- fo.write (islebiome)
- fo.write ('\n')
- fo.write('BiomeIsBorder:')
- fo.write('\n')
- fo.write('NotBorderNear:')
- notbordernear = ''
- if isisle == 0 :
- fo.write('Ocean')
- for ia in range (0, random.randint(1,3)) :
- notbordernear = random.choice(isleborders)
- fo.write(',')
- fo.write(notbordernear)
- fo.write('\n')
- biometemperature = 'BiomeTemperature:'
- biometemperature += str(round(random.uniform(0.0, 1.1), 1))
- fo.write(biometemperature)
- fo.write('\n')
- biomewetness = 'BiomeWetness:'
- biomewetness += str(round(random.uniform(0.0, 1.1), 1))
- fo.write(biomewetness)
- fo.write('\n')
- biomeheight = 'BiomeHeight:'
- biomeheight += str(round(random.gauss(-2.4,0.2),1))
- fo.write(biomeheight)
- fo.write('\n')
- biomevolatility = 'BiomeVolatility:'
- biomevolatility += str(abs(round(random.gauss(0.0,0.3),1)))
- fo.write(biomevolatility)
- fo.write('\n')
- maxaverageheight = 'MaxAverageHeight:'
- maxaverageheight += str(abs(round(random.gauss(0.0,0.3), 1)))
- fo.write(maxaverageheight)
- fo.write('\n')
- maxaveragedepth = 'MaxAverageDepth:'
- maxaveragedepth += str(abs(round(random.gauss(0.0,0.3), 1)))
- fo.write(maxaveragedepth)
- fo.write('\n')
- volatility1 = 'Volatility1:'
- volatility1 += str(abs(round(random.gauss(0.0,1.0), 1)))
- fo.write(volatility1)
- fo.write('\n')
- volatility2 = 'Volatility2:'
- volatility2 += str(abs(round(random.gauss(0.0,1.0), 1)))
- fo.write(volatility2)
- fo.write('\n')
- fo.write('DisableBiomeHeight:false')
- fo.write('\n')
- fo.write('CustomHeightControl:0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0')
- fo.write('\n')
- surfchance = random.randint(0,10)
- surfaceblock = 'SurfaceBlock:'
- if surfchance > 6 :
- thissurfaceblock = random.choice(surfaceblocks)
- elif surfchance < 3 :
- thissurfaceblock = '87'
- else :
- thissurfaceblock = '2'
- surfaceblock += thissurfaceblock
- fo.write(surfaceblock)
- fo.write('\n')
- groundblock = 'GroundBlock:'
- thisgroundblock = random.choice(groundblocks)
- groundblock += thisgroundblock
- fo.write(groundblock)
- fo.write('\n')
- fo.write('ReplacedBlocks:None')
- fo.write('\n')
- fo.write('disableNotchPonds:false')
- fo.write('\n')
- skycolor = ('SkyColor:0x')
- skycolor += str(_colorval())
- fo.write(skycolor)
- fo.write('\n')
- skycolor = ('SkyColor:0x')
- skycolor += str(_colorval())
- fo.write(skycolor)
- fo.write('\n')
- watercolor = ('WaterColor:0x')
- watercolor += str(_colorval())
- fo.write(watercolor)
- fo.write('\n')
- grasscolor = ('GrassColor:0x')
- grasscolor += str(_colorval())
- fo.write(grasscolor)
- fo.write('\n')
- foliagecolor = ('FoliageColor:0x')
- foliagecolor+= str(_colorval())
- fo.write(foliagecolor)
- fo.write('\n')
- dungeon = ('Dungeon(')
- dungeon += str(_dungeonfreq())
- dungeon += ',100,0,128)'
- if random.randint(0,10) > 2 :
- fo.write(dungeon)
- fo.write('\n')
- uglake = ('UnderGroundLake(')
- uglake += str(_minsize())
- uglake += (',')
- uglake += str(_maxsize())
- uglake += (',')
- uglake += str(_frequency())
- uglake += (',')
- uglake += str(_rarity())
- uglake += (',')
- uglake += str(_minalt())
- uglake += (',')
- uglake += str(_maxalt())
- uglake += (')')
- if random.randint(0,10) > 2 :
- fo.write(uglake)
- fo.write('\n')
- for i in range (0, random.randint(3,15)) :
- ore = 'Ore('
- ore += random.choice(oreblocks)
- ore += ','
- ore += str(_oresize())
- ore += ','
- ore += str(_frequency())
- ore += ','
- ore += str(_rarity())
- ore += ','
- ore += str(_minalt())
- ore += ','
- ore += str(_maxalt())
- ore += ','
- ore += thisgroundblock
- ore += ')'
- fo.write(ore)
- fo.write('\n')
- fo.write('UnderWaterOre(SAND,7,4,100,DIRT,GRASS)')
- fo.write('\n')
- fo.write('UnderWaterOre(CLAY,4,1,100,DIRT,CLAY)')
- fo.write('\n')
- fo.write('CustomObject()')
- fo.write('\n')
- treevar = ('Tree(')
- treevar += str(random.randint(1,7))
- treevar += ('0,')
- treevar += random.choice(treetypes)
- treevar += (',')
- treevar += str(random.randint(1,7))
- treevar += ('0,')
- treevar += random.choice(treetypes)
- treevar += (',')
- treevar += str(random.randint(1,7))
- treevar += ('0,Tree,100)')
- if thissurfaceblock == '2' :
- if random.randint(0,10) > 3 :
- fo.write(treevar)
- fo.write('\n')
- for ip in range (0, random.randint(0,4)) :
- plantvar = ('Plant(')
- plantvar += random.choice(plantblocks)
- plantvar += (',2,100,0,128,GRASS,DIRT,SOIL)')
- fo.write(plantvar)
- fo.write('\n')
- if random.randint(0,10) > 6 :
- fo.write ('Grass(LONG_GRASS,1,10,100,GRASS,DIRT)')
- fo.write ('\n')
- if random.randint(0,10) > 6 :
- fo.write ('Plant(PUMPKIN,1,3,0,128,GRASS)')
- fo.write ('\n')
- if random.randint(0,10) > 6 :
- fo.write ('Plant(MELON,1,3,0,128,GRASS)')
- fo.write ('\n')
- if random.randint(0,10) > 6 :
- fo.write ('Grass(LONG_GRASS,1,10,100,GRASS,DIRT)')
- fo.write ('\n')
- if random.randint(0,10) > 6 :
- fo.write ('Liquid(WATER,20,100,8,128,STONE)')
- fo.write ('\n')
- if random.randint(0,10) > 6 :
- fo.write ('Liquid(LAVA,10,100,8,128,STONE)')
- fo.write ('\n')
- fo.close()
- 100bioimes.sh
- #!/bin/bash
- cd /home/minecraft/python/
- for i in {1..100}
- do
- echo $i
- python makebiome.py
- done
- ls *.ini > boimes.txt
- WorldConfig.ini
- # Possible terrain modes : Normal, OldGenerator, TerrainTest, NotGenerate, Default
- # Normal - use all features
- # OldGenerator - generate land like 1.7.3 generator
- # TerrainTest - generate only terrain without any resources
- # NotGenerate - generate empty chunks
- # Default - use default Notch terrain generator
- ModeTerrain:Normal
- # Possible biome modes : Normal, OldGenerator, Default
- # Normal - use all features
- # FromImage - get biomes from image file
- # OldGenerator - generate biome like 1.7.3 generator
- # Default - use default Notch biome generator
- ModeBiome:Normal
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Biome Generator Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # IMPORTANT value for generation. Bigger values appear to zoom out. All 'Sizes' must be smaller than this.
- # Large %/total area biomes (Continents) must be set small, (limit=0)
- # Small %/total area biomes (Oasis,Mountain Peaks) must be larger (limit=GenerationDepth)
- # This could also represent "Total number of biome sizes"
- # Small values (about 1-2) and Large values (about 20) may affect generator performance.
- GenerationDepth:9
- # Max biome rarity from 1 to infinity. By default this is 100, but you can raise it for
- # fine-grained control, or to create biomes with a chance of occurring smaller than 1/100.
- BiomeRarityScale:100
- # Land rarity from 100 to 1. If you set smaller than 90 and LandSize near 0 beware Big oceans.
- LandRarity:98
- # Land size from 0 to GenerationDepth.
- LandSize:3
- # Make land more fuzzy and make lakes. Must be from 0 to GenerationDepth - LandSize
- LandFuzzy:1
- # Ice areas rarity from 100 to 1. If you set smaller than 90 and IceSize near 0 beware ice world
- IceRarity:1
- # Ice area size from 0 to GenerationDepth.
- IceSize:3
- FrozenRivers:false
- FrozenOcean:false
- # River rarity.Must be from 0 to GenerationDepth.
- RiverRarity:3
- # River size from 0 to GenerationDepth - RiverRarity
- RiverSize:2
- RiversEnabled:true
- # Biomes which used in normal biome algorithm. Biome name is case sensitive.
- NormalBiomes:Desert,Forest,Extreme Hills,Swampland,Plains,Taiga,Sky,Hell,WG-Ai,WG-Aliwuz,WG-Alum,WG-Aobic,WG-Eefu,WG-Ejoa,WG-Ewif,WG-Faxoz,WG-Fifkubo,WG-Fudo,WG-Gayaseq,WG-Helusec,WG-Hotuciw,WG-Huo,WG-Hupte,WG-Ifun,WG-Iha,WG-Imup,WG-Ioa,WG-Jasae,WG-Kibi,WG-Kiei,WG-Kiho,WG-Kocnumju,WG-Lasfema,WG-Layok,WG-Lehoc,WG-Mogjim,WG-Nukiyo,WG-Nuzu,WG-Oani,WG-Oedam,WG-Oerar,WG-Oga,WG-Oigo,WG-Ojif,WG-Otal,WG-Pascobhiv,WG-Pie,WG-Puuze,WG-Qaliwaw,WG-Qewaco,WG-Rebo,WG-Rekoi,WG-Satwin,WG-Sezpile,WG-Sufa,WG-Suihef,WG-Suyero,WG-Tinve,WG-Toxu,WG-Uapu,WG-Ubee,WG-Uhiyac,WG-Uo,WG-Uradi,WG-Vite,WG-Weelur,WG-Wezi,WG-Woe,WG-Yosif,WG-Yulohem,WG-Zokbaj
- # Biomes which used in ice biome algorithm. Biome name is case sensitive.
- IceBiomes:Ice Plains
- # Biomes which used as isles. You must set IsleInBiome in biome config for each biome here. Biome name is case sensitive.
- IsleBiomes:MushroomIsland,Ice Mountains,DesertHills,ForestHills,TaigaHills,River,JungleHills,WG-Isle-Aanis,WG-Isle-Ahat,WG-Isle-Azi,WG-Isle-Bavhuthix,WG-Isle-Botabus,WG-Isle-Cebawi,WG-Isle-Ceqou,WG-Isle-Cuzkoqap,WG-Isle-Diulo,WG-Isle-Ea,WG-Isle-Egaqti,WG-Isle-Ehun,WG-Isle-Eyiwrec,WG-Isle-Geqe,WG-Isle-Gopu,WG-Isle-Gou,WG-Isle-Hino,WG-Isle-Hotyec,WG-Isle-Ibep,WG-Isle-Iwu,WG-Isle-Kimnu,WG-Isle-Lexyow,WG-Isle-Mordopu,WG-Isle-Osaq,WG-Isle-Paba,WG-Isle-Pozwus,WG-Isle-Tubokwus,WG-Isle-Tugo,WG-Isle-Ufe,WG-Isle-Ufek,WG-Isle-Uni,WG-Isle-Uosoz,WG-Isle-Usexo,WG-Isle-Uui,WG-Isle-Wujpuye,WG-Isle-Xekro,WG-Isle-Xojuv,WG-Isle-Yipe
- # Biomes which used as borders. You must set BiomeIsBorder in biome config for each biome here. Biome name is case sensitive.
- BorderBiomes:MushroomIslandShore,Beach,Extreme Hills Edge,GravelBeach
- # List of ALL custom biomes.
- # Example:
- # CustomBiomes:TestBiome1, BiomeTest2
- # This will add two biomes and generate biome config files
- # Any changes here need server restart.
- CustomBiomes:GravelBeach:23,WG-Ai:24,WG-Aliwuz:25,WG-Alum:26,WG-Aobic:27,WG-Eefu:28,WG-Ejoa:29,WG-Ewif:30,WG-Faxoz:31,WG-Fifkubo:32,WG-Fudo:33,WG-Gayaseq:34,WG-Helusec:35,WG-Hotuciw:36,WG-Huo:37,WG-Hupte:38,WG-Ifun:39,WG-Iha:40,WG-Imup:41,WG-Ioa:42,WG-Isle-Aanis:43,WG-Isle-Ahat:44,WG-Isle-Azi:45,WG-Isle-Bavhuthix:46,WG-Isle-Botabus:47,WG-Isle-Cebawi:48,WG-Isle-Ceqou:49,WG-Isle-Cuzkoqap:50,WG-Isle-Diulo:51,WG-Isle-Ea:52,WG-Isle-Egaqti:53,WG-Isle-Ehun:54,WG-Isle-Eyiwrec:55,WG-Isle-Geqe:56,WG-Isle-Gopu:57,WG-Isle-Gou:58,WG-Isle-Hino:59,WG-Isle-Hotyec:60,WG-Isle-Ibep:61,WG-Isle-Iwu:62,WG-Isle-Kimnu:63,WG-Isle-Lexyow:64,WG-Isle-Mordopu:65,WG-Isle-Osaq:66,WG-Isle-Paba:67,WG-Isle-Pozwus:68,WG-Isle-Tubokwus:69,WG-Isle-Tugo:70,WG-Isle-Ufe:71,WG-Isle-Ufek:72,WG-Isle-Uni:73,WG-Isle-Uosoz:74,WG-Isle-Usexo:75,WG-Isle-Uui:76,WG-Isle-Wujpuye:77,WG-Isle-Xekro:78,WG-Isle-Xojuv:79,WG-Isle-Yipe:80,WG-Jasae:81,WG-Kibi:82,WG-Kiei:83,WG-Kiho:84,WG-Kocnumju:85,WG-Lasfema:86,WG-Layok:87,WG-Lehoc:88,WG-Mogjim:89,WG-Nukiyo:90,WG-Nuzu:91,WG-Oani:92,WG-Oedam:93,WG-Oerar:94,WG-Oga:95,WG-Oigo:96,WG-Ojif:97,WG-Otal:98,WG-Pascobhiv:99,WG-Pie:100,WG-Puuze:101,WG-Qaliwaw:102,WG-Qewaco:103,WG-Rebo:104,WG-Rekoi:105,WG-Satwin:106,WG-Sezpile:107,WG-Sufa:108,WG-Suihef:109,WG-Suyero:110,WG-Tinve:111,WG-Toxu:112,WG-Uapu:113,WG-Ubee:114,WG-Uhiyac:115,WG-Uo:116,WG-Uradi:117,WG-Vite:118,WG-Weelur:119,WG-Wezi:120,WG-Woe:121,WG-Yosif:122,WG-Yulohem:123,WG-Zokbaj:124
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Biome Image Generator Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # Possible modes when generator outside image boundaries: Repeat, ContinueNormal, FillEmpty
- # Repeat - repeat image
- # ContinueNormal - continue normal generation
- # FillEmpty - fill by biome in "ImageFillBiome settings"
- ImageMode:Repeat
- # Source png file for FromImage biome mode.
- ImageFile:map.png
- # Biome name for fill outside image boundaries with FillEmpty mode.
- ImageFillBiome:Ocean
- # Shifts map position from x=0 and z=0 coordinates.
- ImageXOffset:0
- ImageZOffset:0
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Terrain Generator Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # Height bits determinate generation height. Min 5, max 8
- # For example 7 = 128 height, 8 = 256 height
- WorldHeightBits:8
- # Set water level. Every empty block under this level will be fill water or another block from WaterBlock
- WaterLevelMax:42
- WaterLevelMin:0
- # BlockId used as water in WaterLevel
- WaterBlock:9
- # BlockId used as ice
- IceBlock:79
- # Can increase (values greater than 0) or decrease (values less than 0) how much the landscape is fractured horizontally.
- FractureHorizontal:0.2
- # Can increase (values greater than 0) or decrease (values less than 0) how much the landscape is fractured vertically.
- # Positive values will lead to large cliffs/overhangs, floating islands, and/or a cavern world depending on other settings.
- FractureVertical:0.2
- # Attempts to replace all surface stone with biome surface block
- RemoveSurfaceStone:false
- # Disable bottom of map bedrock generation
- DisableBedrock:false
- # Enable ceiling of map bedrock generation
- CeilingBedrock:false
- # Make bottom layer of bedrock flat
- FlatBedrock:true
- # BlockId used as bedrock
- BedrockobBlock:20
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Map objects | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- StrongholdsEnabled:true
- VillagesEnabled:true
- MineshaftsEnabled:true
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | World visual settings | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # Warning this section will work only for clients with single version of TerrainControl
- # World fog color
- WorldFog:0xc0d8ff
- # World night fog color
- WorldNightFog:0x0b0d17
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | BOB Objects Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # Enable/disable custom objects
- CustomObjects:true
- # Number of attempts for place per chunk
- objectSpawnRatio:2
- # Deny custom objects underFill even it enabled in objects
- DenyObjectsUnderFill:false
- # Chance to grow custom instead normal tree from sapling .
- customTreeChance:50
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Cave Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # TerrainControl attempts once per chunk to create a cave or cave system.
- # This is chance of success on that attempt.
- caveRarity:14
- # If successful, It tries to add this many caves in that chunk but trends towards lower results.
- # Input of 40 tends to result in 5-6 caves or cave systems starting per chunk.
- caveFrequency:60
- # Trends towards lower elevations.
- caveMinAltitude:8
- caveMaxAltitude:128
- # Chance that any cave made during " caveFrequency" will generate without a connecting cave or system.
- # Will also attempt to create a pocket - a higher than normal density of cave systems nearby, however no guarantee of connecting to it.
- individualCaveRarity:25
- # Number of attempts during " caveFreqency" to start a system instead of continuing a single cave.
- # Warning:High values cause extremely slow world generation and lag.
- caveSystemFrequency:1
- # Adds additional attempts for cave pocket after "individualCaveRarity" attempts.
- caveSystemPocketChance:0
- # When triggered, Overrides "caveFrequency"
- caveSystemPocketMinSize:0
- caveSystemPocketMaxSize:4
- # Turns off Randomizer = CAVES EVERYWHERE!
- evenCaveDistribution:false
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Canyon Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- canyonRarity:4
- canyonMinAltitude:12
- canyonMaxAltitude:128
- canyonMinLength:84
- canyonMaxLength:256
- canyonDepth:4.0
- #######################################################################
- # +-----------------------------------------------------------------+ #
- # | Old Biome Generator Variables | #
- # +-----------------------------------------------------------------+ #
- #######################################################################
- # This generator works only with old terrain generator!
- oldBiomeSize:1.5
- minMoisture:0.0
- maxMoisture:1.0
- minTemperature:0.0
- maxTemperature:1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement