COD4 | Frontlines

AI Soldiers (Bots)

The #1 request in our History is to add Bots to Frontlines, and we will FINALLY have not only Bots, but the BEST Bots to COD4 to date, will be almost so good like the ones I did to Black Frontlines (Black Ops).

Well, but why it's soo difficult to add Bots to Frontlines when several mods added PEZBots into them ages ago? Even other Frontlines versions have Bots like W@W Frontlines, Star Wars Frontlines and Black Frontlines, so why not to COD4?

First something you need to know is that ALL of these other mods with PEZBots around have SEVERAL limitations, like very few maps compatible, few mods have more others less, but all of them have at least few of the original maps unplayable.

The most compatible mod is the last original version of PEZBot, but even this version which is the only one which support all original maps have few annoying limitations like only be able to play 2-4 maps in a row and specially the amount of waypoints loaded to be able to play with Bots. Without a waypoint to a map, this map is unplayable.

Ok, your rotation is short and you don't play many maps so you will never notice that, that's why the other versions of Frontlines have Bots, they have limited maps and gameplay, like any of the mods that you used to play with PEZBots until now.

The main problem is that Frontlines is HUGE, soooo big and vast that if you sum ALL mods available to COD4 into one, they will still be even 10% of Frontlines is.

So the magic question is how to add Bots to Frontlines without limit the vast options of the mod? Or at least limit as minimum as possible without really hurt the gameplay?

But now you are wondering what the hell Frontlines have that make this so difficult?

Here few of them:

. War Server, without be able to change many maps without crash like the other mods, then is not possible to play a War with Bots since after 4 maps the server is gone.

. In Frontlines we have 50 gametypes, and summing all the variations like Airborne Mode, Help-Mode, Weapons Modes, etc... and with everything Random, this easily pass than 480.000 combinations. Of course I would not need to code to every of them but to around 200.000, which still a lot.... To get worst the gametypes are a lot more complex and request a lot more intelligence to play which will require alot more code to many of them. PEZBots are coded relative to gametypes, and is not viable to work like that with these numbers. When only very few mods around have more than 10 gametypes you can have a better idea of the size difference.

. Frontlines have several Officers and VIPs in their gametypes with different and special behavior, so Bots must be coded to each one of them, to let them think and decided what to do, what not to do and when, not only the movement.

. Frontlines is based in huge numbers of variations with more than 200 maps in rotations. Depending of the size of your mod, is not possible to load even 50 maps waypoints, in Frontlines this number is even shorter with not more of 20 maps loaded.

. Xmodels limit of 1000 is a pain in the ass in COD4 moding, this is the main cause that many maps doesn't work with several mods which have lots of new Xmodels like Weapons for exemple, and that's why Frontlines doesn't have lots of new weapons to be able to play in almost every map around and not limited to just a few. All the Bots animations are inside Weapons Xmodels that need to be loaded into your mod to have the right animations, so with them several maps will simply stop to work.

. Code Limits are something that I don't believe any mod ever get closer to them, so it's unkown to most of the modders, but in Frontlines it's a real issue since the R3L04D days because the huge amount of code to create this very huge mod. For exemple the limit of 30 gametypes, which is in fact 29, because if we put 30 the last one all the dvars and strings will not work anymore. So to cross all those code limits Frontlines was almost re-written with a very big structure change, to make available room to code the 50 gametypes.

. Size Limits it's another weird thing, seams it's allocated just 4mb of memory to put a mod in the game, which of course is enough to all the small mods around, but not to Frontlines. Inside this allocated memory probably have something pre-allocated space to some core to make the mod live, so we have in fact less than 4mb available. So each line of code written in Frontlines in the last 5 years, a line of code with at least the same size must be out, or the game will crash.

. Aside all these, still have the other limits like Materials (images), Dvars, Localized Strings, etc, etc, etc...

Soooooo, now you have an idea why it's so difficult to add anything to Frontlines since R3L04D, and specially bots.

Well, after all that exposed how the hell I'm still bringing new stuff to Frontlines and now bots?

Let me explain you in parts...

. Code Size Limits : There's no solution, I need to open space to every new thing added, doing that without remove any feature from Frontlines it's a hell, but at least in the original code have few functions and code parts that can be deleted or re-written in better ways, even old Frontlines code was re-written, so with that I'm getting new free space to work.

. WayPoints : Since there's no way to avoid the Code/Size limits, I was forced to create a new way to store the WayPoints, Load the WayPoints and of course, convert your original WayPoints to the Frontlines version or we will need to create new waypoints to every map around, which will be alone a huge project. Using a recursive system there's a minimum size of code to control the WPs, and they will not be of course stored inside the mod code, so the Code/Size Limits will not be affected.

. AI x Gametypes x Maps x VIPs : The original PEZBot AI is not viable because is based on gametypes, so I'm writing a new one based more in the intelligence of the bot as a real player, like I did to Black Frontlines, so they will think with the options available to them at a respective moment, and not to a gametype, with that the size of code will be a lot smaller, and will work to any gametype available, so not need to code over 200.000 of gametypes options.

. War Server : I discover a good way to REALLY remove bots before change the map, so they will not crash after few maps loaded. It's already working but sometimes I'm getting crashes, I'm working on it to try to solve it, and I'm also working to find a even better way to do that, which I know I'm very close. In the last alternative, I can use the shutdown system per map that I used in W@W Frontlines, so save the War after each map, and load them back in the next one with the server already online, so still possible to play a War with bots, so why not a full campaign?

. Xmodel Limits : This is another thing that is not possible to avoid because it's a engine limit sadly, so there's 2 options, remove the bot anims then will look like floating around until they start the combat, exactly like I did at Star Wars Frontlines, or add the anims anyway and several maps will not work anymore.

Since both ways will please part of Frontlines fans, I've simply decided to release both of them. The first to be released in the Multiplayer version like I always did since 2008, and this version will have bots to play with your friends oline when have short numbers of players, will not be the best looking bots because the lack of animations but they will work better than any bot released before to COD4. Then I would release a Frontlines COOP version, which will be the SAME MP version but with the bots animations and because that, several maps will not work anymore.

But while I'm working on it a friend pointed me the COD4X project, which was in initial phase of make COD4 have few Quake commands removed from the core (if you don't know COD Engine was created over a Quake 3 Engine), and asked direct to the makers for 2 things, bring back the function that let you exec from the server config files, which will let me work very easier the real time changes of Frontlines, and the most important in this subject, bring back all the bot functions, which means you can send any control/movement to bots and they will perform like a real player, with all animations and without the need to use xmodels to that.

Even aside that I tryed to use the PezBots animations, but sadly they are very limited, and with them you need limit the weapons that the bots use, and several other things, and in my tests the result was very bad or I would need to cut lots of stuff to make it work "nice", which is not enough for me, IMO was better to play with the bots with limited anims doing EVERYTHING than with a little more anims and doing only basic stuff. For that reason this version was cut out of the project and will never be released. Instead we will have a COD4X version, which is a LOT better.

With bots we have the COOP Missions promised back in 2011 when R3L04D was released, which were released only at Black Frontlines is available for the first time to COD4, and there's around 50 Missions available to be able to play in any map compatible for the respective version. YES! COOP Missions will be available to BOTH versions.