Doing a somewhat light (pre)release because of a breaking change, as I will not be available for a couple weeks. I don't anticipate any other breaking changes in the future, but can't guarantee that there won't be.
This introduces "Mission Variants" which allows for fairly good randomization of mission startup parameters without the need for code (or triggers in the future).
https://github.com/TechCor8/OP2MissionEditor/releases/tag/0.4.1EDIT:
v0.4.1 - Added difficulty settings for "Gaia" units. Changed difficulty to use additive-override settings the same way variants were working. The benefit is decreased mission file size, more manageable work flow, and the ability to manipulate beacons and wreckage based on difficulty.
Breaking ChangeMission format (.opm) has changed to support "Mission Variants" and "Player Difficulty". Backwards compatibility is not available for pre-release builds. Mission files are human readable, so you can manually upgrade if you wish by adding the appropriate attributes.
OverviewMission Variants and Player Difficulty are controlled through the new Mission Variants window found in the View menu. Mission Variants allow randomization at the start of a mission to help give it a bit of a unique flavor and prevent things from being too predictable. Player Difficulty settings affect starting resources and settings for single player and multiplayer games.
Mission VariantsVariants affect game settings such as daylight and music, as well as all units such as beacons, markers, wreckage, and all player settings and units. When the game starts, the master variant is always applied, and then a random variant is chosen to be applied as an additive override - the variant's units and resources are added, and non-countable settings like daylight and music override the master variant's settings.
Player DifficultyPlayer difficulties affect a specific player's morale, tech, and units (resources) based on their chosen difficulty level. The default player resources will be applied to all difficulties, and then the chosen difficulty's resources will be added on top of those resources. For example, if "all difficulties" is set to 500 food, and "easy" is set to 100, the player will receive 600 food for selecting easy difficulty. Settings such as morale are overridden by the difficulty's settings. If a mission does not contain a difficulty, only the default resources are given. In our example above, it would be 500 food.
In single player, all players use the local player's difficulty settings. This means that AI player resources can be adjusted based on the selected difficulty.
Beacons, markers, and wreckage (gaia units) are only affected by difficulty in single player. These follow the same rules as above based on the local player's difficulty selection. This is useful for controlling beacon placements and whether wreckage is visible in lower difficulties. In multiplayer, only default resources ("all difficulties") will be applied.
WorkflowBy default, you are working on the master variant with "all difficulties" selected. The recommended workflow is to set up all non-variant resources and units for "all difficulties". Then, you create easy mode and add resources and units. Finally, when creating normal and hard, you can duplicate easy mode and remove resources and units.
After the master variant is finished, you can create a new variant which contains duplicate settings and no resource or unit data. Because variants are applied additively to the master variant, you will only need to make changes specific to this variant, such as additional resources and different beacon or player start locations. When adding a variant while another variant is selected, you will duplicate that variant's data.
Player counts and difficulty levels must remain uniform across all variants (enforced), so be careful when deleting those values as you will lose that player or difficulty for all variants.
Changes:- Added Mission Variants and Player Difficulty settings.