AI BOT

Technical and coding related questions.

Moderator: Board moderators

User avatar
bencha
Junior member
Posts: 110
Joined: Tue Feb 22, 2005 3:24 pm
Location: Paris

Post by bencha »

of course, that's why it's so hard to code a sript, and I don't imagine for a 'bot who can do everything'
Basilisk
Luser
Posts: 30
Joined: Mon Feb 06, 2006 6:20 am

Post by Basilisk »

Important point. Possibly a bot could test for false walls after sweeping the obvious,
and update the array.

I am taking another look at the "itemlist" struct in the X11 client, and how it gets identity
of walls, etc. This might be a better way to get wall names.
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

For a quick way to get a list of faces corresponding to different combinations of object attributes, you can look at the script I made a while back here

It has piles and piles of options so be sure to look at it's "--help" :P

Of course, remember this doesn't account for the many many exceptions in the map tree :)
Basilisk
Luser
Posts: 30
Joined: Mon Feb 06, 2006 6:20 am

Post by Basilisk »

Your script is useful, as a start.
Once databases of walls, monsters, et cetera are built, a brute-force comparison should be done of each face against the database. The bot will begin by assuming that all walls are real. The bot will compare the "PNUM" of each image to "PNUM" in the table, as described in the "bmaps" file. We are going to stick with the 1.9.1 arch list from the CVS of metalforge, for example; inconsistency would kill it.
Basilisk
Luser
Posts: 30
Joined: Mon Feb 06, 2006 6:20 am

Post by Basilisk »

when you click on an object with the mouse, "client_send_examine( )" is called and
the word "examine %" is sent to the server. The server processed "examine_cmd"
and "examine" before feeding a text string back to the client.

Might there be a sneaky way to probe the level with "client_send_examine( )"
and process the returns? You will have to pause long enough to receive returns in order,
but will have to sweep fast enough to gather reasonable information.
This can tell you the actual pixmap names.
asi
Newbie
Posts: 5
Joined: Sun Jun 25, 2006 1:00 am

keyboard events

Post by asi »

hi
My bot is communicating with the gcfclient over a TCP socket.
My bot has simulated the mouse button presses by directly calling the functions like look_at() and move_player() in common/player.c.
I want to do the same for the keyboard press events but not sure what functions are called when a key is pressed on keyboard. can some one please help.
Also my bot need to know all the player related info, like its current position, the current map, current inventory , current vital stats etc. can u please let me know in which source files i look to collect them.
thanks
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

Hello, you'll want to look at the files in the common/ subdirectory :)

For keys, it's quite simple actually: keybindings intercept them, and transform to text that is sent like other command line text.
asi
Newbie
Posts: 5
Joined: Sun Jun 25, 2006 1:00 am

Post by asi »

can some body tell me what screen coordinate system crossfire client uses?
Are the (x,y) coords of things with respect to top left or bottom left corner?
Post Reply