IPB

Welcome Guest ( Log In | Register )

Bugs, fixes, and other findings for BF2, Found during modding
korben_dallas
post Dec 28 2005, 10:01 PM
Post #1


Classic Rock? no.. classic BF2
******

Group: Soldiers
Posts: 2,497
Joined: 28-June 04
From: USA
Member No.: 262



Will be adding to this as we sift through our notes. Some of these will be single player issues and others general issues.

AT Mine [issue solved]

After increasing the the AT Mine projectile velocity, giving the genericfirearm an aitemplate, and then play-tweaking the aitemplate for several weeks, I had the bots using mines and getting kills. Then one of the patches (1.02 or 1.03) came along, and we started getting CTD's w/ this error msg when bots would lay a mine:
user posted image

I lost all hope for a month or two, then SatNav added this to the AT Mine genericfirearm:

rem ---BeginComp:ThrownFireComp ---
ObjectTemplate.createComponent ThrownFireComp
ObjectTemplate.fire.altFireInput PIAltFire

Problem solved, CTD's disappeared. smile.gif Apparently the bots were trying (or thinking about) to use the right click fire, but with no input mapping in the generic firearm, an error would occur. It's likely the same issue would occur w/ the claymore and be fixed the same way.


Giving soldier aitemplate antiaircraft armament [issue solved]

If you want soldiers in BF2 to fire their handweapons at aircraft, you have to give the soldier.aitemplate.armament antiaircraft ability. For example, an AT Soldier:

rem *** at armament ***
aiTemplatePlugIn.create Armament atSoldierArmament
aiTemplatePlugIn.setIsAntiAircraft 1

Then tweaking the individual weapontemplates, you'll have bots shooting at aircraft with various handweapons. But then on occasion you'll get a CTD with LookAtWrapper errors.

With windowed mode, the debugger logs, and Outsider's help, we tracked it down to certain aibehaviors that DICE did not include (not their fault, since their soldiers don't have antiaircraft armament). These need to be added:


rem *** LandingCraftFixed Behaviour setup ***
aiSettings.activateDefaultInterpreter LandingCraftFixed BAPSTLookAtWrapper Full

rem *** ParatrooperFixed Behaviour setup ***
aiSettings.activateDefaultInterpreter ParatrooperFixed BAPSTLookAtWrapper Full


Hold Object [issue not solved]

The use of the GamePlayObjects.ObjectSpawner property objectTemplate.holdObject 1 causes this error when bots try to move the vehicle:
user posted image

No solution as of yet.


No heatseeking track or lock hud (on target), and no heatseeking track or lock warning sound (for self) [issue solved]

Heatseeking missles must be a secondary (right click) genericfirearm. If assigned as primary firearm, all the said issues will occur.


Bots firing heatseeking missles from a helicopter [issue solved]

1. See above. The heatseeking weapon must be a secondary (right-click), otherwise bots never get a lock, and won't fire.
2. Objects.ai ---> armament must include aiTemplatePlugIn.setIsAntiAircraft 1
3. Weapons.ai ---> WeaponTemplate.WeaponFire PIAltFire


--------------------
Thanx!

~Keith "Korben Dallas"
Go to the top of the page
 
+Quote Post
2 Pages V   1 2 >  
Start new topic
Replies (1 - 14)
Recruit_clivewil_*
post Dec 28 2005, 10:55 PM
Post #2





Guests






QUOTE
Bots firing heatseeking missles from a helicopter [issue solved]

1. See above. The heatseeking weapon must be a secondary (right-click), otherwise bots never get a lock, and won't fire.
2. Objects.ai ---> armament must include aiTemplatePlugIn.setIsAntiAircraft 1
3. Weapons.ai ---> WeaponTemplate.WeaponFire PIAltFire

in \ai\Objects.ai, it was also necessary to change the ai strategic strength settings to:
aiTemplatePlugIn.setStrategicStrength 0 0
aiTemplatePlugIn.setStrategicStrength 1 2

or else the bots would only fire once if it was a cannon, or not at all if it was a missile - they would get a lock, and continue to strafe around you, ad nauseum.
Go to the top of the page
 
+Quote Post
korben_dallas
post Dec 29 2005, 11:42 PM
Post #3


Classic Rock? no.. classic BF2
******

Group: Soldiers
Posts: 2,497
Joined: 28-June 04
From: USA
Member No.: 262



Bots cannot throw/shoot sticky projectiles [issue not solved]

.. but they can use them.

Assuming the weapon has an aitemplate so the bots can use it, you can make the projectile sticky by replacing the collision comp with stickycollisioncomp:

rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 180
rem ---EndComp ---

I made our incendiary grenade sticky, to be similar to a molotov cocktail, and stick to vehicles as it burns. But I noticed the bots rarely using it. So I followed them around in game for a while and discovered that they were doing the same "run to vehicle, plant it, run away from vehicle" behavior as they do with C4. Apparently the StickyCollisionComp triggers that behavior in the AI.

The implication is that you cannot have a bot using a sticky weapon from a distance.

No solution as of yet.


--------------------
Thanx!

~Keith "Korben Dallas"
Go to the top of the page
 
+Quote Post
C.ZI
post Dec 30 2005, 02:01 PM
Post #4


BF1918 AI-Coder
****

Group: Soldiers
Posts: 306
Joined: 2-August 04
From: Germany
Member No.: 332



just a small hint:
on taking screenshots from error messages, rather use [ALT-GR]+[PRINT] than just [PRINT].
this will result in only sending the current active window (in our case the error message) to the clipboard, so you wont have to cut it out from your whole desktop, just save and upload smile.gif


--------------------

-=| C.ZI |=-

AI Coder @ IPB Image

Go to the top of the page
 
+Quote Post
korben_dallas
post Dec 30 2005, 03:05 PM
Post #5


Classic Rock? no.. classic BF2
******

Group: Soldiers
Posts: 2,497
Joined: 28-June 04
From: USA
Member No.: 262



Oh I know heh. biggrin.gif

Sometimes I actually do want to capture the whole screen so I can get the error popup and the % loaded on the background bf2 window.


--------------------
Thanx!

~Keith "Korben Dallas"
Go to the top of the page
 
+Quote Post
Bongholio
post Jun 22 2006, 03:57 PM
Post #6


Mechanized colossus of precision-guided violence
****

Group: Soldiers
Posts: 551
Joined: 29-March 05
Member No.: 554



better ai spawning off the squadleader
inside Objects_server.zip /soldiers/Common/common.con
rem the line
ObjectTemplate.setScatterSpawnPositions 1


--------------------
"Vi Veri Veniversum Vivus Vici"
Go to the top of the page
 
+Quote Post
WCCToetagger
post Nov 22 2006, 07:53 PM
Post #7


The dude
**

Group: Soldiers
Posts: 20
Joined: 10-January 06
From: Ontario Canada
Member No.: 1,394



QUOTE
Giving soldier aitemplate antiaircraft armament [issue solved]

If you want soldiers in BF2 to fire their handweapons at aircraft, you have to give the soldier.aitemplate.armament antiaircraft ability. For example, an AT Soldier:

rem *** at armament ***
aiTemplatePlugIn.create Armament atSoldierArmament
aiTemplatePlugIn.setIsAntiAircraft


What file am I supposed to copy this information to?!






Go to the top of the page
 
+Quote Post
korben_dallas
post Nov 25 2006, 12:12 PM
Post #8


Classic Rock? no.. classic BF2
******

Group: Soldiers
Posts: 2,497
Joined: 28-June 04
From: USA
Member No.: 262



Objects_server.zip/soldiers/common/ai/objects.ai


--------------------
Thanx!

~Keith "Korben Dallas"
Go to the top of the page
 
+Quote Post
Cold Fussion
post Feb 10 2007, 07:41 PM
Post #9


Major
****

Group: Soldiers
Posts: 547
Joined: 6-May 06
Member No.: 1,730



Why do the the mines velocity need increasing for the bots to fire it?


--------------------
..::: My DeviantART Page :::..



"With over 100 players in some of the largest online battles on the PC". - Dice.se
------------------------------------------------------------------------------------------------
"Battlefield 2 features immense, richly detailed, destructible environments" - Dice.se



Go to the top of the page
 
+Quote Post
CrazyAce
post Feb 10 2007, 10:22 PM
Post #10


General
*****

Group: Soldiers
Posts: 1,733
Joined: 13-January 06
Member No.: 1,399



Bots will not use the mines if the velocity is to low, I guess its a bug with the coding or something.


--------------------
Go to the top of the page
 
+Quote Post
Cold Fussion
post Feb 11 2007, 12:45 AM
Post #11


Major
****

Group: Soldiers
Posts: 547
Joined: 6-May 06
Member No.: 1,730



QUOTE(CrazyAce @ Feb 10 2007, 11:22 PM) [snapback]68068[/snapback]

Bots will not use the mines if the velocity is to low, I guess its a bug with the coding or something.


Ah ok. The poe team is against throwing mines 2m so im gonna have to find a way to slow it down or scrap it.


--------------------
..::: My DeviantART Page :::..



"With over 100 players in some of the largest online battles on the PC". - Dice.se
------------------------------------------------------------------------------------------------
"Battlefield 2 features immense, richly detailed, destructible environments" - Dice.se



Go to the top of the page
 
+Quote Post
SatNav
post Feb 11 2007, 05:06 AM
Post #12


Cesar
*******

Group: Banned
Posts: 6,918
Joined: 24-June 05
Member No.: 752



boohoo.gif

This post has been edited by SatNav: Apr 1 2009, 12:07 AM
Go to the top of the page
 
+Quote Post
Cold Fussion
post Feb 16 2007, 06:23 AM
Post #13


Major
****

Group: Soldiers
Posts: 547
Joined: 6-May 06
Member No.: 1,730



QUOTE(SatNav @ Feb 11 2007, 06:06 AM) [snapback]68089[/snapback]

QUOTE(Cold Fussion @ Feb 11 2007, 07:45 PM) [snapback]68075[/snapback]

Ah ok. The poe team is against throwing mines 2m so im gonna have to find a way to slow it down or scrap it.

add a ObjectTemplate.gravityModifier to the projectile template.


Have tried that. It turns the mines into bouncing balls when they land upside down biggrin.gif


--------------------
..::: My DeviantART Page :::..



"With over 100 players in some of the largest online battles on the PC". - Dice.se
------------------------------------------------------------------------------------------------
"Battlefield 2 features immense, richly detailed, destructible environments" - Dice.se



Go to the top of the page
 
+Quote Post
korben_dallas
post Feb 22 2007, 12:29 AM
Post #14


Classic Rock? no.. classic BF2
******

Group: Soldiers
Posts: 2,497
Joined: 28-June 04
From: USA
Member No.: 262



QUOTE(Cold Fussion @ Feb 10 2007, 09:41 PM) [snapback]68057[/snapback]

Why do the the mines velocity need increasing for the bots to fire it?


BF2 Bots pre-calculate every projectile path before firing. They will not fire a weapon unless the projectile can reach its target. This is why defensive weapons are nearly impossible to implement correctly. Same issue with trying to get bots to deploy the mortar in Aintent.

PowerPoker[DICE] solved this problem in BF2142, hence the ability for bots to deploy sentinel guns. Unfortunately, it'll be a cold day in Sweden before any of that code makes it back into BF2.


--------------------
Thanx!

~Keith "Korben Dallas"
Go to the top of the page
 
+Quote Post
Cold Fussion
post Feb 22 2007, 12:43 AM
Post #15


Major
****

Group: Soldiers
Posts: 547
Joined: 6-May 06
Member No.: 1,730



QUOTE(korben_dallas @ Feb 22 2007, 01:29 AM) [snapback]68822[/snapback]

QUOTE(Cold Fussion @ Feb 10 2007, 09:41 PM) [snapback]68057[/snapback]

Why do the the mines velocity need increasing for the bots to fire it?


BF2 Bots pre-calculate every projectile path before firing. They will not fire a weapon unless the projectile can reach its target. This is why defensive weapons are nearly impossible to implement correctly. Same issue with trying to get bots to deploy the mortar in Aintent.

PowerPoker[DICE] solved this problem in BF2142, hence the ability for bots to deploy sentinel guns. Unfortunately, it'll be a cold day in Sweden before any of that code makes it back into BF2.


Thanks,


--------------------
..::: My DeviantART Page :::..



"With over 100 players in some of the largest online battles on the PC". - Dice.se
------------------------------------------------------------------------------------------------
"Battlefield 2 features immense, richly detailed, destructible environments" - Dice.se



Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2017 - 04:30 PM