Forum: PogamutUT2004

AgentInfo and AgentStats problems

Hello,

I've recently run into problems accessing kills, scores etc by using the parent classes (UT2004BotModuleController) methods. In this class the following objects are created:

game = new Game(bot);
info = new AgentInfo(bot, game);
players = new Players(bot);
descriptors = new ItemDescriptors(bot);
items = new Items(bot, info);
.........
stats = new AgentStats(bot);
weaponPrefs = new WeaponPrefs(weaponry, bot);


When I try to use the getInfo() method in my bot class I get the following values all the time: Score: -2147483648 Suicides: 0 Kills: 0 Deaths: -2147483648.

I'm pretty sure the problem is with the Unreal ID. The check that it is doing before it returns the values (for instance, when my bot kills) is:

Killer ID: DM-TrainingDay.ObservedRemoteBot1
My Bots recorded ID: SELF_DM-TrainingDay.ObservedRemoteBot1

These are the same except for the SELF_ at the beginning of the recorded ID.

I used to be able to use getInfo() for accessing all types of information that are used in the logic of my bot. None of this works any more and AgentStats returns the default initial values also. I'm wondering if I'm doing something differently or if I need to follow a different procedure for accessing this information when the bot is running. I've been trying to fix this for weeks and I've run out of ideas.

Is there any reason why the objects created in UT2004BotModuleController wouldn't be returning updated values? All I can think of is that it's something to do with the Bot ID.

Please help!!

Thanks.
Hi!

Sorry for the delay in answering your problem.

First of all - which version of Pogamut are you using? Check pom.xml and the parent pom dependency, it will be something like 3.x.y

Does the version correspond with version of GameBots2004 you're using? (I recommend to try to use the latest version 3.3.1
and like-wise install the lastest GameBots2004 from the pack: http://artemis.ms.mff.cuni.cz/pogamut_files/latest/installer/PogamutUT2004Installer-3.3.1.jar )

Best,
Jimmy
Thank you for replying. I updated to version 3.3.1 about 2 weeks ago but for some reason the pom.xml in the project had version 3.2.0 when I checked after reading your post. I just realised that I had copied the details of the earlier version of the Empty-Bot project from the archetype catalogue. I had just assumed that the most recent versions were at the top. Everything seems to be working fine again. I can't believe how simple it was.

THANK YOU!!!!!!!! This was driving me crazy!!
Glad to help ;-)

We know that "updating to new version of Pogamut" is "hidden feature" as it follows Maven practices, but once you discover how it works,
it is dead simple to switch your project between various versions of Pogamut library.

Cheers!
Jimmy