Increasing CPU Time To AI

Ask questions, discuss ideas, get answers

Increasing CPU Time To AI

Postby Daisy » Tue Mar 06, 2018 12:38 am

Hello All,

I was hoping someone has a way or can provide me with a mod that would allow the CPU Time to AI (max is currently 25%) to be increased. I play the Desert Combat Mod as well as the Unofficial version with the enhanced ai capabilities. Via one of your community modders (Thank you!) I was able to increase the amount of bots in the game. Often they are not being utilized and are standing in formation and I know that more cpu time needs to be given to maximize their play. If anyone can help that would be great. Thank you in advance.

Daisy
Daisy
 
Posts: 4
Joined: Tue Mar 06, 2018 12:29 am

Re: Increasing CPU Time To AI

Postby freddy » Tue Mar 06, 2018 6:02 am

Try this in console

Code: Select all
game.serverCoopCPU 100
User avatar
freddy
 
Posts: 1221
Joined: Sun Oct 18, 2009 4:58 pm

Re: Increasing CPU Time To AI

Postby Daisy » Tue Mar 06, 2018 7:48 pm

Hello Freddy,

Thank you for your prompt reply. Using the console key, I typed in "game.serverCoopCPU 100" without the quotes as suggested and pressed enter. It is returning with: "error:unauthorizedmethod!" without the quotes. I also tried with various numbers under 100 and get the same return. Maybe I am doing something wrong or it needs to be done another way.

With modern cpu's, I don't see why we cant allocate more than the 'maximum' 25%.
Daisy
 
Posts: 4
Joined: Tue Mar 06, 2018 12:29 am

Re: Increasing CPU Time To AI

Postby Daisy » Thu Mar 08, 2018 4:40 pm

BTW, I did find the line 'game.serverCoopCPU 25' in the server.con file in the game and changed it to 100 and lower numbers and it did not change anything.
Daisy
 
Posts: 4
Joined: Tue Mar 06, 2018 12:29 am

Re: Increasing CPU Time To AI

Postby russ » Sat Mar 10, 2018 11:08 pm

I suspect this may be broken. It looks like the setup code is reading in an int, 0-100, but the AI code is expecting a value 0.0 to 1.0. It looks like the default is 0.2. I don't see where it's divided by 100 before passing it into the AI code. Try 1 and see if that helps.
russ
 
Posts: 33
Joined: Sun Oct 29, 2017 8:12 am

Re: Increasing CPU Time To AI

Postby russ » Sat Mar 10, 2018 11:31 pm

Oh geez, adding insult to injury, AIMain::AIMain is called after the assignment, so it would never happen anyway. Changing it in the console won't help either since it only modifies the value in setup, not AIMain itself. But as the professor says, good news everyone!

mdt/scripting/Ai/Properties/AiSystemQuotient.html

Is the actual value, with a range of 0.0 to 1.0. It should be settable after AIMain starts assuming you have permissions right. This would mean after the call to ai.init:

mdt/scripting/Ai/Properties/Init.html

http://www.battlefieldsingleplayer.com/ ... topic=3155
russ
 
Posts: 33
Joined: Sun Oct 29, 2017 8:12 am

Re: Increasing CPU Time To AI

Postby Daisy » Sun Mar 11, 2018 5:56 am

Hi Russ,

Thank you for trying to help. Please tell me where I should put that value of 1. I didn't see a "AIMain" or where it is. I am not a coder but will try my best with instructions.
Daisy
 
Posts: 4
Joined: Tue Mar 06, 2018 12:29 am

Re: Increasing CPU Time To AI

Postby russ » Mon Mar 12, 2018 9:29 am

game.serverCoopCPU is completely broken, in more than one way.

Use ai.SystemQuotient as described in the bf single player link.
russ
 
Posts: 33
Joined: Sun Oct 29, 2017 8:12 am


Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Google [Bot] and 32 guests

cron