SWEENNDAWG

Adding Vehicle classes to Mod's like Igiload and R3F

2 posts in this topic

Right, 

i'm pretty sure i've read somewhere (or watched) someone add all vehicle variant of a particular class with one class name. for example i have Igiload installed and atm it only covers all exile vehicles.

below is my list of offroads

Spoiler

"Exile_Car_Offroad_Repair_Civillian",
        "Exile_Car_Offroad_Repair_Red",
        "Exile_Car_Offroad_Repair_Beige",
        "Exile_Car_Offroad_Repair_White",
        "Exile_Car_Offroad_Repair_Blue",
        "Exile_Car_Offroad_Repair_DarkRed",
        "Exile_Car_Offroad_Repair_BlueCustom",
        "Exile_Car_Offroad_Repair_Guerilla01",
        "Exile_Car_Offroad_Repair_Guerilla02",
        "Exile_Car_Offroad_Repair_Guerilla03",
        "Exile_Car_Offroad_Repair_Guerilla04",
        "Exile_Car_Offroad_Repair_Guerilla05",
        "Exile_Car_Offroad_Repair_Guerilla06",
        "Exile_Car_Offroad_Repair_Guerilla07",
        "Exile_Car_Offroad_Repair_Guerilla08",
        "Exile_Car_Offroad_Repair_Guerilla09",
        "Exile_Car_Offroad_Repair_Guerilla10",
        "Exile_Car_Offroad_Repair_Guerilla11",
        "Exile_Car_Offroad_Repair_Guerilla12",
        "Exile_Car_Offroad_Red",
        "Exile_Car_Offroad_Beige",
        "Exile_Car_Offroad_White",
        "Exile_Car_Offroad_Blue",
        "Exile_Car_Offroad_DarkRed",
        "Exile_Car_Offroad_BlueCustom",
        "Exile_Car_Offroad_Guerilla01",
        "Exile_Car_Offroad_Guerilla02",
        "Exile_Car_Offroad_Guerilla03",
        "Exile_Car_Offroad_Guerilla04",
        "Exile_Car_Offroad_Guerilla05",
        "Exile_Car_Offroad_Guerilla06",
        "Exile_Car_Offroad_Guerilla07",
        "Exile_Car_Offroad_Guerilla08",
        "Exile_Car_Offroad_Guerilla09",
        "Exile_Car_Offroad_Guerilla10",
        "Exile_Car_Offroad_Guerilla11",
        "Exile_Car_Offroad_Guerilla12",
        "Exile_Car_Offroad_Rusty1",
        "Exile_Car_Offroad_Rusty2",
        "Exile_Car_Offroad_Rusty3"

as you can see there is so many different types of offloads but that not covering the A3 Vanilla ones.

My question is, can you write in offroad  or any other vehicle for that matter in a way that covers all variants? 


Thanks in Advance

SWEENNDAWG

Edited by SWEENNDAWG

Share this post


Link to post
Share on other sites
On ‎20‎/‎04‎/‎2017 at 0:46 PM, SWEENNDAWG said:

Right, 

i'm pretty sure i've read somewhere (or watched) someone add all vehicle variant of a particular class with one class name. for example i have Igiload installed and atm it only covers all exile vehicles.

below is my list of offroads

  Reveal hidden contents

"Exile_Car_Offroad_Repair_Civillian",
        "Exile_Car_Offroad_Repair_Red",
        "Exile_Car_Offroad_Repair_Beige",
        "Exile_Car_Offroad_Repair_White",
        "Exile_Car_Offroad_Repair_Blue",
        "Exile_Car_Offroad_Repair_DarkRed",
        "Exile_Car_Offroad_Repair_BlueCustom",
        "Exile_Car_Offroad_Repair_Guerilla01",
        "Exile_Car_Offroad_Repair_Guerilla02",
        "Exile_Car_Offroad_Repair_Guerilla03",
        "Exile_Car_Offroad_Repair_Guerilla04",
        "Exile_Car_Offroad_Repair_Guerilla05",
        "Exile_Car_Offroad_Repair_Guerilla06",
        "Exile_Car_Offroad_Repair_Guerilla07",
        "Exile_Car_Offroad_Repair_Guerilla08",
        "Exile_Car_Offroad_Repair_Guerilla09",
        "Exile_Car_Offroad_Repair_Guerilla10",
        "Exile_Car_Offroad_Repair_Guerilla11",
        "Exile_Car_Offroad_Repair_Guerilla12",
        "Exile_Car_Offroad_Red",
        "Exile_Car_Offroad_Beige",
        "Exile_Car_Offroad_White",
        "Exile_Car_Offroad_Blue",
        "Exile_Car_Offroad_DarkRed",
        "Exile_Car_Offroad_BlueCustom",
        "Exile_Car_Offroad_Guerilla01",
        "Exile_Car_Offroad_Guerilla02",
        "Exile_Car_Offroad_Guerilla03",
        "Exile_Car_Offroad_Guerilla04",
        "Exile_Car_Offroad_Guerilla05",
        "Exile_Car_Offroad_Guerilla06",
        "Exile_Car_Offroad_Guerilla07",
        "Exile_Car_Offroad_Guerilla08",
        "Exile_Car_Offroad_Guerilla09",
        "Exile_Car_Offroad_Guerilla10",
        "Exile_Car_Offroad_Guerilla11",
        "Exile_Car_Offroad_Guerilla12",
        "Exile_Car_Offroad_Rusty1",
        "Exile_Car_Offroad_Rusty2",
        "Exile_Car_Offroad_Rusty3"

as you can see there is so many different types of offloads but that not covering the A3 Vanilla ones.

My question is, can you write in offroad  or any other vehicle for that matter in a way that covers all variants? 


Thanks in Advance

SWEENNDAWG

would be nice to wildcard prefixes etc

looking at similar code which may be a lead:

Quote

 {
  _item = _x select 0;
  _amount = _x select 1;
  _randomAmount = _x select 2;
  _amount = _amount + (random _randomAmount);
  _itemType = _x call BIS_fnc_itemType;

  if((_itemType select 0) == "Weapon") then {_vehicle addWeaponCargoGlobal [_item, _amount];};
  if((_itemType select 0) == "Magazine") then {_vehicle addMagazineCargoGlobal [_item, _amount];};
  if((_itemType select 0) == "Item") then {_vehicle addItemCargoGlobal [_item, _amount];};
  if((_itemType select 0) == "Equipment") then {_vehicle addItemCargoGlobal [_item, _amount];};
  if((_itemType select 0) == "Backpack") then {_vehicle addBackpackCargoGlobal [_item, _amount];};
 }forEach _ned_VehicleItems;

 

this sorts through a list for items and loads into crate but it does the comparison and separation

you could also try to use:

Quote

_cfgSearch = "CfgVehicles";  
_cfgClass = "true" configClasses (configFile >> _cfgSearch);
{
 _cfgName = configName(_x);
 diag_log _cfgName;
}forEach _cfgClass;

maybe this could be close if you added in R3F

Quote

_cfgSearch = "CfgVehicles";  
_cfgClass = "true" configClasses (configFile >> _cfgSearch);
{
 _cfgName = configName(_x);
 R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow + _cfgName
}forEach _cfgClass;

add above this line

R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +

I have no clue if it will work as I  have no way of testing but these could give you some clue

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

  • Recently Browsing   0 members

    No registered users viewing this page.