|
|
|
@ -104,6 +104,9 @@ palworld:
|
|
|
|
|
enabled: true
|
|
|
|
|
interval: 120
|
|
|
|
|
to_keep: 12
|
|
|
|
|
rcon:
|
|
|
|
|
enabled: true
|
|
|
|
|
timeout: 10s
|
|
|
|
|
|
|
|
|
|
workload:
|
|
|
|
|
main:
|
|
|
|
@ -135,10 +138,17 @@ workload:
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
set_ini_value() {
|
|
|
|
|
set_ini() {
|
|
|
|
|
local key="${1}"
|
|
|
|
|
local value="${2}"
|
|
|
|
|
local quote_flag="${3:-}"
|
|
|
|
|
local flags="" # Initialize an empty string for flags
|
|
|
|
|
|
|
|
|
|
# Loop through arguments starting from the third one
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
|
if [ "$arg" != "$key" ] && [ "$arg" != "$value" ]; then
|
|
|
|
|
flags="$flags $arg" # Append each flag to the flags string
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Check if the key exists in the OptionSettings section
|
|
|
|
|
if ! grep -q 'OptionSettings=(' "$cfgFile"; then
|
|
|
|
@ -152,10 +162,26 @@ workload:
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Add quotes around the value if quote_flag is set
|
|
|
|
|
if [ "$quote_flag" = "-q" ]; then
|
|
|
|
|
value="\"$value\""
|
|
|
|
|
fi
|
|
|
|
|
# Iterate over flags
|
|
|
|
|
for flag in $flags; do
|
|
|
|
|
case $flag in
|
|
|
|
|
-q)
|
|
|
|
|
# Add quotes around the value
|
|
|
|
|
value="\"$value\""
|
|
|
|
|
;;
|
|
|
|
|
-b)
|
|
|
|
|
# Handle boolean flag
|
|
|
|
|
if [ "$(echo "$value" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
|
|
|
|
|
value="True"
|
|
|
|
|
else
|
|
|
|
|
value="False"
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
echo "Unknown flag: $flag. Skipping..."
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Update the value within the OptionSettings section
|
|
|
|
|
sed -i "/OptionSettings=(/ {
|
|
|
|
@ -177,76 +203,81 @@ workload:
|
|
|
|
|
|
|
|
|
|
echo "the following options are updating...."
|
|
|
|
|
|
|
|
|
|
set_ini_value "RCONEnabled" "True" -q
|
|
|
|
|
set_ini_value "RCONPort" "{{ .Values.service.rcon.ports.rcon.port }}" -q
|
|
|
|
|
set_ini_value "PublicPort" "{{ .Values.service.main.ports.main.port }}" -q
|
|
|
|
|
set_ini "RCONEnabled" "True" -b
|
|
|
|
|
|
|
|
|
|
set_ini_value "ServerPassword" '{{ .Values.palworld.game.password }}' -q
|
|
|
|
|
set_ini_value "AdminPassword" '{{ .Values.palworld.game.admin_password }}' -q
|
|
|
|
|
set_ini "RCONPort" "{{ .Values.service.rcon.ports.rcon.port }}"
|
|
|
|
|
set_ini "PublicPort" "{{ .Values.service.main.ports.main.port }}"
|
|
|
|
|
|
|
|
|
|
set_ini_value "ServerName" '{{ .Values.palworld.game.name }}' -q
|
|
|
|
|
set_ini_value "ServerDescription" '{{ .Values.palworld.game.description }}' -q
|
|
|
|
|
set_ini_value "Difficulty" "{{ .Values.palworld.game.difficulty }}" -q
|
|
|
|
|
set_ini_value "DeathPenalty" "{{ .Values.palworld.game.death_penalty }}" -q
|
|
|
|
|
set_ini_value "Region" "{{ .Values.palworld.game.region }}" -q
|
|
|
|
|
set_ini "ServerPassword" '{{ .Values.palworld.game.password }}' -q
|
|
|
|
|
set_ini "AdminPassword" '{{ .Values.palworld.game.admin_password }}' -q
|
|
|
|
|
|
|
|
|
|
set_ini_value "AutoResetGuildTimeNoOnlinePlayers" "{{ .Values.palworld.game.auto_reset_guild_time_no_online_players }}"
|
|
|
|
|
set_ini_value "BaseCampMaxNum" "{{ .Values.palworld.game.base_camp_max }}"
|
|
|
|
|
set_ini_value "BaseCampWorkerMaxNum" "{{ .Values.palworld.game.base_camp_worker_max }}"
|
|
|
|
|
set_ini_value "BanListURL" "{{ .Values.palworld.game.ban_list_url }}" -q
|
|
|
|
|
set_ini_value "BuildObjectDamageRate" "{{ .Values.palworld.game.build_object_damage_rate }}"
|
|
|
|
|
set_ini_value "BuildObjectDeteriorationDamageRate" "{{ .Values.palworld.game.build_object_deterioration_damage_rate }}"
|
|
|
|
|
set_ini_value "bCanPickupOtherGuildDeathPenaltyDrop" "{{ .Values.palworld.game.can_pickup_other_guild_death_penalty_drop }}" -q
|
|
|
|
|
set_ini_value "bUseAuth" "{{ .Values.palworld.game.use_auth }}" -q
|
|
|
|
|
set_ini_value "bEnablePlayerToPlayerDamage" "{{ .Values.palworld.game.enable_pvp_damage }}" -q
|
|
|
|
|
set_ini_value "bEnableFriendlyFire" "{{ .Values.palworld.game.enable_friendly_fire }}" -q
|
|
|
|
|
set_ini_value "bEnableInvaderEnemy" "{{ .Values.palworld.game.enable_invader_enemy }}" -q
|
|
|
|
|
set_ini_value "bEnableAimAssistPad" "{{ .Values.palworld.game.enable_aim_assist_pad }}" -q
|
|
|
|
|
set_ini_value "bEnableAimAssistKeyboard" "{{ .Values.palworld.game.enable_aim_assist_kb }}" -q
|
|
|
|
|
set_ini_value "bEnableNonLoginPenalty" "{{ .Values.palworld.game.enable_non_login_penalty }}" -q
|
|
|
|
|
set_ini_value "bEnableFastTravel" "{{ .Values.palworld.game.enable_fast_travel }}" -q
|
|
|
|
|
set_ini_value "bEnableDefenseOtherGuildPlayer" "{{ .Values.palworld.game.enable_defense_other_guild_player }}" -q
|
|
|
|
|
set_ini_value "bIsMultiplay" "{{ .Values.palworld.game.is_multiplay }}" -q
|
|
|
|
|
set_ini_value "bIsStartLocationSelectByMap" "{{ .Values.palworld.game.is_start_location_select_by_map }}" -q
|
|
|
|
|
set_ini_value "bIsPvP" "{{ .Values.palworld.game.is_pvp }}" -q
|
|
|
|
|
set_ini_value "bExistPlayerAfterLogout" "{{ .Values.palworld.game.exist_players_after_logout }}" -q
|
|
|
|
|
set_ini_value "bActiveUNKO" "{{ .Values.palworld.game.active_unko }}" -q
|
|
|
|
|
set_ini_value "bAutoResetGuildNoOnlinePlayers" "{{ .Values.palworld.game.guild_auto_reset_no_online_players }}" -q
|
|
|
|
|
set_ini_value "CollectionDropRate" "{{ .Values.palworld.game.collection_drop_rate }}"
|
|
|
|
|
set_ini_value "CollectionObjectHpRate" "{{ .Values.palworld.game.collection_object_hp_rate }}"
|
|
|
|
|
set_ini_value "CollectionObjectRespawnSpeedRate" "{{ .Values.palworld.game.collection_object_respawn_speed_rate }}"
|
|
|
|
|
set_ini_value "CoopPlayerMaxNum" "{{ .Values.palworld.game.max_players_coop }}"
|
|
|
|
|
set_ini_value "DayTimeSpeedRate" "{{ .Values.palworld.game.day_time_speed_rate }}"
|
|
|
|
|
set_ini_value "DropItemMaxNum" "{{ .Values.palworld.game.drop_item_max }}"
|
|
|
|
|
set_ini_value "DropItemMaxNum_UNKO" "{{ .Values.palworld.game.drop_item_max_unko }}"
|
|
|
|
|
set_ini_value "DropItemAliveMaxHours" "{{ .Values.palworld.game.drop_item_alive_max_hours }}"
|
|
|
|
|
set_ini_value "EnemyDropItemRate" "{{ .Values.palworld.game.enemy_drop_item_rate }}"
|
|
|
|
|
set_ini_value "GuildPlayerMaxNum" "{{ .Values.palworld.game.max_players_guild }}"
|
|
|
|
|
set_ini_value "NightTimeSpeedRate" "{{ .Values.palworld.game.night_time_speed_rate }}"
|
|
|
|
|
set_ini_value "PalCaptureRate" "{{ .Values.palworld.game.pal_capture_rate }}"
|
|
|
|
|
set_ini_value "PalEggDefaultHatchingTime" "{{ .Values.palworld.game.pal_egg_default_hatching_time }}"
|
|
|
|
|
set_ini_value "PalSpawnNumRate" "{{ .Values.palworld.game.pal_spawn_num_rate }}"
|
|
|
|
|
set_ini_value "PalDamageRateAttack" "{{ .Values.palworld.game.pal_damage_rate_attack }}"
|
|
|
|
|
set_ini_value "PalDamageRateDefense" "{{ .Values.palworld.game.pal_damage_rate_defense }}"
|
|
|
|
|
set_ini_value "PlayerDamageRateAttack" "{{ .Values.palworld.game.player_damage_rate_attack }}"
|
|
|
|
|
set_ini_value "PlayerDamageRateDefense" "{{ .Values.palworld.game.player_damage_rate_defense }}"
|
|
|
|
|
set_ini_value "PlayerStomachDecreaceRate" "{{ .Values.palworld.game.player_stomach_decreace_rate }}"
|
|
|
|
|
set_ini_value "PlayerStaminaDecreaceRate" "{{ .Values.palworld.game.player_stamina_decreace_rate }}"
|
|
|
|
|
set_ini_value "PlayerAutoHPRegeneRate" "{{ .Values.palworld.game.player_auto_hp_regene_rate }}"
|
|
|
|
|
set_ini_value "PlayerAutoHpRegeneRateInSleep" "{{ .Values.palworld.game.player_auto_hp_regene_rate_in_sleep }}"
|
|
|
|
|
set_ini_value "PalStomachDecreaceRate" "{{ .Values.palworld.game.pal_stomach_decreace_rate }}"
|
|
|
|
|
set_ini_value "PalStaminaDecreaceRate" "{{ .Values.palworld.game.pal_stamina_decreace_rate }}"
|
|
|
|
|
set_ini_value "PalAutoHPRegeneRate" "{{ .Values.palworld.game.pal_auto_hp_regene_rate }}"
|
|
|
|
|
set_ini_value "PalAutoHpRegeneRateInSleep" "{{ .Values.palworld.game.pal_auto_hp_regene_rate_in_sleep }}"
|
|
|
|
|
set_ini_value "ServerPlayerMaxNum" "{{ .Values.palworld.game.max_players }}"
|
|
|
|
|
set_ini_value "WorkSpeedRate" "{{ .Values.palworld.game.work_speed_rate }}"
|
|
|
|
|
set_ini_value "ExpRate" "{{ .Values.palworld.game.exp_rate }}"
|
|
|
|
|
set_ini "ServerName" '{{ .Values.palworld.game.name }}' -q
|
|
|
|
|
set_ini "ServerDescription" '{{ .Values.palworld.game.description }}' -q
|
|
|
|
|
set_ini "Difficulty" "{{ .Values.palworld.game.difficulty }}" -q
|
|
|
|
|
set_ini "DeathPenalty" "{{ .Values.palworld.game.death_penalty }}" -q
|
|
|
|
|
set_ini "Region" "{{ .Values.palworld.game.region }}" -q
|
|
|
|
|
|
|
|
|
|
set_ini "AutoResetGuildTimeNoOnlinePlayers" "{{ .Values.palworld.game.auto_reset_guild_time_no_online_players }}"
|
|
|
|
|
set_ini "BaseCampMaxNum" "{{ .Values.palworld.game.base_camp_max }}"
|
|
|
|
|
set_ini "BaseCampWorkerMaxNum" "{{ .Values.palworld.game.base_camp_worker_max }}"
|
|
|
|
|
set_ini "BanListURL" "{{ .Values.palworld.game.ban_list_url }}" -q
|
|
|
|
|
set_ini "BuildObjectDamageRate" "{{ .Values.palworld.game.build_object_damage_rate }}"
|
|
|
|
|
set_ini "BuildObjectDeteriorationDamageRate" "{{ .Values.palworld.game.build_object_deterioration_damage_rate }}"
|
|
|
|
|
|
|
|
|
|
set_ini "bCanPickupOtherGuildDeathPenaltyDrop" "{{ .Values.palworld.game.can_pickup_other_guild_death_penalty_drop }}" -b
|
|
|
|
|
set_ini "bUseAuth" "{{ .Values.palworld.game.use_auth }}" -b
|
|
|
|
|
set_ini "bEnablePlayerToPlayerDamage" "{{ .Values.palworld.game.enable_pvp_damage }}" -b
|
|
|
|
|
set_ini "bEnableFriendlyFire" "{{ .Values.palworld.game.enable_friendly_fire }}" -b
|
|
|
|
|
set_ini "bEnableInvaderEnemy" "{{ .Values.palworld.game.enable_invader_enemy }}" -b
|
|
|
|
|
set_ini "bEnableAimAssistPad" "{{ .Values.palworld.game.enable_aim_assist_pad }}" -b
|
|
|
|
|
set_ini "bEnableAimAssistKeyboard" "{{ .Values.palworld.game.enable_aim_assist_kb }}" -b
|
|
|
|
|
set_ini "bEnableNonLoginPenalty" "{{ .Values.palworld.game.enable_non_login_penalty }}" -b
|
|
|
|
|
set_ini "bEnableFastTravel" "{{ .Values.palworld.game.enable_fast_travel }}" -b
|
|
|
|
|
set_ini "bEnableDefenseOtherGuildPlayer" "{{ .Values.palworld.game.enable_defense_other_guild_player }}" -b
|
|
|
|
|
set_ini "bIsMultiplay" "{{ .Values.palworld.game.is_multiplay }}" -b
|
|
|
|
|
set_ini "bIsStartLocationSelectByMap" "{{ .Values.palworld.game.is_start_location_select_by_map }}" -b
|
|
|
|
|
set_ini "bIsPvP" "{{ .Values.palworld.game.is_pvp }}" -b
|
|
|
|
|
set_ini "bExistPlayerAfterLogout" "{{ .Values.palworld.game.exist_players_after_logout }}" -b
|
|
|
|
|
set_ini "bActiveUNKO" "{{ .Values.palworld.game.active_unko }}" -b
|
|
|
|
|
set_ini "bAutoResetGuildNoOnlinePlayers" "{{ .Values.palworld.game.guild_auto_reset_no_online_players }}" -b
|
|
|
|
|
|
|
|
|
|
set_ini "CollectionDropRate" "{{ .Values.palworld.game.collection_drop_rate }}"
|
|
|
|
|
set_ini "CollectionObjectHpRate" "{{ .Values.palworld.game.collection_object_hp_rate }}"
|
|
|
|
|
set_ini "CollectionObjectRespawnSpeedRate" "{{ .Values.palworld.game.collection_object_respawn_speed_rate }}"
|
|
|
|
|
set_ini "CoopPlayerMaxNum" "{{ .Values.palworld.game.max_players_coop }}"
|
|
|
|
|
set_ini "DayTimeSpeedRate" "{{ .Values.palworld.game.day_time_speed_rate }}"
|
|
|
|
|
set_ini "DropItemMaxNum" "{{ .Values.palworld.game.drop_item_max }}"
|
|
|
|
|
set_ini "DropItemMaxNum_UNKO" "{{ .Values.palworld.game.drop_item_max_unko }}"
|
|
|
|
|
set_ini "DropItemAliveMaxHours" "{{ .Values.palworld.game.drop_item_alive_max_hours }}"
|
|
|
|
|
set_ini "EnemyDropItemRate" "{{ .Values.palworld.game.enemy_drop_item_rate }}"
|
|
|
|
|
set_ini "GuildPlayerMaxNum" "{{ .Values.palworld.game.max_players_guild }}"
|
|
|
|
|
set_ini "NightTimeSpeedRate" "{{ .Values.palworld.game.night_time_speed_rate }}"
|
|
|
|
|
set_ini "PalCaptureRate" "{{ .Values.palworld.game.pal_capture_rate }}"
|
|
|
|
|
set_ini "PalEggDefaultHatchingTime" "{{ .Values.palworld.game.pal_egg_default_hatching_time }}"
|
|
|
|
|
set_ini "PalSpawnNumRate" "{{ .Values.palworld.game.pal_spawn_num_rate }}"
|
|
|
|
|
set_ini "PalDamageRateAttack" "{{ .Values.palworld.game.pal_damage_rate_attack }}"
|
|
|
|
|
set_ini "PalDamageRateDefense" "{{ .Values.palworld.game.pal_damage_rate_defense }}"
|
|
|
|
|
set_ini "PlayerDamageRateAttack" "{{ .Values.palworld.game.player_damage_rate_attack }}"
|
|
|
|
|
set_ini "PlayerDamageRateDefense" "{{ .Values.palworld.game.player_damage_rate_defense }}"
|
|
|
|
|
set_ini "PlayerStomachDecreaceRate" "{{ .Values.palworld.game.player_stomach_decreace_rate }}"
|
|
|
|
|
set_ini "PlayerStaminaDecreaceRate" "{{ .Values.palworld.game.player_stamina_decreace_rate }}"
|
|
|
|
|
set_ini "PlayerAutoHPRegeneRate" "{{ .Values.palworld.game.player_auto_hp_regene_rate }}"
|
|
|
|
|
set_ini "PlayerAutoHpRegeneRateInSleep" "{{ .Values.palworld.game.player_auto_hp_regene_rate_in_sleep }}"
|
|
|
|
|
set_ini "PalStomachDecreaceRate" "{{ .Values.palworld.game.pal_stomach_decreace_rate }}"
|
|
|
|
|
set_ini "PalStaminaDecreaceRate" "{{ .Values.palworld.game.pal_stamina_decreace_rate }}"
|
|
|
|
|
set_ini "PalAutoHPRegeneRate" "{{ .Values.palworld.game.pal_auto_hp_regene_rate }}"
|
|
|
|
|
set_ini "PalAutoHpRegeneRateInSleep" "{{ .Values.palworld.game.pal_auto_hp_regene_rate_in_sleep }}"
|
|
|
|
|
set_ini "ServerPlayerMaxNum" "{{ .Values.palworld.game.max_players }}"
|
|
|
|
|
set_ini "WorkSpeedRate" "{{ .Values.palworld.game.work_speed_rate }}"
|
|
|
|
|
set_ini "ExpRate" "{{ .Values.palworld.game.exp_rate }}"
|
|
|
|
|
|
|
|
|
|
# Check if update_public_ip is not true
|
|
|
|
|
if [ "${update_public_ip}" != "true" ]; then
|
|
|
|
|
set_ini_value "PublicIP" "{{ .Values.palworld.game.public_ip }}" -q
|
|
|
|
|
set_ini "PublicIP" "{{ .Values.palworld.game.public_ip }}" -q
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Done!"
|
|
|
|
|
|
|
|
|
|
containers:
|
|
|
|
|
main:
|
|
|
|
|
probes:
|
|
|
|
@ -320,6 +351,7 @@ persistence:
|
|
|
|
|
mountPath: /rcon.yaml
|
|
|
|
|
subPath: rcon.yaml
|
|
|
|
|
readOnly: true
|
|
|
|
|
|
|
|
|
|
portal:
|
|
|
|
|
open:
|
|
|
|
|
enabled: false
|