# Buggy code
def generate_modifiers(full_data_set, pregen_converter_group):
    """
    Generate standard modifiers.

    :param full_data_set: GenieObjectContainer instance that
                          contains all relevant data for the conversion
                          process.
    :type full_data_set: ...dataformat.aoc.genie_object_container.GenieObjectContainer
    :param pregen_converter_group: GenieObjectGroup instance that stores
                                   pregenerated API objects for referencing with
                                   ForwardRef
    :type pregen_converter_group: ...dataformat.aoc.genie_object_container.GenieObjectGroup
    """
    pregen_nyan_objects = full_data_set.pregen_nyan_objects
    api_objects = full_data_set.nyan_api_objects

    modifier_parent = "engine.modifier.multiplier.MultiplierModifier"
    type_parent = "engine.modifier.multiplier.effect.flat_attribute_change.type.Flyover"
    types_location = "data/aux/modifier/flyover_cliff"

    # =======================================================================
    # Flyover effect multiplier
    # =======================================================================
    modifier_ref_in_modpack = "aux.modifier.flyover_cliff.AttackMultiplierFlyover"
    modifier_raw_api_object = RawAPIObject(
        modifier_ref_in_modpack, "AttackMultiplierFlyover", api_objects, types_location
    )
    modifier_raw_api_object.set_filename("flyover_cliff")
    modifier_raw_api_object.add_raw_parent(type_parent)

    pregen_converter_group.add_raw_api_object(modifier_raw_api_object)
    pregen_nyan_objects.update({modifier_ref_in_modpack: modifier_raw_api_object})

    # Increases effect value by 25%
    modifier_raw_api_object.add_raw_member("multiplier", 1.25, modifier_parent)

    # Relative angle to cliff must not be larger than 90°
    modifier_raw_api_object.add_raw_member("relative_angle", 90, type_parent)

    # Affects all cliffs
    types = [ForwardRef(pregen_converter_group, "aux.game_entity_type.types.Cliff")]
    modifier_raw_api_object.add_raw_member("flyover_types", types, type_parent)
    modifier_raw_api_object.add_raw_member("blacklisted_entities", [], type_parent)

    # =======================================================================
    # Elevation difference effect multiplier (higher unit)
    # =======================================================================
    modifier_parent = "engine.modifier.multiplier.MultiplierModifier"
    type_parent = "engine.modifier.multiplier.effect.flat_attribute_change.type.ElevationDifferenceHigh"
    types_location = "data/aux/modifier/elevation_difference"

    modifier_ref_in_modpack = "aux.modifier.elevation_difference.AttackMultiplierHigh"
    modifier_raw_api_object = RawAPIObject(
        modifier_ref_in_modpack, "AttackMultiplierHigh", api_objects, types_location
    )
    modifier_raw_api_object.set_filename("elevation_difference")
    modifier_raw_api_object.add_raw_parent(type_parent)

    pregen_converter_group.add_raw_api_object(modifier_raw_api_object)
    pregen_nyan_objects.update({modifier_ref_in_modpack: modifier_raw_api_object})

    # Increases effect value to 125%
    modifier_raw_api_object.add_raw_member("multiplier", 1.25, modifier_parent)

    # Min elevation difference is not set

    # =======================================================================
    # Elevation difference effect multiplier (lower unit)
    # =======================================================================
    modifier_parent = "engine.modifier.multiplier.MultiplierModifier"
    type_parent = "engine.modifier.multiplier.effect.flat_attribute_change.type.ElevationDifferenceLow"
    types_location = "data/aux/modifier/elevation_difference"

    modifier_ref_in_modpack = "aux.modifier.elevation_difference.AttackMultiplierLow"
    modifier_raw_api_object = RawAPIObject(
        modifier_ref_in_modpack, "AttackMultiplierLow", api_objects, types_location
    )
    modifier_raw_api_object.set_filename("elevation_difference")
    modifier_raw_api_object.add_raw_parent(type_parent)

    pregen_converter_group.add_raw_api_object(modifier_raw_api_object)
    pregen_nyan_objects.update({modifier_ref_in_modpack: modifier_raw_api_object})

    # Decreases effect value to 75%
    modifier_raw_api_object.add_raw_member("multiplier", 0.75, modifier_parent)


# Traceback (KeyError)
INFO [py] launching openage v0.4.1-377-g2be30ba76
INFO [py] compiled by GNU 10.2.0
Do you want to convert assets? [Y/n]
Y
Should we call wine to determine an AOE installation? [Y/n]
n
Could not find any installation directory automatically.
Please enter an AOE2 install path manually.
/home/schatzi/nvme/Steam/steamapps/common/AoE2DE/
converting from '/home/schatzi/nvme/Steam/steamapps/common/AoE2DE'
INFO [py] Game edition detected:
INFO [py]  * Age of Empires 2: Definitive Edition
INFO [py] converting metadata
INFO [py] [0] palette
INFO [py] [1] empires.dat
INFO [py] Starting conversion...
INFO [py] Extracting Genie data...
INFO [py] Creating API-like objects...
INFO [py] Linking API-like objects...
INFO [py] Generating auxiliary objects...
INFO [py] Creating nyan objects...
Traceback (most recent call last):
File "/usr/bin/openage", line 15, in <module>
main()
File "/usr/lib/python3.9/site-packages/openage/__main__.py", line 132, in main
return args.entrypoint(args, cli.error)
File "/usr/lib/python3.9/site-packages/openage/game/main.py", line 71, in main
used_asset_path = convert_assets(
File "/usr/lib/python3.9/site-packages/openage/convert/main.py", line 100, in convert_assets
for current_item in convert(args):
File "/usr/lib/python3.9/site-packages/openage/convert/tool/driver.py", line 48, in convert
yield from convert_metadata(args)
File "/usr/lib/python3.9/site-packages/openage/convert/tool/driver.py", line 96, in convert_metadata
modpacks = args.converter.convert(gamespec,
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/processor.py", line 63, in convert
modpacks = cls._post_processor(dataset)
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/processor.py", line 153, in _post_processor
DE2NyanSubprocessor.convert(full_data_set)
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/nyan_subprocessor.py", line 38, in convert
cls._process_game_entities(gamedata)
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/nyan_subprocessor.py", line 120, in _process_game_entities
cls.tech_group_to_tech(tech_group)
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/nyan_subprocessor.py", line 596, in tech_group_to_tech
patches.extend(DE2TechSubprocessor.get_patches(tech_group))
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/tech_subprocessor.py", line 147, in get_patches
patches.extend(cls.resource_modify_effect(converter_group,
File "/usr/lib/python3.9/site-packages/openage/convert/processor/conversion/de2/tech_subprocessor.py", line 276, in resource_modify_effect
upgrade_func = DE2TechSubprocessor.upgrade_resource_funcs[resource_id]
KeyError:  208

# Fixed code
def generate_modifiers(full_data_set, pregen_converter_group):
    """
    Generate standard modifiers.

    :param full_data_set: GenieObjectContainer instance that
                          contains all relevant data for the conversion
                          process.
    :type full_data_set: ...dataformat.aoc.genie_object_container.GenieObjectContainer
    :param pregen_converter_group: GenieObjectGroup instance that stores
                                   pregenerated API objects for referencing with
                                   ForwardRef
    :type pregen_converter_group: ...dataformat.aoc.genie_object_container.GenieObjectGroup
    """
    pregen_nyan_objects = full_data_set.pregen_nyan_objects
    api_objects = full_data_set.nyan_api_objects

    modifier_parent = "engine.modifier.multiplier.MultiplierModifier"
    type_parent = "engine.modifier.multiplier.effect.flat_attribute_change.type.Flyover"
    types_location = "data/aux/modifier/flyover_cliff/"

    # =======================================================================
    # Flyover effect multiplier
    # =======================================================================
    modifier_ref_in_modpack = "aux.modifier.flyover_cliff.AttackMultiplierFlyover"
    modifier_raw_api_object = RawAPIObject(
        modifier_ref_in_modpack, "AttackMultiplierFlyover", api_objects, types_location
    )
    modifier_raw_api_object.set_filename("flyover_cliff")
    modifier_raw_api_object.add_raw_parent(type_parent)

    pregen_converter_group.add_raw_api_object(modifier_raw_api_object)
    pregen_nyan_objects.update({modifier_ref_in_modpack: modifier_raw_api_object})

    # Increases effect value by 25%
    modifier_raw_api_object.add_raw_member("multiplier", 1.25, modifier_parent)

    # Relative angle to cliff must not be larger than 90°
    modifier_raw_api_object.add_raw_member("relative_angle", 90, type_parent)

    # Affects all cliffs
    types = [ForwardRef(pregen_converter_group, "aux.game_entity_type.types.Cliff")]
    modifier_raw_api_object.add_raw_member("flyover_types", types, type_parent)
    modifier_raw_api_object.add_raw_member("blacklisted_entities", [], type_parent)

    # =======================================================================
    # Elevation difference effect multiplier (higher unit)
    # =======================================================================
    modifier_parent = "engine.modifier.multiplier.MultiplierModifier"
    type_parent = "engine.modifier.multiplier.effect.flat_attribute_change.type.ElevationDifferenceHigh"
    types_location = "data/aux/modifier/elevation_difference/"

    modifier_ref_in_modpack = "aux.modifier.elevation_difference.AttackMultiplierHigh"
    modifier_raw_api_object = RawAPIObject(
        modifier_ref_in_modpack, "AttackMultiplierHigh", api_objects, types_location
    )
    modifier_raw_api_object.set_filename("elevation_difference")
    modifier_raw_api_object.add_raw_parent(type_parent)

    pregen_converter_group.add_raw_api_object(modifier_raw_api_object)
    pregen_nyan_objects.update({modifier_ref_in_modpack: modifier_raw_api_object})

    # Increases effect value to 125%
    modifier_raw_api_object.add_raw_member("multiplier", 1.25, modifier_parent)

    # Min elevation difference is not set

    # =======================================================================
    # Elevation difference effect multiplier (lower unit)
    # =======================================================================
    modifier_parent = "engine.modifier.multiplier.MultiplierModifier"
    type_parent = "engine.modifier.multiplier.effect.flat_attribute_change.type.ElevationDifferenceLow"
    types_location = "data/aux/modifier/elevation_difference/"

    modifier_ref_in_modpack = "aux.modifier.elevation_difference.AttackMultiplierLow"
    modifier_raw_api_object = RawAPIObject(
        modifier_ref_in_modpack, "AttackMultiplierLow", api_objects, types_location
    )
    modifier_raw_api_object.set_filename("elevation_difference")
    modifier_raw_api_object.add_raw_parent(type_parent)

    pregen_converter_group.add_raw_api_object(modifier_raw_api_object)
    pregen_nyan_objects.update({modifier_ref_in_modpack: modifier_raw_api_object})

    # Decreases effect value to 75%
    modifier_raw_api_object.add_raw_member("multiplier", 0.75, modifier_parent)