static void patch_values(ExperienceMode inst, int idx)
    {
        inst.m_OutdoorTempDropDayStart         = xml_params[idx].temp_drop_day_start;
        inst.m_OutdoorTempDropDayFinal         = xml_params[idx].temp_drop_day_end;
        inst.m_OutdoorTempDropCelsiusMax       = xml_params[idx].temp_drop_celsius_max;
        inst.m_FatigueRateScale                = xml_params[idx].player_needs_fatigue_scale;
        inst.m_FreezingRateScale               = xml_params[idx].player_needs_cold_scale;
        inst.m_ThirstRateScale                 = xml_params[idx].player_needs_thirst_scale;
        inst.m_CalorieBurnScale                = xml_params[idx].player_needs_calories_burn_scale;
        inst.m_ConditonRecoveryFromRestScale   = xml_params[idx].player_recovery_rest_scale;
        inst.m_ConditonRecoveryWhileAwakeScale = xml_params[idx].player_recovery_awake_scale;
        inst.m_ChanceOfBlizzardScale           = xml_params[idx].weather_blizzard_chances_scale;
        inst.m_WeatherDurationScale            = xml_params[idx].weather_current_duration_scale;
        inst.m_DecayScale = xml_params[idx].objects_decay_rate_scale;
        inst.m_ReduceMaxItemsInContainer             = xml_params[idx].objects_containers_reduce_max;
        inst.m_ChanceForEmptyContainer               = xml_params[idx].objects_containers_empty_chance;
        inst.m_StrugglePlayerClothingDamageScale     = xml_params[idx].damage_scale_clothing;
        inst.m_StugglePlayerPercentLossFromBearScale = xml_params[idx].damage_scale_bear_attack;
        inst.m_StrugglePlayerDamageReceivedScale     = xml_params[idx].damage_scale_wolf_attack;
        inst.m_StruggleTapStrengthScale              = xml_params[idx].wolf_struggle_defense_strength_scale;
        inst.m_SmellRangeScale                     = xml_params[idx].predators_smell_distance_scale;
        inst.m_RespawnHoursScaleDayStart           = xml_params[idx].respawn_delay_scale_day_start;
        inst.m_RespawnHoursScaleDayFinal           = xml_params[idx].respawn_delay_scale_day_end;
        inst.m_RespawnHoursScaleMax                = xml_params[idx].respawn_delay_scale_max;
        inst.m_NumHoursWarmForHypothermiaCureScale = xml_params[idx].hypothermia_cure_delay_scale;
        inst.m_FishCatchTimeScaleDayStart          = xml_params[idx].fishing_catch_scale_day_start;
        inst.m_FishCatchTimeScaleDayFinal          = xml_params[idx].fishing_catch_scale_day_end;
        inst.m_FishCatchTimeScaleMax               = xml_params[idx].fishing_catch_scale_max;

        Debug.LogFormat("AdjustableDifficulty - Patched 26 values successfully for experience mode '{0}'.", get_exp_mode_name(idx));
    }
    static void Postfix(ExperienceMode __instance)
    {
        if (xml_initialized != 1)
        {
            if (!load_xmlfile_if_not_loaded())
            {
                Debug.LogFormat("AdjustableDifficulty - ERROR: unable to load XML file '{0}'; will do no adjustments as a result.", xml_file_name);
                return;
            }
            Debug.LogFormat("AdjustableDifficulty - Read XML configuration file '{0}' successfully.", xml_file_name);
            xml_initialized = 1;
        }

        if (__instance.m_ModeType == ExperienceModeType.Pilgrim) // Pilgrim.
        {
            patch_values(__instance, 0);
        }
        else if (__instance.m_ModeType == ExperienceModeType.Voyageur) // Voyageur.
        {
            patch_values(__instance, 1);
        }
        else if (__instance.m_ModeType == ExperienceModeType.Stalker) // Stalker.
        {
            patch_values(__instance, 2);
        }
        else if (__instance.m_ModeType == ExperienceModeType.Interloper) // Interloper.
        {
            patch_values(__instance, 3);
        }
    }
Beispiel #3
0
 public static void Prefix(ExperienceMode __instance)
 {
     __instance.m_ConditonRecoveryFromRestScale   = sleep;
     __instance.m_ConditonRecoveryWhileAwakeScale = awake;
 }
Beispiel #4
0
 public static void Prefix(ExperienceMode __instance)
 {
     __instance.m_OutdoorTempDropCelsiusMax = TempDropOptions.temp_drop_celsius_max;
 }