cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric
Class AgentConfig

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensorModule<UT2004Bot>
          extended by cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AgentConfig
All Implemented Interfaces:
IComponent

public class AgentConfig
extends SensorModule<UT2004Bot>

Memory module specialized on the agent's configuration inside UT2004.

It should be instantiated inside IUT2004BotController.prepareBot(UT2004Bot)() class and it may be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule
worldView
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
AgentConfig(UT2004Bot bot)
          Constructor.
AgentConfig(UT2004Bot bot, LogCategory moduleLog)
          Constructor.
 
Method Summary
protected  void cleanUp()
          Hook where to perform clean up of data structures of the module.
 ConfigChange getConfig()
          Retrieves the configuration of the bot inside UT2004.
 java.lang.String getName()
          The bot's name.
 Rotation getRotationSpeed()
          Tells how fast the bot is rotating in all three directions (pitch, yaw, roll).
 double getSpeedMultiplier()
          Bots default speed will be multiplied by this number.
 double getVisionTime()
          The delay between two synchronous batches (can range from 0.1 to 2 seconds).
 boolean isAutoPickup()
          It enables/disables automatic pickup of the bot.
 boolean isAutoTrace()
          True, if the bot is using auto ray tracing (is provided with synchronous ATR messages).
 boolean isDrawTraceLines()
          If the GB should draw lines representing the auto ray traces of the bot (for more information see ATR message).
 boolean isInvulnerable()
          If bot is invulnerable (cannot die) or not.
 boolean isManualSpawn()
          True, if you have to spawn the bot manually after each death.
 boolean isShowDebug()
          If some additional debug information will be shown in the UT2004 server console window.
 boolean isShowFocalPoint()
          If true an actor visualizing the location the bot is actually looking at will appear in the game.
 boolean isSynchronousBatchExported()
          It informs whether the sending of all GB synchronous messages is enabled or disabled.
 void setAutoPickup(boolean state)
          It enables/disables automatic pickup of the bot.
 void setAutoTrace(boolean state)
          Enables/disables auto ray tracing feature.
 void setDrawTraceLines(boolean state)
          If set to true an actor will appear in the game on the location the bot is actually looking at.
 void setInvulnerability(boolean state)
          Will set godmode for bot on (bot can't be killed).
 void setManualSpawn(boolean state)
          Enables/disables manual spawning.
 void setName(java.lang.String newName)
          You can change the name of the bot in the game.
 void setRotationHorizontalSpeed(double speed)
          Sets how fast the bot will rotate horizontally (i.e., yaw rotation == left/right).
 void setRotationSpeed(Rotation rotationSpeeds)
          Sets how fast the bot will rotate in all three axes (yaw/pitch/roll).
 void setRotationVerticalSpeed(double speed)
          Sets how fast the bot will rotate vertically (i.e., pitch rotation == up/down).
 void setShowDebug(boolean state)
          If true some additional debug information will be logged to UT2004 server console window.
 void setShowFocalPoint(boolean state)
          If set to true a marker will appear in the game on the location the bot is actually looking at.
 void setSpeedMultiplier(double value)
          Bots default speed will be multiplied by this number.
 void setSynchronousBatchExport(boolean state)
          It enables/disables sending of all GB synchronous messages for the bot.
 void setVisionTime(double value)
          Between 0.1 to 2 seconds, it sets the delay between two synchronous batches.
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
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

AgentConfig

public AgentConfig(UT2004Bot bot)
Constructor. Setups the memory module based on bot's world view.

Parameters:
bot - owner of the module

AgentConfig

public AgentConfig(UT2004Bot bot,
                   LogCategory moduleLog)
Constructor. Setups the memory module based on bot's world view.

Parameters:
bot - owner of the module
moduleLog - where to log module's messages
Method Detail

isManualSpawn

public boolean isManualSpawn()
True, if you have to spawn the bot manually after each death.


setManualSpawn

public void setManualSpawn(boolean state)
Enables/disables manual spawning.

Sets if the bot will have to be respawned after death manually by RESPAWN command. If false, the bot will respawn automatically.

Parameters:
state -

isAutoTrace

public boolean isAutoTrace()
True, if the bot is using auto ray tracing (is provided with synchronous ATR messages). See ATR messages for more details.


setAutoTrace

public void setAutoTrace(boolean state)
Enables/disables auto ray tracing feature.


getName

public java.lang.String getName()
The bot's name.


setName

public void setName(java.lang.String newName)
You can change the name of the bot in the game.


getSpeedMultiplier

public double getSpeedMultiplier()
Bots default speed will be multiplied by this number. Ranges from 0.1 to 2 (default, can be set in ini in [RemoteBot] MaxSpeed).


setSpeedMultiplier

public void setSpeedMultiplier(double value)
Bots default speed will be multiplied by this number. Ranges from 0.1 to 2 (default, can be set in ini in [RemoteBot] MaxSpeed).


isInvulnerable

public boolean isInvulnerable()
If bot is invulnerable (cannot die) or not.


setInvulnerability

public void setInvulnerability(boolean state)
Will set godmode for bot on (bot can't be killed). This can be changed just when cheating is enabled on the server. (bAllowCheats = True)


getVisionTime

public double getVisionTime()
The delay between two synchronous batches (can range from 0.1 to 2 seconds).


setVisionTime

public void setVisionTime(double value)
Between 0.1 to 2 seconds, it sets the delay between two synchronous batches.


isShowDebug

public boolean isShowDebug()
If some additional debug information will be shown in the UT2004 server console window.


setShowDebug

public void setShowDebug(boolean state)
If true some additional debug information will be logged to UT2004 server console window.


isShowFocalPoint

public boolean isShowFocalPoint()
If true an actor visualizing the location the bot is actually looking at will appear in the game.


setShowFocalPoint

public void setShowFocalPoint(boolean state)
If set to true a marker will appear in the game on the location the bot is actually looking at.


isDrawTraceLines

public boolean isDrawTraceLines()
If the GB should draw lines representing the auto ray traces of the bot (for more information see ATR message).


setDrawTraceLines

public void setDrawTraceLines(boolean state)
If set to true an actor will appear in the game on the location the bot is actually looking at.


isSynchronousBatchExported

public boolean isSynchronousBatchExported()
It informs whether the sending of all GB synchronous messages is enabled or disabled.


setSynchronousBatchExport

public void setSynchronousBatchExport(boolean state)
It enables/disables sending of all GB synchronous messages for the bot.


isAutoPickup

public boolean isAutoPickup()
It enables/disables automatic pickup of the bot. If false the items can be picked up only through Pick command.


setAutoPickup

public void setAutoPickup(boolean state)
It enables/disables automatic pickup of the bot. If false is set the items can be picked up through Pick command.


getRotationSpeed

public Rotation getRotationSpeed()
Tells how fast the bot is rotating in all three directions (pitch, yaw, roll).

Returns:

setRotationHorizontalSpeed

public void setRotationHorizontalSpeed(double speed)
Sets how fast the bot will rotate horizontally (i.e., yaw rotation == left/right).

Parameters:
speed - desired rotation speed

setRotationVerticalSpeed

public void setRotationVerticalSpeed(double speed)
Sets how fast the bot will rotate vertically (i.e., pitch rotation == up/down).

Parameters:
speed - desired rotation speed

setRotationSpeed

public void setRotationSpeed(Rotation rotationSpeeds)
Sets how fast the bot will rotate in all three axes (yaw/pitch/roll).

Parameters:
rotationSpeeds - desired rotation speeds

getConfig

public ConfigChange getConfig()
Retrieves the configuration of the bot inside UT2004.

Returns:
Configuration of the bot.

cleanUp

protected void cleanUp()
Description copied from class: AgentModule
Hook where to perform clean up of data structures of the module.

Called from AgentModule.stop(), AgentModule.kill(), AgentModule.reset().

Overrides:
cleanUp in class AgentModule<UT2004Bot>