Sign in to follow this  
Solignac

DMS - Changing Vehicles

14 posts in this topic

I've been having trouble figuring out how to change what vehicles are rewarded when you complete the mission but also what vehicles are available for the enemy AI to use. I've been looking at the fn_SpawnAIVehicle file but I can't quite make out what I need to do to pick what vehicles are spawned. Anyone know?

Share this post


Link to post
Share on other sites
32 minutes ago, Solignac said:

I've been having trouble figuring out how to change what vehicles are rewarded when you complete the mission but also what vehicles are available for the enemy AI to use. I've been looking at the fn_SpawnAIVehicle file but I can't quite make out what I need to do to pick what vehicles are spawned. Anyone know?

look for:

Quote

if (_VehicleChance >= (random 100)) then {
           _pinCode = (1000 +(round (random 8999)));
           _vehicle = ["Exile_Car_Ural_Open_Military",[6231.08, 10452.6, 0.00249672],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
           _msgWIN = ['#0080ff',format ["Convicts have successfully killed the Invaders and have stolen all the crates, Ural entry code is %1...",_pinCode]];
           } else
           {
           _vehicle = ["Exile_Car_Ural_Open_Military",[6231.08, 10452.6, 0.00249672]] call DMS_fnc_SpawnNonPersistentVehicle;
           _msgWIN = ['#0080ff',"Convicts have successfully killed the Invaders and stolen all the crates"];
           };

some of my bandit missions in DMS define possible vehicles:

Spoiler

_PossibleVehicleClass   = [ 
        "Exile_Car_SUVXL_Black",
        "Exile_Car_Hatchback_Sport_Red",
        "Exile_Car_Hatchback_Sport_Blue",
        "Exile_Car_Hatchback_Sport_Orange",
        "Exile_Car_Hatchback_Sport_White",
        "Exile_Car_Hatchback_Sport_Beige",
        "Exile_Car_Hatchback_Sport_Green",
        "Exile_Car_Lada_Green",
        "Exile_Car_Lada_Red",
        "Exile_Car_Lada_White",
        "Exile_Car_Lada_Hipster",
        "Exile_Car_Volha_Blue",
        "Exile_Car_Volha_White",
        "Exile_Car_Volha_Black"
       ];

either way just look for: DMS_fnc_SpawnPersistentVehicle; and DMS_fnc_SpawnNonPersistentVehicle; and the vehicle used will be defined at start of brackets []

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

oh and for DMS AI vehicles, they are all in the main config inside DMS

Spoiler

 // Vehicles
 DMS_ArmedVehicles =     [       // List of armed vehicles that can spawn
           #ifdef USE_APEX_VEHICLES
           "B_T_LSV_01_armed_F",
           "O_T_LSV_02_armed_F",
           #endif
           "Exile_Car_Offroad_Armed_Guerilla01"
          ];

 DMS_MilitaryVehicles =    [       // List of (unarmed) military vehicles that can spawn
           #ifdef USE_APEX_VEHICLES
           "B_T_LSV_01_unarmed_F",
           "O_T_LSV_02_unarmed_F",
           #endif
           "Exile_Car_Strider",
           "Exile_Car_Hunter",
           "Exile_Car_Ifrit"
          ];

 DMS_TransportTrucks =    [       // List of transport trucks that can spawn
           "Exile_Car_Van_Guerilla01",
           "Exile_Car_Zamak",
           "Exile_Car_Tempest",
           "Exile_Car_HEMMT",
           "Exile_Car_Ural_Open_Military",
           "Exile_Car_Ural_Covered_Military"
          ];

 DMS_RefuelTrucks =     [       // List of refuel trucks that can spawn
           "Exile_Car_Van_Fuel_Black",
           "Exile_Car_Van_Fuel_White",
           "Exile_Car_Van_Fuel_Red",
           "Exile_Car_Van_Fuel_Guerilla01",
           "Exile_Car_Van_Fuel_Guerilla02",
           "Exile_Car_Van_Fuel_Guerilla03"
          ];

 DMS_CivilianVehicles =    [       // List of civilian vehicles that can spawn
           #ifdef USE_APEX_VEHICLES
           "C_Offroad_02_unarmed_F",
           "I_C_Van_01_transport_F",
           #endif
           "Exile_Car_SUV_Red",
           "Exile_Car_Hatchback_Rusty1",
           "Exile_Car_Hatchback_Rusty2",
           "Exile_Car_Hatchback_Sport_Red",
           "Exile_Car_SUV_Red",
           "Exile_Car_Offroad_Rusty2",
           "Exile_Bike_QuadBike_Fia"
          ];

 DMS_TransportHelis =    [       // List of transport helis that can spawn
           #ifdef USE_APEX_VEHICLES
           "B_T_VTOL_01_infantry_F",
           "O_T_VTOL_02_infantry_F",
           #endif
           "Exile_Chopper_Hummingbird_Green",
           "Exile_Chopper_Orca_BlackCustom",
           "Exile_Chopper_Mohawk_FIA",
           "Exile_Chopper_Huron_Black",
           "Exile_Chopper_Hellcat_Green",
           "Exile_Chopper_Taru_Transport_Black"
          ];

 

  • Like 1

Share this post


Link to post
Share on other sites

I appreciate the response, that clears things up a bit.

So for choosing the vehicle that the player would recieve as a reward on a specific mission file, it'd be:

Spoiler

//create possible vehicle list
_PossibleVehicleClass         = [
                                "CUP_BAF_Jackal2_GMG_D",
                                "CUP_BAF_Jackal2_GMG_W"
                            ];
//choose the vehicle
_VehicleClass = selectRandom _PossibleVehicleClass;

But as far as what vehicle the AI would be using in a particular mission, where in this code (if this is the correct line) would I define what specific vehicle that would be? Like change the technical trucks with the 50 cal on the back I keep seeing to something like a BTR:

Spoiler

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side
] call DMS_fnc_SpawnAIVehicle;

 

Share this post


Link to post
Share on other sites
6 hours ago, Solignac said:

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side
] call DMS_fnc_SpawnAIVehicle;

change this to

Quote

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,

"vehiclename"
] call DMS_fnc_SpawnAIVehicle;

you can also expand the list of vehicles it randomly selects for AI in the config - for any DMS function (DMS_fnc_XXXX) look at the scripts folder in the DMS pbo for the fnc_XXXXXXX.sqf as they all have the syntax in a comment at the top:

fnc_SpawnAIVehicle.sqf has:

Quote

 Usage:
 [
  [
   _spawnPos,    // The position at which the AI vehicle will spawn
   _gotoPos    // (OPTIONAL) The position to which the AI vehicle will drive to. If it isn't defined, _spawnPos is used. <--- THIS IS NOT USED. I'm not sure why I included this.
  ],
  _group,      // Group to which the AI units belongs to
  _class,      // Class: "random","assault","MG","sniper" or "unarmed"
  _difficulty,    // Difficulty: "random","static","hardcore","difficult","moderate", or "easy"
  _side,      // "bandit","hero", etc.
  _vehClass     // (OPTIONAL) String: classname of the Vehicle. Use "random" to select a random one from DMS_ArmedVehicles
 ] call DMS_fnc_SpawnAIVehicle;

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I didn't know it was as simple as just putting the name of the vehicle at the end. I successfully added the vehicle but I did notice that the men that occupied it were completely unarmed and unclothed. I don't think it matters too much since they'll probably get blown up anyway but is there any reason why that is? Also is there any way to add an additional or multiple vehicles? Would you just add another line after the first one? So like:

Spoiler

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,

"vehiclename"

"vehiclename"
] call DMS_fnc_SpawnAIVehicle;

 

Edited by Solignac

Share this post


Link to post
Share on other sites
On 30.1.2018 at 2:50 PM, Solignac said:

Would you just add another line after the first one?

 

// add vehicle patrol
_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

// add vehicle patrol 2
_veh1 =
[
    [
        [(_pos select 0) +75,(_pos select 1)-75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

// add vehicle patrol 3
_veh2 =
[
    [
        [(_pos select 0) -25,(_pos select 1)+25,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

// add vehicle patrol 4
_veh3 =
[
    [
        [(_pos select 0) +25,(_pos select 1)-25,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

 

Edited by WURSTKETTE
  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, WURSTKETTE said:

 


// add vehicle patrol
_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

// add vehicle patrol 2
_veh1 =
[
    [
        [(_pos select 0) +75,(_pos select 1)-75,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

// add vehicle patrol 3
_veh2 =
[
    [
        [(_pos select 0) -25,(_pos select 1)+25,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

// add vehicle patrol 4
_veh3 =
[
    [
        [(_pos select 0) +25,(_pos select 1)-25,0]
    ],
    _group,
    "bambi",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

 

Oh I see, just add a whole new line. Appreciate the response, any idea why the troops might be unarmed?

Share this post


Link to post
Share on other sites
45 minutes ago, Solignac said:

any idea

If i would guess, i would say the

class bambi

ain't defined anywhere.

try that and see if they get anything:

_veh =
[
    [
        [(_pos select 0) -75,(_pos select 1)+75,0]
    ],
    _group,
    "random",
    _difficulty,
    _side,
    "vehicleclassname"
    
] call DMS_fnc_SpawnAIVehicle;

 

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.