Bot backport on 0.50.0 from master [tutorial for 0.51.1+]

Release and discuss things you've made, including mods.
Post Reply
User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Bot backport on 0.50.0 from master [tutorial for 0.51.1+]

Post by illwieckz »

Edit: the given configuration is the right one since 0.51.1 Unvanquished release, and the extra files do not have to be downloaded neither to be distributed, jump to “5. use bot fill command directly.

This is a backport from development tree for server owners running the alpha 50 release.

It adds those features:

  • make bot escape from place they are stuck
  • add automatic bot filling team (and leaving when real player joins)

History

  • 2017-04-06: initial release;

  • 2017-09-10: update adding proper dependency to not fail on missing cgame,
    avoid some character in pak version string so google chrome does not edit it sneakily while player download it.

How to use it?

1. Get the pk3 there: pkg/dev/botfixes_0.50.0+20170910-202214-illwieckz.pk3

2. Put it in: pkg/dev/botfixes_0.50.0+20170910-202214-illwieckz.pk3

Example if you are running Linux, put it there:

Code: Select all

~/.unvanquished/pkg/dev/botfixes_0.50.0+20170910-202214-illwieckz.pk3

3. Add this option on your daemon's command line: -set fs_extrapaks 'dev/botfixes'

This option must be placed before any +options
Example:

Code: Select all

./daemonded -set net_port 27960 -set fs_extrapaks 'dev/botfixes' +exec server.cfg

4. Enable download

The simplest way is to put that on your server.cfg:

Code: Select all

set sv_allowDownload "1"

The download will be slow as hell so I recommend you to enable http download too, you can use official server as http server and mine as fallback:

Code: Select all

set sv_allowDownload "1"
set sv_wwwDownload "1"
set sv_wwwDlDisconnected "0"
set sv_wwwBaseURL "dl.unvanquished.net/pkg"
set sv_wwwFallbackURL "gg.illwieckz.net/dl/unvanquished/pkg"

If you know how to host your own http server, you can host the botfixes pk3 yourself and put your own server as BaseURL and the dl.unvanquished.net/pkg as FallbackURL. If you don't know how to host your own http server, you must use my server as fallback if you use the bostfixes backport since the official one does not share it.

Edit: starting with 0.51.1 release you only need that:

5. use bot fill command

So, with this backport, this is how you manage bots. Bots must be loaded once the map is loaded, you can have different amount of bots or bot names per map if you want to use per map script, by the way in this tutorial we will use a default one, used for all the maps.

set this on your server.cfg

Code: Select all

set g_mapConfigs "map"

put that on .unvanquished/config/map/default.cfg

Code: Select all

bot fill 1 humans
bot fill 1 aliens

Just increase the number to set more bots on the teams. You can define bot names this way (put it in default.cfg before the bot fill commands (adjust the names according to your preferences), this is a copy paste from my own server config:

Team is optional, if you want to put 30 bots whatever the team on thunder, just write down a .unvanquished/config/map/thunder.cfg file with “bot fill 30” in it.

Code: Select all

bot names clear
bot names humans "^9[bot]^4 Clodomir" "^9[bot]^4 Alaric" "^9[bot]^4 Baudry" "^9[bot]^4 Adelin" "^9[bot]^4 Ferdinand" "^9[bot]^4 Brieux" "^9[bot]^4 Audran" "^9[bot]^4 Alistair" "^9[bot]^4 Renan" "^9[bot]^4 Malo"
bot names aliens "^9[bot]^1 Nolwen" "^9[bot]^1 Uriel" "^9[bot]^1 Morgan" "^9[bot]^1 Lena" "^9[bot]^1 Soizic" "^9[bot]^1 Aroa" "^9[bot]^1 Belem" "^9[bot]^1 Itsaso" "^9[bot]^1 Muxika" "^9[bot]^1 Urrotz"
bot fill 3 humans
bot fill 3 aliens

Tip: you can call other scripts from map config, for example you can define a .unvanquished/config/bot.cfg doing bot fill … stuff and put “exec bot.cfg“ in your .unvanquished/config/map/default.cfg.

I recall my previous thread except all the bot stuff is obsoleted by that botfixes backport, everything else is ok: Some tweaks for server admin

This comment is licensed under cc ​​by 4 and antecedent.

Post Reply