How to get AgentInfo by player name


I've recently wanted to take data from player,
so I used the observer to do it but not all the data I want is provided.
Can I get AgentInfo from the player by its name?


Interesting question :-) ... theoretically, all BOT modules should work within the observer as well.
But we haven't tested that yet (except AgentStats that was tested and confirmed to work, so if statistics
can be gathered why not everything else?).

I think that all you have to do is create AgentInfo object (or any other object that interests you) during the construction
of the observer.

See UT2004BotModuleController.initializeModules() method sourcecode for all available modules.

Be sure to correctly initialize the observer, i.e., to receive all important messages that the module needs.
E.g. Players requires PLR messages to come regularly, but AgentInfo just needs SLF message.

Let us know what you have found!

Report any bugs / problems, we will try to fix them ASAP:

I might not answered your question directly.

1) BOT cannot obtain more info about our players apart its own messages
2) to truly see what other players see, you have to use OBSERVER connection as you have guessed out
3) check out observer example: svn://jimmy@artemis.ms.mff.cuni.cz/pogamut/trunk/project/Main/PogamutUT2004Examples/16-BotObserver
4) be sure to INIT the observer properly, specifying all "kinds" of messages you want to receive (and be aware that this eats additional resources at GB2004 side)

Ask for more details if I'm still missing you.



News RSS RSS feed for News link


Quarterly RSS RSS feed for quarterly reports


This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.