Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/alpine_lakes.js
Engine.LoadLibrary("rmgen"); | Engine.LoadLibrary("rmgen"); | ||||
Engine.LoadLibrary("rmgen-common"); | Engine.LoadLibrary("rmgen-common"); | ||||
const { tPrimary, tForestFloor, tCliff, tSecondary, tHalfSnow, tSnowLimited, tDirt, tRoad, tRoadWild, | |||||
tShore, tWater, oPine, oBerryBush, oDeer, oFish, oRabbit, oStoneLarge, oStoneSmall, oMetalLarge, | |||||
aGrass, aGrassShort, aRockLarge, aRockMedium, aBushMedium, aBushSmall } = (() => { | |||||
sera: I wonder if it would make sense to keep it as an object instead of unwrapping.
Also the same… | |||||
phositAuthorUnsubmitted Done Inline ActionsUnwrapping: Yes but other (actual) bioms are also "injected" in to the global scope. Changing all of them would be a to big change. (We can do that afther all maps are generators) Yes this should really be actual biomes. Not "generic/" ones but make an own folder like "Gulf of Bothnia" or if there are onough similarity we could actually use thous of "Gulf of Bothnia". phosit: Unwrapping: Yes but other (actual) bioms are also "injected" in to the global scope. Changing… | |||||
if (randBool()) | if (randBool()) | ||||
{ | { | ||||
RandomMapLogger.prototype.printDirectly("Setting late spring biome.\n"); | RandomMapLogger.prototype.printDirectly("Setting late spring biome.\n"); | ||||
setFogThickness(0.26); | setFogThickness(0.26); | ||||
setFogFactor(0.4); | setFogFactor(0.4); | ||||
setPPEffect("hdr"); | setPPEffect("hdr"); | ||||
setPPSaturation(0.48); | setPPSaturation(0.48); | ||||
setPPContrast(0.53); | setPPContrast(0.53); | ||||
setPPBloom(0.12); | setPPBloom(0.12); | ||||
var tPrimary = ["alpine_dirt_grass_50"]; | return { | ||||
var tForestFloor = "alpine_forrestfloor"; | "tPrimary": ["alpine_dirt_grass_50"], | ||||
var tCliff = ["alpine_cliff_a", "alpine_cliff_b", "alpine_cliff_c"]; | "tForestFloor": "alpine_forrestfloor", | ||||
var tSecondary = "alpine_grass_rocky"; | "tCliff": ["alpine_cliff_a", "alpine_cliff_b", "alpine_cliff_c"], | ||||
var tHalfSnow = ["alpine_grass_snow_50", "alpine_dirt_snow"]; | "tSecondary": "alpine_grass_rocky", | ||||
var tSnowLimited = ["alpine_snow_rocky"]; | "tHalfSnow": ["alpine_grass_snow_50", "alpine_dirt_snow"], | ||||
var tDirt = "alpine_dirt"; | "tSnowLimited": ["alpine_snow_rocky"], | ||||
var tRoad = "new_alpine_citytile"; | "tDirt": "alpine_dirt", | ||||
var tRoadWild = "new_alpine_citytile"; | "tRoad": "new_alpine_citytile", | ||||
var tShore = "alpine_shore_rocks_grass_50"; | "tRoadWild": "new_alpine_citytile", | ||||
var tWater = "alpine_shore_rocks"; | "tShore": "alpine_shore_rocks_grass_50", | ||||
"tWater": "alpine_shore_rocks", | |||||
var oPine = "gaia/tree/pine"; | |||||
var oBerryBush = "gaia/fruit/berry_01"; | "oPine": "gaia/tree/pine", | ||||
var oDeer = "gaia/fauna_deer"; | "oBerryBush": "gaia/fruit/berry_01", | ||||
var oFish = "gaia/fish/generic"; | "oDeer": "gaia/fauna_deer", | ||||
var oRabbit = "gaia/fauna_rabbit"; | "oFish": "gaia/fish/generic", | ||||
var oStoneLarge = "gaia/rock/alpine_large"; | "oRabbit": "gaia/fauna_rabbit", | ||||
var oStoneSmall = "gaia/rock/alpine_small"; | "oStoneLarge": "gaia/rock/alpine_large", | ||||
var oMetalLarge = "gaia/ore/alpine_large"; | "oStoneSmall": "gaia/rock/alpine_small", | ||||
"oMetalLarge": "gaia/ore/alpine_large", | |||||
var aGrass = "actor|props/flora/grass_soft_small_tall.xml"; | |||||
var aGrassShort = "actor|props/flora/grass_soft_large.xml"; | "aGrass": "actor|props/flora/grass_soft_small_tall.xml", | ||||
var aRockLarge = "actor|geology/stone_granite_med.xml"; | "aGrassShort": "actor|props/flora/grass_soft_large.xml", | ||||
var aRockMedium = "actor|geology/stone_granite_med.xml"; | "aRockLarge": "actor|geology/stone_granite_med.xml", | ||||
var aBushMedium = "actor|props/flora/bush_medit_me.xml"; | "aRockMedium": "actor|geology/stone_granite_med.xml", | ||||
var aBushSmall = "actor|props/flora/bush_medit_sm.xml"; | "aBushMedium": "actor|props/flora/bush_medit_me.xml", | ||||
"aBushSmall": "actor|props/flora/bush_medit_sm.xml", | |||||
}; | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
RandomMapLogger.prototype.printDirectly("Setting winter spring biome.\n"); | RandomMapLogger.prototype.printDirectly("Setting winter spring biome.\n"); | ||||
setFogFactor(0.35); | setFogFactor(0.35); | ||||
setFogThickness(0.19); | setFogThickness(0.19); | ||||
setPPSaturation(0.37); | setPPSaturation(0.37); | ||||
setPPEffect("hdr"); | setPPEffect("hdr"); | ||||
var tPrimary = ["alpine_snow_a", "alpine_snow_b"]; | return { | ||||
var tForestFloor = "alpine_forrestfloor_snow"; | "tPrimary": ["alpine_snow_a", "alpine_snow_b"], | ||||
var tCliff = ["alpine_cliff_snow"]; | "tForestFloor": "alpine_forrestfloor_snow", | ||||
var tSecondary = "alpine_grass_snow_50"; | "tCliff": ["alpine_cliff_snow"], | ||||
var tHalfSnow = ["alpine_grass_snow_50", "alpine_dirt_snow"]; | "tSecondary": "alpine_grass_snow_50", | ||||
var tSnowLimited = ["alpine_snow_a", "alpine_snow_b"]; | "tHalfSnow": ["alpine_grass_snow_50", "alpine_dirt_snow"], | ||||
var tDirt = "alpine_dirt"; | "tSnowLimited": ["alpine_snow_a", "alpine_snow_b"], | ||||
var tRoad = "new_alpine_citytile"; | "tDirt": "alpine_dirt", | ||||
var tRoadWild = "new_alpine_citytile"; | "tRoad": "new_alpine_citytile", | ||||
var tShore = "alpine_shore_rocks_icy"; | "tRoadWild": "new_alpine_citytile", | ||||
var tWater = "alpine_shore_rocks"; | "tShore": "alpine_shore_rocks_icy", | ||||
"tWater": "alpine_shore_rocks", | |||||
var oPine = "gaia/tree/pine_w"; | |||||
var oBerryBush = "gaia/fruit/berry_01"; | "oPine": "gaia/tree/pine_w", | ||||
var oDeer = "gaia/fauna_deer"; | "oBerryBush": "gaia/fruit/berry_01", | ||||
var oFish = "gaia/fish/generic"; | "oDeer": "gaia/fauna_deer", | ||||
var oRabbit = "gaia/fauna_rabbit"; | "oFish": "gaia/fish/generic", | ||||
var oStoneLarge = "gaia/rock/alpine_large"; | "oRabbit": "gaia/fauna_rabbit", | ||||
var oStoneSmall = "gaia/rock/alpine_small"; | "oStoneLarge": "gaia/rock/alpine_large", | ||||
var oMetalLarge = "gaia/ore/alpine_large"; | "oStoneSmall": "gaia/rock/alpine_small", | ||||
"oMetalLarge": "gaia/ore/alpine_large", | |||||
var aGrass = "actor|props/flora/grass_soft_dry_small_tall.xml"; | |||||
var aGrassShort = "actor|props/flora/grass_soft_dry_large.xml"; | "aGrass": "actor|props/flora/grass_soft_dry_small_tall.xml", | ||||
var aRockLarge = "actor|geology/stone_granite_med.xml"; | "aGrassShort": "actor|props/flora/grass_soft_dry_large.xml", | ||||
var aRockMedium = "actor|geology/stone_granite_med.xml"; | "aRockLarge": "actor|geology/stone_granite_med.xml", | ||||
var aBushMedium = "actor|props/flora/bush_medit_me_dry.xml"; | "aRockMedium": "actor|geology/stone_granite_med.xml", | ||||
var aBushSmall = "actor|props/flora/bush_medit_sm_dry.xml"; | "aBushMedium": "actor|props/flora/bush_medit_me_dry.xml", | ||||
"aBushSmall": "actor|props/flora/bush_medit_sm_dry.xml" | |||||
}; | |||||
} | } | ||||
})(); | |||||
const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor]; | const pForest = [tForestFloor + TERRAIN_SEPARATOR + oPine, tForestFloor]; | ||||
const heightSeaGround = -5; | const heightSeaGround = -5; | ||||
const heightLand = 3; | const heightLand = 3; | ||||
const g_Map = new RandomMap(heightLand, tPrimary); | const g_Map = new RandomMap(heightLand, tPrimary); | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
I wonder if it would make sense to keep it as an object instead of unwrapping.
Also the same structure for "biome" is used in the other alpine map and maybe many other maps. So maybe a biome classes library that could be shared across all maps would make sense. First 3rd party maps using those wouldn't break if artist changed some models and an artist would have a central place to update biomes (asset groups)
@wowgetoffyourcellphone pinging you for insight on the above suggestion from an artist point of view,