Urban Terror Forums: Running bots in UT4 - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (43 Pages)
  • +
  • « First
  • 37
  • 38
  • 39
  • 40
  • 41
  • Last »
  • You cannot start a new topic
  • This topic is locked

Running bots in UT4 Rate Topic: ***** 1 Votes

#381 User is offline   ap0kal0 Icon

  • Account: ap0kal0
  • Main tag:
  • Country:
  • Joined: 12-March 10
  • Posts: 35

Posted 13 March 2010 - 04:32 PM

im using only one bot on standard maps like dressing room and abbey etc, i try to run them in a non dedicated server,its allw orking until i open fire on them

This post has been edited by ap0kal0: 13 March 2010 - 04:34 PM



#383 User is offline   Ronaldlee Icon

  •   clan leader   
  • Account: ronaldlee
  • Joined: 01-March 10
  • Posts: 142

Posted 13 March 2010 - 05:37 PM

View PostJohnnyenglish, on 12 March 2010 - 02:31 PM, said:

I don't know if you can change or force a weapon mode.

If you're using non standard bots like those in

ut4_urbotpack_v0.1.13_.pk3

or those by RonaldLee (download from the 1up clan forum) you can try fiddling with the CHARACTERISTIC_FIRETHROTTLE settings in the bots _c.c file.

failing that try a tiger or sharpshooter, level 5


You can change the weapon weights, so the bot will be more likely to use the heavier weighted weapon. Here is an example of a bot on 1up Fun Server (using the "1" for a weight means the bot will NEVER use that weapon):

//initial weapon weights

#define W_KNIFE............... 10
#define W_BERETTA............... 22
#define W_DEAGLE............... 20
#define W_SPAS12............... 20
#define W_MP5K............... 50
#define W_UMP45............... 50
#define W_G36............... 95
#define W_AK103............... 95
#define W_M4............... 95
#define W_NEGEV............... 1
#define W_PSG1............... 15
#define W_SR8............... 15
#define W_HK69............... 1
#define W_GRENADE_HE............... 1
#define W_GRENADE_SMOKE............... 1

//the bot has the weapons, so the weights change a little bit (but not for ut)
#define GWW_KNIFE............... 10
#define GWW_BERETTA............... 22
#define GWW_DEAGLE............... 20
#define GWW_SPAS12............... 20
#define GWW_MP5K............... 50
#define GWW_UMP45............... 50
#define GWW_G36............... 95
#define GWW_AK103............... 95
#define GWW_M4............... 95
#define GWW_NEGEV............... 1
#define GWW_PSG1............... 15
#define GWW_SR8............... 15
#define GWW_HK69............... 1
#define GWW_GRENADE_HE............... 1
#define GWW_GRENADE_SMOKE............... 1

//flag weight
#define FLAG_WEIGHT............... 900

//file to start with for fuzzy logic interbreeding sessions
#include "bots/gense/fw_items.c"

_________________

For CTF bots you want to seriously increase the Flag_Weight to more than 900. Some people go above and beyond 1500.

_________________

Starting weapons is another way to go but the weapons you start your bot off with should complement the bot's weapon weights. Bots have smoothest movement in firing with the AK. So now we look at the actual ".bot" file here to see the AK is used for this particular bot and done so in a manner that complements the weapon weights above:

{
name 2girls
funname ^2*AK*killa(*v*)
model athena/terror_b
aifile bots/ut_2girls_c.c
gear FaJARWA
}
____________________

Other notes: you can make knife-only using bots, but when they throw all their knives at you, what then? I have not been able to get a bot to use the negv yet, even with weapon weights at 0 or 1 on all other weapons but the negv, and the negv setting at 400 or so. Guess I have to mess with the weapon switching script. Lately though I have been doing bots from scratch for my own little project. With 4.1 anyway, I pretty much reached the maximum of what could be done for bots with the code as is. Also, I found that using less than level 4 bots is better on a TDM server because that way humans will always triumph over bots and feel more like they (humans) are owning others easily. The philosophy is simple: people like to win and they will come back to a place where they are a winner. However, for CTF I make the bots more aggressive, more jumping, no walking, and more prone to return a flag. This is a great game.

One suggestion for the dev team (but these guys are busy with many other things) is to define the bot for ladder purposes the same as human. Everything else is there. Then bots would climb ladders to go places. It is about four lines of code or ten to fifteen minutes work. That is part of my own little project along with making them jump off walls and run fast at times. It involves creating entities that map makers place in the map at certain places which trigger the bot to jump or whatever. At some point you will be able to go on a jump server and if no other people are there you will still have the bot to show you how to make the jumps.

This post has been edited by Ronaldlee: 13 March 2010 - 05:38 PM


#384 User is offline   Haternet Icon

  • Account: haternet
  • Joined: 04-March 10
  • Posts: 40

Posted 13 March 2010 - 10:45 PM

View Postap0kal0, on 13 March 2010 - 04:32 PM, said:

im using only one bot on standard maps like dressing room and abbey etc, i try to run them in a non dedicated server,its allw orking until i open fire on them


As Johnnyenglish recommended, try removing all 3rd-party maps. In fact, try removing all PK3 files except zpak000.pk3 & zpak000_assets.pk3: I recall the first time I packaged my tweaked bots I named them "mybots.pk3" and they worked -- but after some further (minor) tweaking I decided to name them "ut4_mybots.pk3" and got a crash upon firing, like you're experiencing. I didn't bother double-checking to verify that the filename was the culprit, but it may be the case that files named "ut4_*.pk3" are a problem. (I stress "may" because I don't want to start any false rumors here; I'll try to verify this when I get a chance.)

View PostJohnnyenglish, on 13 March 2010 - 05:03 PM, said:

Thanks Haternet for the info about CHARACTERISTIC_FIRETHROTTLE


You're welcome. I wish I could remember where I found the info so I could point you to it, but I do have my own summary that I saved, with some of my own comments, which I'll post in case anyone's interested (those without comments are self-evident):


CHARACTERISTIC_AGGRESSION (0.0-1.0)

CHARACTERISTIC_AIM_ACCURACY (0.0-1.0)

CHARACTERISTIC_AIM_ACCURACY_<WEAPON> (0.0-1.0)
-- per-weapon AIM_ACCURACY
-- at least some of the Q3 weps appear to be mapped to UrT weps
-- probably best to use same value as AIM_ACCURACY for all

CHARACTERISTIC_AIM_SKILL (0.0-1.0)
-- 0.0 < & <  0.9 = aim affected by enemy movement
-- 0.4 < & <= 0.8 = leads enemy on linear heading
-- 0.5 < & <= 1.0 = prediction shots when enemy not visible (sound tracking and random fire)
-- 0.6 < & <= 1.0 = splash damage by shooting nearby geometry (aim at floors and walls with rockets)
-- 0.8 < & <= 1.0 = leads enemy on exact heading (up and down as well as side to side)
-- probably best to stay below 0.4 for UrT, given the following:
-- the bots ping 0, so there's no point in them leading enemies or firing prediction shots
-- the guns are all hitscan, so we don't want them attempting splash damage
-- (OTOH, when the author wrote "lead" he may have meant "track," in which case stay below 0.5)
-- (moreover, this might all have been accounted for in the UrT code, so that higher values might not produce the undesired effects)

CHARACTERISTIC_AIM_SKILL_<WEAPON> (0.0-1.0)
-- per-weapon AIM_SKILL
-- at least some of the Q3 weps appear to be mapped to UrT weps
-- probably best to use same value as AIM_SKILL for all

CHARACTERISTIC_ALERTNESS (0.0-1.0)
-- view distance, essentially
-- higher = able to spot more distant enemies

CHARACTERISTIC_ATTACK_SKILL (0.0-1.0)
-- 0.0 <  & < 0.2 = stands still to shoot
-- 0.0 <  & < 0.4 = only moves forward/backward
-- 0.3 <  & < 1.0 = aims at enemy during retreat
-- 0.4 <= & < 1.0 = circle strafes
-- 0.7 <  & < 1.0 = randomly strafes and randomly changes direction

CHARACTERISTIC_CAMPER (0.0-1.0)

CHARACTERISTIC_CHAT_CPM (1-4000, whole numbers)
-- how many characters per minute bots can type
-- default = 400, equivalent to a fast human typist

CHARACTERISTIC_CHAT_<EVENT> (0.0-1.0)
-- tendency to use supplied chat strings for defined events

CHARACTERISTIC_CROUCHER (0.0-1.0)

CHARACTERISTIC_EASY_FRAGGER (0.0-1.0)
-- tendency to shoot players who are wielding melee weps or are in the middle of chatting (a.k.a. easy frags)

CHARACTERISTIC_FIRETHROTTLE (0.0-1.0)
-- firing speed (i.e., how fast can bots click +attack)
-- no point going below 1.0, since even n00bs can click fast

CHARACTERISTIC_GRAPPLE_USER (0.0-1.0)
-- does not apply to UrT; use 0.0

CHARACTERISTIC_JUMPER (0.0-1.0)

CHARACTERISTIC_REACTIONTIME (0.0-5.0)
-- reaction time in seconds
-- average person is ~200ms (0.2)
-- average gamer perhaps a bit lower, but below ~150ms (0.15) is approaching the inhuman

CHARACTERISTIC_SELFPRESERVATION (0.0-1.0)
-- tendency to avoid taking suicidal risks

CHARACTERISTIC_VENGEFULNESS (0.0-1.0)
-- tendency to come gunning for previous killer

CHARACTERISTIC_VIEW_FACTOR (0.0-1.0)
-- "view angle difference to angle change factor" (higher = more challenging)

CHARACTERISTIC_VIEW_MAXCHANGE (1-360, float)
-- maximum view angle change in degrees (i.e., how far can bots turn when responding to attacks)
-- most players can't do more than 180 with their sensitivity settings

CHARACTERISTIC_WALKER (0.0-1.0)

CHARACTERISTIC_WEAPONJUMPING (0.0-1.0)
-- does not apply to UrT; use 0.0



View PostRonaldlee, on 13 March 2010 - 05:37 PM, said:

You can change the weapon weights, so the bot will be more likely to use the heavier weighted weapon.


Right, but all the main guns (excepting shotgun/snipers) have full/burst modes, which I'd prefer the bots not use. There doesn't seem to be a way to control this.

This post has been edited by Haternet: 13 March 2010 - 11:24 PM



bullet_loaderAdvertisement

#386 User is offline   ap0kal0 Icon

  • Account: ap0kal0
  • Main tag:
  • Country:
  • Joined: 12-March 10
  • Posts: 35

Posted 14 March 2010 - 04:13 PM

i downloaded urban terror again and now running bots and killing them runs without any problems, thx for the help

#387 User is offline   RYRY46d9 Icon

  • Account: ryry46d9
  • Main tag: Pb|
  • Country:
  • Joined: 01-March 10
  • Posts: 120

Posted 14 March 2010 - 05:24 PM

View PostRonaldlee, on 13 March 2010 - 05:37 PM, said:

I have not been able to get a bot to use the negv yet,


I will <3 ya long time, when you do :laugh:

#388 User is offline   Ronaldlee Icon

  •   clan leader   
  • Account: ronaldlee
  • Joined: 01-March 10
  • Posts: 142

Posted 15 March 2010 - 05:42 AM

View PostJohnnyenglish, on 14 March 2010 - 07:50 AM, said:

As you say, all the code is there, the bots can determine whether they are next to a ladder and the code to move the bot on a ladder also exists but I've not yet worked out why they don't use them.

There is another problem thats interested me for a while, why don't the bots use scope and unscope for G36 (and SR8 etc)? Do we know what's missing here?

RonaldLee, bots with negev - lol


1) The code for a "human" to determine it is on a ladder is there, but not for a bot. It would be pretty much in the same vein. So long as your cvar "bot_groundonly" was set at "0", then bots would sometimes climb ladders and sometimes not climb them.

2) Bots don't use scopes. If they did, it would be for cosmetic purposes only. They fire weapons. Spec them. Give a bunch of them sr8s and see how they act. They will make the most incredible no-scopes.

3) I can define the negev and the bot will take it as a starting weapon, but it will always switch to a handgun. So the problem is in the weapon switching script. I will have to find some time to mess around with it. Another thing I have not been able to get them to do is throw a grenade. If only I had more time to mess around with that, but I don't.

#389 User is offline   kiljoyxtrm Icon

  • Account: kiljoyxtrm
  • Joined: 09-April 10
  • Posts: 2

Posted 10 April 2010 - 05:42 PM

I have also noticed that after you kill a bot, it crashes. Should I download the quake 3 version, or does it not have a mac client?


  • (43 Pages)
  • +
  • « First
  • 37
  • 38
  • 39
  • 40
  • 41
  • Last »
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942