cz.cuni.amis.pogamut.ut2004.bot.command
Class ConfigureCommands

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot>
          extended by cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands
              extended by cz.cuni.amis.pogamut.ut2004.bot.command.ConfigureCommands
All Implemented Interfaces:
IComponent

public class ConfigureCommands
extends BotCommands

Class providing Pogamut2 UT2004 configure commands. Changing of the bot attributes like name, speed, etc. Changing the bot appearance.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule
act, worldView
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
ConfigureCommands(UT2004Bot agent, java.util.logging.Logger log)
          Constructor.
 
Method Summary
 void configure(Configuration config)
          Changes the configuration of the bot.
 void setBotAppearance(java.lang.String skin)
          Changes the bot appearance.
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigureCommands

public ConfigureCommands(UT2004Bot agent,
                         java.util.logging.Logger log)
Constructor. Setups the command module based on given agent and logger.

Parameters:
agent - AbstractUT2004Bot we will send commands for
log - Logger to be used for logging runtime/debug info.
Method Detail

configure

public void configure(Configuration config)
Changes the configuration of the bot. How to use this. First you need to create your own Pogamut GB configuration command, you need to import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.*; Then create your own Configuration command with new, set the fields you want to change and then use this method to send it to UT2004. Example: Configuration conf = new Configuration(); conf.setName("MyName"); configure(conf); Note: The Id parameter cannot be changed, it is there for control server, so the server can configure the bots by the Id. Also some other configuration parameters may only be set when the game features particular rules (e.g. you cannot set invulnerability of the bot, when the cheating is off). See help in the documentation of Configuration command. (issues GB CONF command)

Parameters:
config - Actual Pogamut GB Configuration command. Set all desired fields you want to change.

setBotAppearance

public void setBotAppearance(java.lang.String skin)
Changes the bot appearance. Note that the bot will respawn after this command so the change of the skin can be visible. Set the appearance through skin attribute (e.g. "HumanMaleA.MercMaleA"). Find all packages and skins through unrealEd (Actor browser, search in UT2004/Animations folder) or look in GB user documentation on the web. Supported bot skins are Aliens (Aliens.), Bots (Bot.), human males (HumanMaleA.), human females (HumanFemaleA. ), juggernauts (Jugg.). Skaarj skins are not supported at the time being. (issues GB SETSKIN command)

Parameters:
skin - New desired skin of the bot.