EnvironmentalDesignMasks (EDM) is a mod for HBS's Battletech computer game. It allows mod makers to create custom weather and Moods, and apply these to contracts in game. This is an extremely powerful visual tool - Moods have extensive control on how the game renders, and can drastically alter the feel of a map.
In settings.json
, it is recommended to set trace: false
when distributing to users. The trace logging level is extremely useful for modpack developers, but redundant and not very useful in bug reports. Leaving debug: true
is recommended, as it contains information useful for diagnosing any issues users may encounter.
EDM allows DesignMasks to define a new field, additionalStickyEffects
, which is an array of status effects to apply in addition to the normal stickyEffect
. If stickyEffect
is not defined, they will be ignored. Always use stickyEffect
first.
See the included designmasks/DesignMaskVerdantDayWindy.json
for a usage example.
EDM overrides the basegame logic for how Moods are selected. When generating a contract, EDM first assembles a list of all potential Moods, then draws one from the hat. This is done in two steps.
- If the contract specifies a
mapMood
, this will be used, bypassing all other steps. - If the biome exists in
biomeMoods
, then each Mood is added to the list a number of times equal to its values. - For each system tag that the current star system matches in
biomeMoodBySystemTag
, additional tags will be added, as above. - An entry is randomly selected.
For example, consider the following settings:
{
"biomeMoods": {
"highlandsFall": {
"VerdantAfternoonFoggy": 1,
"BoulderFieldMood": 2,
}
},
"biomeMoodBySystemTag": {
"planet_other_taintedair": {
"highlandsFall": {
"RedFog": 3
}
}
}
}
We'll select a Mood for a contract with the highlandsFall
biome.
- We start with a list with three items:
[VerdantAfternoonFoggy, BoulderFieldMood, BoulderFieldMood]
. - If the player is currently at a star system with the
planet_other_taintedair
tag, then we'll add three more items:[RedFog, RedFog, RedFog]
- From our list of 6 items (one FoggyAfternoon, two BoulderFields, three RedFogs), one is now selected at random.
For skirmish battles, the player selects a mood from the dropdown. This dropdown is populated with the appropriate basegame Moods, and then also any Custom Moods (see below) whose moodTags
contain the appropriate biome.
EDM also supports the creation of custom moods (such as RedFog in the example above) by adding JSON documents to the customMoods
folder.
It is highly recommended to use the builtin debug server, which lets you modify moods on the fly and test out your settings without restarting the game. As long as it's enabled (debugServer: true
in settings.json
), you can access it any time Battletech is running by visiting http://localhost:3062.
Use the dropdown on the left to view data about existing Moods - both builtin and Custom Moods loaded from json. Then drop into a contract (skirmish or career) and use the text entry on the right + the apply mood button to see your modifications live in game.
Only two fields are required:
ID
: A human readable name for the mood. Must be globally unique. This may be visible when selecting the mood for a skirmish, but is otherwise not used in the UI.baseMood
: The ID of the mood this one inherets from. Any optional properties not defined will be copied from the baseMood into this one. This can be either any mood from the base game (see the log file after loading into the game for a list), or another custom Mood already loaded.- Custom Moods are loaded alphabetically, which means
moodZ
can havemoodA
as a baseMood, but not vis versa.
- Custom Moods are loaded alphabetically, which means
All other fields are optional:
designMask
: The name of a design mask to apply when this custom mood applies. It replaces the basic biome design mask (which provides reduced heatsinking in deserts and lunar environments, for example).- If this DesignMask has a
stickyEffect
(and maybe alsoadditionalStickyEffects
), these effects are reapplied every turn, duringOnActivationBegin
. It usually makes sense to use"durationData": {"duration": -1, "stackLimit": 1}
for sticky effects applied by biomes
- If this DesignMask has a
startMission
: An array of dialogues to show on mission start (after other mission start dialogue, at the same time as pilot chatter). Interpolation works. Format is the same as other places dialogue chunks are defined (such as in contracts):"startMission": [ { "words": "Everything is on fire. At least {TEAM_TAR.FactionDef.Demonym} are as screwed as you, {COMMANDER.Callsign}.", "wordsColor": {"r": 1, "g": 1, "b": 1}, "selectedCastDefId": "castDef_KameaDefault", "emote": "Default", "audioName": "NONE" } ]
moodTags
: A list of biomes for which this Mood can be selected in the Skirmish bay. These moodTags also control the lighting in the leopard/deployment screen as defined bybriefingCameraTimeTags
, and determine which biomes a mood will be visible for in the skirmish bay.sunXRotation
: A float (0 - 360) specifying where the sun appears in the sky.sunYRotation
: A float (0 - 360) specifying where the sun appears in the sky.
Colors are specified in the format {"r": 1, "g": 0.818, "b": 0.666}
, with an optional alpha value ("a"
).
illuminance
: floatangularDiameter
: floatuseTemperature
: boolcolorTemperature
: floatsunColor
: colorcloudCover
: floatcloudOpacity
: floatcloudSoftness
: intflareTint
: colorsunGIOverride
: boolsunGI
: floatsundiscColor
: colornightLights
: bool
windDirection
: floatwindMain
: floatwindPulseFrequency
: floatwindPulseMagnitude
: floatwindTurbulence
: floatweatherVFXName
: One of:vfxPrfPrtl_weatherCamRain
vfxPrfPrtl_weatherCamRain_drizzle
vfxPrfPrtl_weatherCamRain_storm
vfxPrfPrtl_weatherCamRain_heavy
vfxPrfPrtl_weatherCamRain_jungleMist
vfxPrfPrtl_weatherCamRain_jungleStorm
vfxPrfPrtl_weatherCamSnow_blizzard
vfxPrfPrtl_weatherCamSnow_calm
vfxPrfPrtl_weatherCamSnow_martian
vfxPrfPrtl_weatherCam_windstorm
vfxPrfPrtl_weatherCam_windstorm_martian
vfxPrfPrtl_weatherCam_allergySeason
weatherEffectIntensity
: float
rayleighMultiplier
: floatmieMultiplier
: floatozonePercent
: floatg
: floatskyTint
: ColormieTint
: ColorskyBoost
: ColorstarIntensity
: floatmartian
: boolskyGIIntensity
: floatreflectionIntensity
: float
fogTintColor
: ColorfogMieMultiplier
: floatfogRayleighMultiplier
: floatfogG
: floatheightFogStart
: floatheightFogDensity
: floatheightMieMultiplier
: floatheightRayleighMultiplier
: floatsurveyedMieMultiplier
: floatsurveyedIntensity
: floatrevealedMieMultiplier
: floatrevealedIntensity
: float
EV
: floattempPreset
: One of:Tungsten
Flourescent
Daylight
Cloudy
Shade
Custom
whiteBalanceTemp
: floatwhiteBalanceTint
: float
threshold
: floatsoftKnee
: floatbloomRadius
: floatbloomIntensity
: floatthresholdLinear
: floatbloomSmear
: One of:Off
Horizontal
Vertical
bloomFlareIntensity
: floatbloomFlareColors
: A list of exactly 10 colors. No more, no less.
brightness
: floatcontrast
: floatsaturation
: float
streakMode
: One of:None
Horizontal
Vertical
HorizAndVert
The lighting/time of day shown during the deployment screen is randomly chosen by default. EDM now allows you to control the lighting profile and match it to the appropriate moodTags for the current contract. EDM ships with appropriate default settings, but mod authors may wish to tweak them.
EDM looks at the chosen mood's moodTags
, comparing them in order to briefingCameraTimeTags
. The first matching tag is used, and a lighting profile randomly selected from that list.
e.g for the following in settings.json:
"briefingCameraTimeTags": {
"mood_timeMorning": [0, 1],
"mood_timeSunset": [0, 1, 3 ],
"mood_timeAfternoon": [2, 4],
"mood_timeNoon": [2, 4],
"mood_timeDay": [0, 1, 2, 4],
"mood_timeNight": [3]
}
If a contract mood contains moodTag mood_timeMorning
AND mood_timeDay
, the lighting would choose between 0 and 1 and NOT between 0, 1, 2, 4. The lighting profiles are always controlled by the same integer index value. Available lighting is as as follows: