Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- -- mapinfo.lua
- --
- local mapinfo = {
- name = "Living Lands",
- shortname = "Living Lands",
- description = "1v1 map based on DeadLands, designed for Zero-K.",
- author = "Original by mestizo and Saktoth, remastered by aeonios.",
- version = "v2.0",
- --mutator = "official";
- --mapfile = "", --// location of smf/sm3 file (optional)
- modtype = 3, --// 1=primary, 0=hidden, 3=map
- depend = {"Map Helper v1"},
- replace = {},
- --startpic = "", --// deprecated
- --StartMusic = "", --// deprecated
- maphardness = 500,
- notDeformable = false,
- gravity = 130,
- tidalStrength = 0,
- maxMetal = 0.9,
- extractorRadius = 70.0,
- voidWater = true,
- autoShowMetal = true,
- smf = {
- minheight = 100,
- maxheight = 450,
- --smtFileName0 = "",
- --smtFileName1 = "",
- --smtFileName.. = "",
- --smtFileNameN = "",
- },
- sound = {
- --// Sets the _reverb_ preset (= echo parameters),
- --// passfilter (the direct sound) is unchanged.
- --//
- --// To get a list of all possible presets check:
- --// https://github.com/spring/spring/blob/master/rts/System/Sound/EFXPresets.cpp
- --//
- --// Hint:
- --// You can change the preset at runtime via:
- --// /tset UseEFX [1|0]
- --// /tset snd_eaxpreset preset_name (may change to a real cmd in the future)
- --// /tset snd_filter %gainlf %gainhf (may " " " " " " " " )
- preset = "default",
- passfilter = {
- --// Note, you likely want to set these
- --// tags due to the fact that they are
- --// _not_ set by `preset`!
- --// So if you want to create a muffled
- --// sound you need to use them.
- gainlf = 1.0,
- gainhf = 1.0,
- },
- reverb = {
- --// Normally you just want use the `preset` tag
- --// but you can use handtweak a preset if wanted
- --// with the following tags.
- --// To know their function & ranges check the
- --// official OpenAL1.1 SDK document.
- --density
- --diffusion
- --gain
- --gainhf
- --gainlf
- --decaytime
- --decayhflimit
- --decayhfratio
- --decaylfratio
- --reflectionsgain
- --reflectionsdelay
- --reflectionspan
- --latereverbgain
- --latereverbdelay
- --latereverbpan
- --echotime
- --echodepth
- --modtime
- --moddepth
- --airabsorptiongainhf
- --hfreference
- --lfreference
- --roomrollofffactor
- },
- },
- resources = {
- --grassBladeTex = "",
- --grassShadingTex = "",
- --detailTex = "",
- specularTex = "specmap.png",
- splatDistrTex = "",
- splatDetailTex = "",
- --skyReflectModTex = "",
- --detailNormalTex = "",
- --lightEmissionTex = "",
- },
- splats = {
- texScales = { 0.006, 0.009, 0.006, 0.006 },
- texMults = { 0.3, 0.4, 0.2, 1 },
- },
- atmosphere = {
- minWind = 5.0,
- maxWind = 25.0,
- fogStart = 0.1,
- fogEnd = 4.0,
- fogColor = { 2.0, 2.0, 1.7 },
- sunColor = { 1.0, 1.0, 0.8 },
- skyColor = { 0.0, 0.3, 0.5 },
- skyDir = { -0.5, 0.8, -0.5 },
- skyBox = "altored1.dds",
- cloudDensity = 0.0,
- cloudColor = { 0.8, 0.8, 0.8 },
- },
- grass = {
- bladeWaveScale = 1.0,
- bladeWidth = 0.15,
- bladeHeight = 2.0,
- bladeAngle = 1.57,
- bladeColor = {0.79, 0.81, 0.57}, --// does nothing when `grassBladeTex` is set
- },
- lighting = {
- --// dynsun
- sunStartAngle = 0.0,
- sunOrbitTime = 300.0,
- sunDir = { -0.8, 0.8, 0.0 },
- --// unit & ground lighting
- groundAmbientColor = { 0.3, 0.3, 0.3 },
- groundDiffuseColor = { 2.0, 2.0, 2.0 },
- groundSpecularColor = {2.0, 2.0, 2.0},
- groundShadowDensity = 0.9,
- unitAmbientColor = { 1., 0.9, 0.6 },
- unitDiffuseColor = { 2.0, 2.0, 1.2 },
- unitSpecularColor = {0.7, 0.7, 0.7},
- unitShadowDensity = 0.4,
- specularExponent = 100.0,
- },
- water = {
- damage = 0.0,
- repeatX = 0.0,
- repeatY = 0.0,
- absorb = { 0.01, 0.02, 0.03 },
- baseColor = { 0.1, 0.1, 0.2 },
- minColor = { 0.1, 0.2, 0.5 },
- ambientFactor = 0.0,
- diffuseFactor = 3.7,
- specularFactor = 0,
- specularPower = 20,
- --//planeColor = { 0.0, 0.4, 0.8 },
- surfaceColor = { 0.1, 0.3, 0.4 },
- surfaceAlpha = 0.2,
- diffuseColor = { 0.06, 0.09, 0.12, },
- specularColor = { 0.8, 0.7, 0.9 },
- fresnelMin = 0.0,
- fresnelMax = 0.0,
- fresnelPower = 0.0,
- reflectionDistortion = 0.15,
- blurBase = 8.0,
- blurExponent = 2.0,
- perlinStartFreq = 20,
- perlinLacunarity = 3.1,
- perlinAmplitude = 0.9,
- windSpeed = 1.0, --// does nothing yet
- shoreWaves = true,
- forceRendering = false,
- --// undefined == load them from resources.lua!
- --texture = "",
- --foamTexture = "",
- --normalTexture = "",
- --caustics = {
- -- "",
- -- "",
- --},
- },
- teams = {
- [0] = {startPos = {x = 197, z = 3908}},
- [1] = {startPos = {x = 3875, z = 197}},
- },
- terrainTypes = {
- [0] = {
- name = "Default",
- hardness = 1.0,
- receiveTracks = true,
- moveSpeeds = {
- tank = 1.0,
- kbot = 1.0,
- hover = 1.0,
- ship = 1.0,
- },
- },
- },
- custom = {
- precipitation = {
- density = 30000,
- size = 1.5,
- speed = 50,
- windscale = 1.2,
- texture = 'LuaGaia/effects/snowflake.png',
- },
- },
- }
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- -- Helper
- local function lowerkeys(ta)
- local fix = {}
- for i,v in pairs(ta) do
- if (type(i) == "string") then
- if (i ~= i:lower()) then
- fix[#fix+1] = i
- end
- end
- if (type(v) == "table") then
- lowerkeys(v)
- end
- end
- for i=1,#fix do
- local idx = fix[i]
- ta[idx:lower()] = ta[idx]
- ta[idx] = nil
- end
- end
- lowerkeys(mapinfo)
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- -- Map Options
- if (Spring) then
- local function tmerge(t1, t2)
- for i,v in pairs(t2) do
- if (type(v) == "table") then
- t1[i] = t1[i] or {}
- tmerge(t1[i], v)
- else
- t1[i] = v
- end
- end
- end
- -- make code safe in unitsync
- if (not Spring.GetMapOptions) then
- Spring.GetMapOptions = function() return {} end
- end
- function tobool(val)
- local t = type(val)
- if (t == 'nil') then
- return false
- elseif (t == 'boolean') then
- return val
- elseif (t == 'number') then
- return (val ~= 0)
- elseif (t == 'string') then
- return ((val ~= '0') and (val ~= 'false'))
- end
- return false
- end
- getfenv()["mapinfo"] = mapinfo
- local files = VFS.DirList("mapconfig/mapinfo/", "*.lua")
- table.sort(files)
- for i=1,#files do
- local newcfg = VFS.Include(files[i])
- if newcfg then
- lowerkeys(newcfg)
- tmerge(mapinfo, newcfg)
- end
- end
- getfenv()["mapinfo"] = nil
- end
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
- return mapinfo
- --------------------------------------------------------------------------------
- --------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement