# Default/Code Get First Missing Req

Grammar — (Default Code Version) Get the first completely missing requirment to make object object for player player
FlagsNative | Function

Returns the first completely missing requirment to make an object for a player. Same as the script version, except this version cannot be modified to handle custom requirements.

# Arguments

  • int — Player
  • string — Object

Returns — string

native string AIDefaultGetFirstMissingReq(
	int player,
	string aliasType,
);

Category: AI Advanced / Requirements / Functions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/RequirementsAI.galaxy:691

    // override any special cases here

    return AIDefaultGetFirstMissingReq(player, objType);
}

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/RequirementsAI.galaxy:728

    // override any special cases here

    return AIDefaultGetFirstMissingReq(player, objType);
}

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/Orc/Orc.galaxy:26

    int count=qty-has;
    
    if((AIDefaultGetFirstMissingReq(player, aliasType)==null)&&(count>0)){
        //TriggerDebugOutput(1, StringToText("passed"), true);
        AIResearch(player,0,-1,aliasType);