.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   not correct detection by bots chicken as a friend/enemy (http://forums.bots-united.com/showthread.php?t=3884)

KWo 25-04-2005 08:46

Re: not correct detection by bots chicken as a friend/enemy
 
@ T(+)rget - in AMX there is a native - get_user_team. What is in AMX source code for it? How does this native work in amx_mm.dll's side? How it is constructed?

sPlOrYgOn 25-04-2005 09:24

Re: not correct detection by bots chicken as a friend/enemy
 
AMX and Statsme uses the same method.
They both catch the "TeamInfo" message..
MessageBegin: "TeamInfo"
WriteByte: <PlayerEntityIndex>
WriteString: <TeamName>

T(+)rget 25-04-2005 14:32

Re: not correct detection by bots chicken as a friend/enemy
 
I don't get 100% how the TeamInfo capturing works in AMX (Files: CMisc.cpp all functions below // class TeamIds, emsg.cpp Client_TeamInfo function)

I know it catches the Team Name, but how it sorts out the actual team index number baffles me.

Which is why in VexdUM I capture the ScoreInfo which contains the team index number, technically ScoreInfo should run when joining, changing team etc. Apparently not, according to 1 of the other AMX devs which he tested on LAN + ZBot. It just didn't capture the bot's team index.

But anyway like I said, I'm researching into this for our part and for you guys.

Pierre-Marie Baty 25-04-2005 15:16

Re: not correct detection by bots chicken as a friend/enemy
 
FYI, in the engine-independent bot code I'm working on, I don't sort teams by indexes but by team strings. I don't use team index numbers anymore. It *is* perfectly possible to do that in the bot code and thus to rely on the TeamInfo message *only*.

T(+)rget 25-04-2005 15:49

Re: not correct detection by bots chicken as a friend/enemy
 
Hmm, I see logic in that but isn't it easier to use integers instead of strings?

Pierre-Marie Baty 25-04-2005 18:39

Re: not correct detection by bots chicken as a friend/enemy
 
look friend, the TeamInfo message sends strings. Isn't it easier to use strings instead of integers ? :)

@$3.1415rin 25-04-2005 19:04

Re: not correct detection by bots chicken as a friend/enemy
 
and nobody forbids you to do the string comparision once the message was sent and then store it somewhere as integer :P

[NvT]_KaszpiR_ 25-04-2005 22:20

Re: not correct detection by bots chicken as a friend/enemy
 
well, then, why you chose to detect teammate of enemy in bots via model name comparison? probably because it was the easies and sufficient for the given time.

(i was very unpleased by reaction of bots in w3xp mod when they started to attack me :D)


secodn, KWo asked me if i could ask olo about the statsme and player team detection

olo:
Quote:

there are various methods of gainig the player team info:
- model name
- client setinfo
- log the event
- client message
- join team
- setting player color in tabscores (score table when hitting tab key)

statsme uses the last method because it can get only defined values
and those values depend on each mod

KWo 26-04-2005 08:33

Re: not correct detection by bots chicken as a friend/enemy
 
For these who don't know who is OLO - he is for CS like Botman for all bots. StatsMe, Clanmod, AMX, CSGuard - and few more - they all are OLO's ideas. :)

T(+)rget 26-04-2005 11:13

Re: not correct detection by bots chicken as a friend/enemy
 
Quote:

Originally Posted by Pierre-Marie Baty
look friend, the TeamInfo message sends strings. Isn't it easier to use strings instead of integers ? :)

That is true if obviously getting from TeamInfo, but what if....
AMX or AMXX scripter decides to script a Team3 or Team4 using private data hacking? (Yes it is possible)

Scenerio using TeamInfo:
Bot on Team3 someone on Team4, bot won't shoot anyone on Team3 or 4 since the strings will be NULL or "UNASSIGNED".

But like I said I'm still researching into ScoreInfo bug, I couldn't simulate what the another AMX Dev had since I know for sure I loaded MetaMod then the BOT (ZBot) and it detected the bots team fine, still haven't tested on LAN yet!

Question:
Bots buying weapons, why don't they purchase weapons normally? Just tested with ZBot seems they have there own purchasing system, which is annoying because it means you can't restrict what BOTS can purchase.


All times are GMT +2. The time now is 23:42.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.