コード例 #1
0
ファイル: teacher_agent.py プロジェクト: jmbjr/Saltie
 def load_config(self, config_object_header: ConfigHeader):
     super().load_config(config_object_header)
     teacher_path = config_object_header.get('teacher_path')
     self.teacher = ExternalClassWrapper(
         os.path.join(get_repo_directory(), teacher_path),
         BaseAgent).get_loaded_class()(self.name, self.team, self.index)
コード例 #2
0
 def load_config(self, config_header: ConfigHeader):
     self.executable_path = config_header.getpath('java_executable_path')
     self.logger.info("Java executable is configured as {}".format(
         self.executable_path))
コード例 #3
0
ファイル: agent_config_parser.py プロジェクト: rivques/RLBot
def create_loadout() -> ConfigHeader:
    header = ConfigHeader()
    header.add_value('team_color_id',
                     int,
                     default=0,
                     description='Primary Color selection')
    header.add_value('custom_color_id',
                     int,
                     default=0,
                     description='Secondary Color selection')
    header.add_value('car_id',
                     int,
                     default=0,
                     description='Car type (Octane, Merc, etc)')
    header.add_value('decal_id', int, default=0, description='Type of decal')
    header.add_value('wheels_id',
                     int,
                     default=0,
                     description='Wheel selection')
    header.add_value('boost_id', int, default=0, description='Boost selection')
    header.add_value('antenna_id',
                     int,
                     default=0,
                     description='Antenna Selection')
    header.add_value('hat_id', int, default=0, description='Hat Selection')
    header.add_value('paint_finish_id',
                     int,
                     default=0,
                     description='Paint Type (for first color)')
    header.add_value('custom_finish_id',
                     int,
                     default=0,
                     description='Paint Type (for secondary color)')
    header.add_value('engine_audio_id',
                     int,
                     default=0,
                     description='Engine Audio Selection')
    header.add_value('trails_id',
                     int,
                     default=0,
                     description='Car trail Selection')
    header.add_value('goal_explosion_id',
                     int,
                     default=0,
                     description='Goal Explosion Selection')
    header.add_value(
        'primary_color_lookup',
        str,
        default=None,
        description=
        'Finds the closest primary color swatch based on the provided RGB value '
        'like [34, 255, 60]')
    header.add_value(
        'secondary_color_lookup',
        str,
        default=None,
        description=
        'Finds the closest secondary color swatch based on the provided RGB value '
        'like [34, 255, 60]')

    return header
コード例 #4
0
ファイル: agent_config_parser.py プロジェクト: rivques/RLBot
def create_loadout_paint() -> ConfigHeader:
    header = ConfigHeader()

    header.add_value('car_paint_id', int, default=0)
    header.add_value('decal_paint_id', int, default=0)
    header.add_value('wheels_paint_id', int, default=0)
    header.add_value('boost_paint_id', int, default=0)
    header.add_value('antenna_paint_id', int, default=0)
    header.add_value('hat_paint_id', int, default=0)
    header.add_value('trails_paint_id', int, default=0)
    header.add_value('goal_explosion_paint_id', int, default=0)

    return header
コード例 #5
0
ファイル: base_agent.py プロジェクト: wwxFromTju/RLBot
    def _create_loadout() -> ConfigHeader:
        header = ConfigHeader()
        header.add_value('team_color_id',
                         int,
                         default=27,
                         description='Primary Color selection')
        header.add_value('custom_color_id',
                         int,
                         default=75,
                         description='Secondary Color selection')
        header.add_value('car_id',
                         int,
                         default=23,
                         description='Car type (Octane, Merc, etc')
        header.add_value('decal_id',
                         int,
                         default=307,
                         description='Type of decal')
        header.add_value('wheels_id',
                         int,
                         default=1656,
                         description='Wheel selection')
        header.add_value('boost_id',
                         int,
                         default=0,
                         description='Boost selection')
        header.add_value('antenna_id',
                         int,
                         default=287,
                         description='Antenna Selection')
        header.add_value('hat_id', int, default=0, description='Hat Selection')
        header.add_value('paint_finish_id',
                         int,
                         default=1978,
                         description='Paint Type (for first color)')
        header.add_value('custom_finish_id',
                         int,
                         default=1978,
                         description='Paint Type (for secondary color)')
        header.add_value('engine_audio_id',
                         int,
                         default=0,
                         description='Engine Audio Selection')
        header.add_value('trails_id',
                         int,
                         default=0,
                         description='Car trail Selection')
        header.add_value('goal_explosion_id',
                         int,
                         default=1971,
                         description='Goal Explosion Selection')

        return header
コード例 #6
0
 def load_config(self, config_header: ConfigHeader) -> None:
     self.path = config_header.get('path')
コード例 #7
0
def add_player_to_config(index, player: Player, player_header: ConfigHeader):
    player_header.set_value(PARTICIPANT_CONFIG_KEY,
                            player.get_config_location(), index)
    player_header.set_value(PARTICIPANT_TEAM, player.get_team(), index)
    player_header.set_value(PARTICIPANT_LOADOUT_CONFIG_KEY,
                            player.get_loadout(), index)
コード例 #8
0
 def load_config(self, config_header: ConfigHeader) -> None:
     self.path = config_header.getpath('path')
     if self.path == None:
         print("Error: No executable path set.")
コード例 #9
0
ファイル: CSharpPythonAgent.py プロジェクト: robbai/RLBotPack
 def load_config(self, config_header: ConfigHeader):
     self.dotnet_executable_path = config_header.getpath(
         'dotnet_executable_path')
     self.logger.info(".NET executable is configured as {}".format(
         self.dotnet_executable_path))
コード例 #10
0
ファイル: levi_agent.py プロジェクト: LHolten/Leviathan
 def load_config(self, config_object_header: ConfigHeader):
     self.model_path = config_object_header.get('model_path')
コード例 #11
0
ファイル: swarm_agent.py プロジェクト: jmbjr/Saltie
 def load_config(self, config_object_header: ConfigHeader):
     self.model_path = config_object_header.get('model_path')
     self.load_model = config_object_header.getboolean('load_model')
コード例 #12
0
ファイル: python_run_file.py プロジェクト: Darxeal/RLBotPack
 def load_config(self, config_header: ConfigHeader):
     # Grabs the executable in the config
     self.executable_path = config_header.getpath('executable_path')
     self.logger.info("Executable is configured as {}".format(self.executable_path))
コード例 #13
0
 def load_config(self, config_header: ConfigHeader) -> None:
     self.ip = config_header["ip"].value
     self.port = config_header.getint("port")