-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the ability to generate custom map configurations. Requires move
to Focal Fossa image due to requirements in the recent KF2 updates. Adds a game.yml file which customization of maps.
- Loading branch information
Showing
15 changed files
with
2,563 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
./kf2server | ||
./kf2_steamdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
kf2server | ||
kf2_steamdir | ||
docker-compose.yml | ||
game.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
- name: KF-Airship | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
playableInSurvival: false | ||
- name: KF-AshwoodAsylum | ||
playableInObjective: false | ||
- name: KF-Biolapse | ||
playableInEndless: false | ||
playableInObjective: false | ||
- name: KF-BioticsLab | ||
mapAssociation: 2 | ||
- name: KF-BlackForest | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-BurningParis | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-Catacombs | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-ContainmentStation | ||
playableInObjective: false | ||
- name: KF-Desolation | ||
playableInObjective: false | ||
- name: KF-DieSector | ||
mapAssociation: 2 | ||
playableInSurvival: false | ||
playableInWeekly: false | ||
playableInVsSurvival: false | ||
playableInObjective: false | ||
- name: KF-EvacuationPoint | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-Farmhouse | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-HostileGrounds | ||
playableInObjective: false | ||
- name: KF-InfernalRealm | ||
playableInObjective: false | ||
- name: KF-KrampusLair | ||
playableInObjective: false | ||
- name: KF-Lockdown | ||
playableInObjective: false | ||
- name: KF-MonsterBall | ||
mapAssociation: 2 | ||
platableInObjective: false | ||
- name: KF-Nightmare | ||
mapAssociation: 2 | ||
playableInVsSurvival: false | ||
playableInEndless: false | ||
- name: KF-Nuked | ||
- name: KF-Outpost | ||
mapAssociation: 2 | ||
- name: KF-PowerCore_Holdout | ||
playableInVsSurvival: false | ||
playableInEndless: false | ||
playableInObjective: false | ||
- name: KF-Prison | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-Sanitarium | ||
playableInObjective: false | ||
- name: KF-SantasWorkshop | ||
mapAssociation: 2 | ||
playableInVsSurvival: false | ||
playableInObjective: false | ||
- name: KF-ShoppingSpree | ||
playableInVsSurvival: false | ||
playableInObjective: false | ||
- name: KF-Spillway | ||
playableInObjective: false | ||
- name: KF-SteamFortress | ||
mapAssociation: 2 | ||
playableInVsSurvival: false | ||
- name: KF-TheDescent | ||
mapAssociation: 2 | ||
playableInVsSurvival: false | ||
playableInEndless: false | ||
- name: KF-TragicKingdom | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-VolterManor | ||
mapAssociation: 2 | ||
playableInObjective: false | ||
- name: KF-ZedLanding | ||
mapAssociation: 2 | ||
- name: KF-Default | ||
mapAssociation: 0 | ||
playableInSurvival: false | ||
playableInWeekly: false | ||
playableInVsSurvival: false | ||
playableInEndless: false | ||
playableInObjective: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Game | ||
attr_accessor :maplist | ||
|
||
def initialize(gamehash) | ||
@maplist = MapList.new(gamehash["maplist"]) | ||
end | ||
|
||
def renderGameConfig() | ||
template = File.read("LinuxServer-KFGame.ini.erb") | ||
return ERB.new(template).result(binding) | ||
end | ||
|
||
def renderEngineConfig() | ||
template = File.read("LinuxServer-KFEngine.ini.erb") | ||
return ERB.new(template).result(binding) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'erb' | ||
require 'yaml' | ||
|
||
require './Game.rb' | ||
require './Map.rb' | ||
require './MapList.rb' | ||
|
||
#Generate map list | ||
#Get the official map list then add any custom ones to the end of the array | ||
gameconfig = YAML.load(IO.read("/home/steam/game.yml")) | ||
maplist = YAML.load_file("DefaultMaps.yml") | ||
if gameconfig.key?("custommaps") | ||
if gameconfig["custommaps"] != [] | ||
puts "Found #{gameconfig["custommaps"].length} custom map configs" | ||
maplist.concat(gameconfig["custommaps"]) | ||
end | ||
end | ||
|
||
gamehash = { | ||
"maplist" => maplist | ||
} | ||
|
||
game = Game.new(gamehash) | ||
|
||
IO.write("#{ENV['HOME']}/kf2server/KFGame/Config/LinuxServer-KFGame.ini",game.renderGameConfig()) | ||
IO.write("#{ENV['HOME']}/kf2server/KFGame/Config/LinuxServer-KFEngine.ini",game.renderEngineConfig()) | ||
puts "Wrote Server Config Successfully!" |
Oops, something went wrong.