diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index a1d1a37..0c412ef 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -616,7 +616,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1 + id: prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2 run: | set -e @@ -629,7 +629,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="v1.5.3153.0-bf2all64-bf2stats-2.7.1" + VARIANT="v1.5.3153.0-bf2all64-bf2stats-2.7.2" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -639,45 +639,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: v1.5.3153.0-bf2all64-bf2stats-2.7.1 - Build (PRs) + - name: v1.5.3153.0-bf2all64-bf2stats-2.7.2 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1 + context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2 platforms: linux/386,linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: v1.5.3153.0-bf2all64-bf2stats-2.7.1 - Build and push (master) + - name: v1.5.3153.0-bf2all64-bf2stats-2.7.2 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1 + context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2 platforms: linux/386,linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: v1.5.3153.0-bf2all64-bf2stats-2.7.1 - Build and push (release) + - name: v1.5.3153.0-bf2all64-bf2stats-2.7.2 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1 + context: variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2 platforms: linux/386,linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2all64-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1353,7 +1353,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-v1-5-3153-0-bf2stats-2-7-1 + id: prep-v1-5-3153-0-bf2stats-2-7-2 run: | set -e @@ -1366,7 +1366,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="v1.5.3153.0-bf2stats-2.7.1" + VARIANT="v1.5.3153.0-bf2stats-2.7.2" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1376,45 +1376,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: v1.5.3153.0-bf2stats-2.7.1 - Build (PRs) + - name: v1.5.3153.0-bf2stats-2.7.2 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/v1.5.3153.0-bf2stats-2.7.1 + context: variants/v1.5.3153.0-bf2stats-2.7.2 platforms: linux/386,linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: v1.5.3153.0-bf2stats-2.7.1 - Build and push (master) + - name: v1.5.3153.0-bf2stats-2.7.2 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/v1.5.3153.0-bf2stats-2.7.1 + context: variants/v1.5.3153.0-bf2stats-2.7.2 platforms: linux/386,linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: v1.5.3153.0-bf2stats-2.7.1 - Build and push (release) + - name: v1.5.3153.0-bf2stats-2.7.2 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/v1.5.3153.0-bf2stats-2.7.1 + context: variants/v1.5.3153.0-bf2stats-2.7.2 platforms: linux/386,linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-5-3153-0-bf2stats-2-7-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max diff --git a/README.md b/README.md index d685f4e..a249239 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ All images contain [`Battlefield 2 Server 1.50`](https://www.bf-games.net/downlo | `:v1.5.3153.0-bf2all64-bf2stats-2.4.6` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.4.6 ) | | `:v1.5.3153.0-bf2all64-bf2stats-2.5.1` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.5.1 ) | | `:v1.5.3153.0-bf2all64-bf2stats-2.6.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.6.0 ) | -| `:v1.5.3153.0-bf2all64-bf2stats-2.7.1` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.7.1 ) | +| `:v1.5.3153.0-bf2all64-bf2stats-2.7.2` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2 ) | | `:v1.5.3153.0-bf2all64-bf2stats-3.1.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.1.0 ) | | `:v1.5.3153.0-bf2all64-bf2stats-3.1.2` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.1.2 ) | | `:v1.5.3153.0-bf2all64-bf2stats-3.2.0` | [View](variants/v1.5.3153.0-bf2all64-bf2stats-3.2.0 ) | @@ -31,7 +31,7 @@ All images contain [`Battlefield 2 Server 1.50`](https://www.bf-games.net/downlo | `:v1.5.3153.0-bf2stats-2.4.6` | [View](variants/v1.5.3153.0-bf2stats-2.4.6 ) | | `:v1.5.3153.0-bf2stats-2.5.1` | [View](variants/v1.5.3153.0-bf2stats-2.5.1 ) | | `:v1.5.3153.0-bf2stats-2.6.0` | [View](variants/v1.5.3153.0-bf2stats-2.6.0 ) | -| `:v1.5.3153.0-bf2stats-2.7.1` | [View](variants/v1.5.3153.0-bf2stats-2.7.1 ) | +| `:v1.5.3153.0-bf2stats-2.7.2` | [View](variants/v1.5.3153.0-bf2stats-2.7.2 ) | | `:v1.5.3153.0-bf2stats-3.1.0` | [View](variants/v1.5.3153.0-bf2stats-3.1.0 ) | | `:v1.5.3153.0-bf2stats-3.1.2` | [View](variants/v1.5.3153.0-bf2stats-3.1.2 ) | | `:v1.5.3153.0-bf2stats-3.2.0` | [View](variants/v1.5.3153.0-bf2stats-3.2.0 ) | diff --git a/docs/usage.md b/docs/usage.md index a1724bc..bf4fcbb 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -59,13 +59,13 @@ To customize the server, edit `serversettings.con` and `maplist.con` accordingly ```sh # Generate serversettings.con and customize -docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 cat /server/bf2/mods/bf2/settings/serversettings.con > serversettings.con +docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 cat /server/bf2/mods/bf2/settings/serversettings.con > serversettings.con # Generate maplist.con (coop) -docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_coop' > maplist.con +docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_coop' > maplist.con # Generate maplist.con (conquest) -docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_cq' > maplist.con +docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 bash -c '(esai-helper -m bf2 get maplist; esai-helper -m xpack get maplist) | grep gpm_cq' > maplist.con # Generate BF2StatisticsConfig.py and customize -docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 cat /server/bf2/python/bf2/BF2StatisticsConfig.py > BF2StatisticsConfig.py +docker run --rm startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 cat /server/bf2/python/bf2/BF2StatisticsConfig.py > BF2StatisticsConfig.py # BF2 server with BF2Statistics 2.x.x docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \ -v "$(pwd)/serversettings.con:/server/bf2/mods/bf2/settings/serversettings.con:ro" \ @@ -74,7 +74,7 @@ docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \ --add-host bf2web.gamespy.com:192.168.1.100 \ --add-host gamestats.gamespy.com:192.168.1.100 \ --add-host eapusher.dice.se:192.168.1.100 \ - startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 + startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 ``` See `docker-compose` examples: @@ -308,7 +308,7 @@ docker run --rm -it -p 16567:16567/udp -p 29900:29900/udp \ --add-host bf2web.gamespy.com:192.168.1.100 \ --add-host gamestats.gamespy.com:192.168.1.100 \ --add-host eapusher.dice.se:192.168.1.100 \ - startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.1 + startersclan/docker-bf2:v1.5.3153.0-bf2stats-2.7.2 ``` See `docker-compose` examples: diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index b3e3679..7654695 100644 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -12,7 +12,7 @@ $local:VARIANTS_MATRIX = @( @{ components = @( 'bf2all64', 'bf2stats-2.4.6' ) } @{ components = @( 'bf2all64', 'bf2stats-2.5.1' ) } @{ components = @( 'bf2all64', 'bf2stats-2.6.0' ) } - @{ components = @( 'bf2all64', 'bf2stats-2.7.1' ) } + @{ components = @( 'bf2all64', 'bf2stats-2.7.2' ) } @{ components = @( 'bf2all64', 'bf2stats-3.1.0' ) } @{ components = @( 'bf2all64', 'bf2stats-3.1.2' ) } @{ components = @( 'bf2all64', 'bf2stats-3.2.0' ) } @@ -23,7 +23,7 @@ $local:VARIANTS_MATRIX = @( @{ components = @( 'bf2stats-2.4.6' ) } @{ components = @( 'bf2stats-2.5.1' ) } @{ components = @( 'bf2stats-2.6.0' ) } - @{ components = @( 'bf2stats-2.7.1' ) } + @{ components = @( 'bf2stats-2.7.2' ) } @{ components = @( 'bf2stats-3.1.0' ) } @{ components = @( 'bf2stats-3.1.2' ) } @{ components = @( 'bf2stats-3.2.0' ) } @@ -65,7 +65,7 @@ $VARIANTS = @( @{ variables = @{ # Since bf2stats 2 python files - # E.g. https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.1.tar.gz + # E.g. https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.2.tar.gz bf2stats_2_sha256sum = @" 29a25c6e78062f34b05d7086aad530b598b4c9ed3f32164ffcf3b1c52b33f553 2.3.0.tar.gz 9a5e0544ba1474feb5ca0194449f6d6dee521abf59cba96dbc94387490d660b0 2.3.1.tar.gz @@ -88,6 +88,7 @@ e07f46f0078fc0dcdbeb0dd86e1e9add4b502b0d7b263711dcad957ec4a6de61 2.5.1.tar.gz 7a75b58fec1b1d105c1a495e543eff6f2ee0fd0bf4ab010078539ef95e55f6e7 2.6.0.tar.gz daeb57232cd1725bea3cf45c197fba13d99251864347ffff44552aae585b273a 2.7.0.tar.gz 96a9cd2c1283668e417f45ee14dec6307cbad9f310a81e2e8b5af95a871fef4f 2.7.1.tar.gz +bee8933873b42fff26aff34de964d54f4f470e256be43de7ab30ad122788d605 2.7.2.tar.gz "@ # Since bf2stats 3 python files # E.g. https://github.com/startersclan/statspython/archive/refs/tags/3.2.0.tar.gz diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/Dockerfile b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/Dockerfile new file mode 100644 index 0000000..dd492b3 --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/Dockerfile @@ -0,0 +1,101 @@ +FROM ubuntu:16.04 as install +ARG TARGETPLATFORM=linux/amd64 +ARG BUILDPLATFORM=linux/amd64 +RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" + +# Install network utilities which can be useful for debugging issues +# Install unzip and zip for the sake of applying ESAI strategies in ./mods/*/levels/*/server.zip at './GameModes/[gpm_coop|gpm_cq|sp1|sp2|sp3]/[16|32|64]/AI/Strategies.ai' +RUN export DEBIAN_FRONTEND=noninteractive; \ + apt-get update; \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + curl \ + conntrack dnsutils iproute2 netcat net-tools tcpdump \ + unzip zip \ + ; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/*; + +# Install Battlefield 2 server +WORKDIR /root +COPY aibehaviours-fixlookatwrapper.ai /aibehaviours-fixlookatwrapper.ai +RUN set -eux; \ + curl -sSLO https://files.startersclan.com/ea/bf2/bf2-linuxded-1.5.3153.0-installer.tgz; \ + sha256sum bf2-linuxded-1.5.3153.0-installer.tgz | grep "^4d849218c1725e7bd6a7e7f164e27b036248f8ded2e30340dd0722c1dfffbab6 "; \ + tar -zxvf bf2-linuxded-1.5.3153.0-installer.tgz; \ + sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec --info; \ + sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec; \ + rm -v bf2-linuxded-1.5.3153.0-installer.sh; \ + rm -v bf2-linuxded-1.5.3153.0-installer.tgz; \ + cd /install; \ + mkdir -p /server; \ + # Show the licenses without a pager + cat /install/license.sh | sed 's/^more/cat/' > /install/license-fixed.sh; \ + # Agree to licenses + printf '\naccept\n\nyes\n/server\ny\n' | sh /install/license-fixed.sh; \ + find /server; \ + rm -rf /install; \ + # Apply the LookAtWrapper fix to prevent crashes when playing with bots + mv -v /server/bf2/mods/bf2/ai/aibehaviours.ai /server/bf2/mods/bf2/ai/aibehaviours.ai.original; \ + cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/bf2/ai/aibehaviours.ai; \ + mv -v /server/bf2/mods/xpack/ai/aibehaviours.ai /server/bf2/mods/xpack/ai/aibehaviours.ai.original; \ + cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/xpack/ai/aibehaviours.ai; \ + rm -v /aibehaviours-fixlookatwrapper.ai + +# Install bf2all64 mod +WORKDIR /root +COPY aibehaviours-fixlookatwrapper.ai /aibehaviours-fixlookatwrapper.ai +RUN set -eux; \ + curl -sSLO https://files.startersclan.com/ea/bf2/bf2all64_v1.0_setup.zip; \ + sha256sum bf2all64_v1.0_setup.zip | grep '^4ee82d91043c4afbf1bed50787cbf98af124bd7e6c608cdb0f5115c7761024f1 '; \ + unzip bf2all64_v1.0_setup.zip -d extract; \ + rm -rf /server/bf2/mods/bf2all64; \ + mv extract/bf2all64 /server/bf2/mods; \ + rm -fv bf2all64_v1.0_setup.zip; \ + # Apply the LookAtWrapper fix to prevent crashes when playing with bots + mv -v /server/bf2/mods/bf2all64/ai/aibehaviours.ai /server/bf2/mods/bf2all64/ai/aibehaviours.ai.original; \ + cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/bf2all64/ai/aibehaviours.ai; \ + rm -v /aibehaviours-fixlookatwrapper.ai + +# Install bf2stats 2.7.2 +WORKDIR /root +RUN set -eux; \ + curl -sSLO https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.2.tar.gz; \ + echo "96a9cd2c1283668e417f45ee14dec6307cbad9f310a81e2e8b5af95a871fef4f 2.7.2.tar.gz bee8933873b42fff26aff34de964d54f4f470e256be43de7ab30ad122788d605 2.7.2.tar.gz" | sha256sum -c -; \ + mkdir -p extract; \ + tar -C extract -zxvf 2.7.2.tar.gz; \ + rm -rf /server/bf2/python; \ + mv extract/bf2stats-2.7.2/src/python /server/bf2/python; \ + rm -fv 2.7.2.tar.gz; \ + rm -rf extract + +# Install ESAI in all mods +WORKDIR /root +COPY ESAI-Standard-v4.2.zip ESAI-Standard-v4.2.zip +COPY lowercase-helper /usr/local/bin/lowercase-helper +RUN set -eux; \ + sha256sum ESAI-Standard-v4.2.zip | grep '^ef4e5d0f1446b9a2ddb0b350f1334273681c0f64d9c38c506320db769b24499c '; \ + # Lowercase all files in ESAI folder + for i in $( ls /server/bf2/mods ); do \ + unzip ESAI-Standard-v4.2.zip -d /server/bf2/mods/$i; \ + lowercase-helper --dir "/server/bf2/mods/$i/ESAI"; \ + done; \ + # Lowercase ESAI mapfiles' content + for i in $( find /server/bf2/mods/*/esai/mapfiles -type f ); do \ + CONTENT=$( cat "$i" ); \ + echo "$CONTENT" | tr '[:upper:]' '[:lower:]' > "$i"; \ + done; + +# Install esai-helper and configs +COPY esai-helper /usr/local/bin/esai-helper +COPY esai-optimized-strategies-bf2.txt /esai-optimized-strategies-bf2.txt +COPY esai-optimized-strategies-bf2all64.txt /esai-optimized-strategies-bf2all64.txt +COPY esai-optimized-strategies-xpack.txt /esai-optimized-strategies-xpack.txt + +COPY healthcheck /healthcheck + +# EXPOSE 16567/udp +# EXPOSE 29900/udp +# HEALTHCHECK CMD /healthcheck +WORKDIR /server/bf2 +CMD [ "./start.sh", "+modPath", "mods/bf2all64" ] diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/ESAI-Standard-v4.2.zip b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/ESAI-Standard-v4.2.zip new file mode 100644 index 0000000..4870cee Binary files /dev/null and b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/ESAI-Standard-v4.2.zip differ diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/aibehaviours-fixlookatwrapper.ai b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/aibehaviours-fixlookatwrapper.ai new file mode 100644 index 0000000..61a95f0 --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/aibehaviours-fixlookatwrapper.ai @@ -0,0 +1,822 @@ +rem *** Set number of behaviours and id/name mappings *** +aiSettings.setMaxNumberOfBehaviours 13 + +aiSettings.setBehaviour 0 Avoid +aiSettings.setBehaviour 1 MoveTo +aiSettings.setBehaviour 2 Idle +aiSettings.setBehaviour 3 Fire +aiSettings.setBehaviour 4 TakeCover +aiSettings.setBehaviour 5 Change +aiSettings.setBehaviour 6 Special +aiSettings.setBehaviour 7 Revive +aiSettings.setBehaviour 8 c4 +aiSettings.setBehaviour 9 Special2 +aiSettings.setBehaviour 10 Special3 +aiSettings.setBehaviour 11 Random +aiSettings.setBehaviour 12 Triggerable + + +rem *** Set number of vehicles and id/name mappings *** +aiSettings.setVehicle Tank +aiSettings.setVehicle Plane +aiSettings.setVehicle Boat +aiSettings.setVehicle Infantery +aiSettings.setVehicle Fixed +aiSettings.setVehicle Car +aiSettings.setVehicle LandingCraft +aiSettings.setVehicle Passenger +aiSettings.setVehicle LandingCraftPassenger +aiSettings.setVehicle LandingCraftFixed +aiSettings.setVehicle Helicopter +aiSettings.setVehicle TransportHelicopter +aiSettings.setVehicle ArmedCar +aiSettings.setVehicle ManDown +aiSettings.setVehicle ParatrooperFixed + +aiSettings.setVehicleClusterMapping Tank Tank +aiSettings.setVehicleClusterMapping Boat LandingCraft +aiSettings.setVehicleClusterMapping Infantery Infantery +aiSettings.setVehicleClusterMapping Car Tank +rem aiSettings.setVehicleClusterMapping LandingCraft LandingCraft +aiSettings.setVehicleClusterMapping LandingCraft ArmedCar +aiSettings.setVehicleClusterMapping ArmedCar ArmedCar + + +rem *** Set Sensing Agent Patterns id/name mappings *** +aiSettings.setSensingAgentPatternName Turret +aiSettings.setSensingAgentPatternName MouseFreeLook +aiSettings.setSensingAgentPatternName Soldier +aiSettings.setSensingAgentPatternName Null +rem the null pattern +aiSettings.setSensingAgentNullPattern Null + + +aiSettings.setManDownEquipment ManDown + +rem *** IMPORTANT !!! ************************** +rem * NEVER ALLOW IDLE's urgency to become 0. * +rem * The AI will CRASH in that case. * +rem *** REMINDER ******************************* + +rem *** Construct unit weights *** +aiSettings.createBehaviourModifiers UnitWeights +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 1.0 +aiSettings.setBehaviourModifier Fire 1.0 +aiSettings.setBehaviourModifier Special 1.0 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct HeliMove weights *** +aiSettings.createBehaviourModifiers HeliMoveWeights +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 0.01 +aiSettings.setBehaviourModifier Fire 1.0 +aiSettings.setBehaviourModifier Special 1.0 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct standard weights *** +aiSettings.createBehaviourModifiers StandardWeights +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 0.1 +aiSettings.setBehaviourModifier Fire 7.5 +aiSettings.setBehaviourModifier Special 3.0 +aiSettings.setBehaviourModifier TakeCover 2.0 +aiSettings.setBehaviourModifier Change 1.9 +aiSettings.setBehaviourModifier Revive 3.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct plane weights *** +aiSettings.createBehaviourModifiers PlaneWeights +aiSettings.setBehaviourModifier Avoid 0.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 0.1 +aiSettings.setBehaviourModifier Fire 1.5 +aiSettings.setBehaviourModifier Special 1.0 +aiSettings.setBehaviourModifier TakeCover 0.0 +aiSettings.setBehaviourModifier Change 0.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct Avoid inhibitors *** +aiSettings.createBehaviourModifiers AvoidInhibit +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 0.3 +aiSettings.setBehaviourModifier Idle 1.0 +aiSettings.setBehaviourModifier Fire 1.0 +aiSettings.setBehaviourModifier Special 0.5 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct Change Inhibit *** +aiSettings.createBehaviourModifiers ChangeInhibit +aiSettings.setBehaviourModifier Avoid 0.8 +aiSettings.setBehaviourModifier MoveTo 0.0 +aiSettings.setBehaviourModifier Idle 0.01 +aiSettings.setBehaviourModifier Fire 0.75 +aiSettings.setBehaviourModifier Special 0.0 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Set basic weights for bot behaviour *** +aiSettings.setBasicBotWeights UnitWeights +aiSettings.setStandardPersonality UnitWeights 1 +aiSettings.setStandardPersonality UnitWeights 2 + +rem ************************* Vehicle behaviour setup ****************************** + +aiSettings.createUCConstant UCUnion 1.0 +aiSettings.createUCLinear UCFire -0.22 1.3 +aiSettings.createUCLinear UCCallForMedic 0.1 1 +aiSettings.createUCXInverse UCScout 2.5 0.9 1.0 0.5 + +rem *** Tank Behaviour setup *** +aisettings.setVehicleMods Tank StandardWeights +aiSettings.setVehicleMaterialCost Tank Ground 1 +aiSettings.setVehicleMaterialCost Tank Road 1 +aiSettings.setVehicleMaterialCost Tank Shallows 1.5 +aiSettings.setVehicleMaterialCost Tank DeepWater -1 +aiSettings.setVehicleBehaviour Tank Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Tank MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Tank Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Tank Idle +aiSettings.addInterpreterEntry Tank MoveToMedium Medium +aiSettings.addInterpreterEntry Tank MoveToObjectMedium Medium +aiSettings.addInterpreterEntry Tank InfoWrapper +aiSettings.addInterpreterEntry Tank TankMoveTo +aiSettings.addInterpreterEntry Tank TankTurnTo +aiSettings.addInterpreterEntry Tank TankMoveToDirection +aiSettings.addInterpreterEntry Tank TankMoveToObject +aiSettings.addInterpreterEntry Tank Trigger +aiSettings.addInterpreterEntry Tank TriggerContinously +aiSettings.addInterpreterEntry Tank MouseTurretAimAt +aiSettings.addInterpreterEntry Tank TankResetControls +aiSettings.addInterpreterEntry Tank MouseTurretLookAt +aiSettings.addInterpreterEntry Tank Sense +aiSettings.activateDefaultInterpreter Tank BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter Tank BAPSTParallel Full +aiSettings.activateDefaultInterpreter Tank BAPSTSerial Full +aiSettings.activateDefaultInterpreter Tank BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Tank BAPSTIf Full +aiSettings.activateDefaultInterpreter Tank BAPSTWait Full +aiSettings.activateDefaultInterpreter Tank BAPSTWhile Full +aiSettings.activateDefaultInterpreter Tank BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Tank BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Tank BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Tank BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Tank BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Tank BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Tank BAPSTIdle Full +aiSettings.activateDefaultInterpreter Tank BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Tank BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Tank BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Tank BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTDebug Full +aiSettings.activateDefaultInterpreter Tank BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Tank BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Tank BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern Tank Turret + +rem *** Plane Behaviour setup *** +aisettings.setVehicleMods Plane StandardWeights +aiSettings.setVehicleBehaviour Plane MoveTo BBMoveTo BBPGotoWaypoint3d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Plane Idle BBIdle BBPIdle3d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Plane Fire BBFire3d BBPFire3d 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Plane Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Plane Idle +aiSettings.addInterpreterEntry Plane InfoWrapper +aiSettings.addInterpreterEntry Plane PlaneMoveTo +aiSettings.addInterpreterEntry Plane PlaneMoveToDirection +aiSettings.addInterpreterEntry Plane PlaneMoveToObject +aiSettings.addInterpreterEntry Plane Trigger +aiSettings.addInterpreterEntry Plane TriggerContinously +aiSettings.addInterpreterEntry Plane PlaneAimAt +aiSettings.addInterpreterEntry Plane PlaneResetControls +aiSettings.addInterpreterEntry Plane Sense +aiSettings.activateDefaultInterpreter Plane BAPSTParallel Full +aiSettings.activateDefaultInterpreter Plane BAPSTSerial Full +aiSettings.activateDefaultInterpreter Plane BAPSTIf Full +aiSettings.activateDefaultInterpreter Plane BAPSTWait Full +aiSettings.activateDefaultInterpreter Plane BAPSTWhile Full +aiSettings.activateDefaultInterpreter Plane BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Plane BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Plane BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Plane BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Plane BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Plane BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Plane BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Plane BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Plane BAPSTIdle Full +aiSettings.activateDefaultInterpreter Plane BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Plane BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Plane BAPSTDebug Full +aiSettings.activateDefaultInterpreter Plane BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Plane BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter Plane BAPSTLookAtWrapper Full + +rem *** Boat Behaviour setup *** +aisettings.setVehicleMods Boat StandardWeights +aiSettings.setVehicleMaterialCost Boat Ground -1 +aiSettings.setVehicleMaterialCost Boat Road -1 +aiSettings.setVehicleMaterialCost Boat Shallows -1 +aiSettings.setVehicleMaterialCost Boat DeepWater 1 +aiSettings.setVehicleBehaviour Boat Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Boat MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Boat Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Boat Fire BBFireLargeBore BBPFire2d 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Boat Change BBChangeTeleport BBPChangeTeleport 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Boat Idle +aiSettings.addInterpreterEntry Boat InfoWrapper +aiSettings.addInterpreterEntry Boat BoatMoveTo +aiSettings.addInterpreterEntry Boat BoatMoveToDirection +aiSettings.addInterpreterEntry Boat BoatMoveToObject +aiSettings.addInterpreterEntry Boat Trigger +aiSettings.addInterpreterEntry Boat TriggerContinously +aiSettings.addInterpreterEntry Boat MouseTurretLookAt +aiSettings.addInterpreterEntry Boat MouseTurretAimAt +aiSettings.addInterpreterEntry Boat Sense +aiSettings.addInterpreterEntry Boat BoatResetControls +aiSettings.activateDefaultInterpreter Boat BAPSTParallel Full +aiSettings.activateDefaultInterpreter Boat BAPSTSerial Full +aiSettings.activateDefaultInterpreter Boat BAPSTIf Full +aiSettings.activateDefaultInterpreter Boat BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Boat BAPSTWait Full +aiSettings.activateDefaultInterpreter Boat BAPSTWhile Full +aiSettings.activateDefaultInterpreter Boat BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Boat BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Boat BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Boat BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Boat BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Boat BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Boat BAPSTIdle Full +aiSettings.activateDefaultInterpreter Boat BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Boat BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Boat BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Boat BAPSTDebug Full +aiSettings.activateDefaultInterpreter Boat BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Boat BAPSTEvaluateCondition Full + +rem *** Infantery Behaviour setup *** +aisettings.setVehicleMods Infantery StandardWeights +aiSettings.setVehicleMaterialCost Infantery Ground 1 +aiSettings.setVehicleMaterialCost Infantery Road 1 +aiSettings.setVehicleMaterialCost Infantery Shallows 1.5 +aiSettings.setVehicleMaterialCost Infantery DeepWater 6 +aiSettings.setVehicleBehaviour Infantery Avoid BBAvoid BBPAvoidCollisionInfantery 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Infantery MoveTo BBMoveTo BBPGotoWaypointInfantery 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Idle BBIdle BBPIdleInfantery 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Infantery Special BBMedicAssist BBPMedicAssist 12 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery c4 BBC4 BBPC4 12 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Change BBChange BBPChange 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Revive BBRevive BBPRevive 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Random BBRandom BBPRandom 12 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Triggerable BBTriggerable BBPTriggerable 12 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Infantery Idle +aiSettings.addInterpreterEntry Infantery MoveToMediumSoldier Medium +aiSettings.addInterpreterEntry Infantery MoveToObjectMediumSoldier Medium +aiSettings.addInterpreterEntry Infantery InfoWrapper +aiSettings.addInterpreterEntry Infantery InfanteryMoveTo +aiSettings.addInterpreterEntry Infantery InfanteryMoveToDirection +aiSettings.addInterpreterEntry Infantery InfanteryMoveToObject +aiSettings.addInterpreterEntry Infantery Trigger +aiSettings.addInterpreterEntry Infantery TriggerContinously +aiSettings.addInterpreterEntry Infantery MouseTurretAimAt +aiSettings.addInterpreterEntry Infantery InfanteryResetControls +aiSettings.addInterpreterEntry Infantery MouseTurretLookAt +aiSettings.addInterpreterEntry Infantery Sense +aiSettings.addInterpreterEntry Infantery SoldierPose +aiSettings.activateDefaultInterpreter Infantery BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter Infantery BAPSTPlaceC4 Full +aiSettings.activateDefaultInterpreter Infantery BAPSTParallel Full +aiSettings.activateDefaultInterpreter Infantery BAPSTSerial Full +aiSettings.activateDefaultInterpreter Infantery BAPSTIf Full +aiSettings.activateDefaultInterpreter Infantery BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Infantery BAPSTWait Full +aiSettings.activateDefaultInterpreter Infantery BAPSTWhile Full +aiSettings.activateDefaultInterpreter Infantery BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Infantery BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Infantery BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Infantery BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Infantery BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Infantery BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Infantery BAPSTIdle Full +aiSettings.activateDefaultInterpreter Infantery BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Infantery BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Infantery BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Infantery BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTDebug Full +aiSettings.activateDefaultInterpreter Infantery BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Infantery BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Infantery BAPSTEvaluateCondition Full +aiSettings.activateDefaultInterpreter Infantery BAPSTRevive Full +aiSettings.addSensingAgentPattern Infantery Soldier + + + +rem *** Fixed Behaviour setup *** +aisettings.setVehicleMods Fixed StandardWeights +aiSettings.setVehicleBehaviour Fixed Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Fixed MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Change BBChange BBPChange 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Fixed Idle +aiSettings.addInterpreterEntry Fixed InfoWrapper +aiSettings.addInterpreterEntry Fixed Trigger +aiSettings.addInterpreterEntry Fixed TriggerContinously +aiSettings.addInterpreterEntry Fixed MouseTurretAimAt +aiSettings.addInterpreterEntry Fixed MouseTurretLookAt +aiSettings.addInterpreterEntry Fixed Sense +aiSettings.addInterpreterEntry Fixed InfanteryResetControls +aiSettings.activateDefaultInterpreter Fixed BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter Fixed BAPSTParallel Full +aiSettings.activateDefaultInterpreter Fixed BAPSTSerial Full +aiSettings.activateDefaultInterpreter Fixed BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Fixed BAPSTIf Full +aiSettings.activateDefaultInterpreter Fixed BAPSTWait Full +aiSettings.activateDefaultInterpreter Fixed BAPSTWhile Full +aiSettings.activateDefaultInterpreter Fixed BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Fixed BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Fixed BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Fixed BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Fixed BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Fixed BAPSTNotifyBot Full + +aiSettings.activateDefaultInterpreter Fixed BAPSTIdle Full +aiSettings.activateDefaultInterpreter Fixed BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Fixed BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Fixed BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Fixed BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTDebug Full +aiSettings.activateDefaultInterpreter Fixed BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Fixed BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern Fixed Turret + +rem *** Car Behaviour setup *** +aiSettings.setVehicleMaterialCost Car Ground 1 +aiSettings.setVehicleMaterialCost Car Road 1 +aiSettings.setVehicleMaterialCost Car Shallows 1.8 +aiSettings.setVehicleMaterialCost Car DeepWater -1 + +aisettings.setVehicleMods Car StandardWeights +aiSettings.setVehicleBehaviour Car Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Car MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Change BBChange BBPChange 2 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Fire BBFireUnarmed BBPFireDriveAttack 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Special BBRunOverSoldier BBPRunOverSoldier 6 UCUnion UnitWeights + +aiSettings.setVehicleBehaviour Car Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Car Idle + +aiSettings.addInterpreterEntry Car CarResetControls +aiSettings.addInterpreterEntry Car MoveToMedium Medium +aiSettings.addInterpreterEntry Car MoveToObjectMedium Medium +aiSettings.addInterpreterEntry Car InfoWrapper +aiSettings.addInterpreterEntry Car CarMoveTo +aiSettings.addInterpreterEntry Car CarMoveToDirection +aiSettings.addInterpreterEntry Car CarMoveToObject +aiSettings.addInterpreterEntry Car Trigger +aiSettings.addInterpreterEntry Car TriggerContinously +aiSettings.addInterpreterEntry Car MouseTurretAimAt +aiSettings.addInterpreterEntry Car MouseTurretLookAt +aiSettings.addInterpreterEntry Car Sense +aiSettings.activateDefaultInterpreter Car BAPSTParallel Full +aiSettings.activateDefaultInterpreter Car BAPSTSerial Full +aiSettings.activateDefaultInterpreter Car BAPSTIf Full +aiSettings.activateDefaultInterpreter Car BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Car BAPSTWait Full +aiSettings.activateDefaultInterpreter Car BAPSTWhile Full +aiSettings.activateDefaultInterpreter Car BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Car BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Car BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Car BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Car BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Car BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Car BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Car BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Car BAPSTIdle Full +aiSettings.activateDefaultInterpreter Car BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Car BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Car BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Car BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Car BAPSTDebug Full +aiSettings.activateDefaultInterpreter Car BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Car BAPSTRunOverObject Full +aiSettings.activateDefaultInterpreter Car BAPSTHonkHorn Full +aiSettings.activateDefaultInterpreter Car BAPSTEvaluateCondition Full + +rem *** LandingCraft Behaviour setup *** +aisettings.setVehicleMods LandingCraft StandardWeights +aiSettings.setVehicleMaterialCost LandingCraft Ground 10 +aiSettings.setVehicleMaterialCost LandingCraft Road 10 +aiSettings.setVehicleMaterialCost LandingCraft Shallows 2 +aiSettings.setVehicleMaterialCost LandingCraft DeepWater 1 +aiSettings.setVehicleBehaviour LandingCraft Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour LandingCraft MoveTo BBMoveTo BBPGotoWaypointBoat 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraft Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraft Fire BBFireUnarmed UnRelated 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraft Change BBChangeLandingCraft BBPChangeLandingCraft 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour LandingCraft Idle +aiSettings.addInterpreterEntry LandingCraft MoveToMediumBoat Medium +aiSettings.addInterpreterEntry LandingCraft MoveToObjectMediumBoat Medium +aiSettings.addInterpreterEntry LandingCraft CarMoveTo +aiSettings.addInterpreterEntry LandingCraft CarMoveToDirection +aiSettings.addInterpreterEntry LandingCraft CarMoveToObject +aiSettings.addInterpreterEntry LandingCraft Trigger +aiSettings.addInterpreterEntry LandingCraft TriggerContinously +aiSettings.addInterpreterEntry LandingCraft MouseTurretLookAt +aiSettings.addInterpreterEntry LandingCraft BoatResetControls +aiSettings.addInterpreterEntry LandingCraft Sense +aiSettings.activateDefaultInterpreter LandingCraft BAPSTParallel Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTSerial Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTIf Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTWait Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTWhile Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTIdle Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTPhysicsEnable Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTDebug Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTUseFlareOnMissileLock Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter LandingCraft BAPSTLookAtWrapper Full +aiSettings.addSensingAgentPattern LandingCraft Turret + + +rem *** Passenger Behaviour setup *** +aisettings.setVehicleMods Passenger StandardWeights +aiSettings.setVehicleBehaviour Passenger Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Fire BBFireUnarmed UnRelated 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleBehaviour Passenger MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Passenger Idle +aiSettings.addInterpreterEntry Passenger Trigger +aiSettings.addInterpreterEntry Passenger TriggerContinously +aiSettings.addInterpreterEntry Passenger MouseTurretLookAt +aiSettings.addInterpreterEntry Passenger InfanteryResetControls +aiSettings.addInterpreterEntry Passenger Sense +aiSettings.activateDefaultInterpreter Passenger BAPSTParallel Full +aiSettings.activateDefaultInterpreter Passenger BAPSTSerial Full +aiSettings.activateDefaultInterpreter Passenger BAPSTIf Full +aiSettings.activateDefaultInterpreter Passenger BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Passenger BAPSTWait Full +aiSettings.activateDefaultInterpreter Passenger BAPSTWhile Full +aiSettings.activateDefaultInterpreter Passenger BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter Passenger BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Passenger BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Passenger BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Passenger BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Passenger BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Passenger BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Passenger BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Passenger BAPSTIdle Full +aiSettings.activateDefaultInterpreter Passenger BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Passenger BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Passenger BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Passenger BAPSTDebug Full +aiSettings.activateDefaultInterpreter Passenger BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Passenger BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter Passenger BAPSTLookAtWrapper Full +aiSettings.addSensingAgentPattern Passenger Turret + +rem *** Passenger Behaviour setup *** +aisettings.setVehicleMods LandingCraftPassenger StandardWeights +aiSettings.setVehicleBehaviour LandingCraftPassenger Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraftPassenger Fire BBFireUnarmed UnRelated 6 UCScout UnitWeights +aiSettings.setVehicleBehaviour LandingCraftPassenger Change BBChangeLandingCraft BBPChangeLandingCraft 6 UCUnion ChangeInhibit +aiSettings.setVehicleBehaviour LandingCraftPassenger MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour LandingCraftPassenger Idle +aiSettings.addInterpreterEntry LandingCraftPassenger Trigger +aiSettings.addInterpreterEntry LandingCraftPassenger TriggerContinously +aiSettings.addInterpreterEntry LandingCraftPassenger MouseTurretLookAt +aiSettings.addInterpreterEntry LandingCraftPassenger InfanteryResetControls +aiSettings.addInterpreterEntry LandingCraftPassenger Sense +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTParallel Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTSerial Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTIf Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTWait Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTWhile Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTIdle Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTDebug Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTLookAtWrapper Full + +rem *** LandingCraftFixed Behaviour setup *** +aisettings.setVehicleMods LandingCraftFixed StandardWeights +aiSettings.setVehicleBehaviour LandingCraftFixed Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraftFixed Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour LandingCraftFixed MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraftFixed Change BBChangeLandingCraft BBPChangeLandingCraft 6 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour LandingCraftFixed Idle +aiSettings.addInterpreterEntry LandingCraftFixed InfoWrapper +aiSettings.addInterpreterEntry LandingCraftFixed Trigger +aiSettings.addInterpreterEntry LandingCraftFixed TriggerContinously +aiSettings.addInterpreterEntry LandingCraftFixed MouseTurretAimAt +aiSettings.addInterpreterEntry LandingCraftFixed MouseTurretLookAt +aiSettings.addInterpreterEntry LandingCraftFixed Sense +aiSettings.addInterpreterEntry LandingCraftFixed InfanteryResetControls +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTParallel Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTSerial Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTIf Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTWait Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTWhile Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTIdle Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTDebug Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTLookAtWrapper Full +aiSettings.addSensingAgentPattern LandingCraftFixed Turret + +rem ***** HeliBehaviour setup *** +aisettings.setVehicleMods Helicopter StandardWeights +aiSettings.setVehicleBehaviour Helicopter MoveTo BBMoveTo BBPGotoWaypoint3d 4 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour Helicopter Idle BBIdle BBPIdle3d 5 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour Helicopter Fire BBFire3d BBPHeliFire3d 4 UCFire HeliMoveWeights +aiSettings.setVehicleBehaviour Helicopter Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Helicopter Idle + +aiSettings.addInterpreterEntry Helicopter InfoWrapper +aiSettings.addInterpreterEntry Helicopter HeliMoveTo +aiSettings.addInterpreterEntry Helicopter HeliMoveToDirection +aiSettings.addInterpreterEntry Helicopter HeliMoveToObject +aiSettings.addInterpreterEntry Helicopter HeliMoveAwayFromObject +aiSettings.addInterpreterEntry Helicopter Trigger +aiSettings.addInterpreterEntry Helicopter TriggerContinously +aiSettings.addInterpreterEntry Helicopter HeliAimAt +aiSettings.addInterpreterEntry Helicopter HeliResetControls +aiSettings.addInterpreterEntry Helicopter Sense +aiSettings.activateDefaultInterpreter Helicopter BAPSTParallel Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTSerial Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTIf Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTWait Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTWhile Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTIdle Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTDebug Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter Helicopter BAPSTLookAtWrapper Full + + +rem ***** TransportHelicopterBehaviour setup *** +aisettings.setVehicleMods TransportHelicopter StandardWeights +aiSettings.setVehicleBehaviour TransportHelicopter MoveTo BBMoveTo BBPGotoWaypoint3d 4 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour TransportHelicopter Idle BBIdle BBPIdle3d 5 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour TransportHelicopter Change BBChangeLandingCraft BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour TransportHelicopter Idle + +aiSettings.addInterpreterEntry TransportHelicopter InfoWrapper +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveTo +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveToDirection +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveToObject +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveAwayFromObject +aiSettings.addInterpreterEntry TransportHelicopter Trigger +aiSettings.addInterpreterEntry TransportHelicopter TriggerContinously +aiSettings.addInterpreterEntry TransportHelicopter HeliAimAt +aiSettings.addInterpreterEntry TransportHelicopter HeliResetControls +aiSettings.addInterpreterEntry TransportHelicopter Sense +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTParallel Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTSerial Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTIf Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTWait Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTWhile Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTIdle Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTDebug Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTLookAtWrapper Full + +rem **-------- Armed Car ----------------------- + +aisettings.setVehicleMods ArmedCar StandardWeights +aiSettings.setVehicleMaterialCost ArmedCar Ground 1 +aiSettings.setVehicleMaterialCost ArmedCar Road 1 +aiSettings.setVehicleMaterialCost ArmedCar Shallows 1 +aiSettings.setVehicleMaterialCost ArmedCar DeepWater 2 +aiSettings.setVehicleBehaviour ArmedCar Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour ArmedCar MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Change BBChange BBPChange 2 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour ArmedCar Idle +aiSettings.addInterpreterEntry ArmedCar CarResetControls +aiSettings.addInterpreterEntry ArmedCar MoveToMedium Medium +aiSettings.addInterpreterEntry ArmedCar MoveToObjectMedium Medium +aiSettings.addInterpreterEntry ArmedCar InfoWrapper +aiSettings.addInterpreterEntry ArmedCar CarMoveTo +aiSettings.addInterpreterEntry ArmedCar CarMoveToDirection +aiSettings.addInterpreterEntry ArmedCar CarMoveToObject +aiSettings.addInterpreterEntry ArmedCar Trigger +aiSettings.addInterpreterEntry ArmedCar TriggerContinously +aiSettings.addInterpreterEntry ArmedCar MouseTurretAimAt +aiSettings.addInterpreterEntry ArmedCar MouseTurretLookAt +aiSettings.addInterpreterEntry ArmedCar Sense +aiSettings.activateDefaultInterpreter ArmedCar BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTParallel Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTSerial Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTIf Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTWait Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTWhile Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTIdle Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTDebug Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTDebug Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern ArmedCar Turret + +rem ***-------------------- + +aisettings.setVehicleMods ManDown UnitWeights +aiSettings.setVehicleBehaviour ManDown Idle BBIdle BBPIdle2d 2 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour ManDown Idle +aiSettings.addInterpreterEntry ManDown Trigger +aiSettings.addInterpreterEntry ManDown InfanteryResetControls +aiSettings.activateDefaultInterpreter ManDown BAPSTWhile Full +aiSettings.activateDefaultInterpreter ManDown BAPSTParallel Full +aiSettings.activateDefaultInterpreter ManDown BAPSTSerial Full +aiSettings.activateDefaultInterpreter ManDown BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter ManDown BAPSTDebug Full +aiSettings.activateDefaultInterpreter ManDown BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter ManDown BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter ManDown BAPSTSoldierPose Full +aiSettings.activateDefaultInterpreter ManDown BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter ManDown BAPSTLookAtWrapper Full + +aiSettings.addSensingAgentPattern ManDown Null + +rem *** ParatrooperFixed Behaviour setup *** +aisettings.setVehicleMods ParatrooperFixed StandardWeights +aiSettings.setVehicleBehaviour ParatrooperFixed Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ParatrooperFixed Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour ParatrooperFixed MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ParatrooperFixed Change BBChangeLandingCraft BBPChange 6 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour ParatrooperFixed Idle +aiSettings.addInterpreterEntry ParatrooperFixed InfoWrapper +aiSettings.addInterpreterEntry ParatrooperFixed Trigger +aiSettings.addInterpreterEntry ParatrooperFixed TriggerContinously +aiSettings.addInterpreterEntry ParatrooperFixed MouseTurretAimAt +aiSettings.addInterpreterEntry ParatrooperFixed MouseTurretLookAt +aiSettings.addInterpreterEntry ParatrooperFixed Sense +aiSettings.addInterpreterEntry ParatrooperFixed InfanteryResetControls +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTParallel Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTSerial Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTIf Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTWait Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTWhile Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTIdle Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTDebug Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern ParatrooperFixed Turret +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTLookAtWrapper Full \ No newline at end of file diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-helper b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-helper new file mode 100755 index 0000000..8d4c00d --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-helper @@ -0,0 +1,412 @@ +#!/bin/sh +set -eu + +usage() { + echo "esai-helper: Get and apply ESAI strategies.ai in levels//server.zip" + echo "Options:" + echo " -d|--dir BF2 server installation directory. Defaults to '/server/bf2'" + echo " -m|--mod Mod. E.g. 'bf2' or 'xpack'. Defaults to 'bf2'" + echo "Commands:" + echo " get [subcommand]" + echo " gamemodes Get all available levels' gamemodes" + echo " maplist Generate a maplist" + echo " level-strategies Get a level's server.zip's ESAI strategies" + echo " If if omitted, all levels' strategies are shown" + echo " level-strategiescontent Get file content of level's server.zip's ESAI strategies" + echo " If if omitted, all levels' strategies are shown" + echo " levels Get all available levels" + echo " mods Get all available mods" + echo " strategies Get all available ESAI strategies" + echo " apply|delete [subcommand]" + echo " default-strategy Apply a default ESAI strategy for all levels." + echo " This is the default strategy if a level-strategy is not found for a level" + echo " level-strategy Apply the specified ESAI strategy to a specified gamemode" + echo " of a specified level's server.zip" + echo " -f|--file Apply ESAI strategies based on a space-delimited file" + echo " Format per line: " + echo " Use '#' for comments" + echo "Examples:" + echo " esai-helper -m bf2 get gamemodes" + echo " esai-helper -m xpack get gamemodes" + echo " esai-helper -m bf2 get maplist" + echo " esai-helper -m bf2 get level-strategies" + echo " esai-helper -m bf2 get level-strategiescontent" + echo " esai-helper -m bf2 get levels" + echo " esai-helper -m bf2 get mods" + echo " esai-helper -m bf2 get strategies" + echo " esai-helper -m bf2 apply default-strategy mediumfca" + echo " esai-helper -m bf2 apply level-strategy highway_tampa gpm_cq 32 mediumfca" + echo " esai-helper -m bf2 apply -f strategies.txt" + echo " esai-helper -m bf2 delete default-strategy mediumfca" + echo " esai-helper -m bf2 delete level-strategy highway_tampa gpm_cq 32 mediumfca" + echo " esai-helper -m bf2 delete -f strategies.txt" +} +# Exit if we got no options +if [ $# -eq 0 ]; then usage; exit 1; fi + +# Get some options +while test $# -gt 0; do + case "$1" in + help|-h|--help) + usage + exit 0 + ;; + -d|--dir) + shift + if test $# -gt 0; then + DIR="$1" + shift + fi + ;; + -m|--mod) + shift + if test $# -gt 0; then + MOD="$1" + shift + fi + ;; + get) + shift + if [ $# = 0 ]; then + echo "Missing subcommand" + usage + exit 1 + fi + case "$1" in + gamemodes) + GET_GAMEMODES=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + break + ;; + maplist) + GET_MAPLIST=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + ;; + level-strategies) + GET_LEVEL_STRATEGIES=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + ;; + level-strategiescontent) + GET_LEVEL_STRATEGIESCONTENT=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + ;; + levels) + GET_LEVELS=1 + shift + ;; + mods) + GET_MODS=1 + shift + ;; + strategies) + GET_STRATEGIES=1 + shift + ;; + esac + ;; + apply|delete) + SUBCOMMAND="$1" + shift + if [ "$#" = 0 ]; then + echo "Missing options or arguments" + usage + exit 1 + fi + case "$1" in + default-strategy) + if [ "$SUBCOMMAND" = 'apply' ]; then + APPLY_DEFAULT_STRATEGY=1 + else + DELETE_DEFAULT_STRATEGY=1 + fi + shift + STRATEGY="${1:-}" + if [ -z "$STRATEGY" ]; then + echo "Please specify an ESAI strategy an argument. E.g. mediumfcapb" + exit 1 + fi + shift + ;; + level-strategy) + if [ "$SUBCOMMAND" = 'apply' ]; then + APPLY_LEVEL_STRATEGY=1 + else + DELETE_LEVEL_STRATEGY=1 + fi + shift + LEVEL="${1:-}" + if [ -z "$LEVEL" ]; then + echo "Please specify a level as the first argument. E.g. dalian_plant" + exit 1 + fi + shift + GAMEMODE="${1:-}" + if [ -z "$GAMEMODE" ]; then + echo "Please specify a gamemode as the second argument. E.g. gpm_coop" + exit 1 + fi + shift + SIZE="${1:-}" + if [ -z "$SIZE" ]; then + echo "Please specify a map size as the third argument. E.g. 16" + exit 1 + fi + shift + STRATEGY="${1:-}" + if [ -z "$STRATEGY" ]; then + echo "Please specify an ESAI strategy as the fourth argument. E.g. mediumfcapb" + exit 1 + fi + shift + ;; + -f|--file) + if [ "$SUBCOMMAND" = 'apply' ]; then + APPLY_FILE=1 + else + DELETE_FILE=1 + fi + shift + if [ "$#" -gt 0 ]; then + FILE="$1" + shift + fi + ;; + *) + echo "Invalid option '$1'" 1>&2 + usage + exit 1 + ;; + esac + ;; + *) + echo "Invalid option '$1'" 1>&2 + usage + exit 1 + ;; + esac +done + +DIR=${DIR:-/server/bf2} +MOD=${MOD:-bf2} # Default mod is mods/bf2 +GET_GAMEMODES=${GET_GAMEMODES:-} +GET_MAPLIST=${GET_MAPLIST:-} +GET_LEVEL_STRATEGIES=${GET_LEVEL_STRATEGIES:-} +GET_LEVEL_STRATEGIESCONTENT=${GET_LEVEL_STRATEGIESCONTENT:-} +GET_LEVELS=${GET_LEVELS:-} +GET_MODS=${GET_MODS:-} +GET_STRATEGIES=${GET_STRATEGIES:-} +APPLY_DEFAULT_STRATEGY=${APPLY_DEFAULT_STRATEGY:-} +DELETE_DEFAULT_STRATEGY=${DELETE_DEFAULT_STRATEGY:-} +APPLY_LEVEL_STRATEGY=${APPLY_LEVEL_STRATEGY:-} +DELETE_LEVEL_STRATEGY=${DELETE_LEVEL_STRATEGY:-} +APPLY_FILE=${APPLY_FILE:-} +DELETE_FILE=${DELETE_FILE:-} +LEVEL=${LEVEL:-} +GAMEMODE=${GAMEMODE:-} +SIZE=${SIZE:-} +STRATEGY=${STRATEGY:-} + +# Validation +if ! cd "$DIR" 2>/dev/null; then + echo "No such directory: $DIR" + exit 1 +fi +DIR=$( cd "$DIR" && pwd ) +if [ ! -d "$DIR/mods/$MOD" ]; then + echo "Invalid mod. Mod directory does not exist: $DIR/mods/$MOD" + exit 1 +fi +if [ -n "$GET_GAMEMODES" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + for i in $( echo "$SERVER_ZIPS" | sort -n ); do + LEVEL=$( echo "$i" | xargs dirname | xargs basename ) + for j in $( unzip -l "$i" | awk '{print $4}' | grep -iE "gamemodes/[^/]+/[0-9]+/.+" | cut -d '/' -f2-3 | sort -n | uniq || true ); do + GAMEMODE=$( echo "$j" | cut -d '/' -f1 ) + SIZE=$( echo "$j" | cut -d '/' -f2 ) + echo "$LEVEL $GAMEMODE $SIZE" + done + done +fi + +if [ -n "$GET_MAPLIST" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + for i in $( echo "$SERVER_ZIPS" | sort -n ); do + LEVEL=$( echo "$i" | xargs dirname | xargs basename ) + for j in $( unzip -l "$i" | awk '{print $4}' | grep -iE "gamemodes/[^/]+/[0-9]+/.+" | cut -d '/' -f2-3 | sort -n | uniq || true ); do + GAMEMODE=$( echo "$j" | cut -d '/' -f1 ) + SIZE=$( echo "$j" | cut -d '/' -f2 ) + echo "maplist.append $LEVEL $GAMEMODE $SIZE" + done + done +fi + +if [ -n "$GET_MODS" ]; then + ls -1 "$DIR/mods" | sort -n +fi + +if [ -n "$GET_LEVELS" ]; then + ls -1 "$DIR/mods/$MOD/levels" | sort -n +fi + +if [ -n "$GET_LEVEL_STRATEGIES" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + for i in $SERVER_ZIPS; do + STRATEGIES_AI=$( unzip -l "$i" | grep -iE "gamemodes/[^/]+/[0-9]+/[^/]+/strategies.ai" | awk '{print $4}' | sort -n | uniq || true ) + if [ -n "$STRATEGIES_AI" ]; then + for s in $STRATEGIES_AI; do + echo "$i $s" + done + else + echo "No strategies found in: $i" >&2 + fi + done +fi + +if [ -n "$GET_LEVEL_STRATEGIESCONTENT" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + ERR= + for i in $SERVER_ZIPS; do + echo "Looking in: $i" >&2 + STRATEGIES_AI=$( unzip -l "$i" | grep -iE "gamemodes/[^/]+/[0-9]+/[^/]+/strategies.ai" | awk '{print $4}' | sort -n | uniq || true ) + if [ -n "$STRATEGIES_AI" ]; then + for s in $STRATEGIES_AI; do + echo "Content of $s in $i:" >&2 + unzip -p "$i" "$s" + done + else + echo "No strategies found in: $i" >&2 + ERR=1 + fi + done + if [ -n "$ERR" ]; then + exit 1 + fi +fi + +if [ -n "$GET_STRATEGIES" ]; then + cd "$DIR" + find . | grep -E "mods/$MOD/esai/mapfiles/[^/]+/[^/]+/strategies.ai" | cut -d '/' -f7 | sort -n +fi + +if [ -n "$APPLY_DEFAULT_STRATEGY" ]; then + # A trick not found in ESAI readmes + # The default ESAI strategy is used when there is no ESAI strategy for a particular level. + # According to Void, the original author of ESAI, it's easy to add the default ESAI strategy for all maps: + # 1. All except the last two lines of an ESAI strategy (i.e. mods/bf2/esai/mapfiles/*//strategies.ai) goes into aidefaultstrategies.ai + # 2. The last two lines go into aidefaultstrategiesadd.ai + STRATEGIES_AI=$( find "$DIR" | grep -E "mods/$MOD/esai/mapfiles/[^/]+/$STRATEGY/strategies.ai" | head -n1 || true ) + if [ -z "$STRATEGIES_AI" ]; then + echo "No such strategy: $STRATEGY" + echo "To get a list of available strategies, run:" + echo " esai-helper -m "$MOD" get strategies" + exit 1 + fi + CONTENT=$( cat "$STRATEGIES_AI" ) + LINE_COUNT=$( echo "$CONTENT" | wc -l ) + echo "Applying $STRATEGIES_AI to $DIR/mods/$MOD/ai/aidefaultstrategies.ai">&2 + echo "$CONTENT" | head -n $(( $LINE_COUNT - 2 )) > "$DIR/mods/$MOD/ai/aidefaultstrategies.ai" + echo "Applying $STRATEGIES_AI to $DIR/mods/$MOD/ai/aidefaultstrategiesadd.ai">&2 + echo "$CONTENT" | tail -n 2 > "$DIR/mods/$MOD/ai/aidefaultstrategiesadd.ai" +fi + +if [ -n "$DELETE_DEFAULT_STRATEGY" ]; then + echo "Deleting a default ESAI strategy is not supported. The server needs a default strategy." + exit 1 +fi + +if [ -n "$APPLY_LEVEL_STRATEGY" ] || [ -n "$DELETE_LEVEL_STRATEGY" ] || [ -n "$APPLY_FILE" ] || [ -n "$DELETE_FILE" ]; then + # Validation + if [ -n "$APPLY_LEVEL_STRATEGY" ] || [ -n "$DELETE_LEVEL_STRATEGY" ]; then + CONTENT="$LEVEL $GAMEMODE $SIZE $STRATEGY" + fi + if [ -n "$APPLY_FILE" ] || [ -n "$DELETE_FILE" ]; then + if [ ! -f "$FILE" ]; then + echo "No such file: $FILE" + exit 1 + fi + CONTENT=$( cat "$FILE" | grep -v '#' | awk NF || true ) # Remove lines starting with '#' or trailing with '# ...', as well as blank lines + if [ -z "$CONTENT" ]; then + echo "No ESAI strategies to apply in: $FILE" + exit 1 + fi + fi + echo "$CONTENT" | while read -r LEVEL GAMEMODE SIZE STRATEGY; do + SERVER_ZIP="$DIR/mods/$MOD/levels/$LEVEL/server.zip" + if ! unzip -l "$SERVER_ZIP" | grep -iE "gamemodes/$GAMEMODE/$SIZE/" > /dev/null; then + echo "The gamemode '$GAMEMODE' does not exist in $SERVER_ZIP at gamemodes/$GAMEMODE/$SIZE/" + echo "To get a list of available gamemodes, run:" + echo " esai-helper -m "$MOD" get gamemodes" + exit 1 + fi + STRATEGIES_AI=$( find "$DIR" | grep -E "mods/$MOD/esai/mapfiles/[^/]+/$STRATEGY/strategies.ai" | head -n1 || true ) + if [ -z "$STRATEGIES_AI" ]; then + echo "No such strategy: $STRATEGY" + echo "To get a list of available strategies, run:" + echo " esai-helper -m "$MOD" get strategies" + exit 1 + fi + done + + if [ -n "$APPLY_LEVEL_STRATEGY" ] || [ -n "$APPLY_FILE" ]; then + echo "$CONTENT" | while read -r LEVEL GAMEMODE SIZE STRATEGY; do + cd "$DIR/mods/$MOD/levels/$LEVEL" + SERVER_ZIP="$PWD/server.zip" + STRATEGIES_AI=$( find "$DIR" | grep -E "mods/$MOD/esai/mapfiles/[^/]+/$STRATEGY/strategies.ai" | head -n1 || true ) + STRATEGIES_AI_DESTINATION_IN_ZIP="gamemodes/$GAMEMODE/$SIZE/ai/strategies.ai" + echo "Applying strategy $STRATEGIES_AI to $SERVER_ZIP at $STRATEGIES_AI_DESTINATION_IN_ZIP" + mkdir -p "$( dirname "$STRATEGIES_AI_DESTINATION_IN_ZIP" )" # Same layout as content of server.zip + cp -f "$STRATEGIES_AI" "$STRATEGIES_AI_DESTINATION_IN_ZIP" + zip -qru server.zip gamemodes + rm -rf "$DIR/mods/$MOD/levels/$LEVEL/gamemodes" + done + fi + + if [ -n "$DELETE_LEVEL_STRATEGY" ] || [ -n "$DELETE_FILE" ]; then + echo "$CONTENT" | while read -r LEVEL GAMEMODE SIZE STRATEGY; do + cd "$DIR/mods/$MOD/levels/$LEVEL" + SERVER_ZIP="$PWD/server.zip" + EXISTING_STRATEGIES_AI=$( unzip -l "$SERVER_ZIP" | grep -iE "gamemodes/$GAMEMODE/$SIZE/ai/strategies.ai" | awk '{print $4}' || true ) + if [ -n "$EXISTING_STRATEGIES_AI" ]; then + for i in $EXISTING_STRATEGIES_AI; do + echo "Removing existing strategy $i from $SERVER_ZIP at $i" + zip -q -d "$SERVER_ZIP" "$i" + done + else + echo "No existing strategy in: $SERVER_ZIP" + exit 1 + fi + done + fi +fi diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-bf2.txt b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-bf2.txt new file mode 100644 index 0000000..8207539 --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-bf2.txt @@ -0,0 +1,142 @@ +# This is a list of optimized ESAI strategies, based on 'Strategies-&-Navmesh-Credits.pdf' for BF2SP64 +# Format: +# Usage: +# 1. The following level-gamemode-strategy entries may be generated (with an empty field): +# esai-helper --mod bf2 get gamemodes +# 2. Edit field to your liking. To get all available strategies: +# esai-helper --mod bf2 get strategies +# 3. Apply these ESAI strategies: +# esai-helper --mod bf2 apply -f esai-optimized-strategies-bf2.txt +# 4. Remove these ESAI strategies: +# esai-helper --mod bf2 delete -f esai-optimized-strategies-bf2.txt +# NOTE: Commented out maps do not have an optimized ESAI strategy + +dalian_plant gpm_coop 16 smallmap +dalian_plant gpm_cq 16 smallmap +dalian_plant gpm_cq 32 smallmap +dalian_plant gpm_cq 64 largemap +dalian_plant sp1 16 smallmap +daqing_oilfields gpm_coop 16 smallmap +daqing_oilfields gpm_cq 16 smallmap +daqing_oilfields gpm_cq 32 mediummap +daqing_oilfields gpm_cq 64 largefcapf +daqing_oilfields sp1 16 smallmap +dragon_valley gpm_coop 16 smallmap +dragon_valley gpm_cq 16 smallmap +dragon_valley gpm_cq 32 mediumfcapfpb +dragon_valley gpm_cq 64 largefcapfpb +dragon_valley gpm_cq 128 largefcapfpb +dragon_valley gpm_sl 16 smallmap +dragon_valley gpm_sl 32 mediumfcapfpb +dragon_valley gpm_sl 64 largefcapfpb +dragon_valley gpm_sl 128 largefcapfpb +dragon_valley sp1 16 smallmap +dragon_valley sp1 32 mediumfcapfpb +dragon_valley sp1 64 largefcapfpb +dragon_valley sp1 128 largefcapfpb +dragon_valley sp2 16 smallmap +dragon_valley sp2 32 mediumfcapfpb +dragon_valley sp2 64 largefcapfpb +dragon_valley sp2 128 largefcapfpb +dragon_valley sp3 16 smallmap +dragon_valley sp3 32 mediumfcapfpb +dragon_valley sp3 64 largefcapfpb +dragon_valley sp3 128 largefcapfpb +fushe_pass gpm_coop 16 smallmap +fushe_pass gpm_cq 16 smallmap +fushe_pass gpm_cq 32 mediumpf +fushe_pass gpm_cq 64 largepf +fushe_pass sp1 16 smallmap +# greatwall gpm_coop 16 - +# greatwall gpm_cq 16 - +# greatwall gpm_cq 32 - +# greatwall sp1 16 - +# greatwall sp1 32 - +# greatwall sp1 64 - +gulf_of_oman gpm_coop 16 smallmap +gulf_of_oman gpm_cq 16 smallmap +gulf_of_oman gpm_cq 32 smallfca +gulf_of_oman gpm_cq 64 mediumfca +gulf_of_oman sp1 16 smallmap +highway_tampa gpm_cq 16 smallmap +highway_tampa gpm_cq 32 mediummap +highway_tampa gpm_cq 64 largemap +highway_tampa gpm_cq 128 largemap +highway_tampa gpm_cq 8 smallmap +highway_tampa gpm_sl 16 smallmap +highway_tampa gpm_sl 32 mediummap +highway_tampa gpm_sl 64 largemap +highway_tampa gpm_sl 128 largemap +highway_tampa sp1 16 smallmap +highway_tampa sp1 32 mediummap +highway_tampa sp1 64 largemap +highway_tampa sp1 128 largemap +highway_tampa sp2 16 smallmap +highway_tampa sp2 32 mediummap +highway_tampa sp2 64 largemap +highway_tampa sp2 128 largemap +highway_tampa sp3 16 smallmap +highway_tampa sp3 32 mediummap +highway_tampa sp3 64 largemap +highway_tampa sp3 128 largemap +kubra_dam gpm_cq 16 smallmap +kubra_dam gpm_cq 32 mediumpf +kubra_dam gpm_cq 64 largepf +kubra_dam sp1 16 smallmap +mashtuur_city gpm_cq 16 smallmap +mashtuur_city gpm_cq 32 smallmap +mashtuur_city gpm_cq 64 mediummap +# midnight_sun gpm_coop 16 - +# midnight_sun gpm_cq 16 - +# midnight_sun gpm_cq 32 - +# midnight_sun gpm_cq 64 - +# midnight_sun sp1 16 -` +# operation_blue_pearl gpm_cq 16 - +# operation_blue_pearl gpm_cq 32 - +# operation_blue_pearl gpm_cq 64 - +operation_clean_sweep gpm_coop 16 smallmap +operation_clean_sweep gpm_cq 16 smallmap +operation_clean_sweep gpm_cq 32 mediumfcapf +operation_clean_sweep gpm_cq 64 mediumfcapf +operation_clean_sweep sp1 16 smallmap +# operationharvest gpm_coop 16 - +# operationharvest gpm_cq 16 - +# operationharvest gpm_cq 32 - +# operationharvest gpm_cq 64 - +# operationharvest sp1 16 - +# operationroadrage gpm_coop 1 -6 +# operationroadrage gpm_cq 16 - +# operationroadrage gpm_cq 32 - +# operationroadrage gpm_cq 64 - +# operationroadrage sp1 16 - +# operationsmokescreen gpm_coop 16 - +# operationsmokescreen gpm_cq 16 - +# operationsmokescreen gpm_cq 32 - +# operationsmokescreen sp1 16 - +# operationsmokescreen sp1 32 - +road_to_jalalabad gpm_coop 16 smallmap +road_to_jalalabad gpm_cq 16 smallmap +road_to_jalalabad gpm_cq 32 mediumfcapf +road_to_jalalabad gpm_cq 64 mediumfcapf +road_to_jalalabad sp1 16 smallmap +sharqi_peninsula gpm_coop 16 smallmap +sharqi_peninsula gpm_cq 16 smallmap +sharqi_peninsula gpm_cq 32 mediumfcapf +sharqi_peninsula gpm_cq 64 mediumfcapf +sharqi_peninsula sp1 16 smallmap +songhua_stalemate gpm_coop 16 smallmap +songhua_stalemate gpm_cq 16 smallmap +songhua_stalemate gpm_cq 32 mediumfca +songhua_stalemate gpm_cq 64 largefca +songhua_stalemate sp1 16 smallmap +# taraba_quarry gpm_coop 16 - +# taraba_quarry gpm_cq 16 - +# taraba_quarry gpm_cq 32 - +# taraba_quarry sp1 16 - +# taraba_quarry sp1 32 - +wake_island_2007 gpm_cq 64 wake-island-64 +zatar_wetlands gpm_coop 16 smallmap +zatar_wetlands gpm_cq 16 smallmap +zatar_wetlands gpm_cq 32 mediumfca +zatar_wetlands gpm_cq 64 mediumfcapf +zatar_wetlands sp1 16 smallmap diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-bf2all64.txt b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-bf2all64.txt new file mode 100644 index 0000000..c7ae71f --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-bf2all64.txt @@ -0,0 +1,187 @@ +# This is a list of optimized ESAI strategies, based on 'Strategies-&-Navmesh-Credits.pdf' for BF2SP64 +# Format: +# Usage: +# 1. The following level-gamemode-strategy entries may be generated (with an empty field): +# esai-helper --mod bf2all64 get gamemodes +# 2. Edit field to your liking. To get all available strategies: +# esai-helper --mod bf2all64 get strategies +# 3. Apply these ESAI strategies: +# esai-helper --mod bf2all64 apply -f esai-optimized-strategies-bf2all64.txt +# 4. Remove these ESAI strategies: +# esai-helper --mod bf2all64 delete -f esai-optimized-strategies-bf2all64.txt +# NOTE: Commented out maps do not have an optimized ESAI strategy + +dalian_plant gpm_coop 16 smallmap +dalian_plant gpm_coop 32 smallmap +dalian_plant gpm_coop 64 largemap +dalian_plant gpm_cq 16 smallmap +dalian_plant gpm_cq 32 smallmap +dalian_plant gpm_cq 64 largemap +dalian_plant gpm_cq 128 largemap +dalian_plant sp1 16 smallmap +dalian_plant sp2 32 smallmap +dalian_plant sp3 64 largemap +daqing_oilfields gpm_coop 16 smallmap +daqing_oilfields gpm_coop 32 mediummap +daqing_oilfields gpm_coop 64 largefcapf +daqing_oilfields gpm_cq 16 smallmap +daqing_oilfields gpm_cq 32 mediummap +daqing_oilfields gpm_cq 64 largefcapf +daqing_oilfields sp1 16 smallmap +daqing_oilfields sp2 32 mediummap +daqing_oilfields sp3 64 largefcapf +dragon_valley gpm_coop 16 smallmap +dragon_valley gpm_coop 32 mediumfcapfpb +dragon_valley gpm_coop 64 largefcapfpb +dragon_valley gpm_cq 16 smallmap +dragon_valley gpm_cq 32 mediumfcapfpb +dragon_valley gpm_cq 64 largefcapfpb +dragon_valley gpm_cq 128 largefcapfpb +dragon_valley sp1 16 smallmap +dragon_valley sp2 32 mediumfcapfpb +dragon_valley sp3 64 largefcapfpb +fushe_pass gpm_coop 16 smallmap +fushe_pass gpm_coop 32 mediumpf +fushe_pass gpm_coop 64 largepf +fushe_pass gpm_cq 64 largepf +fushe_pass sp1 16 smallmap +fushe_pass sp2 32 mediumpf +fushe_pass sp3 64 largepf +# greatwall gpm_coop 16 - +# greatwall gpm_cq 16 - +# greatwall gpm_cq 32 - +# greatwall sp1 16 - +# greatwall sp1 32 - +# greatwall sp1 64 - +gulf_of_oman gpm_coop 16 smallmap +gulf_of_oman gpm_coop 32 smallfca +gulf_of_oman gpm_coop 64 mediumfca +gulf_of_oman gpm_cq 16 smallmap +gulf_of_oman gpm_cq 32 smallfca +gulf_of_oman gpm_cq 64 mediumfca +gulf_of_oman sp1 16 smallmap +gulf_of_oman sp2 32 smallfca +gulf_of_oman sp3 64 mediumfca +highway_tampa gpm_coop 16 smallmap +highway_tampa gpm_coop 32 mediummap +highway_tampa gpm_coop 64 largemap +highway_tampa gpm_cq 16 smallmap +highway_tampa gpm_cq 32 mediummap +highway_tampa gpm_cq 64 largemap +highway_tampa sp1 16 smallmap +highway_tampa sp2 32 mediummap +highway_tampa sp3 64 largemap +kubra_dam gpm_coop 16 smallmap +kubra_dam gpm_coop 32 mediumpf +kubra_dam gpm_coop 64 largepf +kubra_dam gpm_cq 16 smallmap +kubra_dam gpm_cq 32 mediumpf +kubra_dam gpm_cq 64 largepf +kubra_dam sp1 16 smallmap +kubra_dam sp2 32 mediumpf +kubra_dam sp3 64 largepf +mashtuur_city gpm_coop 16 smallmap +mashtuur_city gpm_coop 32 smallmap +mashtuur_city gpm_coop 64 mediummap +mashtuur_city gpm_cq 128 mediummap +mashtuur_city gpm_cq 16 smallmap +mashtuur_city gpm_cq 32 smallmap +mashtuur_city gpm_cq 64 mediummap +# midnight_sun gpm_coop 16 - +# midnight_sun gpm_coop 32 - +# midnight_sun gpm_coop 64 - +# midnight_sun gpm_cq 16 - +# midnight_sun gpm_cq 32 - +# midnight_sun gpm_cq 64 - +# midnight_sun sp1 16 - +# midnight_sun sp2 32 - +# midnight_sun sp3 64 - +operation_clean_sweep gpm_coop 16 smallmap +operation_clean_sweep gpm_coop 32 mediumfcapf +operation_clean_sweep gpm_coop 64 mediumfcapf +operation_clean_sweep gpm_cq 16 smallmap +operation_clean_sweep gpm_cq 32 mediumfcapf +operation_clean_sweep gpm_cq 64 mediumfcapf +operation_clean_sweep sp1 16 smallmap +operation_clean_sweep sp2 32 mediumfcapf +operation_clean_sweep sp3 64 mediumfcapf +# operationharvest gpm_coop 16 - +# operationharvest gpm_coop 32 - +# operationharvest gpm_coop 64 - +# operationharvest gpm_cq 16 - +# operationharvest gpm_cq 32 - +# operationharvest gpm_cq 64 - +# operationharvest gpm_sl 16 - +# operationharvest gpm_sl 32 - +# operationharvest gpm_sl 64 - +# operationharvest sp1 16 - +# operationharvest sp2 32 - +# operationharvest sp3 64 - +# operationroadrage gpm_coop 16 - +# operationroadrage gpm_coop 32 - +# operationroadrage gpm_coop 64 - +# operationroadrage gpm_cq 16 - +# operationroadrage gpm_cq 32 - +# operationroadrage gpm_cq 64 - +# operationroadrage sp1 16 - +# operationroadrage sp2 32 - +# operationroadrage sp3 64 - +# operationsmokescreen gpm_coop 16 - +# operationsmokescreen gpm_coop 32 - +# operationsmokescreen gpm_cq 16 - +# operationsmokescreen gpm_cq 32 - +# operationsmokescreen sp1 16 - +# operationsmokescreen sp1 32 - +# operationsmokescreen sp2 32 - +road_to_jalalabad gpm_coop 16 smallmap +road_to_jalalabad gpm_coop 32 mediumfcapf +road_to_jalalabad gpm_coop 64 mediumfcapf +road_to_jalalabad gpm_cq 16 smallmap +road_to_jalalabad gpm_cq 32 mediumfcapf +road_to_jalalabad gpm_cq 64 mediumfcapf +road_to_jalalabad sp1 16 smallmap +road_to_jalalabad sp2 32 mediumfcapf +road_to_jalalabad sp3 64 mediumfcapf +sharqi_peninsula gpm_coop 16 smallmap +sharqi_peninsula gpm_coop 32 mediumfcapf +sharqi_peninsula gpm_coop 64 mediumfcapf +sharqi_peninsula gpm_cq 128 mediumfcapf +sharqi_peninsula gpm_cq 16 smallmap +sharqi_peninsula gpm_cq 32 mediumfcapf +sharqi_peninsula gpm_cq 64 mediumfcapf +sharqi_peninsula sp1 16 smallmap +sharqi_peninsula sp2 32 mediumfcapf +sharqi_peninsula sp3 64 mediumfcapf +songhua_stalemate gpm_coop 16 smallmap +songhua_stalemate gpm_coop 32 mediumfcapf +songhua_stalemate gpm_coop 64 largefcapf +songhua_stalemate gpm_cq 16 smallmap +songhua_stalemate gpm_cq 32 mediumfca +songhua_stalemate gpm_cq 64 largefca +songhua_stalemate sp1 16 smallmap +songhua_stalemate sp2 32 mediumfca +songhua_stalemate sp3 64 largefca +# taraba_quarry gpm_coop 16 - +# taraba_quarry gpm_coop 32 - +# taraba_quarry gpm_cq 16 - +# taraba_quarry gpm_cq 32 - +# taraba_quarry sp1 16 - +# taraba_quarry sp2 32 - +wake_island_2007 gpm_coop 16 smallmap +wake_island_2007 gpm_coop 32 smallmap +wake_island_2007 gpm_coop 64 wake-island-64 +wake_island_2007 gpm_cq 16 smallmap +wake_island_2007 gpm_cq 32 smallmap +wake_island_2007 gpm_cq 64 wake-island-64 +wake_island_2007 sp1 16 smallmap +wake_island_2007 sp2 32 smallmap +wake_island_2007 sp3 64 wake-island-64 +zatar_wetlands gpm_coop 16 smallmap +zatar_wetlands gpm_coop 32 mediumfca +zatar_wetlands gpm_coop 64 mediumfcapf +zatar_wetlands gpm_cq 16 smallmap +zatar_wetlands gpm_cq 32 mediumfca +zatar_wetlands gpm_cq 64 mediumfcapf +zatar_wetlands sp1 16 smallmap +zatar_wetlands sp2 32 mediumfca +zatar_wetlands sp3 64 mediumfcapf diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-xpack.txt b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-xpack.txt new file mode 100644 index 0000000..d0fffa6 --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/esai-optimized-strategies-xpack.txt @@ -0,0 +1,42 @@ +# Format: +# 1. The following level-gamemode-strategy entries may be generated (with an empty field) using: +# esai-helper --mod xpack get gamemodes +# 2. Edit field to your liking. To get all available strategies: +# esai-helper --mod xpack get strategies +# 3. Then apply these ESAI strategies as part of container entrypoint: +# esai-helper --mod xpack apply -f esai-optimized-strategies-xpack.txt +# 4. To remove these ESAI strategies, simply: +# esai-helper --mod xpack delete -f esai-optimized-strategies-xpack.txt +# NOTE: Commented out maps do not have an optimized ESAI strategy + +# ghost_town gpm_coop 16 - +# ghost_town gpm_cq 16 - +# ghost_town gpm_cq 32 - +# ghost_town gpm_cq 64 - +# ghost_town sp1 16 - +# 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_coop 16 - +# mass_destruction gpm_cq 16 - +# mass_destruction gpm_cq 32 - +# mass_destruction gpm_cq 64 - +# mass_destruction sp1 16 - +# night_flight gpm_coop 16 - +# night_flight gpm_cq 16 - +# night_flight gpm_cq 32 - +# night_flight gpm_cq 64 - +# night_flight sp1 16 - +# surge gpm_coop 16 - +# surge gpm_cq 16 - +# surge gpm_cq 32 - +# surge gpm_cq 64 - +# surge sp1 16 - +# warlord gpm_coop 16 - +# warlord gpm_cq 16 - +# warlord gpm_cq 32 - +# warlord gpm_cq 64 - +# warlord sp1 16 - diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/healthcheck b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/healthcheck new file mode 100755 index 0000000..5464f28 --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/healthcheck @@ -0,0 +1,24 @@ +#!/bin/bash +set -eu +usage() { + echo "healthcheck: Healthcheck a Battlefield 2 server" + echo "Usage: healthcheck " + echo "Examples:" + echo " ./healthcheck 127.0.0.1 29900" + echo " ./healthcheck bf2 29900" +} +if [ "${1:-}" = '-h' ] || [ "${1:-}" = '--help' ]; then + usage + exit 0 +fi +HOST=${1:-localhost} # Hostname +PORT=${2:-29900} # Gamespy port + +echo "Checking $HOST:$PORT" +RES=$( printf '\xFE\xFD\x00\x10\x20\x30\x40\xFF\xFF\xFF\x01' | nc -w 1 -u "$HOST" "$PORT" ) +if [ -n "$RES" ]; then + echo "OK" +else + echo "Not OK" + exit 1 +fi diff --git a/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/lowercase-helper b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/lowercase-helper new file mode 100755 index 0000000..699a069 --- /dev/null +++ b/variants/v1.5.3153.0-bf2all64-bf2stats-2.7.2/lowercase-helper @@ -0,0 +1,70 @@ +#!/bin/sh +set -eu + +usage() { + echo "$0 The BF2 linux server requires all files to be in lowercase, except python files. See /readmes/readme-linux.txt" + echo " This script lowercases a given directory and all descendent folders" + echo "Examples:" + echo " $0 --dir /server/bf2/mods/bf2/ESAI" +} + +# Get some options +while test $# -gt 0; do + case "$1" in + -h|--help) + usage + exit 0 + ;; + -d|--dir) + shift + if test $# -gt 0; then + DIR="$1" + shift + fi + ;; + *) + echo "Invalid option '$1'" 1>&2 + usage + exit 1 + ;; + esac +done + +if [ -z "$DIR" ]; then + echo "Specify a directory as the first argument" + usage() + exit 1 +fi + +# Lowercase this directory +if basename "$DIR" | grep -E '[A-Z]' > /dev/null; then + DIR_LOWERCASED="$( dirname "$DIR" )/$( basename "$DIR" | tr '[:upper:]' '[:lower:]' )" + mv -v "$DIR" "$DIR_LOWERCASED" 2>&1 || true + DIR="$DIR_LOWERCASED" +fi + +# Lowercase descendent directories starting from the parent-most +i=1 +while true; do + DIRS=$( find "$DIR" -mindepth "$i" -maxdepth "$i" -type d | grep -E '[A-Z]' || true ) + if [ -z "$DIRS" ]; then + break + fi + echo "$DIRS" | while read -r d; do + mv -v "$d" "$( echo "$d" | tr '[:upper:]' '[:lower:]' )" + done + i=$(( $i + 1 )) +done + +# Lowercase descendent files starting from the parent-most +i=1 +while true; do + FILES=$( find "$DIR" -mindepth "$i" -maxdepth "$i" -type f | grep -E '[A-Z]' || true ) + if [ -z "$FILES" ]; then + break + fi + echo "$FILES" | while read -r f; do + mv -v "$f" "$( echo "$f" | tr '[:upper:]' '[:lower:]' )" + done + i=$(( $i + 1 )) +done diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/Dockerfile b/variants/v1.5.3153.0-bf2stats-2.7.2/Dockerfile new file mode 100644 index 0000000..976f5fc --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/Dockerfile @@ -0,0 +1,85 @@ +FROM ubuntu:16.04 as install +ARG TARGETPLATFORM=linux/amd64 +ARG BUILDPLATFORM=linux/amd64 +RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" + +# Install network utilities which can be useful for debugging issues +# Install unzip and zip for the sake of applying ESAI strategies in ./mods/*/levels/*/server.zip at './GameModes/[gpm_coop|gpm_cq|sp1|sp2|sp3]/[16|32|64]/AI/Strategies.ai' +RUN export DEBIAN_FRONTEND=noninteractive; \ + apt-get update; \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + curl \ + conntrack dnsutils iproute2 netcat net-tools tcpdump \ + unzip zip \ + ; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/*; + +# Install Battlefield 2 server +WORKDIR /root +COPY aibehaviours-fixlookatwrapper.ai /aibehaviours-fixlookatwrapper.ai +RUN set -eux; \ + curl -sSLO https://files.startersclan.com/ea/bf2/bf2-linuxded-1.5.3153.0-installer.tgz; \ + sha256sum bf2-linuxded-1.5.3153.0-installer.tgz | grep "^4d849218c1725e7bd6a7e7f164e27b036248f8ded2e30340dd0722c1dfffbab6 "; \ + tar -zxvf bf2-linuxded-1.5.3153.0-installer.tgz; \ + sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec --info; \ + sh bf2-linuxded-1.5.3153.0-installer.sh --target /install --noexec; \ + rm -v bf2-linuxded-1.5.3153.0-installer.sh; \ + rm -v bf2-linuxded-1.5.3153.0-installer.tgz; \ + cd /install; \ + mkdir -p /server; \ + # Show the licenses without a pager + cat /install/license.sh | sed 's/^more/cat/' > /install/license-fixed.sh; \ + # Agree to licenses + printf '\naccept\n\nyes\n/server\ny\n' | sh /install/license-fixed.sh; \ + find /server; \ + rm -rf /install; \ + # Apply the LookAtWrapper fix to prevent crashes when playing with bots + mv -v /server/bf2/mods/bf2/ai/aibehaviours.ai /server/bf2/mods/bf2/ai/aibehaviours.ai.original; \ + cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/bf2/ai/aibehaviours.ai; \ + mv -v /server/bf2/mods/xpack/ai/aibehaviours.ai /server/bf2/mods/xpack/ai/aibehaviours.ai.original; \ + cp -v /aibehaviours-fixlookatwrapper.ai /server/bf2/mods/xpack/ai/aibehaviours.ai; \ + rm -v /aibehaviours-fixlookatwrapper.ai + +# Install bf2stats 2.7.2 +WORKDIR /root +RUN set -eux; \ + curl -sSLO https://github.com/startersclan/bf2stats/archive/refs/tags/2.7.2.tar.gz; \ + echo "96a9cd2c1283668e417f45ee14dec6307cbad9f310a81e2e8b5af95a871fef4f 2.7.2.tar.gz bee8933873b42fff26aff34de964d54f4f470e256be43de7ab30ad122788d605 2.7.2.tar.gz" | sha256sum -c -; \ + mkdir -p extract; \ + tar -C extract -zxvf 2.7.2.tar.gz; \ + rm -rf /server/bf2/python; \ + mv extract/bf2stats-2.7.2/src/python /server/bf2/python; \ + rm -fv 2.7.2.tar.gz; \ + rm -rf extract + +# Install ESAI in all mods +WORKDIR /root +COPY ESAI-Standard-v4.2.zip ESAI-Standard-v4.2.zip +COPY lowercase-helper /usr/local/bin/lowercase-helper +RUN set -eux; \ + sha256sum ESAI-Standard-v4.2.zip | grep '^ef4e5d0f1446b9a2ddb0b350f1334273681c0f64d9c38c506320db769b24499c '; \ + # Lowercase all files in ESAI folder + for i in $( ls /server/bf2/mods ); do \ + unzip ESAI-Standard-v4.2.zip -d /server/bf2/mods/$i; \ + lowercase-helper --dir "/server/bf2/mods/$i/ESAI"; \ + done; \ + # Lowercase ESAI mapfiles' content + for i in $( find /server/bf2/mods/*/esai/mapfiles -type f ); do \ + CONTENT=$( cat "$i" ); \ + echo "$CONTENT" | tr '[:upper:]' '[:lower:]' > "$i"; \ + done; + +# Install esai-helper and configs +COPY esai-helper /usr/local/bin/esai-helper +COPY esai-optimized-strategies-bf2.txt /esai-optimized-strategies-bf2.txt +COPY esai-optimized-strategies-xpack.txt /esai-optimized-strategies-xpack.txt + +COPY healthcheck /healthcheck + +# EXPOSE 16567/udp +# EXPOSE 29900/udp +# HEALTHCHECK CMD /healthcheck +WORKDIR /server/bf2 +CMD [ "./start.sh" ] diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/ESAI-Standard-v4.2.zip b/variants/v1.5.3153.0-bf2stats-2.7.2/ESAI-Standard-v4.2.zip new file mode 100644 index 0000000..4870cee Binary files /dev/null and b/variants/v1.5.3153.0-bf2stats-2.7.2/ESAI-Standard-v4.2.zip differ diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/aibehaviours-fixlookatwrapper.ai b/variants/v1.5.3153.0-bf2stats-2.7.2/aibehaviours-fixlookatwrapper.ai new file mode 100644 index 0000000..61a95f0 --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/aibehaviours-fixlookatwrapper.ai @@ -0,0 +1,822 @@ +rem *** Set number of behaviours and id/name mappings *** +aiSettings.setMaxNumberOfBehaviours 13 + +aiSettings.setBehaviour 0 Avoid +aiSettings.setBehaviour 1 MoveTo +aiSettings.setBehaviour 2 Idle +aiSettings.setBehaviour 3 Fire +aiSettings.setBehaviour 4 TakeCover +aiSettings.setBehaviour 5 Change +aiSettings.setBehaviour 6 Special +aiSettings.setBehaviour 7 Revive +aiSettings.setBehaviour 8 c4 +aiSettings.setBehaviour 9 Special2 +aiSettings.setBehaviour 10 Special3 +aiSettings.setBehaviour 11 Random +aiSettings.setBehaviour 12 Triggerable + + +rem *** Set number of vehicles and id/name mappings *** +aiSettings.setVehicle Tank +aiSettings.setVehicle Plane +aiSettings.setVehicle Boat +aiSettings.setVehicle Infantery +aiSettings.setVehicle Fixed +aiSettings.setVehicle Car +aiSettings.setVehicle LandingCraft +aiSettings.setVehicle Passenger +aiSettings.setVehicle LandingCraftPassenger +aiSettings.setVehicle LandingCraftFixed +aiSettings.setVehicle Helicopter +aiSettings.setVehicle TransportHelicopter +aiSettings.setVehicle ArmedCar +aiSettings.setVehicle ManDown +aiSettings.setVehicle ParatrooperFixed + +aiSettings.setVehicleClusterMapping Tank Tank +aiSettings.setVehicleClusterMapping Boat LandingCraft +aiSettings.setVehicleClusterMapping Infantery Infantery +aiSettings.setVehicleClusterMapping Car Tank +rem aiSettings.setVehicleClusterMapping LandingCraft LandingCraft +aiSettings.setVehicleClusterMapping LandingCraft ArmedCar +aiSettings.setVehicleClusterMapping ArmedCar ArmedCar + + +rem *** Set Sensing Agent Patterns id/name mappings *** +aiSettings.setSensingAgentPatternName Turret +aiSettings.setSensingAgentPatternName MouseFreeLook +aiSettings.setSensingAgentPatternName Soldier +aiSettings.setSensingAgentPatternName Null +rem the null pattern +aiSettings.setSensingAgentNullPattern Null + + +aiSettings.setManDownEquipment ManDown + +rem *** IMPORTANT !!! ************************** +rem * NEVER ALLOW IDLE's urgency to become 0. * +rem * The AI will CRASH in that case. * +rem *** REMINDER ******************************* + +rem *** Construct unit weights *** +aiSettings.createBehaviourModifiers UnitWeights +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 1.0 +aiSettings.setBehaviourModifier Fire 1.0 +aiSettings.setBehaviourModifier Special 1.0 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct HeliMove weights *** +aiSettings.createBehaviourModifiers HeliMoveWeights +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 0.01 +aiSettings.setBehaviourModifier Fire 1.0 +aiSettings.setBehaviourModifier Special 1.0 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct standard weights *** +aiSettings.createBehaviourModifiers StandardWeights +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 0.1 +aiSettings.setBehaviourModifier Fire 7.5 +aiSettings.setBehaviourModifier Special 3.0 +aiSettings.setBehaviourModifier TakeCover 2.0 +aiSettings.setBehaviourModifier Change 1.9 +aiSettings.setBehaviourModifier Revive 3.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct plane weights *** +aiSettings.createBehaviourModifiers PlaneWeights +aiSettings.setBehaviourModifier Avoid 0.0 +aiSettings.setBehaviourModifier MoveTo 1.0 +aiSettings.setBehaviourModifier Idle 0.1 +aiSettings.setBehaviourModifier Fire 1.5 +aiSettings.setBehaviourModifier Special 1.0 +aiSettings.setBehaviourModifier TakeCover 0.0 +aiSettings.setBehaviourModifier Change 0.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct Avoid inhibitors *** +aiSettings.createBehaviourModifiers AvoidInhibit +aiSettings.setBehaviourModifier Avoid 1.0 +aiSettings.setBehaviourModifier MoveTo 0.3 +aiSettings.setBehaviourModifier Idle 1.0 +aiSettings.setBehaviourModifier Fire 1.0 +aiSettings.setBehaviourModifier Special 0.5 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Construct Change Inhibit *** +aiSettings.createBehaviourModifiers ChangeInhibit +aiSettings.setBehaviourModifier Avoid 0.8 +aiSettings.setBehaviourModifier MoveTo 0.0 +aiSettings.setBehaviourModifier Idle 0.01 +aiSettings.setBehaviourModifier Fire 0.75 +aiSettings.setBehaviourModifier Special 0.0 +aiSettings.setBehaviourModifier TakeCover 1.0 +aiSettings.setBehaviourModifier Change 1.0 +aiSettings.setBehaviourModifier Revive 1.0 +aiSettings.setBehaviourModifier c4 1.0 +aiSettings.setBehaviourModifier Special2 1.0 +aiSettings.setBehaviourModifier Special3 1.0 +aiSettings.setBehaviourModifier Random 1.0 +aiSettings.setBehaviourModifier Triggerable 1.0 + +rem *** Set basic weights for bot behaviour *** +aiSettings.setBasicBotWeights UnitWeights +aiSettings.setStandardPersonality UnitWeights 1 +aiSettings.setStandardPersonality UnitWeights 2 + +rem ************************* Vehicle behaviour setup ****************************** + +aiSettings.createUCConstant UCUnion 1.0 +aiSettings.createUCLinear UCFire -0.22 1.3 +aiSettings.createUCLinear UCCallForMedic 0.1 1 +aiSettings.createUCXInverse UCScout 2.5 0.9 1.0 0.5 + +rem *** Tank Behaviour setup *** +aisettings.setVehicleMods Tank StandardWeights +aiSettings.setVehicleMaterialCost Tank Ground 1 +aiSettings.setVehicleMaterialCost Tank Road 1 +aiSettings.setVehicleMaterialCost Tank Shallows 1.5 +aiSettings.setVehicleMaterialCost Tank DeepWater -1 +aiSettings.setVehicleBehaviour Tank Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Tank MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Tank Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Tank Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Tank Idle +aiSettings.addInterpreterEntry Tank MoveToMedium Medium +aiSettings.addInterpreterEntry Tank MoveToObjectMedium Medium +aiSettings.addInterpreterEntry Tank InfoWrapper +aiSettings.addInterpreterEntry Tank TankMoveTo +aiSettings.addInterpreterEntry Tank TankTurnTo +aiSettings.addInterpreterEntry Tank TankMoveToDirection +aiSettings.addInterpreterEntry Tank TankMoveToObject +aiSettings.addInterpreterEntry Tank Trigger +aiSettings.addInterpreterEntry Tank TriggerContinously +aiSettings.addInterpreterEntry Tank MouseTurretAimAt +aiSettings.addInterpreterEntry Tank TankResetControls +aiSettings.addInterpreterEntry Tank MouseTurretLookAt +aiSettings.addInterpreterEntry Tank Sense +aiSettings.activateDefaultInterpreter Tank BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter Tank BAPSTParallel Full +aiSettings.activateDefaultInterpreter Tank BAPSTSerial Full +aiSettings.activateDefaultInterpreter Tank BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Tank BAPSTIf Full +aiSettings.activateDefaultInterpreter Tank BAPSTWait Full +aiSettings.activateDefaultInterpreter Tank BAPSTWhile Full +aiSettings.activateDefaultInterpreter Tank BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Tank BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Tank BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Tank BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Tank BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Tank BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Tank BAPSTIdle Full +aiSettings.activateDefaultInterpreter Tank BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Tank BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Tank BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Tank BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Tank BAPSTDebug Full +aiSettings.activateDefaultInterpreter Tank BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Tank BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Tank BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern Tank Turret + +rem *** Plane Behaviour setup *** +aisettings.setVehicleMods Plane StandardWeights +aiSettings.setVehicleBehaviour Plane MoveTo BBMoveTo BBPGotoWaypoint3d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Plane Idle BBIdle BBPIdle3d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Plane Fire BBFire3d BBPFire3d 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Plane Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Plane Idle +aiSettings.addInterpreterEntry Plane InfoWrapper +aiSettings.addInterpreterEntry Plane PlaneMoveTo +aiSettings.addInterpreterEntry Plane PlaneMoveToDirection +aiSettings.addInterpreterEntry Plane PlaneMoveToObject +aiSettings.addInterpreterEntry Plane Trigger +aiSettings.addInterpreterEntry Plane TriggerContinously +aiSettings.addInterpreterEntry Plane PlaneAimAt +aiSettings.addInterpreterEntry Plane PlaneResetControls +aiSettings.addInterpreterEntry Plane Sense +aiSettings.activateDefaultInterpreter Plane BAPSTParallel Full +aiSettings.activateDefaultInterpreter Plane BAPSTSerial Full +aiSettings.activateDefaultInterpreter Plane BAPSTIf Full +aiSettings.activateDefaultInterpreter Plane BAPSTWait Full +aiSettings.activateDefaultInterpreter Plane BAPSTWhile Full +aiSettings.activateDefaultInterpreter Plane BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Plane BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Plane BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Plane BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Plane BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Plane BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Plane BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Plane BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Plane BAPSTIdle Full +aiSettings.activateDefaultInterpreter Plane BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Plane BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Plane BAPSTDebug Full +aiSettings.activateDefaultInterpreter Plane BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Plane BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter Plane BAPSTLookAtWrapper Full + +rem *** Boat Behaviour setup *** +aisettings.setVehicleMods Boat StandardWeights +aiSettings.setVehicleMaterialCost Boat Ground -1 +aiSettings.setVehicleMaterialCost Boat Road -1 +aiSettings.setVehicleMaterialCost Boat Shallows -1 +aiSettings.setVehicleMaterialCost Boat DeepWater 1 +aiSettings.setVehicleBehaviour Boat Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Boat MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Boat Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Boat Fire BBFireLargeBore BBPFire2d 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Boat Change BBChangeTeleport BBPChangeTeleport 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Boat Idle +aiSettings.addInterpreterEntry Boat InfoWrapper +aiSettings.addInterpreterEntry Boat BoatMoveTo +aiSettings.addInterpreterEntry Boat BoatMoveToDirection +aiSettings.addInterpreterEntry Boat BoatMoveToObject +aiSettings.addInterpreterEntry Boat Trigger +aiSettings.addInterpreterEntry Boat TriggerContinously +aiSettings.addInterpreterEntry Boat MouseTurretLookAt +aiSettings.addInterpreterEntry Boat MouseTurretAimAt +aiSettings.addInterpreterEntry Boat Sense +aiSettings.addInterpreterEntry Boat BoatResetControls +aiSettings.activateDefaultInterpreter Boat BAPSTParallel Full +aiSettings.activateDefaultInterpreter Boat BAPSTSerial Full +aiSettings.activateDefaultInterpreter Boat BAPSTIf Full +aiSettings.activateDefaultInterpreter Boat BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Boat BAPSTWait Full +aiSettings.activateDefaultInterpreter Boat BAPSTWhile Full +aiSettings.activateDefaultInterpreter Boat BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Boat BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Boat BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Boat BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Boat BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Boat BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Boat BAPSTIdle Full +aiSettings.activateDefaultInterpreter Boat BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Boat BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Boat BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Boat BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Boat BAPSTDebug Full +aiSettings.activateDefaultInterpreter Boat BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Boat BAPSTEvaluateCondition Full + +rem *** Infantery Behaviour setup *** +aisettings.setVehicleMods Infantery StandardWeights +aiSettings.setVehicleMaterialCost Infantery Ground 1 +aiSettings.setVehicleMaterialCost Infantery Road 1 +aiSettings.setVehicleMaterialCost Infantery Shallows 1.5 +aiSettings.setVehicleMaterialCost Infantery DeepWater 6 +aiSettings.setVehicleBehaviour Infantery Avoid BBAvoid BBPAvoidCollisionInfantery 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Infantery MoveTo BBMoveTo BBPGotoWaypointInfantery 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Idle BBIdle BBPIdleInfantery 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Infantery Special BBMedicAssist BBPMedicAssist 12 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery c4 BBC4 BBPC4 12 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Change BBChange BBPChange 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Revive BBRevive BBPRevive 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Random BBRandom BBPRandom 12 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Infantery Triggerable BBTriggerable BBPTriggerable 12 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Infantery Idle +aiSettings.addInterpreterEntry Infantery MoveToMediumSoldier Medium +aiSettings.addInterpreterEntry Infantery MoveToObjectMediumSoldier Medium +aiSettings.addInterpreterEntry Infantery InfoWrapper +aiSettings.addInterpreterEntry Infantery InfanteryMoveTo +aiSettings.addInterpreterEntry Infantery InfanteryMoveToDirection +aiSettings.addInterpreterEntry Infantery InfanteryMoveToObject +aiSettings.addInterpreterEntry Infantery Trigger +aiSettings.addInterpreterEntry Infantery TriggerContinously +aiSettings.addInterpreterEntry Infantery MouseTurretAimAt +aiSettings.addInterpreterEntry Infantery InfanteryResetControls +aiSettings.addInterpreterEntry Infantery MouseTurretLookAt +aiSettings.addInterpreterEntry Infantery Sense +aiSettings.addInterpreterEntry Infantery SoldierPose +aiSettings.activateDefaultInterpreter Infantery BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter Infantery BAPSTPlaceC4 Full +aiSettings.activateDefaultInterpreter Infantery BAPSTParallel Full +aiSettings.activateDefaultInterpreter Infantery BAPSTSerial Full +aiSettings.activateDefaultInterpreter Infantery BAPSTIf Full +aiSettings.activateDefaultInterpreter Infantery BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Infantery BAPSTWait Full +aiSettings.activateDefaultInterpreter Infantery BAPSTWhile Full +aiSettings.activateDefaultInterpreter Infantery BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Infantery BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Infantery BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Infantery BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Infantery BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Infantery BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Infantery BAPSTIdle Full +aiSettings.activateDefaultInterpreter Infantery BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Infantery BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Infantery BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Infantery BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Infantery BAPSTDebug Full +aiSettings.activateDefaultInterpreter Infantery BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Infantery BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Infantery BAPSTEvaluateCondition Full +aiSettings.activateDefaultInterpreter Infantery BAPSTRevive Full +aiSettings.addSensingAgentPattern Infantery Soldier + + + +rem *** Fixed Behaviour setup *** +aisettings.setVehicleMods Fixed StandardWeights +aiSettings.setVehicleBehaviour Fixed Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour Fixed MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Change BBChange BBPChange 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Fixed Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Fixed Idle +aiSettings.addInterpreterEntry Fixed InfoWrapper +aiSettings.addInterpreterEntry Fixed Trigger +aiSettings.addInterpreterEntry Fixed TriggerContinously +aiSettings.addInterpreterEntry Fixed MouseTurretAimAt +aiSettings.addInterpreterEntry Fixed MouseTurretLookAt +aiSettings.addInterpreterEntry Fixed Sense +aiSettings.addInterpreterEntry Fixed InfanteryResetControls +aiSettings.activateDefaultInterpreter Fixed BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter Fixed BAPSTParallel Full +aiSettings.activateDefaultInterpreter Fixed BAPSTSerial Full +aiSettings.activateDefaultInterpreter Fixed BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Fixed BAPSTIf Full +aiSettings.activateDefaultInterpreter Fixed BAPSTWait Full +aiSettings.activateDefaultInterpreter Fixed BAPSTWhile Full +aiSettings.activateDefaultInterpreter Fixed BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Fixed BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Fixed BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Fixed BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Fixed BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Fixed BAPSTNotifyBot Full + +aiSettings.activateDefaultInterpreter Fixed BAPSTIdle Full +aiSettings.activateDefaultInterpreter Fixed BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Fixed BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Fixed BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Fixed BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter Fixed BAPSTDebug Full +aiSettings.activateDefaultInterpreter Fixed BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Fixed BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern Fixed Turret + +rem *** Car Behaviour setup *** +aiSettings.setVehicleMaterialCost Car Ground 1 +aiSettings.setVehicleMaterialCost Car Road 1 +aiSettings.setVehicleMaterialCost Car Shallows 1.8 +aiSettings.setVehicleMaterialCost Car DeepWater -1 + +aisettings.setVehicleMods Car StandardWeights +aiSettings.setVehicleBehaviour Car Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour Car MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Change BBChange BBPChange 2 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Fire BBFireUnarmed BBPFireDriveAttack 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Special BBRunOverSoldier BBPRunOverSoldier 6 UCUnion UnitWeights + +aiSettings.setVehicleBehaviour Car Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Car Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Car Idle + +aiSettings.addInterpreterEntry Car CarResetControls +aiSettings.addInterpreterEntry Car MoveToMedium Medium +aiSettings.addInterpreterEntry Car MoveToObjectMedium Medium +aiSettings.addInterpreterEntry Car InfoWrapper +aiSettings.addInterpreterEntry Car CarMoveTo +aiSettings.addInterpreterEntry Car CarMoveToDirection +aiSettings.addInterpreterEntry Car CarMoveToObject +aiSettings.addInterpreterEntry Car Trigger +aiSettings.addInterpreterEntry Car TriggerContinously +aiSettings.addInterpreterEntry Car MouseTurretAimAt +aiSettings.addInterpreterEntry Car MouseTurretLookAt +aiSettings.addInterpreterEntry Car Sense +aiSettings.activateDefaultInterpreter Car BAPSTParallel Full +aiSettings.activateDefaultInterpreter Car BAPSTSerial Full +aiSettings.activateDefaultInterpreter Car BAPSTIf Full +aiSettings.activateDefaultInterpreter Car BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Car BAPSTWait Full +aiSettings.activateDefaultInterpreter Car BAPSTWhile Full +aiSettings.activateDefaultInterpreter Car BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter Car BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Car BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Car BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Car BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Car BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Car BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Car BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Car BAPSTIdle Full +aiSettings.activateDefaultInterpreter Car BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Car BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Car BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Car BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter Car BAPSTDebug Full +aiSettings.activateDefaultInterpreter Car BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Car BAPSTRunOverObject Full +aiSettings.activateDefaultInterpreter Car BAPSTHonkHorn Full +aiSettings.activateDefaultInterpreter Car BAPSTEvaluateCondition Full + +rem *** LandingCraft Behaviour setup *** +aisettings.setVehicleMods LandingCraft StandardWeights +aiSettings.setVehicleMaterialCost LandingCraft Ground 10 +aiSettings.setVehicleMaterialCost LandingCraft Road 10 +aiSettings.setVehicleMaterialCost LandingCraft Shallows 2 +aiSettings.setVehicleMaterialCost LandingCraft DeepWater 1 +aiSettings.setVehicleBehaviour LandingCraft Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour LandingCraft MoveTo BBMoveTo BBPGotoWaypointBoat 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraft Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraft Fire BBFireUnarmed UnRelated 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraft Change BBChangeLandingCraft BBPChangeLandingCraft 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour LandingCraft Idle +aiSettings.addInterpreterEntry LandingCraft MoveToMediumBoat Medium +aiSettings.addInterpreterEntry LandingCraft MoveToObjectMediumBoat Medium +aiSettings.addInterpreterEntry LandingCraft CarMoveTo +aiSettings.addInterpreterEntry LandingCraft CarMoveToDirection +aiSettings.addInterpreterEntry LandingCraft CarMoveToObject +aiSettings.addInterpreterEntry LandingCraft Trigger +aiSettings.addInterpreterEntry LandingCraft TriggerContinously +aiSettings.addInterpreterEntry LandingCraft MouseTurretLookAt +aiSettings.addInterpreterEntry LandingCraft BoatResetControls +aiSettings.addInterpreterEntry LandingCraft Sense +aiSettings.activateDefaultInterpreter LandingCraft BAPSTParallel Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTSerial Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTIf Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTWait Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTWhile Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTIdle Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTPhysicsEnable Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTDebug Full +aiSettings.activateDefaultInterpreter LandingCraft BAPSTUseFlareOnMissileLock Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter LandingCraft BAPSTLookAtWrapper Full +aiSettings.addSensingAgentPattern LandingCraft Turret + + +rem *** Passenger Behaviour setup *** +aisettings.setVehicleMods Passenger StandardWeights +aiSettings.setVehicleBehaviour Passenger Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Fire BBFireUnarmed UnRelated 6 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleBehaviour Passenger MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour Passenger Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour Passenger Idle +aiSettings.addInterpreterEntry Passenger Trigger +aiSettings.addInterpreterEntry Passenger TriggerContinously +aiSettings.addInterpreterEntry Passenger MouseTurretLookAt +aiSettings.addInterpreterEntry Passenger InfanteryResetControls +aiSettings.addInterpreterEntry Passenger Sense +aiSettings.activateDefaultInterpreter Passenger BAPSTParallel Full +aiSettings.activateDefaultInterpreter Passenger BAPSTSerial Full +aiSettings.activateDefaultInterpreter Passenger BAPSTIf Full +aiSettings.activateDefaultInterpreter Passenger BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter Passenger BAPSTWait Full +aiSettings.activateDefaultInterpreter Passenger BAPSTWhile Full +aiSettings.activateDefaultInterpreter Passenger BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter Passenger BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Passenger BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Passenger BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Passenger BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Passenger BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Passenger BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Passenger BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Passenger BAPSTIdle Full +aiSettings.activateDefaultInterpreter Passenger BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Passenger BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter Passenger BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Passenger BAPSTDebug Full +aiSettings.activateDefaultInterpreter Passenger BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Passenger BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter Passenger BAPSTLookAtWrapper Full +aiSettings.addSensingAgentPattern Passenger Turret + +rem *** Passenger Behaviour setup *** +aisettings.setVehicleMods LandingCraftPassenger StandardWeights +aiSettings.setVehicleBehaviour LandingCraftPassenger Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraftPassenger Fire BBFireUnarmed UnRelated 6 UCScout UnitWeights +aiSettings.setVehicleBehaviour LandingCraftPassenger Change BBChangeLandingCraft BBPChangeLandingCraft 6 UCUnion ChangeInhibit +aiSettings.setVehicleBehaviour LandingCraftPassenger MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour LandingCraftPassenger Idle +aiSettings.addInterpreterEntry LandingCraftPassenger Trigger +aiSettings.addInterpreterEntry LandingCraftPassenger TriggerContinously +aiSettings.addInterpreterEntry LandingCraftPassenger MouseTurretLookAt +aiSettings.addInterpreterEntry LandingCraftPassenger InfanteryResetControls +aiSettings.addInterpreterEntry LandingCraftPassenger Sense +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTParallel Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTSerial Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTIf Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTWait Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTWhile Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTIdle Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTDebug Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter LandingCraftPassenger BAPSTLookAtWrapper Full + +rem *** LandingCraftFixed Behaviour setup *** +aisettings.setVehicleMods LandingCraftFixed StandardWeights +aiSettings.setVehicleBehaviour LandingCraftFixed Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraftFixed Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour LandingCraftFixed MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour LandingCraftFixed Change BBChangeLandingCraft BBPChangeLandingCraft 6 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour LandingCraftFixed Idle +aiSettings.addInterpreterEntry LandingCraftFixed InfoWrapper +aiSettings.addInterpreterEntry LandingCraftFixed Trigger +aiSettings.addInterpreterEntry LandingCraftFixed TriggerContinously +aiSettings.addInterpreterEntry LandingCraftFixed MouseTurretAimAt +aiSettings.addInterpreterEntry LandingCraftFixed MouseTurretLookAt +aiSettings.addInterpreterEntry LandingCraftFixed Sense +aiSettings.addInterpreterEntry LandingCraftFixed InfanteryResetControls +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTParallel Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTSerial Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTIf Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTWait Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTWhile Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTIdle Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTDebug Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTLookAtWrapper Full +aiSettings.addSensingAgentPattern LandingCraftFixed Turret + +rem ***** HeliBehaviour setup *** +aisettings.setVehicleMods Helicopter StandardWeights +aiSettings.setVehicleBehaviour Helicopter MoveTo BBMoveTo BBPGotoWaypoint3d 4 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour Helicopter Idle BBIdle BBPIdle3d 5 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour Helicopter Fire BBFire3d BBPHeliFire3d 4 UCFire HeliMoveWeights +aiSettings.setVehicleBehaviour Helicopter Change BBChange BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour Helicopter Idle + +aiSettings.addInterpreterEntry Helicopter InfoWrapper +aiSettings.addInterpreterEntry Helicopter HeliMoveTo +aiSettings.addInterpreterEntry Helicopter HeliMoveToDirection +aiSettings.addInterpreterEntry Helicopter HeliMoveToObject +aiSettings.addInterpreterEntry Helicopter HeliMoveAwayFromObject +aiSettings.addInterpreterEntry Helicopter Trigger +aiSettings.addInterpreterEntry Helicopter TriggerContinously +aiSettings.addInterpreterEntry Helicopter HeliAimAt +aiSettings.addInterpreterEntry Helicopter HeliResetControls +aiSettings.addInterpreterEntry Helicopter Sense +aiSettings.activateDefaultInterpreter Helicopter BAPSTParallel Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTSerial Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTIf Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTWait Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTWhile Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTIdle Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTDebug Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter Helicopter BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter Helicopter BAPSTLookAtWrapper Full + + +rem ***** TransportHelicopterBehaviour setup *** +aisettings.setVehicleMods TransportHelicopter StandardWeights +aiSettings.setVehicleBehaviour TransportHelicopter MoveTo BBMoveTo BBPGotoWaypoint3d 4 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour TransportHelicopter Idle BBIdle BBPIdle3d 5 UCUnion HeliMoveWeights +aiSettings.setVehicleBehaviour TransportHelicopter Change BBChangeLandingCraft BBPChange 6 UCUnion ChangeInhibit +aiSettings.setVehicleDefaultBehaviour TransportHelicopter Idle + +aiSettings.addInterpreterEntry TransportHelicopter InfoWrapper +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveTo +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveToDirection +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveToObject +aiSettings.addInterpreterEntry TransportHelicopter HeliMoveAwayFromObject +aiSettings.addInterpreterEntry TransportHelicopter Trigger +aiSettings.addInterpreterEntry TransportHelicopter TriggerContinously +aiSettings.addInterpreterEntry TransportHelicopter HeliAimAt +aiSettings.addInterpreterEntry TransportHelicopter HeliResetControls +aiSettings.addInterpreterEntry TransportHelicopter Sense +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTParallel Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTSerial Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTIf Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTWait Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTWhile Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTIdle Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTDebug Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter TransportHelicopter BAPSTLookAtWrapper Full + +rem **-------- Armed Car ----------------------- + +aisettings.setVehicleMods ArmedCar StandardWeights +aiSettings.setVehicleMaterialCost ArmedCar Ground 1 +aiSettings.setVehicleMaterialCost ArmedCar Road 1 +aiSettings.setVehicleMaterialCost ArmedCar Shallows 1 +aiSettings.setVehicleMaterialCost ArmedCar DeepWater 2 +aiSettings.setVehicleBehaviour ArmedCar Avoid BBAvoid BBPAvoidCollision2d 1 UCUnion AvoidInhibit +aiSettings.setVehicleBehaviour ArmedCar MoveTo BBMoveTo BBPGotoWaypoint2d 4 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Change BBChange BBPChange 2 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Special2 BBBridgeRepair BBPBridgeRepair 15 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ArmedCar Special3 BBDefuseMines BBPDefuseMines 13 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour ArmedCar Idle +aiSettings.addInterpreterEntry ArmedCar CarResetControls +aiSettings.addInterpreterEntry ArmedCar MoveToMedium Medium +aiSettings.addInterpreterEntry ArmedCar MoveToObjectMedium Medium +aiSettings.addInterpreterEntry ArmedCar InfoWrapper +aiSettings.addInterpreterEntry ArmedCar CarMoveTo +aiSettings.addInterpreterEntry ArmedCar CarMoveToDirection +aiSettings.addInterpreterEntry ArmedCar CarMoveToObject +aiSettings.addInterpreterEntry ArmedCar Trigger +aiSettings.addInterpreterEntry ArmedCar TriggerContinously +aiSettings.addInterpreterEntry ArmedCar MouseTurretAimAt +aiSettings.addInterpreterEntry ArmedCar MouseTurretLookAt +aiSettings.addInterpreterEntry ArmedCar Sense +aiSettings.activateDefaultInterpreter ArmedCar BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTParallel Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTSerial Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTIf Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTWait Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTWhile Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTIdle Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTMergeSoldierInputs Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTDebug Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTLookAtWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTDebug Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTForgetTarget Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter ArmedCar BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern ArmedCar Turret + +rem ***-------------------- + +aisettings.setVehicleMods ManDown UnitWeights +aiSettings.setVehicleBehaviour ManDown Idle BBIdle BBPIdle2d 2 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour ManDown Idle +aiSettings.addInterpreterEntry ManDown Trigger +aiSettings.addInterpreterEntry ManDown InfanteryResetControls +aiSettings.activateDefaultInterpreter ManDown BAPSTWhile Full +aiSettings.activateDefaultInterpreter ManDown BAPSTParallel Full +aiSettings.activateDefaultInterpreter ManDown BAPSTSerial Full +aiSettings.activateDefaultInterpreter ManDown BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter ManDown BAPSTDebug Full +aiSettings.activateDefaultInterpreter ManDown BAPSTInfoWrapper Full +aiSettings.activateDefaultInterpreter ManDown BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter ManDown BAPSTSoldierPose Full +aiSettings.activateDefaultInterpreter ManDown BAPSTEvaluateCondition Full +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter ManDown BAPSTLookAtWrapper Full + +aiSettings.addSensingAgentPattern ManDown Null + +rem *** ParatrooperFixed Behaviour setup *** +aisettings.setVehicleMods ParatrooperFixed StandardWeights +aiSettings.setVehicleBehaviour ParatrooperFixed Idle BBIdle BBPIdle2d 5 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ParatrooperFixed Fire BBFireInfantery BBPFireInfantery 4 UCFire UnitWeights +aiSettings.setVehicleBehaviour ParatrooperFixed MoveTo BBMoveToFixed UnRelated 8 UCUnion UnitWeights +aiSettings.setVehicleBehaviour ParatrooperFixed Change BBChangeLandingCraft BBPChange 6 UCUnion UnitWeights +aiSettings.setVehicleDefaultBehaviour ParatrooperFixed Idle +aiSettings.addInterpreterEntry ParatrooperFixed InfoWrapper +aiSettings.addInterpreterEntry ParatrooperFixed Trigger +aiSettings.addInterpreterEntry ParatrooperFixed TriggerContinously +aiSettings.addInterpreterEntry ParatrooperFixed MouseTurretAimAt +aiSettings.addInterpreterEntry ParatrooperFixed MouseTurretLookAt +aiSettings.addInterpreterEntry ParatrooperFixed Sense +aiSettings.addInterpreterEntry ParatrooperFixed InfanteryResetControls +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTOverrideSensingAgent Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTParallel Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTSerial Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTIf Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTPlanEnd Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTWait Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTWhile Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTWeaponWrapper Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTAimingWrapper Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTFinishedWrapper Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTUpdateVehicle Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTChangeWeapon Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTICTurnLock Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTICChangeVehicle Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTEvaluate Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTNotifyBot Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTIdle Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTSetSensingAgentFocus Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTSendRadioMessage Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTDebug Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTUseFlareOnMissileLock Full +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTEvaluateCondition Full +aiSettings.addSensingAgentPattern ParatrooperFixed Turret +rem http://www.bfeditor.org/forums/?showtopic=13499 +aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTLookAtWrapper Full \ No newline at end of file diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/esai-helper b/variants/v1.5.3153.0-bf2stats-2.7.2/esai-helper new file mode 100755 index 0000000..8d4c00d --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/esai-helper @@ -0,0 +1,412 @@ +#!/bin/sh +set -eu + +usage() { + echo "esai-helper: Get and apply ESAI strategies.ai in levels//server.zip" + echo "Options:" + echo " -d|--dir BF2 server installation directory. Defaults to '/server/bf2'" + echo " -m|--mod Mod. E.g. 'bf2' or 'xpack'. Defaults to 'bf2'" + echo "Commands:" + echo " get [subcommand]" + echo " gamemodes Get all available levels' gamemodes" + echo " maplist Generate a maplist" + echo " level-strategies Get a level's server.zip's ESAI strategies" + echo " If if omitted, all levels' strategies are shown" + echo " level-strategiescontent Get file content of level's server.zip's ESAI strategies" + echo " If if omitted, all levels' strategies are shown" + echo " levels Get all available levels" + echo " mods Get all available mods" + echo " strategies Get all available ESAI strategies" + echo " apply|delete [subcommand]" + echo " default-strategy Apply a default ESAI strategy for all levels." + echo " This is the default strategy if a level-strategy is not found for a level" + echo " level-strategy Apply the specified ESAI strategy to a specified gamemode" + echo " of a specified level's server.zip" + echo " -f|--file Apply ESAI strategies based on a space-delimited file" + echo " Format per line: " + echo " Use '#' for comments" + echo "Examples:" + echo " esai-helper -m bf2 get gamemodes" + echo " esai-helper -m xpack get gamemodes" + echo " esai-helper -m bf2 get maplist" + echo " esai-helper -m bf2 get level-strategies" + echo " esai-helper -m bf2 get level-strategiescontent" + echo " esai-helper -m bf2 get levels" + echo " esai-helper -m bf2 get mods" + echo " esai-helper -m bf2 get strategies" + echo " esai-helper -m bf2 apply default-strategy mediumfca" + echo " esai-helper -m bf2 apply level-strategy highway_tampa gpm_cq 32 mediumfca" + echo " esai-helper -m bf2 apply -f strategies.txt" + echo " esai-helper -m bf2 delete default-strategy mediumfca" + echo " esai-helper -m bf2 delete level-strategy highway_tampa gpm_cq 32 mediumfca" + echo " esai-helper -m bf2 delete -f strategies.txt" +} +# Exit if we got no options +if [ $# -eq 0 ]; then usage; exit 1; fi + +# Get some options +while test $# -gt 0; do + case "$1" in + help|-h|--help) + usage + exit 0 + ;; + -d|--dir) + shift + if test $# -gt 0; then + DIR="$1" + shift + fi + ;; + -m|--mod) + shift + if test $# -gt 0; then + MOD="$1" + shift + fi + ;; + get) + shift + if [ $# = 0 ]; then + echo "Missing subcommand" + usage + exit 1 + fi + case "$1" in + gamemodes) + GET_GAMEMODES=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + break + ;; + maplist) + GET_MAPLIST=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + ;; + level-strategies) + GET_LEVEL_STRATEGIES=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + ;; + level-strategiescontent) + GET_LEVEL_STRATEGIESCONTENT=1 + shift + if [ "$#" -gt 0 ]; then + LEVEL="${1:-}" + shift + fi + ;; + levels) + GET_LEVELS=1 + shift + ;; + mods) + GET_MODS=1 + shift + ;; + strategies) + GET_STRATEGIES=1 + shift + ;; + esac + ;; + apply|delete) + SUBCOMMAND="$1" + shift + if [ "$#" = 0 ]; then + echo "Missing options or arguments" + usage + exit 1 + fi + case "$1" in + default-strategy) + if [ "$SUBCOMMAND" = 'apply' ]; then + APPLY_DEFAULT_STRATEGY=1 + else + DELETE_DEFAULT_STRATEGY=1 + fi + shift + STRATEGY="${1:-}" + if [ -z "$STRATEGY" ]; then + echo "Please specify an ESAI strategy an argument. E.g. mediumfcapb" + exit 1 + fi + shift + ;; + level-strategy) + if [ "$SUBCOMMAND" = 'apply' ]; then + APPLY_LEVEL_STRATEGY=1 + else + DELETE_LEVEL_STRATEGY=1 + fi + shift + LEVEL="${1:-}" + if [ -z "$LEVEL" ]; then + echo "Please specify a level as the first argument. E.g. dalian_plant" + exit 1 + fi + shift + GAMEMODE="${1:-}" + if [ -z "$GAMEMODE" ]; then + echo "Please specify a gamemode as the second argument. E.g. gpm_coop" + exit 1 + fi + shift + SIZE="${1:-}" + if [ -z "$SIZE" ]; then + echo "Please specify a map size as the third argument. E.g. 16" + exit 1 + fi + shift + STRATEGY="${1:-}" + if [ -z "$STRATEGY" ]; then + echo "Please specify an ESAI strategy as the fourth argument. E.g. mediumfcapb" + exit 1 + fi + shift + ;; + -f|--file) + if [ "$SUBCOMMAND" = 'apply' ]; then + APPLY_FILE=1 + else + DELETE_FILE=1 + fi + shift + if [ "$#" -gt 0 ]; then + FILE="$1" + shift + fi + ;; + *) + echo "Invalid option '$1'" 1>&2 + usage + exit 1 + ;; + esac + ;; + *) + echo "Invalid option '$1'" 1>&2 + usage + exit 1 + ;; + esac +done + +DIR=${DIR:-/server/bf2} +MOD=${MOD:-bf2} # Default mod is mods/bf2 +GET_GAMEMODES=${GET_GAMEMODES:-} +GET_MAPLIST=${GET_MAPLIST:-} +GET_LEVEL_STRATEGIES=${GET_LEVEL_STRATEGIES:-} +GET_LEVEL_STRATEGIESCONTENT=${GET_LEVEL_STRATEGIESCONTENT:-} +GET_LEVELS=${GET_LEVELS:-} +GET_MODS=${GET_MODS:-} +GET_STRATEGIES=${GET_STRATEGIES:-} +APPLY_DEFAULT_STRATEGY=${APPLY_DEFAULT_STRATEGY:-} +DELETE_DEFAULT_STRATEGY=${DELETE_DEFAULT_STRATEGY:-} +APPLY_LEVEL_STRATEGY=${APPLY_LEVEL_STRATEGY:-} +DELETE_LEVEL_STRATEGY=${DELETE_LEVEL_STRATEGY:-} +APPLY_FILE=${APPLY_FILE:-} +DELETE_FILE=${DELETE_FILE:-} +LEVEL=${LEVEL:-} +GAMEMODE=${GAMEMODE:-} +SIZE=${SIZE:-} +STRATEGY=${STRATEGY:-} + +# Validation +if ! cd "$DIR" 2>/dev/null; then + echo "No such directory: $DIR" + exit 1 +fi +DIR=$( cd "$DIR" && pwd ) +if [ ! -d "$DIR/mods/$MOD" ]; then + echo "Invalid mod. Mod directory does not exist: $DIR/mods/$MOD" + exit 1 +fi +if [ -n "$GET_GAMEMODES" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + for i in $( echo "$SERVER_ZIPS" | sort -n ); do + LEVEL=$( echo "$i" | xargs dirname | xargs basename ) + for j in $( unzip -l "$i" | awk '{print $4}' | grep -iE "gamemodes/[^/]+/[0-9]+/.+" | cut -d '/' -f2-3 | sort -n | uniq || true ); do + GAMEMODE=$( echo "$j" | cut -d '/' -f1 ) + SIZE=$( echo "$j" | cut -d '/' -f2 ) + echo "$LEVEL $GAMEMODE $SIZE" + done + done +fi + +if [ -n "$GET_MAPLIST" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + for i in $( echo "$SERVER_ZIPS" | sort -n ); do + LEVEL=$( echo "$i" | xargs dirname | xargs basename ) + for j in $( unzip -l "$i" | awk '{print $4}' | grep -iE "gamemodes/[^/]+/[0-9]+/.+" | cut -d '/' -f2-3 | sort -n | uniq || true ); do + GAMEMODE=$( echo "$j" | cut -d '/' -f1 ) + SIZE=$( echo "$j" | cut -d '/' -f2 ) + echo "maplist.append $LEVEL $GAMEMODE $SIZE" + done + done +fi + +if [ -n "$GET_MODS" ]; then + ls -1 "$DIR/mods" | sort -n +fi + +if [ -n "$GET_LEVELS" ]; then + ls -1 "$DIR/mods/$MOD/levels" | sort -n +fi + +if [ -n "$GET_LEVEL_STRATEGIES" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + for i in $SERVER_ZIPS; do + STRATEGIES_AI=$( unzip -l "$i" | grep -iE "gamemodes/[^/]+/[0-9]+/[^/]+/strategies.ai" | awk '{print $4}' | sort -n | uniq || true ) + if [ -n "$STRATEGIES_AI" ]; then + for s in $STRATEGIES_AI; do + echo "$i $s" + done + else + echo "No strategies found in: $i" >&2 + fi + done +fi + +if [ -n "$GET_LEVEL_STRATEGIESCONTENT" ]; then + SERVER_ZIPS=$( find "$DIR" -path "*/mods/$MOD/levels/${LEVEL:-*}/server.zip" | sort -n ) + if [ -z "$SERVER_ZIPS" ]; then + echo "No such level: $LEVEL" >&2 + exit 1 + fi + ERR= + for i in $SERVER_ZIPS; do + echo "Looking in: $i" >&2 + STRATEGIES_AI=$( unzip -l "$i" | grep -iE "gamemodes/[^/]+/[0-9]+/[^/]+/strategies.ai" | awk '{print $4}' | sort -n | uniq || true ) + if [ -n "$STRATEGIES_AI" ]; then + for s in $STRATEGIES_AI; do + echo "Content of $s in $i:" >&2 + unzip -p "$i" "$s" + done + else + echo "No strategies found in: $i" >&2 + ERR=1 + fi + done + if [ -n "$ERR" ]; then + exit 1 + fi +fi + +if [ -n "$GET_STRATEGIES" ]; then + cd "$DIR" + find . | grep -E "mods/$MOD/esai/mapfiles/[^/]+/[^/]+/strategies.ai" | cut -d '/' -f7 | sort -n +fi + +if [ -n "$APPLY_DEFAULT_STRATEGY" ]; then + # A trick not found in ESAI readmes + # The default ESAI strategy is used when there is no ESAI strategy for a particular level. + # According to Void, the original author of ESAI, it's easy to add the default ESAI strategy for all maps: + # 1. All except the last two lines of an ESAI strategy (i.e. mods/bf2/esai/mapfiles/*//strategies.ai) goes into aidefaultstrategies.ai + # 2. The last two lines go into aidefaultstrategiesadd.ai + STRATEGIES_AI=$( find "$DIR" | grep -E "mods/$MOD/esai/mapfiles/[^/]+/$STRATEGY/strategies.ai" | head -n1 || true ) + if [ -z "$STRATEGIES_AI" ]; then + echo "No such strategy: $STRATEGY" + echo "To get a list of available strategies, run:" + echo " esai-helper -m "$MOD" get strategies" + exit 1 + fi + CONTENT=$( cat "$STRATEGIES_AI" ) + LINE_COUNT=$( echo "$CONTENT" | wc -l ) + echo "Applying $STRATEGIES_AI to $DIR/mods/$MOD/ai/aidefaultstrategies.ai">&2 + echo "$CONTENT" | head -n $(( $LINE_COUNT - 2 )) > "$DIR/mods/$MOD/ai/aidefaultstrategies.ai" + echo "Applying $STRATEGIES_AI to $DIR/mods/$MOD/ai/aidefaultstrategiesadd.ai">&2 + echo "$CONTENT" | tail -n 2 > "$DIR/mods/$MOD/ai/aidefaultstrategiesadd.ai" +fi + +if [ -n "$DELETE_DEFAULT_STRATEGY" ]; then + echo "Deleting a default ESAI strategy is not supported. The server needs a default strategy." + exit 1 +fi + +if [ -n "$APPLY_LEVEL_STRATEGY" ] || [ -n "$DELETE_LEVEL_STRATEGY" ] || [ -n "$APPLY_FILE" ] || [ -n "$DELETE_FILE" ]; then + # Validation + if [ -n "$APPLY_LEVEL_STRATEGY" ] || [ -n "$DELETE_LEVEL_STRATEGY" ]; then + CONTENT="$LEVEL $GAMEMODE $SIZE $STRATEGY" + fi + if [ -n "$APPLY_FILE" ] || [ -n "$DELETE_FILE" ]; then + if [ ! -f "$FILE" ]; then + echo "No such file: $FILE" + exit 1 + fi + CONTENT=$( cat "$FILE" | grep -v '#' | awk NF || true ) # Remove lines starting with '#' or trailing with '# ...', as well as blank lines + if [ -z "$CONTENT" ]; then + echo "No ESAI strategies to apply in: $FILE" + exit 1 + fi + fi + echo "$CONTENT" | while read -r LEVEL GAMEMODE SIZE STRATEGY; do + SERVER_ZIP="$DIR/mods/$MOD/levels/$LEVEL/server.zip" + if ! unzip -l "$SERVER_ZIP" | grep -iE "gamemodes/$GAMEMODE/$SIZE/" > /dev/null; then + echo "The gamemode '$GAMEMODE' does not exist in $SERVER_ZIP at gamemodes/$GAMEMODE/$SIZE/" + echo "To get a list of available gamemodes, run:" + echo " esai-helper -m "$MOD" get gamemodes" + exit 1 + fi + STRATEGIES_AI=$( find "$DIR" | grep -E "mods/$MOD/esai/mapfiles/[^/]+/$STRATEGY/strategies.ai" | head -n1 || true ) + if [ -z "$STRATEGIES_AI" ]; then + echo "No such strategy: $STRATEGY" + echo "To get a list of available strategies, run:" + echo " esai-helper -m "$MOD" get strategies" + exit 1 + fi + done + + if [ -n "$APPLY_LEVEL_STRATEGY" ] || [ -n "$APPLY_FILE" ]; then + echo "$CONTENT" | while read -r LEVEL GAMEMODE SIZE STRATEGY; do + cd "$DIR/mods/$MOD/levels/$LEVEL" + SERVER_ZIP="$PWD/server.zip" + STRATEGIES_AI=$( find "$DIR" | grep -E "mods/$MOD/esai/mapfiles/[^/]+/$STRATEGY/strategies.ai" | head -n1 || true ) + STRATEGIES_AI_DESTINATION_IN_ZIP="gamemodes/$GAMEMODE/$SIZE/ai/strategies.ai" + echo "Applying strategy $STRATEGIES_AI to $SERVER_ZIP at $STRATEGIES_AI_DESTINATION_IN_ZIP" + mkdir -p "$( dirname "$STRATEGIES_AI_DESTINATION_IN_ZIP" )" # Same layout as content of server.zip + cp -f "$STRATEGIES_AI" "$STRATEGIES_AI_DESTINATION_IN_ZIP" + zip -qru server.zip gamemodes + rm -rf "$DIR/mods/$MOD/levels/$LEVEL/gamemodes" + done + fi + + if [ -n "$DELETE_LEVEL_STRATEGY" ] || [ -n "$DELETE_FILE" ]; then + echo "$CONTENT" | while read -r LEVEL GAMEMODE SIZE STRATEGY; do + cd "$DIR/mods/$MOD/levels/$LEVEL" + SERVER_ZIP="$PWD/server.zip" + EXISTING_STRATEGIES_AI=$( unzip -l "$SERVER_ZIP" | grep -iE "gamemodes/$GAMEMODE/$SIZE/ai/strategies.ai" | awk '{print $4}' || true ) + if [ -n "$EXISTING_STRATEGIES_AI" ]; then + for i in $EXISTING_STRATEGIES_AI; do + echo "Removing existing strategy $i from $SERVER_ZIP at $i" + zip -q -d "$SERVER_ZIP" "$i" + done + else + echo "No existing strategy in: $SERVER_ZIP" + exit 1 + fi + done + fi +fi diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/esai-optimized-strategies-bf2.txt b/variants/v1.5.3153.0-bf2stats-2.7.2/esai-optimized-strategies-bf2.txt new file mode 100644 index 0000000..8207539 --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/esai-optimized-strategies-bf2.txt @@ -0,0 +1,142 @@ +# This is a list of optimized ESAI strategies, based on 'Strategies-&-Navmesh-Credits.pdf' for BF2SP64 +# Format: +# Usage: +# 1. The following level-gamemode-strategy entries may be generated (with an empty field): +# esai-helper --mod bf2 get gamemodes +# 2. Edit field to your liking. To get all available strategies: +# esai-helper --mod bf2 get strategies +# 3. Apply these ESAI strategies: +# esai-helper --mod bf2 apply -f esai-optimized-strategies-bf2.txt +# 4. Remove these ESAI strategies: +# esai-helper --mod bf2 delete -f esai-optimized-strategies-bf2.txt +# NOTE: Commented out maps do not have an optimized ESAI strategy + +dalian_plant gpm_coop 16 smallmap +dalian_plant gpm_cq 16 smallmap +dalian_plant gpm_cq 32 smallmap +dalian_plant gpm_cq 64 largemap +dalian_plant sp1 16 smallmap +daqing_oilfields gpm_coop 16 smallmap +daqing_oilfields gpm_cq 16 smallmap +daqing_oilfields gpm_cq 32 mediummap +daqing_oilfields gpm_cq 64 largefcapf +daqing_oilfields sp1 16 smallmap +dragon_valley gpm_coop 16 smallmap +dragon_valley gpm_cq 16 smallmap +dragon_valley gpm_cq 32 mediumfcapfpb +dragon_valley gpm_cq 64 largefcapfpb +dragon_valley gpm_cq 128 largefcapfpb +dragon_valley gpm_sl 16 smallmap +dragon_valley gpm_sl 32 mediumfcapfpb +dragon_valley gpm_sl 64 largefcapfpb +dragon_valley gpm_sl 128 largefcapfpb +dragon_valley sp1 16 smallmap +dragon_valley sp1 32 mediumfcapfpb +dragon_valley sp1 64 largefcapfpb +dragon_valley sp1 128 largefcapfpb +dragon_valley sp2 16 smallmap +dragon_valley sp2 32 mediumfcapfpb +dragon_valley sp2 64 largefcapfpb +dragon_valley sp2 128 largefcapfpb +dragon_valley sp3 16 smallmap +dragon_valley sp3 32 mediumfcapfpb +dragon_valley sp3 64 largefcapfpb +dragon_valley sp3 128 largefcapfpb +fushe_pass gpm_coop 16 smallmap +fushe_pass gpm_cq 16 smallmap +fushe_pass gpm_cq 32 mediumpf +fushe_pass gpm_cq 64 largepf +fushe_pass sp1 16 smallmap +# greatwall gpm_coop 16 - +# greatwall gpm_cq 16 - +# greatwall gpm_cq 32 - +# greatwall sp1 16 - +# greatwall sp1 32 - +# greatwall sp1 64 - +gulf_of_oman gpm_coop 16 smallmap +gulf_of_oman gpm_cq 16 smallmap +gulf_of_oman gpm_cq 32 smallfca +gulf_of_oman gpm_cq 64 mediumfca +gulf_of_oman sp1 16 smallmap +highway_tampa gpm_cq 16 smallmap +highway_tampa gpm_cq 32 mediummap +highway_tampa gpm_cq 64 largemap +highway_tampa gpm_cq 128 largemap +highway_tampa gpm_cq 8 smallmap +highway_tampa gpm_sl 16 smallmap +highway_tampa gpm_sl 32 mediummap +highway_tampa gpm_sl 64 largemap +highway_tampa gpm_sl 128 largemap +highway_tampa sp1 16 smallmap +highway_tampa sp1 32 mediummap +highway_tampa sp1 64 largemap +highway_tampa sp1 128 largemap +highway_tampa sp2 16 smallmap +highway_tampa sp2 32 mediummap +highway_tampa sp2 64 largemap +highway_tampa sp2 128 largemap +highway_tampa sp3 16 smallmap +highway_tampa sp3 32 mediummap +highway_tampa sp3 64 largemap +highway_tampa sp3 128 largemap +kubra_dam gpm_cq 16 smallmap +kubra_dam gpm_cq 32 mediumpf +kubra_dam gpm_cq 64 largepf +kubra_dam sp1 16 smallmap +mashtuur_city gpm_cq 16 smallmap +mashtuur_city gpm_cq 32 smallmap +mashtuur_city gpm_cq 64 mediummap +# midnight_sun gpm_coop 16 - +# midnight_sun gpm_cq 16 - +# midnight_sun gpm_cq 32 - +# midnight_sun gpm_cq 64 - +# midnight_sun sp1 16 -` +# operation_blue_pearl gpm_cq 16 - +# operation_blue_pearl gpm_cq 32 - +# operation_blue_pearl gpm_cq 64 - +operation_clean_sweep gpm_coop 16 smallmap +operation_clean_sweep gpm_cq 16 smallmap +operation_clean_sweep gpm_cq 32 mediumfcapf +operation_clean_sweep gpm_cq 64 mediumfcapf +operation_clean_sweep sp1 16 smallmap +# operationharvest gpm_coop 16 - +# operationharvest gpm_cq 16 - +# operationharvest gpm_cq 32 - +# operationharvest gpm_cq 64 - +# operationharvest sp1 16 - +# operationroadrage gpm_coop 1 -6 +# operationroadrage gpm_cq 16 - +# operationroadrage gpm_cq 32 - +# operationroadrage gpm_cq 64 - +# operationroadrage sp1 16 - +# operationsmokescreen gpm_coop 16 - +# operationsmokescreen gpm_cq 16 - +# operationsmokescreen gpm_cq 32 - +# operationsmokescreen sp1 16 - +# operationsmokescreen sp1 32 - +road_to_jalalabad gpm_coop 16 smallmap +road_to_jalalabad gpm_cq 16 smallmap +road_to_jalalabad gpm_cq 32 mediumfcapf +road_to_jalalabad gpm_cq 64 mediumfcapf +road_to_jalalabad sp1 16 smallmap +sharqi_peninsula gpm_coop 16 smallmap +sharqi_peninsula gpm_cq 16 smallmap +sharqi_peninsula gpm_cq 32 mediumfcapf +sharqi_peninsula gpm_cq 64 mediumfcapf +sharqi_peninsula sp1 16 smallmap +songhua_stalemate gpm_coop 16 smallmap +songhua_stalemate gpm_cq 16 smallmap +songhua_stalemate gpm_cq 32 mediumfca +songhua_stalemate gpm_cq 64 largefca +songhua_stalemate sp1 16 smallmap +# taraba_quarry gpm_coop 16 - +# taraba_quarry gpm_cq 16 - +# taraba_quarry gpm_cq 32 - +# taraba_quarry sp1 16 - +# taraba_quarry sp1 32 - +wake_island_2007 gpm_cq 64 wake-island-64 +zatar_wetlands gpm_coop 16 smallmap +zatar_wetlands gpm_cq 16 smallmap +zatar_wetlands gpm_cq 32 mediumfca +zatar_wetlands gpm_cq 64 mediumfcapf +zatar_wetlands sp1 16 smallmap diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/esai-optimized-strategies-xpack.txt b/variants/v1.5.3153.0-bf2stats-2.7.2/esai-optimized-strategies-xpack.txt new file mode 100644 index 0000000..d0fffa6 --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/esai-optimized-strategies-xpack.txt @@ -0,0 +1,42 @@ +# Format: +# 1. The following level-gamemode-strategy entries may be generated (with an empty field) using: +# esai-helper --mod xpack get gamemodes +# 2. Edit field to your liking. To get all available strategies: +# esai-helper --mod xpack get strategies +# 3. Then apply these ESAI strategies as part of container entrypoint: +# esai-helper --mod xpack apply -f esai-optimized-strategies-xpack.txt +# 4. To remove these ESAI strategies, simply: +# esai-helper --mod xpack delete -f esai-optimized-strategies-xpack.txt +# NOTE: Commented out maps do not have an optimized ESAI strategy + +# ghost_town gpm_coop 16 - +# ghost_town gpm_cq 16 - +# ghost_town gpm_cq 32 - +# ghost_town gpm_cq 64 - +# ghost_town sp1 16 - +# 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_coop 16 - +# mass_destruction gpm_cq 16 - +# mass_destruction gpm_cq 32 - +# mass_destruction gpm_cq 64 - +# mass_destruction sp1 16 - +# night_flight gpm_coop 16 - +# night_flight gpm_cq 16 - +# night_flight gpm_cq 32 - +# night_flight gpm_cq 64 - +# night_flight sp1 16 - +# surge gpm_coop 16 - +# surge gpm_cq 16 - +# surge gpm_cq 32 - +# surge gpm_cq 64 - +# surge sp1 16 - +# warlord gpm_coop 16 - +# warlord gpm_cq 16 - +# warlord gpm_cq 32 - +# warlord gpm_cq 64 - +# warlord sp1 16 - diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/healthcheck b/variants/v1.5.3153.0-bf2stats-2.7.2/healthcheck new file mode 100755 index 0000000..5464f28 --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/healthcheck @@ -0,0 +1,24 @@ +#!/bin/bash +set -eu +usage() { + echo "healthcheck: Healthcheck a Battlefield 2 server" + echo "Usage: healthcheck " + echo "Examples:" + echo " ./healthcheck 127.0.0.1 29900" + echo " ./healthcheck bf2 29900" +} +if [ "${1:-}" = '-h' ] || [ "${1:-}" = '--help' ]; then + usage + exit 0 +fi +HOST=${1:-localhost} # Hostname +PORT=${2:-29900} # Gamespy port + +echo "Checking $HOST:$PORT" +RES=$( printf '\xFE\xFD\x00\x10\x20\x30\x40\xFF\xFF\xFF\x01' | nc -w 1 -u "$HOST" "$PORT" ) +if [ -n "$RES" ]; then + echo "OK" +else + echo "Not OK" + exit 1 +fi diff --git a/variants/v1.5.3153.0-bf2stats-2.7.2/lowercase-helper b/variants/v1.5.3153.0-bf2stats-2.7.2/lowercase-helper new file mode 100755 index 0000000..699a069 --- /dev/null +++ b/variants/v1.5.3153.0-bf2stats-2.7.2/lowercase-helper @@ -0,0 +1,70 @@ +#!/bin/sh +set -eu + +usage() { + echo "$0 The BF2 linux server requires all files to be in lowercase, except python files. See /readmes/readme-linux.txt" + echo " This script lowercases a given directory and all descendent folders" + echo "Examples:" + echo " $0 --dir /server/bf2/mods/bf2/ESAI" +} + +# Get some options +while test $# -gt 0; do + case "$1" in + -h|--help) + usage + exit 0 + ;; + -d|--dir) + shift + if test $# -gt 0; then + DIR="$1" + shift + fi + ;; + *) + echo "Invalid option '$1'" 1>&2 + usage + exit 1 + ;; + esac +done + +if [ -z "$DIR" ]; then + echo "Specify a directory as the first argument" + usage() + exit 1 +fi + +# Lowercase this directory +if basename "$DIR" | grep -E '[A-Z]' > /dev/null; then + DIR_LOWERCASED="$( dirname "$DIR" )/$( basename "$DIR" | tr '[:upper:]' '[:lower:]' )" + mv -v "$DIR" "$DIR_LOWERCASED" 2>&1 || true + DIR="$DIR_LOWERCASED" +fi + +# Lowercase descendent directories starting from the parent-most +i=1 +while true; do + DIRS=$( find "$DIR" -mindepth "$i" -maxdepth "$i" -type d | grep -E '[A-Z]' || true ) + if [ -z "$DIRS" ]; then + break + fi + echo "$DIRS" | while read -r d; do + mv -v "$d" "$( echo "$d" | tr '[:upper:]' '[:lower:]' )" + done + i=$(( $i + 1 )) +done + +# Lowercase descendent files starting from the parent-most +i=1 +while true; do + FILES=$( find "$DIR" -mindepth "$i" -maxdepth "$i" -type f | grep -E '[A-Z]' || true ) + if [ -z "$FILES" ]; then + break + fi + echo "$FILES" | while read -r f; do + mv -v "$f" "$( echo "$f" | tr '[:upper:]' '[:lower:]' )" + done + i=$(( $i + 1 )) +done