cz.cuni.pogamut.Client
Interface Commands

All Known Implementing Classes:
AgentBody

public interface Commands

interface which specifies which commands with what arguments are available

all method descriptions are in the fashion:


Method Summary
 void addInventory(java.lang.String inventoryClass)
          add inventory to the agent - specify class
"ADDINV {Class inventoryClass}
 void addRayToAutoTrace(int ID, Triple direction, java.lang.Double length, boolean fastTrace, boolean traceActors)
          adds ray to auto-trace rays - those are sended every batch "ADDRAY {Id X} {Direction X X X} {Lenght X} {FastTrace True|False} {TraceActors True|False}"
if the trace of same ID is added, the previous one is just configured by the parameters of new one
 void configure(boolean autoTrace, boolean manualSpawn, java.lang.String name, boolean invulnerable, double visionTime, boolean showFocalPoint, boolean drawTraceLines, boolean synchronousOff)
          Configure particular agent's properties
"CONF {AutoTrace True|False} {ManualSpawn True|False} {Name name} {Invulnerable True|False} {VisionTime X}"
 void configureAutoTrace(boolean autoTrace)
          Configure particular agent's properties
"CONF {AutoTrace True|False}"
 void configureInvulnerable(boolean invulnerable)
          Configure particular agent's vulnerability
"CONF {Invulnerable True|False}"
 void configureManualSpawn(boolean manualSpawn)
          Configure particular agent's properties
"CONF {AutoTrace True|False}"
 void configureName(java.lang.String name)
          Configure particular agent's properties
"CONF {ManualSpawn True|False}"
 void configureVisionTime(double visionTime)
          Configure particular agent's vision time
"CONF {VisionTime X}"
 void dodge(Triple direction)
          Dodge to the direction.
 void doubleJump()
          makes agent jump as high as possible
"JUMP"
 void fastTrace(int id, Triple to)
          fastTrace - emit ray from the place where agent stands from about "1.5m" height to specified location
fastTrace will return true, if it hits anything
"FTRACE {Id X} {To X X X}"
 void fastTrace(int id, Triple from, Triple to)
          fasttrace - emit ray from from to to which will return true, if it hits anything
"FTRACE {Id X} {From X X X} {To X X X}"
 void getPathToLocation(int ID, Triple location)
          request path to location, ID is for matching a query with a result
"PATH {Location X X X} {Id X}"
 void getPathToNavPoint(int ID, NavPoint navPoint)
          request path to navigation point, ID is for matching a query with a result
"PATH {Location X X X} {Id X}"
 void changeToBestWeapon()
          change to best weapon - unreal choose the best - note that it can result in ShieldGun, which is only for defence
"CHANGEWEAPON {Id Best}"
 void changeWeapon(AddWeapon newWeapon)
          change weapon to specified weapon
"CHANGEWEAPON {Id UnrealId}"
 void init(java.lang.String name, int team, boolean manualSpawn, Triple location, Triple rotation)
          initialize agent name, location, rotation, manualSpawn, team
"INIT {Name name} {Location X X X} {Rotation X X X} {Team 0} {ManualSpawn True|False}"
 void init(java.lang.String name, int team, boolean manualSpawn, Triple location, Triple rotation, java.lang.String skin, double accuracy, boolean targetLead)
          initialize agent
 void init(java.lang.String name, int team, Triple location)
          initialize agent name, location, team
"INIT {Name name} {Location X X X} {Team 0}"
 void init(java.lang.String name, Triple location)
          initialize agent name and location
"INIT {Name name} {Location X X X}"
 void jump()
          makes agent jump
"JUMP"
 void move(double speed, Triple location1, Triple location2)
          move continuously to location1 and then to location2 - no abrupt movement - just smooth
"MOVE {Location1 X X X} {Location2 X X X} {Speed X}"
 void moveAlongNavPoints(double speed, NavPoint nav1, NavPoint nav2)
          move continuously to navigation point 1 and then to navigation point - no abrupt movement - just smooth
"MOVE {Location1 X X X} {Location2 X X X} {Speed X}"
 void moveContinuous()
           
 void pauseTheGame()
          pause the game - all actors except spectators
"PAUSE {Pause True}"
 void ping()
          send ping to server - it replies with PONG
"PING"
 void removeAllRaysFromAutoTrace()
          remove all rays from auto-trace
"REMOVERAY {Id All}"
 void removeRayFromAutoTrace(int ID)
          remove auto-trace with specified id from auto-trace rays
"REMOVERAY {Id X}"
 void requestReachcheckLocation(int ID, Triple to, Triple from)
          request test on reachability of the target from the location, ID is for matching a query with a result
"CHECKREACH {Id X} {Target UnrealId} {From X X X}"
 void requestReachcheckTargetFrom(int ID, MessageObject target, Triple from)
          request test on reachability of the target from the location, ID is for matching a query with a result
"CHECKREACH {Id X} {Location X X X} {From X X X}"
 void respawn()
          respawn agent on random location
"RESPAWN"
 void respawn(Triple location, Triple rotation)
          respawn agent on supplied location with supplied rotation
"RESPAWN {Location X X X} {Rotation X X X}"
 void restartAutoTraceRays()
          restart auto-trace - set to default settings
"ADDRAY {Id Default}"
 void runToLocation(Triple location)
          agent run to location
"RUN {Location X X X} {Speed XXXX} {Accel X}"
 void runToNavPoint(NavPoint target)
          agent run to supplied navigation point
"RUN {Location X X X} {Speed XXXX} {Accel X}"
 void runToTarget(MessageObject target)
          agent run to target - e. g. enemy
"RUN {Location X X X} {Speed XXXX} {Accel X}"
 void sendGlobalMessage(java.lang.String text)
          send message to global communication channel
"MESSAGE {Text text} {Global True}"
 void sendPrivateMessage(java.lang.String text)
          send message to private team communication channel
"MESSAGE {Text text} {Global False}"
 void setCrouch(boolean crouch)
          switch from normal movement to crouch and back
"SETCROUCH {Crouch True|False}"
 void setLenghtOAutoTrace(int lenght, int ID)
          change lenght of all traces at once
 void setRun()
          change the way of agent movement from walk to run
"SETWALK {Walk False}"
 void setSkin(java.lang.String name)
          set skin of the agent to the skin of specified name
 void setWalk()
          change the way of agent movement from run to walk
"SETWALK {Walk True}"
 void shoot(Player target)
          shoot at target player
"SHOOT {Location X X X} {Target UnrealId} {Alt False}"
 void shoot(Triple location)
          shoot at target player
"SHOOT {Location X X X} {Alt False}"
 void shootAlternate(Player target)
          shoot at target player
"SHOOT {Location X X X} {Target UnrealId} {Alt True}"
 void shootAlternate(Triple location)
          shoot at target player
"SHOOT {Location X X X} {Alt True}"
 void startAutoTrace()
          start auto tracing - 3 default traces - left, front, right
 void startRecording(java.lang.String fileName)
          start recording a demo of the simulation, name of the file as specified
record will be stored at the server
"REC {Filename fileName}"
 void stop()
          stop agent's movement
"STOP"
 void stopAutoTrace()
          stop auto tracing
 void stopRecording()
          stop recording the demo "STOPREC"
 void stopShoot()
          stop agent's fire "STOPSHOOT"
 void strafeToLocation(Triple whereToGo, Triple whereToStrafeTo)
          strafe to location whereToStrafeTo while going towards whereToGo
"STRAFE {Location X X X} {Focus X X X}"
 void strafeToTarget(MessageObject target, Triple whereToGo)
          strafe to location whereToStrafeTo while going towards whereToGo
"STRAFE {Location X X X} {Target UnrealID}"
 void throwWeapon()
          agent throws its current weapon away - can be used for trade/cooperation between agents
"THROW"
 void trace(int id, Triple to, boolean traceActors)
          trace - emit ray from the place where agent stands from about "1.5m" height to specified location
trace will return true, if it hits anything
"TRACE {Id X} {To X X X} {TraceActors True}"
 void trace(int id, Triple from, Triple to, boolean traceActors)
          trace - emit ray from from to to which will return true, if it hits anything
"TRACE {Id X} {From X X X} {To X X X} {TraceActors True}"
 void turn(int pitch, int yaw, int roll)
          turn agent's avatar in the specified directions
"TURN {Pitch X} {Yaw X} {Roll X}"
 void turnHorizontal(int amount)
          Turn agent around (Yaw) - amount is in degrees not in UT units where 360 degrees is 65535 UT units
"ROTATE {Axis Horizontal} {Amount X}" - X should be correct according to conversion between degrees and UT units
 void turnToLocation(Triple location)
          agent turn to location
"TURN {Location X X X}"
 void turnToTarget(MessageObject target)
          agent turn to target
"TURN {Target UnrealId}"
 void turnVertical(int amount)
          Turn agent around (Pitch) - amount is in degrees not in UT units where 360 degrees is 65535 UT units
"ROTATE {Axis Vertical} {Amount X}" - X should be correct according to conversion between degrees and UT units
 void unpauseTheGame()
          unpause paused game
"PAUSE {Pause False}"
 

Method Detail

setRun

void setRun()
change the way of agent movement from walk to run
"SETWALK {Walk False}"


setWalk

void setWalk()
change the way of agent movement from run to walk
"SETWALK {Walk True}"


stop

void stop()
stop agent's movement
"STOP"


jump

void jump()
makes agent jump
"JUMP"


doubleJump

void doubleJump()
makes agent jump as high as possible
"JUMP"


runToNavPoint

void runToNavPoint(NavPoint target)
agent run to supplied navigation point
"RUN {Location X X X} {Speed XXXX} {Accel X}"

Parameters:
target -

runToLocation

void runToLocation(Triple location)
agent run to location
"RUN {Location X X X} {Speed XXXX} {Accel X}"

Parameters:
location -

runToTarget

void runToTarget(MessageObject target)
agent run to target - e. g. enemy
"RUN {Location X X X} {Speed XXXX} {Accel X}"

Parameters:
target -

strafeToLocation

void strafeToLocation(Triple whereToGo,
                      Triple whereToStrafeTo)
strafe to location whereToStrafeTo while going towards whereToGo
"STRAFE {Location X X X} {Focus X X X}"

Parameters:
whereToGo -
whereToStrafeTo -

strafeToTarget

void strafeToTarget(MessageObject target,
                    Triple whereToGo)
strafe to location whereToStrafeTo while going towards whereToGo
"STRAFE {Location X X X} {Target UnrealID}"

Parameters:
whereToGo -
target - - typically player

turn

void turn(int pitch,
          int yaw,
          int roll)
turn agent's avatar in the specified directions
"TURN {Pitch X} {Yaw X} {Roll X}"

Parameters:
pitch -
yaw -
roll -

turnToTarget

void turnToTarget(MessageObject target)
agent turn to target
"TURN {Target UnrealId}"

Parameters:
target -

turnToLocation

void turnToLocation(Triple location)
agent turn to location
"TURN {Location X X X}"

Parameters:
location -

turnHorizontal

void turnHorizontal(int amount)
Turn agent around (Yaw) - amount is in degrees not in UT units where 360 degrees is 65535 UT units
"ROTATE {Axis Horizontal} {Amount X}" - X should be correct according to conversion between degrees and UT units

Parameters:
amount -

turnVertical

void turnVertical(int amount)
Turn agent around (Pitch) - amount is in degrees not in UT units where 360 degrees is 65535 UT units
"ROTATE {Axis Vertical} {Amount X}" - X should be correct according to conversion between degrees and UT units

Parameters:
amount -

shoot

void shoot(Player target)
shoot at target player
"SHOOT {Location X X X} {Target UnrealId} {Alt False}"

Parameters:
target -

shootAlternate

void shootAlternate(Player target)
shoot at target player
"SHOOT {Location X X X} {Target UnrealId} {Alt True}"

Parameters:
target -

shoot

void shoot(Triple location)
shoot at target player
"SHOOT {Location X X X} {Alt False}"

Parameters:
location -

shootAlternate

void shootAlternate(Triple location)
shoot at target player
"SHOOT {Location X X X} {Alt True}"

Parameters:
location -

changeWeapon

void changeWeapon(AddWeapon newWeapon)
change weapon to specified weapon
"CHANGEWEAPON {Id UnrealId}"

Parameters:
newWeapon -

changeToBestWeapon

void changeToBestWeapon()
change to best weapon - unreal choose the best - note that it can result in ShieldGun, which is only for defence
"CHANGEWEAPON {Id Best}"


stopShoot

void stopShoot()
stop agent's fire "STOPSHOOT"


requestReachcheckTargetFrom

void requestReachcheckTargetFrom(int ID,
                                 MessageObject target,
                                 Triple from)
request test on reachability of the target from the location, ID is for matching a query with a result
"CHECKREACH {Id X} {Location X X X} {From X X X}"

Parameters:
ID -
target -
from -

requestReachcheckLocation

void requestReachcheckLocation(int ID,
                               Triple to,
                               Triple from)
request test on reachability of the target from the location, ID is for matching a query with a result
"CHECKREACH {Id X} {Target UnrealId} {From X X X}"

Parameters:
ID -
to -
from -

getPathToLocation

void getPathToLocation(int ID,
                       Triple location)
request path to location, ID is for matching a query with a result
"PATH {Location X X X} {Id X}"

Parameters:
ID -
location -

getPathToNavPoint

void getPathToNavPoint(int ID,
                       NavPoint navPoint)
request path to navigation point, ID is for matching a query with a result
"PATH {Location X X X} {Id X}"

Parameters:
ID -
navPoint -

sendGlobalMessage

void sendGlobalMessage(java.lang.String text)
send message to global communication channel
"MESSAGE {Text text} {Global True}"

Parameters:
text -

sendPrivateMessage

void sendPrivateMessage(java.lang.String text)
send message to private team communication channel
"MESSAGE {Text text} {Global False}"

Parameters:
text -

ping

void ping()
send ping to server - it replies with PONG
"PING"


throwWeapon

void throwWeapon()
agent throws its current weapon away - can be used for trade/cooperation between agents
"THROW"


startRecording

void startRecording(java.lang.String fileName)
start recording a demo of the simulation, name of the file as specified
record will be stored at the server
"REC {Filename fileName}"

Parameters:
fileName -

stopRecording

void stopRecording()
stop recording the demo "STOPREC"


trace

void trace(int id,
           Triple from,
           Triple to,
           boolean traceActors)
trace - emit ray from from to to which will return true, if it hits anything
"TRACE {Id X} {From X X X} {To X X X} {TraceActors True}"

Parameters:
id - - id of request
from - - from where the ray goes
to - - to where the ray goes
traceActors - - whether to take actors (players) in account

fastTrace

void fastTrace(int id,
               Triple from,
               Triple to)
fasttrace - emit ray from from to to which will return true, if it hits anything
"FTRACE {Id X} {From X X X} {To X X X}"

Parameters:
id - - id of request
from - - from where the ray goes
to - - to where the ray goes

trace

void trace(int id,
           Triple to,
           boolean traceActors)
trace - emit ray from the place where agent stands from about "1.5m" height to specified location
trace will return true, if it hits anything
"TRACE {Id X} {To X X X} {TraceActors True}"

Parameters:
id - - id of request
to - - to where the ray goes
traceActors - - whether to take actors (players) in account

fastTrace

void fastTrace(int id,
               Triple to)
fastTrace - emit ray from the place where agent stands from about "1.5m" height to specified location
fastTrace will return true, if it hits anything
"FTRACE {Id X} {To X X X}"

Parameters:
id - - id of request
to - - to where the ray goes

respawn

void respawn(Triple location,
             Triple rotation)
respawn agent on supplied location with supplied rotation
"RESPAWN {Location X X X} {Rotation X X X}"

Parameters:
location -
rotation -

respawn

void respawn()
respawn agent on random location
"RESPAWN"


init

void init(java.lang.String name,
          Triple location)
initialize agent name and location
"INIT {Name name} {Location X X X}"

Parameters:
name -
location -

init

void init(java.lang.String name,
          int team,
          Triple location)
initialize agent name, location, team
"INIT {Name name} {Location X X X} {Team 0}"

Parameters:
name -
team -
location -

init

void init(java.lang.String name,
          int team,
          boolean manualSpawn,
          Triple location,
          Triple rotation)
initialize agent name, location, rotation, manualSpawn, team
"INIT {Name name} {Location X X X} {Rotation X X X} {Team 0} {ManualSpawn True|False}"

Parameters:
name -
team - - value 0, 1, 2, 3 - red, blue, gold, green (approximately)
manualSpawn - - whether agent respawn automaticaly or is respawned manually
location -
rotation -

init

void init(java.lang.String name,
          int team,
          boolean manualSpawn,
          Triple location,
          Triple rotation,
          java.lang.String skin,
          double accuracy,
          boolean targetLead)
initialize agent

Parameters:
name -
team - - value 0, 1, 2, 3 - red, blue, gold, green (approximately)
manualSpawn - - whether agent respawn automaticaly or is respawned manually
location -
rotation -
skin - - from the supported skins (see SkinTypes)
accuracy - - range [0-1]
targetLead - - boolean for engine if it should lead the bullets according to target movement, see GB doc

move

void move(double speed,
          Triple location1,
          Triple location2)
move continuously to location1 and then to location2 - no abrupt movement - just smooth
"MOVE {Location1 X X X} {Location2 X X X} {Speed X}"

Parameters:
speed -
location1 -
location2 -

setCrouch

void setCrouch(boolean crouch)
switch from normal movement to crouch and back
"SETCROUCH {Crouch True|False}"

Parameters:
crouch -

moveAlongNavPoints

void moveAlongNavPoints(double speed,
                        NavPoint nav1,
                        NavPoint nav2)
move continuously to navigation point 1 and then to navigation point - no abrupt movement - just smooth
"MOVE {Location1 X X X} {Location2 X X X} {Speed X}"

Parameters:
speed -
nav1 -
nav2 -

addRayToAutoTrace

void addRayToAutoTrace(int ID,
                       Triple direction,
                       java.lang.Double length,
                       boolean fastTrace,
                       boolean traceActors)
adds ray to auto-trace rays - those are sended every batch "ADDRAY {Id X} {Direction X X X} {Lenght X} {FastTrace True|False} {TraceActors True|False}"
if the trace of same ID is added, the previous one is just configured by the parameters of new one

Parameters:
ID - - id of the auto-trace ray
direction - - direction of the ray
length - - ray length
fastTrace - - fast trace or not (fast is faster and is less demanding for server)
traceActors - - trace actors or not

removeRayFromAutoTrace

void removeRayFromAutoTrace(int ID)
remove auto-trace with specified id from auto-trace rays
"REMOVERAY {Id X}"

Parameters:
ID -

removeAllRaysFromAutoTrace

void removeAllRaysFromAutoTrace()
remove all rays from auto-trace
"REMOVERAY {Id All}"


restartAutoTraceRays

void restartAutoTraceRays()
restart auto-trace - set to default settings
"ADDRAY {Id Default}"


startAutoTrace

void startAutoTrace()
start auto tracing - 3 default traces - left, front, right


stopAutoTrace

void stopAutoTrace()
stop auto tracing


setLenghtOAutoTrace

void setLenghtOAutoTrace(int lenght,
                         int ID)
change lenght of all traces at once


moveContinuous

void moveContinuous()

pauseTheGame

void pauseTheGame()
pause the game - all actors except spectators
"PAUSE {Pause True}"


unpauseTheGame

void unpauseTheGame()
unpause paused game
"PAUSE {Pause False}"


addInventory

void addInventory(java.lang.String inventoryClass)
add inventory to the agent - specify class
"ADDINV {Class inventoryClass}

Parameters:
inventoryClass -

configure

void configure(boolean autoTrace,
               boolean manualSpawn,
               java.lang.String name,
               boolean invulnerable,
               double visionTime,
               boolean showFocalPoint,
               boolean drawTraceLines,
               boolean synchronousOff)
Configure particular agent's properties
"CONF {AutoTrace True|False} {ManualSpawn True|False} {Name name} {Invulnerable True|False} {VisionTime X}"

Parameters:
autoTrace -
manualSpawn -
name -
invulnerable -
visionTime -

configureAutoTrace

void configureAutoTrace(boolean autoTrace)
Configure particular agent's properties
"CONF {AutoTrace True|False}"

Parameters:
autoTrace -

configureManualSpawn

void configureManualSpawn(boolean manualSpawn)
Configure particular agent's properties
"CONF {AutoTrace True|False}"

Parameters:
manualSpawn -

configureName

void configureName(java.lang.String name)
Configure particular agent's properties
"CONF {ManualSpawn True|False}"

Parameters:
name -

configureInvulnerable

void configureInvulnerable(boolean invulnerable)
Configure particular agent's vulnerability
"CONF {Invulnerable True|False}"

Parameters:
invulnerable -

configureVisionTime

void configureVisionTime(double visionTime)
Configure particular agent's vision time
"CONF {VisionTime X}"

Parameters:
visionTime -

setSkin

void setSkin(java.lang.String name)
set skin of the agent to the skin of specified name


dodge

void dodge(Triple direction)
Dodge to the direction. Axis-x is going in the way the bot is looking. (Axis-z has no meaning).