Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import configparser
- from collections import OrderedDict
- def get_map_names():
- return OrderedDict({
- "Alleys": "Uptown",
- "Andromeda": "Prosk",
- "Bunker": "Bunker",
- "Facility": "Facility",
- "FightClub": "Fight Club",
- "LastEco": "Last Eco",
- "Sahara": "Bazaar",
- "Titan": "Origin",
- "Valkirie": "Front Line",
- "Wreckage": "Wreckage"
- })
- def get_game_type_names():
- return OrderedDict({
- "VS": "Deathmatch",
- "CO": "Co-Op Team Deathmatch",
- "SG": "Siege",
- "MA": "Missile Assault",
- "AI": "Co-Op Bot Destruction"
- })
- def get_time_limits():
- return [5, 10, 15, 20, 25, 30] # Example time limits. Adjust as needed.
- def get_goal_scores():
- return [20000, 30000, 40000, 50000] # Example goal scores. Adjust as needed.
- def create_config_files(map_names, game_type_names, time_limits, goal_scores):
- root_path = "X:\\Games\\Hawken\\"
- game_path = "X:\\Games\\Hawken\\Binaries\\Win32\\HawkenGame-Win32-Shipping.exe"
- for map_key, map_name in map_names.items():
- for game_key, game_name in game_type_names.items():
- # Generate all possible map_key and game_key combinations
- full_key = f"{game_key}-{map_key}"
- for time_limit in time_limits:
- for goal_score in goal_scores:
- config = configparser.ConfigParser()
- config['config'] = {
- 'root': root_path,
- 'game': game_path,
- 'args': f"Server {full_key}?NumPublicConnections=10?GoalScore={goal_score}?TimeLimit={time_limit}?bIsLanMatch=True?game=HawkenGame.R_{game_key} -log"
- }
- with open(f'hook_{map_name}_{game_name}_score_{goal_score}_time_{time_limit}.ini', 'w') as configfile:
- config.write(configfile)
- def main():
- map_names = get_map_names()
- game_type_names = get_game_type_names()
- time_limits = get_time_limits()
- goal_scores = get_goal_scores()
- create_config_files(map_names, game_type_names, time_limits, goal_scores)
- if __name__ == "__main__":
- main()
Advertisement
Comments
-
- This is a python script. I need to add the missing maps and fix some game mode issues
Add Comment
Please, Sign In to add comment
Advertisement