256 Bots in Instant Battle Mode (no EXE hack required!)

Ask questions, discuss ideas, get answers
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Apache Thunder »

With the help of Tuia, I was able to modify the exe to allow the client exe to host games with 256 bots in mulitplayer co-op. But I was curious to know if this limitation applied to Instant Battle mode as I don't recall anyone attempting to change the max value for the Percentage of Bots slider in the Campaign/Instant Battle menu.

So I reverted to the original EXE (this version only had the widescreen hack, I did check to make sure multiplayer was capped at 64 with that version and it was) and then modified the meme files for CampaignMenu and SkirmishMenu. I increased the max bot count in the AIDefault.con file for my mod and then tried out the menu changes. It worked! Got 256 bots working in Instant Battle mode and this shouldn't need any hacks to the EXE! :D

Basically I changed the Slider node max value from 400 to 1600 (unlike the CreateGame menu, the player count is percentage based instead of an exact player count, this might be why we are able to get more bots in Skirmish Mode without EXE hacks). I tried something crazy like 3200 (this would in theory give me 512 bots), but the game crashed as it ran out of "descriptors" to assign to the players. So like multiplayer, the game has a memory allocation limitation and there can't be more then 256 players. So to be on the safe side just set the max bot count in your AiDefault.con file to 255 instead of 256 as you have to remember the human player counts towards the player population in Skirmish Mode just like in multiplayer. So you can safely have 255. But you can go ahead and try 256 bots if it turns out the game has a little leg room and allows 257 players.

Download Link:

256BotMod.rar

The AiDefault.con file is not included. For the mod you are going to use this on, you'll need to edit that file your self. Details are included in the ReadMe file in the archive linked above.

This mod is compatible with vanilla BF1942, however it will also work in any mod that hasn't already modified the CampaignMenu or SkirmishMenu meme files. This includes mod like DesertCombat.

My upcoming rebuild of the BF242 mod will already have this menu mod, so don't attempt to use this with my BF242 mod as it wouldn't be needed. ;)

EDIT:

Important! There was one thing I forgot about. (Thanks to Swaffy for discovering that there was an issue involving the vanilla maps)

Most of the vanilla maps has this code line in the SingleplayerAxis/SingleplayerAllied.con files (Skirmish Mode uses these con files to setup the tickets and load the objectspawns/CPs)

Code: Select all

game.maxNrofPlayers 18
You'll need to go through any maps that use this and rem it out. Otherwise you won't notice any change in bot count even after installing the modified meme files and editing the AiDefault.con file!

Most mods I don't think really have this. But if you run into maps that seem to ignore the new max bot count, that would be the first place to look. ;)
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Swaffy »

I'm trying it out. How can I change the number of bots in the Create Local Multiplayer Game menu? It still only allows for 64 and I'd like to make it 255.
Last edited by Swaffy on Thu Jun 12, 2014 5:55 pm, edited 2 times in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Apache Thunder »

That still requires an exe hack even after fixing the CreateGame meme file to allow greater player count. My mod only allows greater bots in games created from the Instant Battle menu.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Swaffy »

It seems like nothing worked. I copied the two meme files into my mod's Menu.rfa file, then changed the AIDefailt.con file like I should have. What did I miss? (Everything is done in the mod, not vanilla BF1942)
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Apache Thunder »

That's strange I even tested this in the debugger exe and it worked there as well.

EDIT:

Ok I see what's going wrong. Most of the vanilla maps has this code line in the SingleplayerAxis/SingleplayerAllied.con files (Skirmish Mode uses these con files to setup the tickets and load the objectspawns/CPs)

Code: Select all

game.maxNrofPlayers 18
You'll need to go through any maps that use this and either rem it out or change it to 256. ;)

Since it worked fine with the completely unmodded EXE in my BF242 mod, that's definitely the culprit. None of my BF242 maps has that code in the SingleplayerAxis.con or SingleplayerAllied.con files.

I completely forgot that most of the vanilla maps has that command. :P
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Swaffy »

Hmm. I changed that and still didn't get 255 bots. Have you tried this in any other mods yet?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Apache Thunder »

Just tried it in vanilla on the retail exe. After creating a patch rfa for El Alamein to remove the max player count from the singleplayerAllied.con and SingleplayerAxis.con files, the mod worked correctly. There's something your not doing right with your mod. What mod are you doing this on? Does the mod already use a Menu_001.rfa file? Menu_002 or above won't work. I recall that the main rfas can only accept one patch files. The Game.rfa can't accept patch files at all, so you'll need to repack that one. ;)
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Swaffy »

Okay, I got it working!

The issue is that I used "game.maxNrofPlayers 256" instead of simply remming out the line.

So:
rem game.maxNrofPlayers 18

Okay, cool. :D
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by Apache Thunder »

Cool. Good to see it working. I'll edit my threads to suggest remming it out instead of trying to edit them.
ImageImageImage
I have cameras in your head!
bluesman6
Posts: 4
Joined: Fri May 02, 2014 10:54 pm

Re: 256 Bots in Instant Battle Mode (no EXE hack required!)

Post by bluesman6 »

so where dose that file go? this is what I have been looking for. I want to increase the number of bots in single player mode for bf42 and bfv I have found where it said 400 % on bots and changed it to 1600 but did not get anymore bots than 64. any help would be great I do not know how to read codes so I get lost very easy and have just been changing numbers. I was able to increase the bot count in bf2 but it is simpler to understand. yours bluesman6 out
Post Reply