cz.cuni.amis.pogamut.ut2004.bot.command
Class ConfigureCommands
java.lang.Object
cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot>
cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands
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.
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 |
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 forlog
- Logger to be used for logging runtime/debug info.
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.