Author Topic: My progress with SP development  (Read 4687 times)

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
My progress with SP development
« on: 21-03-2012, 19:03:16 »
Hi, just an update about out what I'm up to as I'm not exactly surrounded by bf2 fans here in RL.

I've gone as far as I can ATM with the tracker. I'll keep an eye out for new issues. I've been learning A LOT about bf2 internals. A lot to digest. It has given me new respect for SP developers. So often the solution to a problem looks simple but of course there are bugs and inconsistencies and I can see where the FH SP devs have made compromises on quite complex issues.

I've been digging up some Python documentation on the bf2 technical wiki. Looks like Python could be used to link an event to the smoke shells and grenades based on a radius. That could be used to  allow blinding of vehicles. But I've still got some way to go. I really need to find a Python coder.

I started doing an add-on making a GUI interface to start SP on a multi-core system. You'll be able to select the map from a menu that shows that level map as well as map graphic ... basically replicating what is in the game menu. A coop map will load with server and client on separate cores. There's a max of 64 bots as that is the limitation for team balancing but that is plenty on most maps. Performance is a lot better - 64 bots can take a lot of cpu when run on a single core (server/client coop). I can even pause the game by hibernating my system and the server continues on going after coming out of hibernation ! However the client needs restarting.

I'll put it on my Moddb page when it's ready !

Offline ksl94

  • Jr. Member
  • **
  • Posts: 739
  • British Imperialist
    • View Profile
Re: My progress with SP development
« Reply #1 on: 31-03-2012, 22:03:48 »
Cheers, DJBarney!
I really appreciate your efforts alot and I am looking forward to this interface thingy!  :D

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #2 on: 31-03-2012, 22:03:28 »
Thanks !  ;D

I'm writing it using Autohotkey. Still taking a break from fixing issues, but I took a brief look at the Universal Carrier WASP after I found that bots can use if you get in it first. I think it's just missing an entry point for the driver and once you jump in bots can get into the gunner position. It's cool to see those bots throwing fire all over the place.

Offline ksl94

  • Jr. Member
  • **
  • Posts: 739
  • British Imperialist
    • View Profile
Re: My progress with SP development
« Reply #3 on: 02-04-2012, 14:04:21 »
That is truly interesting; maybe there are some more things that are kept from working as intended because of coding errors and could therefore be fixed rather easily. One question I have, I am currently starting to use that performance trick (changing the affinity of the server and FH2 in the task manager) and am unable to correctly balance my 96 bots which I'd absolutely like to keep. I would have to be able to move the bot ratio percentage to a level higher than 100% in the server launcher. Now, as as you might have guessed, this is impossible to do. Do you know any way to alter the limits of the server launcher or do you have another idea on how to correctly balance the teams out?  :D

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #4 on: 02-04-2012, 17:04:44 »
I think this was answered in another thread, but the upper limit for bots when starting a server game with 50/50 balanced teams is 64 bots. If you must have more than that and want it 50/50 then start the game using the in game menu.

Please note that I'm finding that some things "that were never fixed", or "need fixing" were simply set up by the FH devs to be as functional as possible within the limitations of the engine. But there may still be some things that respond to innovative fixes that were not discovered by the FH devs. However it did bring me down to earth with a bit of a bump when I realised how many bugs and workarounds have to be taken into consideration for SP. It's probably one of the least recognised side of modding bf2 because it can't be shown quickly in a screenshot or render.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: My progress with SP development
« Reply #5 on: 02-04-2012, 18:04:46 »
I think this was answered in another thread, but the upper limit for bots when starting a server game with 50/50 balanced teams is 64 bots. If you must have more than that and want it 50/50 then start the game using the in game menu.

Please note that I'm finding that some things "that were never fixed", or "need fixing" were simply set up by the FH devs to be as functional as possible within the limitations of the engine. But there may still be some things that respond to innovative fixes that were not discovered by the FH devs. However it did bring me down to earth with a bit of a bump when I realised how many bugs and workarounds have to be taken into consideration for SP. It's probably one of the least recognised side of modding bf2 because it can't be shown quickly in a screenshot or render.

Actually, its almost 100 bots. Once you set the ratio to 100, you get them back to 50:50.
Its 50:50 at 48, so the ratio is almost equal to the number of bots to get a 50:50 ratio.
But you can only have up to 110 before you start running out of squads and increase your chance of a game crash.
Unless you do what SISU did.

But its interesting you note these things. Even from outside the hood, I have noted alot of these workarounds.
Like why bots can't use bandages or walk right over it even if they are bleeding.
We needn't even mention the artillery raised perspective that we had to implement to get them to see like planes do when firing arty at distant targets.

I have been wanting to look into having bots' POV on arty switch to remote cam when you spot with binoculars. I am counting on bots knowing how to adjust to that remote target and fire at it.
If this was possible, it would really add a tactical element to artillery because bots will then respond immediately to distant artillery targets.

But it really is an interesting, under-researched bit of the game that I feel still has ALOT of growth capability.

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #6 on: 04-04-2012, 17:04:00 »
Actually, its almost 100 bots. Once you set the ratio to 100, you get them back to 50:50.
Its 50:50 at 48, so the ratio is almost equal to the number of bots to get a 50:50 ratio.
But you can only have up to 110 before you start running out of squads and increase your chance of a game crash.
Unless you do what SISU did.

SISU ?

 ;D Djinn I almost posted a snappy/angry reply to you because I was so sure about this max 64 bots thing ... just as well I held off on that post button  ::) ... I did a test again and indeed you are right. I've been fed conflicting/bad information from various sources that had me misled. See attachments that a show a working 48/49 bots 50/50 balance using 96 bots.

Here is my aidefault.ai..

Code: [Select]
echo *****************************************************************************************
echo AIDefault.ai ****************************************************************************
echo *****************************************************************************************

aiSettings.setNSides 2
aiSettings.setAutoSpawnBots 1

rem aiSettings.setMaxNBots 64
rem aiSettings.maxBotsIncludeHumans 1
rem aiSettings.setBotSkill 0.7

rem To spawn more than 15 bots in SP, use the following lines instead of the three lines above.
rem Note that this is totaly unsupported, it will affect your system's performance
rem and may even crash your game. That being said, you will most likely be able to run a lot
rem more bots than 15 on your system.

rem Example for 32 bot game with expert bots

aiSettings.overrideMenuSettings 1
[color=red]aiSettings.setMaxNBots 96[/color]
aiSettings.maxBotsIncludeHumans 0
aiSettings.setBotSkill 0.85

run BotNames.ai

aiSettings.setInformationGridDimension 32


run AIPathFinding.ai

rem aiDebug.draw 1


rem EOF

Here is ServerSettings.con...

Code: [Select]
sv.serverName "Phorce Coop/SP"
// sv.GameMode gpm_coop
sv.password ""
sv.internet 0
sv.serverIP "192.168.1.7"
sv.serverPort 16567
sv.welcomeMessage "Welcome to Phorce Server"
sv.punkBuster 0
sv.allowFreeCam 1
sv.allowExternalViews 1
sv.allowNoseCam 1
sv.hitIndicator 1
sv.autoBalanceTeam 0
sv.teamRatio 50
sv.teamRatioPercent 100
sv.coopBotRatio 100
[color=red]sv.coopBotCount 48[/color]
sv.CoopBotDifficulty 85
sv.ticketRatio 1500
sv.ManDownTime 7
sv.SpawnTime 10
sv.maxPlayers 1
sv.numPlayersNeededToStart 1
sv.notEnoughPlayersRestartDelay 15
sv.startDelay 15
sv.endDelay 15
sv.endOfRoundDelay 15
sv.roundsPerMap 1
sv.timeLimit 0
sv.scoreLimit 0
sv.soldierFriendlyFire 0
sv.vehicleFriendlyFire 0
sv.soldierSplashFriendlyFire 0
sv.vehicleSplashFriendlyFire 0
sv.FriendlyFireWithMines 0
sv.tkPunishEnabled 0
sv.tkNumPunishToKick 3
sv.tkPunishByDefault 0
sv.votingEnabled 0
sv.voteTime 90
sv.minPlayersForVoting 2
sv.teamVoteOnly 0
sv.gameSpyPort 29900
sv.allowNATNegotiation 1
sv.interfaceIP 127.0.0.1
sv.autoRecord 0
sv.demoIndexURL ""
sv.demoDownloadURL "http://"
sv.autoDemoHook "adminutils/demo/rotate_demo.exe"
sv.demoQuality 1
sv.adminScript "modmanager"
sv.timeBeforeRestartMap 30
sv.voipEnabled 0
sv.voipQuality 3
sv.voipServerRemote 0
sv.voipServerRemoteIP
sv.voipServerPort 55125
sv.voipBFClientPort 55123
sv.voipBFServerPort 55124
sv.voipSharedPassword
sv.useGlobalRank 0
sv.useGlobalUnlocks 1
sv.noVehicles 0
sv.sponsorText "Welcome to Phorce Server"
sv.sponsorLogoURL "http://files.djbarney.org/sponsor_logo.png"
sv.communityLogoURL ""
sv.radioSpamInterval 6
sv.radioMaxSpamFlagCount 6
sv.radioBlockedDurationTime 30
sv.numReservedSlots 0
sv.friendlyFireWithMines 0

The settings are the same as I've published them before apart from adjusting the "sv.coopBotCount" bot count line to half of the bots set in aidefualt.ai.

Quote
But its interesting you note these things. Even from outside the hood, I have noted alot of these workarounds.
Like why bots can't use bandages or walk right over it even if they are bleeding.
We needn't even mention the artillery raised perspective that we had to implement to get them to see like planes do when firing arty at distant targets.

This requires ruthless logic and observing of bot behaviour. For example I just watched a bot trying to fire with the em-placeable MG. Of course it couldn’t because it does not know how to drop it like a mine. This is the same issue as mine dropping not working.

Quote
But it really is an interesting, under-researched bit of the game that I feel still has ALOT of growth capability.

You mean SP/Coop in general ?

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: My progress with SP development
« Reply #7 on: 04-04-2012, 19:04:19 »
SISU is this server in the Netherlands that managed to crack the code on 256 bot limit after several tests with an increasing player base that kept crashing until they got it right.

The owner rents it out once in a while to the common servers for special game nights etc.

About 'ruthless logic and observation', yer after watching bots play since 2005 in Fh1 and Fh2, and asking why, why, why, I finally sort of get the logic of bots.

We used to have bots use the AT rifle standing and PzIIs were easy kills. But I insisted to Remick04 to make bots ONLY fire them in prone and focus on finding a way for bots to fire from farther than rifle range, so that although they will stand there wondering why they cant stand-fire, they will eventually 'get' that they must prone if their prefered firing position is set high enough for prone.

Same for mgs. This ofcourse needs to be delicately balanced with the minimum/ maximum range for pistols.

The idea is to get bots to prone from range and suppress or snipe, while riflemen move in firing, and SMGs are giving a safety net to get in close enough to finish off.

I still believe in spite of their flaws, and the work-arounds, we can have AI being as fun if not more fun in a strictly WWII tactical sense.
Humans sneak around a bit, bots move in force. Which feels more like WWII? Which has the potential to? you tell me...


Yes, I think SP/ COOP in general has alot of way to go in the research department. Thankfully both yourself and Void are researchers at heart. i think at this point, we need such things. Sure, we need to churn out a steady supply of content, but there is room for improvement and that comes from the SP/COOP labs, not the sheer navmeshing of maps and providing templates to similar vehicles

That's why I created the 'Singleplayer Fan project thread' (now called the Experimental AI solution thread).

I want people who still care to to come up with radical solutions and work-arounds.

Raised artillery was born there. And I hope we see things like 'sniper vehicles' in church towers in the future as well as other interesting things that will make SP/ COOP sing.

It's always a pleasure seeing your updates, DJBarney.
It keeps me hoping.
« Last Edit: 04-04-2012, 19:04:15 by djinn »

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #8 on: 10-04-2012, 15:04:31 »
OK, thanks Djinn.

Here's an experimental idea.

It might just get discarded on my pile of failed inventions, but we'll see.

Each asset has a temperature so it could be possible to make the smoke spawn a dummy vehicle (unless the grenade temp can be set directly) which has a very high temperature which then might distract the bots.

"SA temperatures and don't drive them too high as this might block other actions"

http://www.bfeditor.org/forums/index.php?showtopic=10027&view=findpost&p=76407&hl=block&fromsearch=1

"Icon Dumb Ai
View Post
...one neighbouring strategic area for a CP with the same basic temperature bots often stand undecided"

Those quotes refer to strategic areas but I think the same is true for setting vehicle temps too high.

Miset temps make bot's "dumb" (for example I think spinning bots is the heli temp set too high) so why not use this tendency with smoke to initiate that kind of behaviour. It's using a weakness of the bots to create possibly believable behaviour in smoke ... ie "getting confused". Problems with that may be that bots in vehicles may not suffer from the same "temperature set too high" behaviour. Plus, as you said before, bots at a distance would probably not be effected by some temperature set too high. But I don't know how much of a problem that would be as bots at distance are usually less accurate. Even that part might make sense anyway as real soldiers would tend to fire blindly into smoke just in order to lay down tactical fire in an area where "something" may be going on. Anyway I'm thinking of smoke used in close quarters infantry battles, I'm not sure if the same temperature approach would work with tanks. But if it works with infantry then it could actually only be used on infantry maps like Port en Bessin, Port en Bessin, Siege of Giarabub (yeah, I know has Vickers tank), Purple Heart Lane and Tunis. So, anyway, I'll get down to some experimenting in game.
« Last Edit: 10-04-2012, 15:04:31 by DJ Barney »

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: My progress with SP development
« Reply #9 on: 10-04-2012, 19:04:03 »
Actually a vehicle in itself blocks bots from firing. So if it does that, bots wont fire once you are behind it.
Not sure about the temp part though. if they like it, wont they fire at it more i.e at you? Don't forget you are behind the smoke

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #10 on: 10-04-2012, 20:04:27 »
No, I don't think you understand. Forget about "blocking" anything.

What I'm talking about is using a way to actually create a dysfunction in bot behaviour. This has to do with setting temperatures INCORRECTLY for as long as the grenade+smoke exists in such a way that bot behaviour is messed up.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: My progress with SP development
« Reply #11 on: 11-04-2012, 16:04:37 »
But can the effect of their being 'confused' be predicted to cause them to NOT fire at you from behind the smoke?

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #12 on: 11-04-2012, 18:04:33 »
Don't know yet. Just wanted to discuss this and see if the approach makes sense before I can go and do some testing.

Offline djinn

  • Masterspammer
  • ****
  • Posts: 5.723
    • View Profile
Re: My progress with SP development
« Reply #13 on: 11-04-2012, 18:04:55 »
I think you should also consider the idea of bots perceiving it as a physical object. Bots really dont fire at you if you are perfectly concealed.

They will fire again if any bit of you shows. Kinda of what you would want with smoke. And they will avoid it as best they can, although not as great as a static, which is also what you would want.

Offline Michael Z Freeman

  • Jr. Member
  • **
  • Posts: 799
  • Formerly known as DJ Barney. The Few are many ;)
    • View Profile
    • Homepage
Re: My progress with SP development
« Reply #14 on: 13-04-2012, 18:04:21 »
LOL  :D

I think I know what you mean Djinn. I have a LOT of real life problems going on here that are reaching a solution. One thing that has kept me going is thinking of solutions to SP problems. Solution to RL problems should allow me to concentrate a lot more on FH. The battle continues. Mad letters in the air.