Is it possible to change the auto-generated tasks that are sent? What I'm after is a way to (for example) allow auto-gen tasks but blacklist the troop insertion ones so that they are not sent to player units.
Is it possible to change the auto-generated tasks that are sent? What I'm after is a way to (for example) allow auto-gen tasks but blacklist the troop insertion ones so that they are not sent to player units.
Yes there is, you can do it by using this code. The first line waits until C2ISTAR has initialized (so we can overwrite the variables it has been given). The second defines which tasks will be used.
waituntil {!isnil "ALIVE_autoGeneratedTasks"}; ALIVE_autoGeneratedTasks = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"];
Here is a list of all of the task names ["MilAssault","MilDefence","CivAssault","Assassination","TransportInsertion","DestroyVehicles","DestroyInfantry","SabotageBuilding"];
Spyder how prestation using
waituntil {!isnil "ALIVE_autoGeneratedTasks"}; ALIVE_autoGeneratedTasks = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"];
is better of this ? _missions = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"];
_choose = _missions call BIS_fnc_selectRandom;
Which method is more optimized?
Thanks for that Spyder, works beautifully.
@Master-Antonio Spyder how prestation using
waituntil {!isnil "ALIVE_autoGeneratedTasks"}; ALIVE_autoGeneratedTasks = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"];is better of this ?
_missions = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"]; _choose = _missions call BIS_fnc_selectRandom;
Which method is more optimized?
The one I posted is the only way to do it as far as I know. You must define ALIVE_autoGeneratedTasks
with an array consisting off the mission types and ALiVE will randomly choose which one to task you with based on what type of units the enemy has.
As a tip for the future, you could shorten the code you posted to
_mission = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"] call BIS_fnc_selectRandom;
I use this in the mission and work. _missions = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"]; //mission array
_choose = _missions call BIS_fnc_selectRandom; // random mission
[_choose] execVM "Rtask\makeClearOps.sqf";
Ok thanks for suggestion.
Now i prove this. But i think that how prestation is equal .
_mission = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"] call BIS_fnc_selectRandom; [_mission] execVM "Rtask\makeClearOps.sqf";
All task are in makeClearOps.sqf ...
Just I wanted to know if using the API of ALIVE.
There were better performance.
Yeah, I didn't know you were using that to execute another script, makes sense now.
_mission = ["MilDefence","Assassination","DestroyVehicles","DestroyInfantry"] call BIS_fnc_selectRandom; [_mission] execVM "Rtask\makeClearOps.sqf";
That should work very well.
There is a performance improvement for you?
It would be very minimal but yes, removing an extra variable would result in extra performance/faster execution of the script.
Or use your code?
Use ALIVE_autoGeneratedTasks?
For you^?
The code I posted was to define what tasks would be given by the C2ISTAR module over the course of a mission. It probably won't help with what you are trying to achieve. ALIVE_autoGeneratedTasks
is a global variable that is passed into the C2ISTAR tasking system to know which tasks should be excluded during autotasking.
A ok, perfect for information.
I've discovered that this does not seem to work consistently, some of the time it will still assign missions that are not in the list. I've put it in the init.sqf copied from here but with the names changed to pick the tasks I wanted. The main one that fails is CivAssault, I always get it (90%) of the time even when it is disabled by not including it in the list. Any ideas?
Not sure, I haven't encountered that bug, but the last used it but that was a few months ago so something could have broken.
Which auto tasks are still "buggy"? Does "clear the town" still never complete? Does it still tell you to blow up campfires?
Editing the available auto tasks sounds like a great idea to get rid of the potential buggy ones. I'll have to try this.
@AUTigerGrad : Clear The Town is "CivAssault" and yes, the problem is that it never completes. It also still shows up in the auto-generated tasks even if you do not include it. If you either delete or set the mission to complete in C2ISTAR then you will still not be sent any more missions.
Basically Clear The Town breaks the auto-generated tasks as when you get one it can't be completed, deleted or fake-completed. To add insult to injury, you can't even set it not to send them to you, as it just ignores you and gives you that task 90% of the time anyway.
I'm hoping someone has a solution to this, but I doubt it. Only thing I can think of is perhaps it's not actually called "CivAssault" and that's why it cannot be disabled.
Theres been a lot of C2ISTAR bugs getting fixed. You can report it here if it hasn't been noted as fixed already.
@SpyderBlack723 : I might have to, the code you posted the other day is 100% not working, I just got one of the other disabled tasks as well, so it's not just CivAssault.
I'll try to test later as well.
After further testing, it seems that the task options work fine in singleplayer, but in multiplayer they will ignore the setting and send any random task, including ones not added to the list.
So essentially the selection function does not work in MP.