Skip to content

Commit

Permalink
Docs: Enhance full bf2 stack example with improved instructions, cust…
Browse files Browse the repository at this point in the history
…om gameserver configs, and a custom ASP config
  • Loading branch information
leojonathanoh committed Oct 3, 2022
1 parent e35b059 commit c5ded5b
Show file tree
Hide file tree
Showing 11 changed files with 1,288 additions and 82 deletions.
193 changes: 132 additions & 61 deletions docs/full-bf2-stack-example/README.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
echo *****************************************************************************************
echo AIDefault.ai ****************************************************************************
echo *****************************************************************************************

aiSettings.setNSides 2
aiSettings.setAutoSpawnBots 1

rem Let's go with 63 bots! Hope your system holds up
aiSettings.overrideMenuSettings 1
aiSettings.setMaxNBots 63
aiSettings.maxBotsIncludeHumans 0
aiSettings.setBotSkill 1.0

run BotNames.ai

aiSettings.setInformationGridDimension 32


run AIPathFinding.ai

rem EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rem ESAI Strategy : medium FCA PF

rem -= load Enhanced SAI core =-
run /mods/bf2/ESAI/Core/esaicore.ai

rem -= load Enhanced SAI default plugins =-
run /mods/bf2/ESAI/Plugin/default/grabNeutrals.ai
run /mods/bf2/ESAI/Plugin/default/endGame.ai

rem -= load user plugins =-
run /mods/bf2/ESAI/Plugin/user/userConditions.ai
run /mods/bf2/ESAI/Plugin/user/focusedCounterAttack.ai
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rem -= load strategy =-
run /mods/bf2/ESAI/Strategy/user/mediumFCAPF.ai
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
; mods/bf2 coop
maplist.append dalian_plant gpm_coop 16
maplist.append daqing_oilfields gpm_coop 16
maplist.append dragon_valley gpm_coop 16
maplist.append fushe_pass gpm_coop 16
maplist.append greatwall gpm_coop 16
maplist.append gulf_of_oman gpm_coop 16
maplist.append midnight_sun gpm_coop 16
maplist.append operation_clean_sweep gpm_coop 16
maplist.append operationharvest gpm_coop 16
maplist.append operationroadrage gpm_coop 16
maplist.append operationsmokescreen gpm_coop 16
maplist.append road_to_jalalabad gpm_coop 16
maplist.append sharqi_peninsula gpm_coop 16
maplist.append songhua_stalemate gpm_coop 16
maplist.append taraba_quarry gpm_coop 16
maplist.append zatar_wetlands gpm_coop 16

; mods/xpack coop
ghost_town gpm_coop/16
mass_destruction gpm_coop/16
night_flight gpm_coop/16
surge gpm_coop/16
warlord gpm_coop/16
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
; mods/bf2 conquest
maplist.append dalian_plant gpm_cq 16
maplist.append dalian_plant gpm_cq 32
maplist.append dalian_plant gpm_cq 64
maplist.append daqing_oilfields gpm_cq 16
maplist.append daqing_oilfields gpm_cq 32
maplist.append daqing_oilfields gpm_cq 64
maplist.append dragon_valley gpm_cq 128
maplist.append dragon_valley gpm_cq 16
maplist.append dragon_valley gpm_cq 32
maplist.append dragon_valley gpm_cq 64
maplist.append fushe_pass gpm_cq 16
maplist.append fushe_pass gpm_cq 32
maplist.append fushe_pass gpm_cq 64
maplist.append greatwall gpm_cq 16
maplist.append greatwall gpm_cq 32
maplist.append gulf_of_oman gpm_cq 16
maplist.append gulf_of_oman gpm_cq 32
maplist.append gulf_of_oman gpm_cq 64
maplist.append highway_tampa gpm_cq 128
maplist.append highway_tampa gpm_cq 16
maplist.append highway_tampa gpm_cq 32
maplist.append highway_tampa gpm_cq 64
maplist.append highway_tampa gpm_cq 8
maplist.append mashtuur_city gpm_cq 16
maplist.append mashtuur_city gpm_cq 32
maplist.append mashtuur_city gpm_cq 64
maplist.append midnight_sun gpm_cq 16
maplist.append midnight_sun gpm_cq 32
maplist.append midnight_sun gpm_cq 64
maplist.append operation_blue_pearl gpm_cq 16
maplist.append operation_blue_pearl gpm_cq 32
maplist.append operation_blue_pearl gpm_cq 64
maplist.append operation_clean_sweep gpm_cq 16
maplist.append operation_clean_sweep gpm_cq 32
maplist.append operation_clean_sweep gpm_cq 64
maplist.append operationharvest gpm_cq 16
maplist.append operationharvest gpm_cq 32
maplist.append operationharvest gpm_cq 64
maplist.append operationroadrage gpm_cq 16
maplist.append operationroadrage gpm_cq 32
maplist.append operationroadrage gpm_cq 64
maplist.append operationsmokescreen gpm_cq 16
maplist.append operationsmokescreen gpm_cq 32
maplist.append road_to_jalalabad gpm_cq 16
maplist.append road_to_jalalabad gpm_cq 32
maplist.append road_to_jalalabad gpm_cq 64
maplist.append sharqi_peninsula gpm_cq 16
maplist.append sharqi_peninsula gpm_cq 32
maplist.append sharqi_peninsula gpm_cq 64
maplist.append songhua_stalemate gpm_cq 16
maplist.append songhua_stalemate gpm_cq 32
maplist.append songhua_stalemate gpm_cq 64
maplist.append taraba_quarry gpm_cq 16
maplist.append taraba_quarry gpm_cq 32
maplist.append wake_island_2007 gpm_cq 64
maplist.append zatar_wetlands gpm_cq 16
maplist.append zatar_wetlands gpm_cq 32
maplist.append zatar_wetlands gpm_cq 64

; mods/xpack cq
ghost_town gpm_cq/16
ghost_town gpm_cq/32
ghost_town gpm_cq/64
iron_gator gpm_cq/16
iron_gator gpm_cq/32
iron_gator gpm_cq/64
leviathan gpm_cq/16
leviathan gpm_cq/32
leviathan gpm_cq/64
mass_destruction gpm_cq/16
mass_destruction gpm_cq/32
mass_destruction gpm_cq/64
night_flight gpm_cq/16
night_flight gpm_cq/32
night_flight gpm_cq/64
surge gpm_cq/16
surge gpm_cq/32
surge gpm_cq/64
warlord gpm_cq/16
warlord gpm_cq/32
warlord gpm_cq/64
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
sv.serverName "Default Server Name"
sv.password ""
sv.internet 1
sv.serverIP ""
sv.serverPort 16567
sv.welcomeMessage ""
sv.punkBuster 1
sv.allowFreeCam 1
sv.allowExternalViews 1
sv.allowNoseCam 1
sv.hitIndicator 1
sv.maxPlayers 64
sv.numPlayersNeededToStart 0
sv.notEnoughPlayersRestartDelay 15
sv.startDelay 15
sv.endDelay 15
sv.spawnTime 15
sv.manDownTime 15
sv.endOfRoundDelay 15
sv.ticketRatio 100
sv.roundsPerMap 3
sv.timeLimit 0
sv.scoreLimit 0
sv.soldierFriendlyFire 100
sv.vehicleFriendlyFire 100
sv.soldierSplashFriendlyFire 100
sv.vehicleSplashFriendlyFire 100
sv.tkPunishEnabled 1
sv.tkNumPunishToKick 3
sv.tkPunishByDefault 0
sv.votingEnabled 1
sv.voteTime 90
sv.minPlayersForVoting 2
sv.teamVoteOnly 1
sv.gameSpyPort 29900
sv.allowNATNegotiation 0
sv.interfaceIP ""
sv.autoRecord 0
sv.demoIndexURL http://
sv.demoDownloadURL http://
sv.autoDemoHook "adminutils/demo/rotate_demo.py"
sv.demoQuality 1
sv.adminScript "default"
sv.timeBeforeRestartMap 30
sv.autoBalanceTeam 0
sv.teamRatioPercent 100
sv.coopBotRatio 100
sv.coopBotCount 16
sv.coopBotDifficulty 50
sv.voipEnabled 1
sv.voipQuality 3
sv.voipServerRemote 0
sv.voipServerRemoteIP ""
sv.voipServerPort 55125
sv.voipBFClientPort 55123
sv.voipBFServerPort 55124
sv.voipSharedPassword ""
sv.useGlobalRank 1
sv.useGlobalUnlocks 1
sv.noVehicles 0
sv.sponsorText ""
sv.sponsorLogoURL "https://example.com/bf2logo.png"
sv.communityLogoURL "https://example.com/bf2logo.png"
sv.radioSpamInterval 6
sv.radioMaxSpamFlagCount 6
sv.radioBlockedDurationTime 30
sv.numReservedSlots 0
sv.friendlyFireWithMines 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ------------------------------------------------------------------------------
# BF2Statistics 3.0.0 - Config File
# ------------------------------------------------------------------------------
# Conventions:
# 0 -> Disable
# 1 -> Enable
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# Debug Logging
# ------------------------------------------------------------------------------
debug_enable = 1
debug_log_path = 'python/bf2/logs' # Relative from BF2 base folder
debug_fraglog_enable = 0 # Detailed 'Fragalyzer' Logs (requires existing folder "mods/<ModName>/logs/")

# ------------------------------------------------------------------------------
# Statistics Enabling
# ------------------------------------------------------------------------------
# 0 = disable statistics, 1 = enable statistics (requires an ASP stats server)
# By disabling the stats, this server will be "non-ranked"
#
# An AuthID and AuthToken are required to post stats data to the ASP backend.
# Contact your local Stats Admin to recieve an AuthID and AuthToken. Both of
# which are NOT to be shared with anyone!
# ------------------------------------------------------------------------------
stats_enable = 1
stats_auth_id = 112960 # Required to post stats data at the end of round.
stats_auth_token = '2GS61JLR2WQq2n6N' # Required to post stats data at the end of round.

# ------------------------------------------------------------------------------
# ASP Stats Backend Web Server
# ------------------------------------------------------------------------------
http_backend_addr = 'asp-nginx' # Reach ASP over the `bf2-network` docker network. If your ASP is on another host, use its hostname or domain name here.
http_backend_port = 80
http_backend_asp = '/ASP/bf2statistics.php'

# ------------------------------------------------------------------------------
# Snapshot Logging
# ------------------------------------------------------------------------------
# Enables server to make snapshot backups.
# 0 = log only on error sending to backend
# 1 = all snapshots
# ------------------------------------------------------------------------------
snapshot_logging = 0
snapshot_log_path_sent = 'python/bf2/logs/snapshots/sent' # Relative from the BF2 base folder
snapshot_log_path_unsent = 'python/bf2/logs/snapshots/unsent' # Relative from the BF2 base folder

# ------------------------------------------------------------------------------
# Medals Processing
# ------------------------------------------------------------------------------
# Suffix for your custom medals file(s).
# Example: A profile named "custom" = medal_data_custom.py
# ------------------------------------------------------------------------------
medals_custom_data = 'custom'
# A list of mods that xpack (special forces) medals can be earned while playing
# Example: ['mods/xpack', 'mods/bf2', 'mods/ModName'] (all entries must be lower case!!)
medals_xpack_mods = ['mods/bf2sfsp','mods/xpack']

# ------------------------------------------------------------------------------
# Player Manager
# ------------------------------------------------------------------------------
# Local IP address for AI Bots
# ------------------------------------------------------------------------------
pm_ai_player_addr = '127.0.0.1' # Not recommended to change


# ------------------------------------------------------------------------------
# END CONFIGURATION
# ------------------------------------------------------------------------------
15 changes: 9 additions & 6 deletions docs/full-bf2-stack-example/config/coredns/Corefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
.:53 {
# Try resolving DNS using the hosts file first
hosts /hosts {
ttl 300 # DNS TTL
ttl 1 # DNS TTL. 1 second so that the BF2 client doesn't cache the DNS
no_reverse # Do not generate reverse DNS records
reload 5s # hosts file reload interval
fallthrough # If no host is matched, continue down the plugin chain
}

# If it didn't match any records in the hosts file, forward this DNS request to upstream DNS servers
forward . tls://1.1.1.1 tls://1.0.0.1 {
tls_servername cloudflare-dns.com
health_check 5s
}
# If it didn't match any records in the hosts file, forward this to your router's DNS server
forward . 192.168.0.1:53

# Or forward this DNS request to public DNS servers
# forward . tls://1.1.1.1 tls://1.0.0.1 {
# tls_servername cloudflare-dns.com
# health_check 5s
# }

# Log everything. There might be a performance hit, so remove it for better performance
log
Expand Down
Loading

0 comments on commit c5ded5b

Please sign in to comment.