Blacklisting unit question

  1. 8 years ago
    Edited 8 years ago by HeroesandvillainsOS

    I'm trying to blacklist a specific civilian type from spawning. On the wiki, I see general instructions but can I get some clarification on where to put this? Let's say the civ I don't want to spawn is called "mod_man_01"

    ALiVE_PLACEMEMT_CUSTOM_UNITBLACKLIST = ["mod_man_01"];

    Is that the exact correct way to write it or is that just an example? And where does it go? In the init of the civ placement module or in ALiVE Required? Do any additional changes need to be made to my init.sqf or staticdata.sqf or anything else?

  2. You place that in staticdata.sqf structured like showcased on the wiki

  3. Edited 8 years ago by HeroesandvillainsOS

    init.sqf = call compile preprocessFile "staticData.sqf";

    staticData.sqf = waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"}; ALiVE_PLACEMEMT_CUSTOM_UNITBLACKLIST = ["mod_man_01"];

    Like this? Not sure if I'm missing anything. Some of the examples on the wiki have additional code in the staticData file listed above/below the blacklist line with: = [] call ALIVE_fnc_hashCreate;

  4. yes

  5. Would you mind taking a quick peak at my files? I can't seem to get it to work. The line in question is at the very bottom of the second link in the staticData file. The first link is my init.sqf

    http://pastebin.com/3WBHwdSu
    http://pastebin.com/CRmf06gQ

    I know classnames of the two civs I want to blacklist are correct. Did I format it ok?

  6. Remove all lines that contain

    [] call ALIVE_fnc_hashCreate;
  7. Calling this script in the init of ALiVE_Require module:

    http://pastebin.com/6HRP3c4M

  8. Deleted 8 years ago by HeroesandvillainsOS
  9. Yes, but that whole paste is our staticData.sqf, execVM'd from the module init, like in the usage section.

    ps. That comma in the array might cause headaches :)

  10. Ugh. I'm having a hard time formatting the example here. I'll see if I can suss it out on my own. Thanks Whigital.

  11. Edited 8 years ago by Whigital

    staticData.sqf:

    waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};
     
    ALiVE_PLACEMENT_CUSTOM_UNITBLACKLIST =
    [
         "C_mas_med_Civil_doc_F",
         "C_mas_med_Civil_fun_F"
    ];

    then add _null = [] execVM "staticData.sqf"; to the ALiVE main module (ALiVE Reqired).

  12. Perfect! Thanks so much for the help. I appreciate it a lot.

  13. Edited 8 years ago by HeroesandvillainsOS

    Unfortunately, this isn't working for me either. Thanks for trying to help with it though. It's not a big deal, I can probably just wait for ORBAT and make my own civ faction unless you have any other ideas.

    EDIT: It just occurred to me this was probably a typo above and meant for the init.sqf file?

    init.sqf: waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};

    I'll try it.

    EDIT 2: Yep! That seems to work! :) I didn't check every single civ on the map but I just looked over around 40 or so, and those two haven't popped up yet. Nice!

 

or Sign Up to reply!