Comments (1)
If you go to your mods/bots folder and open the z_svr_bots.iwd with winrar/7-zip and then proceed to navigate to maps/mp/bots/ and open _bot_script.gsc with a text editor (code editor like vscode preferred), you can change a couple of lines to get rid of them.
ctrl+f/find the following function: chooseRandomPrimary()
You'll see the following code within it:
`
if (!allowOp)
{
if (primary == "riotshield")
continue;
}
if (reasonable)
{
if (primary == "riotshield")
continue;
if (primary == "wa2000")
continue;
if (primary == "uzi")
continue;
if (primary == "sa80")
continue;
if (primary == "fn2000")
continue;
if (primary == "m240")
continue;
if (primary == "mg4")
continue;
}
if (!self isItemUnlocked(primary))
continue;
return primary;
`
the if (!allowOp) and if (reasonable) lines determine that those guns will not be allowed to be added to the pool of guns that will randomly be chosen by a bot, in any instance that you've decided to either disable op weapons, or only allow reasonable weapons. I chose to add the code disabling guns in to the reasonable option, so that any time I only allow reasonable guns to be used, the cod4 guns will be removed. You could also place the code outside of the if statements to disable them entirely. you can replace the original function with the following to copy the same behavior as I've chosen:
`
chooseRandomPrimary()
{
primaries = getPrimaries();
allowOp = (getDvarInt("bots_loadout_allow_op") >= 1);
reasonable = getDvarInt("bots_loadout_reasonable");
while (true)
{
primary = random(primaries);
if (!allowOp)
{
if (primary == "riotshield")
continue;
}
if (reasonable)
{
if (primary == "riotshield")
continue;
if (primary == "wa2000")
continue;
if (primary == "uzi")
continue;
if (primary == "sa80")
continue;
if (primary == "fn2000")
continue;
if (primary == "m240")
continue;
if (primary == "mg4")
continue;
if (primary == "ak74u")
continue;
if (primary == "peacekeeper")
continue;
if (primary == "m40a3")
continue;
if (primary == "ak47classic")
continue;
if (primary == "dragunov")
continue;
}
if (!self isItemUnlocked(primary))
continue;
return primary;
}
}
`
from iw4_bot_warfare.
Related Issues (20)
- Bots spinning in different directions cant walk straight HOT 1
- script error maps/mp/bots/_bot_internal.gsc HOT 1
- script compile error unknown function httpget maps/mp/bots/_bot_http.gsc HOT 4
- Can you look into this "Scripting error"? HOT 2
- What Causes This? HOT 5
- isn't work with pml220 HOT 1
- Domination Mode HOT 4
- How to decrease bot crounching HOT 1
- problem loading mod HOT 2
- Can't make custom classes HOT 1
- Mod will not install HOT 1
- "script compile error, selectclass already defined" HOT 3
- bot warfare HOT 2
- Crash when too many bots in game HOT 1
- What is the process to modify the mod? HOT 11
- python scripts for waypoint modification/fixing HOT 3
- [Feature Request] No bots until first player spawns HOT 1
- [Bug] Bots Stuck on loop with latest version (v2.2.0) HOT 5
- Bots won't spawn HOT 4
- 115 errors 😁 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iw4_bot_warfare.