Why does my custom blacklist not work?

  1. 8 years ago

    I'm currently putting together a new Takistan mission and really wanted to get rid of the terrible vanilla civilian vehicles which just don't fit in the dirty Takistan world. I'm using CUP which has the skodas, toyotas etc listed under the standard CIV_F faction.

    So I made this blacklist
    ALiVE_PLACEMENT_CUSTOM_VEHICLEBLACKLIST = ["C_Offroad_01_F","C_Offroad_01_repair_F","C_Van_01_fuel_F","CUP_C_Golf4_black_Civ","CUP_C_Golf4_blue_Civ","CUP_C_Golf4_camo_Civ","CUP_C_Golf4_camodark_Civ","CUP_C_Golf4_camodigital_Civ","CUP_C_Golf4_green_Civ","CUP_C_Golf4_kitty_Civ","CUP_C_Golf4_crowe_Civ","CUP_C_Golf4_random_Civ","CUP_C_Golf4_red_Civ","CUP_C_Golf4_reptile_Civ","CUP_C_Golf4_white_Civ","CUP_C_Golf4_whiteblood_Civ","CUP_C_Golf4_yellow_Civ","C_Hatchback_01_F","C_Hatchback_01_sport_F","C_Offroad_02_unarmed_F","C_Offroad_02_unarmed_F_blue","C_Offroad_02_unarmed_F_green","C_Offroad_02_unarmed_F_orange","C_Kart_01_F","C_Kart_01_Blu_F","C_Kart_01_Fuel_F","C_Kart_01_Red_F","C_Kart_01_Vrana_F","C_Offroad_01_F","C_Offroad_01_repair_F","C_Quadbike_01_F","CUP_C_Octavia_CIV","C_SUV_01_F","C_Van_01_transport_F","C_Van_01_box_F","C_Truck_02_fuel_F","C_Truck_02_box_F","C_Truck_02_transport_F","C_Truck_02_covered_F"];

    hoping that it would get rid of all the vanilla shiny offroads, trucks, 4WD's and CUP's golfs. Now I placed this in the CIV module init (although I understand any ALiVE module init would work)
    The skoda's etc spawn great, but there's still a lot of vanilla stuff as well.

    Can anyone see the error, of if you already have a blacklist which does what I need that would be great too. Thanks

  2. What happens if you try to run it as a staticData.sqf file instead?

  3. The static data is loaded in when the ALiVE_Required module is initialized. So to actually get the custom blacklists in to the blacklist array, it has to be specified before the concatenation into the big blacklist arrays.

    Do it all in the init of the ALiVE_Required to make sure the ALiVE_PLACEMENT_CUSTOM_UNITBLACKLIST, ALiVE_PLACEMENT_CUSTOM_VEHICLEBLACKLIST and ALiVE_PLACEMENT_CUSTOM_GROUPBLACKLIST is filled before they get used.

    https://github.com/ALiVEOS/ALiVE.OS/blob/master/addons/main/static/Placement.hpp

    See this for reference -> http://alivemod.com/forum/2374-blacklisting-unit-question

 

or Sign Up to reply!