Mission rewards?

  1. 9 years ago

    So, I am working on a mission that is AI vs T vs T. So, 1 AI faction vs one Player faction vs another Player faction.

    How can I make it so that there are missions that get assigned automatically. Multiple missions that are for all sides or something. And when the mission is completed, supplies get air dropped or something. I do not plan on using the C2ISTAR module or Alive_Tablet.

  2. Maybe something where a mission spawns randomly on the map and the AI faction automatically assigns it as a target. Something that is not directly tied to ALiVE.

  3. like a script that spawns scripted missions at a random mission marker.

  4. You might be better off asking in either https://forums.bistudio.com/forum/154-arma-3-mission-editing-scripting/ or https://www.reddit.com/r/armadev

    People there are usually pretty good at setting up templates of things to use

  5. would they be able to make a scripted mission addon that would tie into ALiVE's AICOM module? I want it to be so that the AI Commander only tasks the AI faction to complete the mission. The other player factions would get the mission notification and could choose to complete it or not. And then, the reward would be different depending on if the AI completed it or if the Player Factions completed it. Example, the Player Factions would get an Air drop of supplies or vehicles (random). The AI would get reinforcements.

  6. Probably not, something of that nature would require a lot of time and a decent amount of knowledge on how the inner workings of ALiVE are handled.

    Here's something I wrote quickly to get which factions are controlled by an OPCOM and are AI only (no players belong to that faction)

    _AIFactions = [];
    {
    	//-- Get opcom factions
    	_opcom = _x;
    	_factions = [_opcom, "factions"] call ALiVE_fnc_hashGet;
    
    	//-- Check if any players belong to opcom controlled factions
    	{
    		_faction = _x;
    
    		if ({faction _x == _faction} count allPlayers > 0) then {
    			_AIFactions pushBack _faction;
    		};
    	} forEach _factions;
    } forEach OPCOM_instances;

    You could then try and use a loop which selects tasks and use the BIS task framework to assign tasks

    For rewards of reinforcements, you could use the snippet off the wiki

    _faction = "BLU_F";
    _value = 50;
    _currentForcepool = [ALIVE_globalForcePool, _faction] call ALIVE_fnc_hashGet;
    _newForcepool = _currentForcepool + _value;
    [ALIVE_globalForcePool, _faction,_newForcepool] call ALIVE_fnc_hashSet;
  7. So, i could write it in an IF....THEN.....OR.....ELSE type statement? That way it would be something like the AI faction (OPFOR) would get the forcepool increased and the Players would get an Airdrop at the location of the mission?

  8. I had a similar idea, a mission that gets sent to all the factions and they have to fight over it and against ai. than have rewards like air drop of vehicles or supplies.

  9. ARJay

    20 Oct 2015 Administrator

    you can also script player logistics requests, this might throw a script error at the moment (fixed in dev to allow this type of thing). Note you will need to have a Military Logistics synced to an Military AI Commander for the faction doing the requesting

    _requestID = floor(time);
    
    _payload = [];
    _emptyVehicles = [];
    _staticIndividuals = [];
    _joinIndividuals = [];
    _reinforceIndividuals = [];
    _staticGroups = [];
    _joinGroups = [];
    _reinforceGroups = [];
    
    // add some ammo boxes to payload
    
    _payload pushBack "Box_NATO_Wps_F";
    _payload pushBack "Box_NATO_Wps_F";
    
    // add a empty hunter
    
    _emptyVehiclesItem = [];
    _emptyVehiclesItem set [0,"B_MRAP_01_hmg_F"];
    _emptyVehiclesItem set [1,["Vehicles","Car","B_MRAP_01_hmg_F"]];
    
    _emptyVehicles pushBack _emptyVehiclesItem;
    
    // add a empty quadbike
    
    _emptyVehiclesItem = [];
    _emptyVehiclesItem set [0,"B_Quadbike_01_F"];
    _emptyVehiclesItem set [1,["Vehicles","Car","B_Quadbike_01_F"]];
    
    _emptyVehicles pushBack _emptyVehiclesItem;
    
    
    // send the player request of to the military logistics module
    
    _forceMakeup = [_requestID,_payload,_emptyVehicles,_staticIndividuals,_joinIndividuals,_reinforceIndividuals,_staticGroups,_joinGroups,_reinforceGroups];
    
    _playerID = getPlayerUID player;
    _destination = position player;
    _faction = "BLU_F";
    _side = "WEST";
    _deliveryType = "PR_AIRDROP";
    
    _event = ['LOGCOM_REQUEST', [_destination,_faction,_side,_forceMakeup,_deliveryType,_playerID],"PR"] call ALIVE_fnc_event;
    
    if(isServer) then {
    	[ALIVE_eventLog, "addEvent",_event] call ALIVE_fnc_eventLog;
    }else{
    	[[_event],"ALIVE_fnc_addEventToServer",false,false] spawn BIS_fnc_MP;
    };
  10. Will the above script work if the AI Comm is the one doing the request but the players are the ones who receive the package? There is no AI comm for the player faction. Currently, we have it set to be 2 AI factions duking it out while the Indie faction is the player faction and the Indie faction is 'free-for-all' with grouping.
    So, the idea would be that someone writes a scripted mission and it goes through a mission routine. The mission is spawned for all players and the AI gets a custom objective spawned. the rewards would come from one of the AI factions logistics module. Both AI factions have an infinite pool to draw from. The rewards would be air dropped at the location of the mission.

  11. ARJay

    20 Oct 2015 Administrator

    It should work, but you need to have a playerID that will receive radio messages about the request etc. You might need to do some testing though.

  12. can I make it a HC? Or a non-player that is synced to the AI COMM?

  13. ARJay

    20 Oct 2015 Administrator

    HC might work, you could try sending a fake playerID but it might break.

  14. what about spawning a non-player unit on the map in the editor, giving it a name and calling that name in the script? Place that player somewhere and make it invulnerable or something. Maybe place it in an HQ or something.

 

or Sign Up to reply!