|
Coop & Singleplayer Suggestions and feedback pertaining to Project Reality Single Player. |
|
Thread Tools | Display Modes |
2019-08-15, 17:23 | #21 | |
PR:BF2 Contributor
Join Date: Sep 2011
Posts: 523
Germany
Location: Germany NRW - Xanten
|
Re: [COOP] Fix for Bots shooting trough foliage.
And that is what i found in Project Reality Game C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr\ai\esai\docs\fromdecompile
Code:
Extracted from BF2.exe (1.41) IT Flags: (27 total) 000000521108 000000922108 0 ITHasCarHorn 000000521118 000000922118 0 ITObstacle 000000521124 000000922124 0 ITHasWreck 000000521130 000000922130 0 ITHelicopter 000000521140 000000922140 0 ITNoTemperature 000000521150 000000922150 0 ITObstructedView 000000521164 000000922164 0 ITSoldier 000000521170 000000922170 0 ITVegetation 000000521180 000000922180 0 ITBiological 000000521190 000000922190 0 ITStructure 00000052119C 00000092219C 0 ITLowPriority 0000005211AC 0000009221AC 0 ITUnmanned 0000005211B8 0000009221B8 0 ITMobile 0000005211C4 0000009221C4 0 ITCover 0000005211CC 0000009221CC 0 ITFixed 0000005211D4 0000009221D4 0 ITArtillery 0000005211E0 0000009221E0 0 ITTransportation 0000005211F4 0000009221F4 0 ITAirfield 000000521200 000000922200 0 ITRadar 000000521208 000000922208 0 ITControlpoint 000000521218 000000922218 0 ITNaval 000000521220 000000922220 0 ITGround 00000052122C 00000092222C 0 ITAir 000000521234 000000922234 0 ITUnit 00000052123C 00000092223C 0 ITRepair 000000521248 000000922248 0 ITAmmunition 000000521258 000000922258 0 ITProduction The red marked ones having my attention. 1 or 2 of them will help me to get ammocache defense for Coop-Insurgency done via mapstrategies. From TK Quote:
But i can use TTN modifiers in a mapstrategy with an ammocache-ai to increase the temperature of the specifiec SA where the ammocache spawned. About ITCover: The BF2 Developers said the ITCover behaviour isn't used anymore in BF2 but they asking themself why vehicles still having the codelines. I believe it's still inside but no vanilla staticobject has an ai.template with any objects.ai to tell the bots that it can be used as cover. Only one object, corrugated_fence_destroyable_part, has an ai template and when used and correctly navmeshed the bots will not jump anymore against that objects that isn't in destroyed condition. And sorry Valmont for Hijacking your thread but you said you want learn to speak our language. | |
2019-08-19, 19:28 | #22 | ||
Join Date: Oct 2014
Posts: 153
United States of America
|
Re: [COOP] Fix for Bots shooting trough foliage.
Quote:
Quote:
And every three years we come up with some "actually useful" suggestions that you could use to make your creations even better! | ||
Last edited by Valmont; 2019-08-19 at 19:47..
|
2023-03-12, 01:54 | #23 |
PR:BF2 Developer
|
Re: [COOP] Fix for Bots shooting trough foliage.
Did a test.
The vBF2 static object fence_corrugated_3x12m_broken_parts has an AI attached to it. It's a DestroyableObject, meaning that it has HP and disappears after the set HP amount is depleted. This static can be found in Strike at Karkand, outside of the US base where the fence is on the right. Code:
rem *** Plugins *** aiTemplatePlugIn.create Physical fence_corrugated_3x12m_broken_partsPhysical aiTemplatePlugIn.setStrType Infantry rem *** AITemplate *** aiTemplate.create fence_corrugated_3x12m_broken_parts aiTemplate.addType ITStructure aiTemplate.degeneration 50 aiTemplate.allowedTimeDiff 2 aiTemplate.basicTemp 1 aiTemplate.commonKnowledge 1 aiTemplate.addPlugIn fence_corrugated_3x12m_broken_partsPhysical Once it is destroyed, it signals to the bots that they can go through an object. Safe to say, it only works for DestroyableObjects. This would fix bots crowding on certain statics that doesn't have this code applied to it - like in Asad Khal. It only triggers the AI behavior if the navmesh is in the direction of the static. I tested in Strike at Karkand if the bots can't see the player when hiding behind it and they still target the player behind it. But I did notice some form of invisibility. To test this out, load Strike at Karkand with 64 bots and play as MEC side. Then proceed to the middle, go to the left - closest to the road and hill of the US base and then hide behind the fence object. .tweak: Code:
rem *** Generated with Bf2Editor.exe [created: 2005/5/2 17:30] GeometryTemplate.maxSkip3pLods 3 GeometryTemplate.setSubGeometryLodDistance 0 0 35 GeometryTemplate.setSubGeometryLodDistance 0 1 55 GeometryTemplate.doNotGenerateLightmaps 1 GeometryTemplate.lightmapOverride 0 GeometryTemplate.compressVertexData 1 GeometryTemplate.maxTextureRepeat 16 ObjectTemplate.activeSafe DestroyableObject fence_corrugated_3x12m_broken_parts ObjectTemplate.creator ENI-2:eni ObjectTemplate.modifiedByUser ful ObjectTemplate.setNetworkableInfo BasicInfo ObjectTemplate.saveInSeparateFile 1 ObjectTemplate.isDestructable 1 rem ---BeginComp:Armor --- ObjectTemplate.createComponent Armor ObjectTemplate.armor.maxHitPoints 50 ObjectTemplate.armor.hitPoints 50 ObjectTemplate.armor.defaultMaterial 97 ObjectTemplate.armor.waterLevel -0.3 ObjectTemplate.armor.wreckHitPoints 50 ObjectTemplate.armor.addArmorEffect 0 e_destruction_FenceBoards -0.28/-0.52/0 0/0/0 rem ---EndComp --- ObjectTemplate.geometry fence_corrugated_3x12m_broken_parts ObjectTemplate.setCollisionMesh fence_corrugated_3x12m_broken_parts ObjectTemplate.mapMaterial 0 wood 59 ObjectTemplate.floaterMod 0 ObjectTemplate.hasMobilePhysics 0 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.physicsType Mesh ObjectTemplate.aiTemplate fence_corrugated_3x12m_broken_parts ObjectTemplate.usedByAi 1 ObjectTemplate.initiallyWalkable 0 ObjectTemplate.minCorner -0.7/-1.4/-0.5 ObjectTemplate.maxCorner 0.7/1.5/0.5 Also the collision mesh needs col 3 (AI) obviously for it to work. ObjectTemplate.initiallyWalkable 0 means that bots can walk through it. ObjectTemplate.initiallyWalkable 1 is only applied to bridges as they are not preventing players from crossing it. Would be nice to find a way to hack/trick the AI system to destroy an object without attaching an underground enemy spawn point to the object. There was one attempt which had mixed results somewhere in this forum. Is interesting how bots engage in destroying bridges as they rarely do it until certain conditions are met. They also have the bridge ai attached to it. Operation Clean Sweep is one example of a map that does have it. Simply can load all .tweaks of staticobjects and look for AiTemplates. It's interesting stuff. Codes tested with fence_corrugated_3x12m_broken AI which has no effect: ITVegetation ITStructure ITObstructedView ITObstacle |
|
|
Last edited by Arab; 2023-03-12 at 03:20..
|
Tags |
bots, coop, fix, foliage, immersion |
|
|