genesis92x / VcomAI-3.0

Vcom AI 3.0
76 stars 41 forks source link

Steal Vehicles is overly aggressive with targets #15

Closed Freddo3000 closed 6 years ago

Freddo3000 commented 6 years ago

While it may be fun to see a taliban soldier climb into a m1a2 abrams and use it like he was trained for years, it is kind of stupid after seeing it for the fifth time.

I'd suggest changing the check from "isKindOf 'LandVehicle'" to "isKindOf 'car'", to limit it to trucks and cars therefore excluding tanks and apcs.

I'd also suggest adding a check if the group is in combat, because otherwise leaving it like this may lead to the AI deciding to mount up while in combat.

aussie-battler commented 6 years ago

The ai won't steal a vehicle when in combat or in alert mode.

I love the idea of ai stealing all types of air, sea and land vehicles. I changed the code to include all vehicles. Running a persistent server it clears vehicles off the map for us.

You can change the code here:

Vcom\FSMS\SQADBEH.fsm line 463

Freddo3000 commented 6 years ago

While it is fine that you think that it is a nice thing for the AI to steal any and all vehicles, I don't think it translates to many significant portions of the ArmA community.

Also, the AI will steal vehicles if they are in combat/alert considering this is the script:

if (VCM_StealVeh) then
{
{
    if (_x iskindof "LandVehicle" && {crew _x isEqualTo []} && {_x distance _Leader < VCM_AIDISTANCEVEHPATH} && {!(locked _x isEqualTo 2)}) then
    {
        _Group addvehicle _x;
    };
} foreach vehicles;
};

getting called at every leader cycle.

genesis92x commented 6 years ago

I would recommend turning this feature off if you do not like it. - But adding in another parameter for changing if it's CARS/TANKS is not a bad idea.

serialtasted commented 6 years ago

Related to Freddo3000 sugestion I would like to see a way to set a variable to a specific vehicle, like _x getVariable ["VCM_IgnoreVehicle", false]. That way the AI would ignore certain vehicles.

if (VCM_StealVeh) then
{
{
    if (_x iskindof "LandVehicle" && {crew _x isEqualTo []} && {_x distance _Leader < VCM_AIDISTANCEVEHPATH} && {!(locked _x isEqualTo 2)} && !(_x getVariable ["VCM_IgnoreVehicle", false])) then
    {
        _Group addvehicle _x;
    };
} foreach vehicles;
};
aussie-battler commented 6 years ago

@serialtasted There are so many vehicles in Arma, it would be easier if you just put it into the code yourself.

_IgnoreVehicle = ["CUP_B_M2A3Bradley_USA_W","I_APC_Wheeled_03_cannon_F","CUP_B_HMMWV_Avenger_USA"];

if (_x iskindof "_IgnoreVehicle" && {crew _x isEqualTo []} && {_x distance _Leader < VCM_AIDISTANCEVEHPATH} && {!(locked _x isEqualTo 2)} && !(_x getVariable ["VCM_IgnoreVehicle", false])) exitWith {};

serialtasted commented 6 years ago

@aussie-battler That way I would be crippling the amount of vehicles they would be able to steal, when I just want to have some specific (not class name specific but object specific) vehicles not getting stolen.

Let's imagine this scenario, my mission I have a bunch of vehicles, and I repeat some classnames, when I place a new one for my squad I don't want that specific one to be stolen, but the other vehicles on the map they can steal them.

The way you'r telling me to do it is not the most dynamic one. But rather the most restrictive. I'm not asking to place all vehicles in the mod.. that's just not realistic. But a check if a specific vehicle was given that variable the mod would behave in a different way. It's completely different from what you said.

serialtasted commented 6 years ago

@aussie-battler Just not to say that you'r not even suggesting something that it would be possible out of the internal code of the mod.

aussie-battler commented 6 years ago

@serialtasted make vehicles lockable.

Problem SOLVED.

serialtasted commented 6 years ago

@aussie-battler Please stop... you are not understanding what I'm suggesting here. AT ALL!

Again to explain: That way AI would not be able to enter a vehicle when I'm the leader. AGAIN the variable makes things so more configurable and opens more possibilities. What you are suggesting is restrictive. Look at ACE, they use variables for this reason, to give mission makers possibilities and options when creating missions.

So yeah problem not solved.

serialtasted commented 6 years ago

@aussie-battler Also I'm not asking you for a solution, I'm asking for a code implementation that I think it would make a lot of people happy. Even including @Freddo3000 's "problem". Please stop with your suggestions, I'm sorry.. But that doesn't help.

aussie-battler commented 6 years ago

@serialtasted unlock your vehicle & order the ai into it. The Vcom code already tells ai not to steal a locked vehicle.

I don't know your server & you didn;t explain yourself well. All you said was "That way the AI would ignore certain vehicles." Sorry that I didnt have my crystal ball out to fully see what you were asking for.

Here is a quote from genesis:

I'd like to find a more reliable way for players to control what vehicles AI will steal - without making it a setvariable.

Freddo3000 commented 6 years ago

Tweaked with #28