Jump to content
fabrizio_t

[OPEN BETA] [SP] bCombat infantry AI Mod

How would you rate AI firing accuracy within bCombat v0.15?  

92 members have voted

  1. 1. How would you rate AI firing accuracy within bCombat v0.15?

    • Way too low
      3
    • A bit low
      7
    • Almost fine
      45
    • A bit high
      21
    • Way too high
      14


Recommended Posts

thx for your reply. i checked what you said.

1) @bcombat located in documents/arma3. this is where PWS installed all mods.

2) @bcombat contains config.sqf

3) no -nofilepatching in startupparameters

but no balloons. :confused: this game is making me crazy.

Ok, 1) is wrong and the reason for config.sqf override not working.

PWS alters the planned install path.

You may try these simple steps:

1) create a @bcombat folder within your ArmA3 installation directory

2) put in there just your config.sqf file and edit it at will.

3) run the game.

I'm positive these 3 simple steps will solve your issue, since i think it's just a simple path problem.

Share this post


Link to post
Share on other sites

thx. i think the mod is working. checked it without any mods and the movment etc. is much better. great work. the debug problem is still the same. thx for your help i will play a little bit with path and config this evening. cya....

Share this post


Link to post
Share on other sites
thx. i think the mod is working. checked it without any mods and the movment etc. is much better. great work. the debug problem is still the same. thx for your help i will play a little bit with path and config this evening. cya....

Yes, it should be working, the only problem is probably with defaults override.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

@Fabrizio

I think the last update broke the damage multiplieir :(

Testing with high values even 3.0 and its taking 4+ chest shots to down enemys.

EDIT:

Sorry,tested a little more,it seems that its only happening when NATO units take damage.

After disabling Killochs multi national pack.The problem seems to go away.He did alter some armour values.I will ask the man himself see if these mods can work together.

Edited by redarmy

Share this post


Link to post
Share on other sites

Hey fabrizio_T,

I'm using bcombat since quite a while now and it turned out to be my favorite AI mod.

Thank you very much for your work, chapeau!

Now that the flowers are thrown here comes a bug :P

When I remote control an AI via ZEUS module, the AI does throw grenades by itself.

However this was not the case for version 0.16.

Share this post


Link to post
Share on other sites

Hey Fab, :)

do you maybe know if your mod is conflicting with VcomAi mod? Still seraching after a mod which makes the AI check and Garrison Buildings, VComAI has this ability, i cant play without bCombat so only VComAI is not an option ^^

Share this post


Link to post
Share on other sites
Hey Fab, :)

do you maybe know if your mod is conflicting with VcomAi mod? Still seraching after a mod which makes the AI check and Garrison Buildings, VComAI has this ability, i cant play without bCombat so only VComAI is not an option ^^

LSD_Timewarp82 - Have you tried ww_AIMenu http://forums.bistudio.com/showthread.php?162942-WW-AIMenu-%28complimentary-commands%29 This is a simple menu of AI commands that has a "Clear Building" and I think a "Garrison Building" command as well. Simple to use. I've used it with bCombat and haven't noticed any issues.

Share this post


Link to post
Share on other sites
Hey Fab, :)

do you maybe know if your mod is conflicting with VcomAi mod? Still seraching after a mod which makes the AI check and Garrison Buildings, VComAI has this ability, i cant play without bCombat so only VComAI is not an option ^^

Also checkout getTactical

Share this post


Link to post
Share on other sites
Running ArmA 3 campaign: bCombat is designed to cope with campaign, just set the following parameters within config.sqf:

bcombat_damage_multiplier = 1.0;

bcombat_allow_investigate = false;

bcombat_allow_fleeing = false;

bcombat_allow_surrender = false;

So, uh.... where is exactly the config.sqf file?

Share this post


Link to post
Share on other sites
First place where I looked, of course

http://i.imgur.com/nyRvBB9.png

Did you download it from Steam Workshop? If so, I think there was mention that you need the config.sqf separately from here (right click the button that says "RAW" > Save as... and put it in your @bcombat folder).

Edited to add: From what I understand, the config.sqf is not essential - it is only used to override the default settings - hence why it doesn't come with the Steam package.

Share this post


Link to post
Share on other sites

I guess it's time I update the GUI?

Yay!

Share this post


Link to post
Share on other sites

fABRIZIO,

I JUST REALISED BCOMBAT DISABLES THE ABILITY TO MAKE ai UNITS HOLD A CERTAIN STANCE; ie THIS SETUNITPOS "UP"

Is there any way or anything i can disable in the config to allow this init line to work?Or is something tied into the FSM thats unchangable?

Share this post


Link to post
Share on other sites

Hi,

just got back from Hong Kong.

Massive jet-lag ...

Now i'm going to start replying to questions, thanks for patience.

---------- Post added at 14:31 ---------- Previous post was at 14:25 ----------

fABRIZIO,

I JUST REALISED BCOMBAT DISABLES THE ABILITY TO MAKE ai UNITS HOLD A CERTAIN STANCE; ie THIS SETUNITPOS "UP"

Is there any way or anything i can disable in the config to allow this init line to work?Or is something tied into the FSM thats unchangable?

bCombat uses setUnitPos in order to have units temporarily crouch or go prone in order to escape incoming fire.

A lower priority command, setUnitPosWeak could be used, but i found it to be quite unreliable.

It would be possible to exclude some units altogether from bCombat routines, but that would create some balancing issues.

---------- Post added at 14:32 ---------- Previous post was at 14:31 ----------

I guess it's time I update the GUI?

Yay!

Almost ... hope to release v0.17 FINAL in the next few days.

---------- Post added at 14:45 ---------- Previous post was at 14:32 ----------

Did you download it from Steam Workshop? If so, I think there was mention that you need the config.sqf separately from here (right click the button that says "RAW" > Save as... and put it in your @bcombat folder).

Edited to add: From what I understand, the config.sqf is not essential - it is only used to override the default settings - hence why it doesn't come with the Steam package.

True. Default config.sqf is already packed into the PBO, so you need it only IF you are going to customize bCombat features.

In general Steam workshop version is a good fire-and-forget solution, thanks to the auto-update feature. It comes with limitations though.

Steam package does not include config.sqf, because workshop allows distribution of just a single PBO package.

That's quite a limitation, as for instance no traditional readme, icons nor changelog can be bundled with it.

If you are willing to customize your Steam Workshop bCombat addon, you can grab config.sqf from here: https://raw.githubusercontent.com/fabrizioT/bCombat/master/config.sqf

Then you have to put it into your existing @bcombat folder.

WARNING: Keep in mind that on any mod update steam will wipe your @bcombat folder and recreate it, so your custom config.sqf will be deleted.

You may overcome this by setting auto-update feature off for bCombat within ArmA3 launcher.

---------- Post added at 14:51 ---------- Previous post was at 14:45 ----------

Hey Fab, :)

do you maybe know if your mod is conflicting with VcomAi mod? Still seraching after a mod which makes the AI check and Garrison Buildings, VComAI has this ability, i cant play without bCombat so only VComAI is not an option ^^

Well i guess that some bCombat features may collide, yet i have really no insight on VcomAI.

bCombat is designed to cope with missions, campaign and higher level AI mods (e.g. those handling waypoints, strategic layer, etc.), while it would obviously collide with other mods micromanaging single AI units.

---------- Post added at 14:57 ---------- Previous post was at 14:51 ----------

Hey fabrizio_T,

When I remote control an AI via ZEUS module, the AI does throw grenades by itself.

However this was not the case for version 0.16.

Ty. I'm aware of this ZEUS issue, as it was reported by another user before.

Basically bCombat self-disables itself for any units being "player", but within Zeus you are somewhat "possessing" them and not being registered as "player".

Hence AI routines stay active for possessed units and collide with your commands.

I've posted about this issue within the editing subforum (see: http://forums.bistudio.com/showthread.php?184170-Quick-question-how-to-check-if-some-unit-is-remotely-controlled-by-player-(ZEUS)), so far i know no workaround, yet it think this problem can be solved.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Hello fabrizio, I have been following your work for a while, and waiting to see if Dar would announce he's successfully converted bcombat to A2/OA. This was posted way back on post 84. He may have given up.

I have a fully functioning ver 0.17RC in A2/OA. Of course I had to change a lot of commands, and add new functions(one is to check for silenced weapon). I also noticed in A2/OA you add an eventhandler "handledamage" to the player, but it is then not defined, which makes the player invincible... This may work different in A3, as I do not have A3(that's another story).

Anyway, I will not sidetrack your A3 thread, so if you're interested in having a copy, and possibly releasing for your A2/OA fans, send me a pm and I can send you the files and discuss some of the features you were intending/I have altered.

I WILL NOT release/post anything.

I understand if you're busy working on v 0.17 Final.

Great work, and thank you for your contribution to the community.

panther42

Share this post


Link to post
Share on other sites
Hello fabrizio, I have been following your work for a while, and waiting to see if Dar would announce he's successfully converted bcombat to A2/OA. This was posted way back on post 84. He may have given up.

I have a fully functioning ver 0.17RC in A2/OA. Of course I had to change a lot of commands, and add new functions(one is to check for silenced weapon). I also noticed in A2/OA you add an eventhandler "handledamage" to the player, but it is then not defined, which makes the player invincible... This may work different in A3, as I do not have A3(that's another story).

Anyway, I will not sidetrack your A3 thread, so if you're interested in having a copy, and possibly releasing for your A2/OA fans, send me a pm and I can send you the files and discuss some of the features you were intending/I have altered.

I WILL NOT release/post anything.

I understand if you're busy working on v 0.17 Final.

Great work, and thank you for your contribution to the community.

panther42

Hi panther42,

nice to see that some oldtimer took some time to fiddle with bCombat files.

Two quick remarks:

* there's a (very simple) function checking for silenced weapon already within bCombat (bcombat_fnc_weapon_is_silenced). It has to be tweaked for ArmA2 though.

* Not sure about the "Handledamage" issue, this EH is bound to bcombat_fnc_eh_handledamage function for any units. Also within ArmA3 player is definitely killable :)

I think a bCombat ArmA2 version may be of interest for the community.

For sure i woudn't be able to actively mantain it, too much effort.

So if you're eventually willing to release an ArmA2 replica version of the mod, in the interest of community, then you're welcome.

The only single thing i would ask is releasing an ArmA2 version being an (almost) 1:1 replica of ArmA3 version, features wise.

Of course overall mod features may be discussed: you mentioned something you altered, now i'm curious on what you changed and why since this may be of interest for everybody.

You may post back about this here, no need for PM.

Thank you for your time.

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Can someone please explain how I can get the config.sqf working?

Mods only work for me if I put the pbo's directly into the addons folder. Nothing else works.

I've tried creating a new folder in the arma3 directory called @bcombat with the config but this does not work either.

Share this post


Link to post
Share on other sites
Hi panther42,

nice to see that some oldtimer took some time to fiddle with bCombat files.

Two quick remarks:

* there's a (very simple) function checking for silenced weapon already within bCombat (bcombat_fnc_weapon_is_silenced). It has to be tweaked for ArmA2 though.

* Not sure about the "Handledamage" issue, this EH is bound to bcombat_fnc_eh_handledamage function for any units. Also within ArmA3 player is definitely killable :)

I think a bCombat ArmA2 version may be of interest for the community.

For sure i woudn't be able to actively mantain it, too much effort.

So if you're eventually willing to release an ArmA2 replica version of the mod, in the interest of community, then you're welcome.

The only single thing i would ask is releasing an ArmA2 version being an (almost) 1:1 replica of ArmA3 version, features wise.

Of course overall mod features may be discussed: you mentioned something you altered, now i'm curious on what you changed and why since this may be of interest for everybody.

You may post back about this here, no need for PM.

Thank you for your time.

Thank you for the reply fabrizio. Nice to see us "old timers" still around.

As for the handledamage event handler for the player, here is the problem in A2/OA. Again, I do not have A3, so it may work differently:

Called from bcombat.sqf:

while { true } do 
{
	if( bcombat_enable ) then
	{
		{
			_unit = _x;

			if(  [_unit] call bcombat_fnc_is_active ) then 
			{
				if( isNil { _unit getvariable ["bcombat_init_done", nil ] } ) then 
				{
					[color="#0000FF"]_unit call bcombat_fnc_unit_initialize[/color];
				};
                                       ....

Then in common.sqf, bcombat_fnc_unit_initialize:

if( isNil { _this getvariable ["bcombat_eh_handledamage", nil ] } ) then {
	[color="#0000FF"]_e = _this addEventHandler ["HandleDamage", bcombat_fnc_eh_handledamage][/color]; 
	_this setvariable ["bcombat_eh_handledamage", _e ];
};

Which leads to bcombat_fnc_eh_handledamage:

bcombat_fnc_eh_handledamage = {

private ["_unit", "_body_part", "_body_part_damage", "_enemy", "_ammo", "_msg"];

_unit = _this select 0; // Unit the EH is assigned to
_body_part = _this select 1; // Selection (=body part) that was hit
_body_part_damage = _this select 2; // Damage to the above selection (sum of dealt and prior damage)
_enemy = _this select 3; //Source of damage (returns the unit if no source)
_ammo = _this select 4; // Ammo classname of the projectile that dealt the damage (returns "" if no projectile)

if( [_unit] call bcombat_fnc_is_active && { [color="#FF0000"]!(isPlayer _unit )[/color] } ) then //&& { _body_part != "" }
{
	if( !(isNull _enemy) ) then {
		_body_part_damage = _body_part_damage * bcombat_damage_multiplier;
	};

	if( bcombat_debug_enable ) then {
		_msg = format["bcombat_fnc_eh_handledamage() - unit=%1", _unit ];
		[ _msg, 10 ] call bcombat_fnc_debug;
	};

	if( bcombat_allow_friendly_capped_damage 
		&& { !(isPlayer _enemy ) }
		&& { [_enemy, _unit] call bcombat_fnc_is_friendly } 
	) then { 
		_body_part_damage = _body_part_damage min bcombat_friendly_fire_max_damage;
	};

	_body_part_damage
};
};

So you end up with the player having a HandleDamage eventhandler which contains nothing {}.

From the Biki:

Adding this eventhandler with no return value or with return value 0, replaces damage handling by the engine, making the object invulnerable if damage is not scripted in the eventhandler. If you want default processing to be done, be sure to return _this select 2.

_this select 2, or in your code body_part_damage, is not returned for the player(outside the if/then).

I can post more, but like I said, I do not want to derail your A3 thread(only if you insist... :D )

Share this post


Link to post
Share on other sites
Thank you for the reply fabrizio. Nice to see us "old timers" still around.

As for the handledamage event handler for the player, here is the problem in A2/OA. Again, I do not have A3, so it may work differently:

Called from bcombat.sqf:

while { true } do 
{
	if( bcombat_enable ) then
	{
		{
			_unit = _x;

			if(  [_unit] call bcombat_fnc_is_active ) then 
			{
				if( isNil { _unit getvariable ["bcombat_init_done", nil ] } ) then 
				{
					[color="#0000FF"]_unit call bcombat_fnc_unit_initialize[/color];
				};
                                       ....

Then in common.sqf, bcombat_fnc_unit_initialize:

if( isNil { _this getvariable ["bcombat_eh_handledamage", nil ] } ) then {
	[color="#0000FF"]_e = _this addEventHandler ["HandleDamage", bcombat_fnc_eh_handledamage][/color]; 
	_this setvariable ["bcombat_eh_handledamage", _e ];
};

Which leads to bcombat_fnc_eh_handledamage:

bcombat_fnc_eh_handledamage = {

private ["_unit", "_body_part", "_body_part_damage", "_enemy", "_ammo", "_msg"];

_unit = _this select 0; // Unit the EH is assigned to
_body_part = _this select 1; // Selection (=body part) that was hit
_body_part_damage = _this select 2; // Damage to the above selection (sum of dealt and prior damage)
_enemy = _this select 3; //Source of damage (returns the unit if no source)
_ammo = _this select 4; // Ammo classname of the projectile that dealt the damage (returns "" if no projectile)

if( [_unit] call bcombat_fnc_is_active && { [color="#FF0000"]!(isPlayer _unit )[/color] } ) then //&& { _body_part != "" }
{
	if( !(isNull _enemy) ) then {
		_body_part_damage = _body_part_damage * bcombat_damage_multiplier;
	};

	if( bcombat_debug_enable ) then {
		_msg = format["bcombat_fnc_eh_handledamage() - unit=%1", _unit ];
		[ _msg, 10 ] call bcombat_fnc_debug;
	};

	if( bcombat_allow_friendly_capped_damage 
		&& { !(isPlayer _enemy ) }
		&& { [_enemy, _unit] call bcombat_fnc_is_friendly } 
	) then { 
		_body_part_damage = _body_part_damage min bcombat_friendly_fire_max_damage;
	};

	_body_part_damage
};
};

So you end up with the player having a HandleDamage eventhandler which contains nothing {}.

From the Biki:

Adding this eventhandler with no return value or with return value 0, replaces damage handling by the engine, making the object invulnerable if damage is not scripted in the eventhandler. If you want default processing to be done, be sure to return _this select 2.

_this select 2, or in your code body_part_damage, is not returned for the player(outside the if/then).

I can post more, but like I said, I do not want to derail your A3 thread(only if you insist... :D )

Hi panther42,

i think that part of Biki documentation is slightly outdated, regarding ArmA3.

HandleDamage should now work like explained here: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage

If no value is returned, the default damage processing will be done. This allows for safe stacking of this event handler.

So behaviour for HandleDamage is indeed different in ArmA3.

I'd say that returning _body_part_damage for the player, from within the bcombat_fnc_eh_handledamage function, would suffice to solve the issue in ArmA2.

Share this post


Link to post
Share on other sites

I seem to be having a problem with units spawning without NVGs, this happens with units spawned in editor and with Zeus.

Without NVGs the AI have are severely effected at night and do not spot or shoot at ranges greater than 50 meters.

I have tested this with all Vanilla units CSAT,AAF and NATO all spawn with NVGs in the vanilla game but do not with this mod enabled

Is this intentional or is this a bug with the current build?

Share this post


Link to post
Share on other sites
I seem to be having a problem with units spawning without NVGs, this happens with units spawned in editor and with Zeus.

Without NVGs the AI have are severely effected at night and do not spot or shoot at ranges greater than 50 meters.

I have tested this with all Vanilla units CSAT,AAF and NATO all spawn with NVGs in the vanilla game but do not with this mod enabled

Is this intentional or is this a bug with the current build?

Its a feature,and a good one at that.Give everyone flashlights ;)

Just messin with ya!

Go into bcombat config sqf,scroll to the bottom or near bottom of page,you will see option for remove all NVGs,its by default set to true,change it to false mate;)

Share this post


Link to post
Share on other sites
Its a feature,and a good one at that.Give everyone flashlights ;)

Just messin with ya!

Go into bcombat config sqf,scroll to the bottom or near bottom of page,you will see option for remove all NVGs,its by default set to true,change it to false mate;)

Well that was really easy, thank you so much I really appreciate it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×