# Catalog Entry Scope
Grammar — Catalog catalog entry entry scope
Flags —Native
|Function
Returns the scope (essentially, the type) of the specified entry. Use catalog lookup functions to retrieve a data value or other information from the game data.
# Arguments
int
<preset::CatalogType> — Catalogstring
<catalogentry> — Entry
Returns — string
<catalogscope>
native string CatalogEntryScope(int catalog, string entry);
# Related
Category: Catalog / Lookup
- Catalog Entry Is Default —
bool
— CatalogEntryIsDefault - Catalog Entry Is Valid —
bool
— CatalogEntryIsValid - Catalog Entry Class —
int
— CatalogEntryClass - Catalog Entry Count —
int
— CatalogEntryCount - Catalog Entry Get —
string
<catalogentry> — CatalogEntryGet - Catalog Entry Parent —
string
<catalogentry> — CatalogEntryParent - Catalog Entry Scope —
string
<catalogscope> — CatalogEntryScope - Catalog Field Count —
int
— CatalogFieldCount - Catalog Field Get —
string
<catalogfieldname> — CatalogFieldGet - Catalog Field Exists —
bool
— CatalogFieldExists - Catalog Field Is Array —
bool
— CatalogFieldIsArray - Catalog Field Is Scope —
bool
— CatalogFieldIsScope - Catalog Field Type —
string
— CatalogFieldType - Catalog Field Type Category —
int
<preset::FieldTypeCategory> — CatalogFieldTypeCategory - Catalog Field Value Get —
string
— CatalogFieldValueGet - Catalog Field Value Get As Integer —
int
— CatalogFieldValueGetAsInt - Catalog Field Value Get Flags As Integer —
int
— CatalogFieldValueGetFlagsAsInt - Catalog Field Value Get As Real —
fixed
— libNtve_gf_CatalogFieldValueGetAsReal - Catalog Field Value Count —
int
— CatalogFieldValueCount - Catalog Reference Get —
string
— CatalogReferenceGet - Catalog Reference Get As Integer —
int
— CatalogReferenceGetAsInt - Catalog Reference Get As Real —
fixed
— libNtve_gf_CatalogReferenceGetAsReal - Catalog Reference Count —
int
— CatalogReferenceCount - Class Of Ability —
int
<preset::AbilityClass> — AbilityClass - Cost Of Ability —
fixed
— libNtve_gf_CostOfAbility
# Examples
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5734
// Implementation
if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5735
if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5746
}
else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5747
else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:3233
// Implementation
if ((CatalogEntryIsValid(c_gameCatalogMover, lp_mover) == true) && (CatalogEntryIsDefault(c_gameCatalogMover, lp_mover) == false) && (CatalogEntryScope(c_gameCatalogMover, lp_mover) == "CMoverMissile")) {
CatalogReferenceSet("Effect,UnitLaunchToTargetPointLM,Movers[0].Link", lv_o, (lp_mover));
UnitCreateEffectPoint(lp_unit, libNCMI_gv_launchUnitToTargetPointBaseEffect, lp_targetPoint);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:7738
for ( ; auto08666BD0_i <= CatalogEntryCount(c_gameCatalogReward) ; auto08666BD0_i += 1 ) {
lv_itReward = CatalogEntryGet(auto08666BD0_catalog, auto08666BD0_i);
if ((CatalogEntryScope(c_gameCatalogReward, lv_itReward) == "CRewardVoicePack")) {
if ((PlayerHasReward(lp_player, lv_itReward) == true)) {
lv_rewardStringIDCombine = (((lv_itReward) + "_" + (libCOOC_gf_ActiveCommanderForPlayer(lp_player))));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:7745
for ( ; auto895D551D_i <= CatalogEntryCount(c_gameCatalogReward) ; auto895D551D_i += 1 ) {
lv_appReward = CatalogEntryGet(auto895D551D_catalog, auto895D551D_i);
if ((CatalogEntryScope(c_gameCatalogReward, lv_appReward) == "CRewardVoicePack")) {
if (((lv_appReward) == lv_rewardStringIDCombine)) {
PlayerAddReward(lp_player, lv_rewardStringIDCombine);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:7782
for ( ; auto3F278324_i <= CatalogEntryCount(c_gameCatalogReward) ; auto3F278324_i += 1 ) {
lv_itReward = CatalogEntryGet(auto3F278324_catalog, auto3F278324_i);
if ((CatalogEntryScope(c_gameCatalogReward, lv_itReward) == "CRewardVoicePack") && (PlayerHasReward(lp_player, lv_itReward) == true) && (CatalogFieldValueGet(c_gameCatalogReward, lv_itReward, "VoicePack", c_playerAny) != "Default")) {
return ;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25450
lv_itActive = UserDataGetGameLink("CoopTechTychusSquad", lv_itInstance, "Active Abil", 1);
if ((CatalogEntryIsValid(c_gameCatalogAbil, lv_itActive) == true)) {
if ((CatalogEntryScope(c_gameCatalogAbil, lv_itActive) == "CAbilBuild")) {
lv_pathCooldown = "InfoArray[0].Cooldown.TimeUse";
lv_pathCharge = "InfoArray[0].Charge.TimeUse";
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:25524
lv_itActive = UserDataGetGameLink("CoopTechTychusSquad", lv_itInstance, "Active Abil", 1);
if ((CatalogEntryIsValid(c_gameCatalogAbil, lv_itActive) == true)) {
if ((CatalogEntryScope(c_gameCatalogAbil, lv_itActive) == "CAbilBuild")) {
lv_pathCooldown = "InfoArray[0].Cooldown.TimeUse";
lv_pathCharge = "InfoArray[0].Charge.TimeUse";
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:30110
for ( ; autoA7A5BD22_i <= CatalogEntryCount(c_gameCatalogReward) ; autoA7A5BD22_i += 1 ) {
lv_itReward = CatalogEntryGet(autoA7A5BD22_catalog, autoA7A5BD22_i);
if (((CatalogEntryScope(c_gameCatalogReward, lv_itReward) == "CRewardVoicePack") && (StringContains((lv_itReward), ("_" + (libCOOC_gf_ActiveCommanderForPlayer(1))), c_stringAnywhere, c_stringCase) == false))) {
if ((PlayerHasReward(1, lv_itReward) == true)) {
lv_rewardStringIDCombine = (((lv_itReward) + "_" + (libCOOC_gf_ActiveCommanderForPlayer(1))));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:30121
for ( ; auto76AAF890_i <= CatalogEntryCount(c_gameCatalogReward) ; auto76AAF890_i += 1 ) {
lv_appReward = CatalogEntryGet(auto76AAF890_catalog, auto76AAF890_i);
if ((CatalogEntryScope(c_gameCatalogReward, lv_appReward) == "CRewardVoicePack")) {
if (((lv_appReward) == lv_rewardStringIDCombine)) {
PlayerAddReward(1, lv_rewardStringIDCombine);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1666
lv_behaviorIndex = 1;
for ( ; ( (auto85BE7A0C_ai >= 0 && lv_behaviorIndex <= auto85BE7A0C_ae) || (auto85BE7A0C_ai < 0 && lv_behaviorIndex >= auto85BE7A0C_ae) ) ; lv_behaviorIndex += auto85BE7A0C_ai ) {
if (((UnitBehaviorGet(lp_killer, lv_behaviorIndex) == "") || (CatalogEntryScope(c_gameCatalogBehavior, UnitBehaviorGet(lp_killer, lv_behaviorIndex)) != "CBehaviorBuff"))) {
continue;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3450
// Implementation
if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3451
if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3462
}
else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3463
else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
return 0.0;
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:123
for ( ; autoB7D8DFCC_i <= CatalogEntryCount(c_gameCatalogDataCollection) ; autoB7D8DFCC_i += 1 ) {
lv_itEntry = CatalogEntryGet(autoB7D8DFCC_catalog, autoB7D8DFCC_i);
if ((CatalogEntryScope(c_gameCatalogDataCollection, lv_itEntry) == "CDataCollectionAbil") && (StringContains((lv_itEntry), lv_raceToken, c_stringEnd, c_stringCase) == true)) {
lv_newLink = CatalogFieldValueGet(c_gameCatalogDataCollection, lv_itEntry, "TechInfoAbil", lp_player);
lv_oldLink = CatalogFieldValueGet(c_gameCatalogDataCollection, lv_itEntry, "TechInfoAbilReplaced", lp_player);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:149
}
if ((CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemAbil")) {
lv_abilEntry = CatalogFieldValueGet(c_gameCatalogItem, lp_itemType, "Abil", c_playerAny);
return CatalogFieldValueGet(c_gameCatalogAbil, lv_abilEntry, "Cost[" + IntToString(0) + "].Cooldown.Link", c_playerAny);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:154
}
if (((CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectInstant") || (CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectTarget"))) {
return CatalogFieldValueGet(c_gameCatalogItem, lv_itemEntry, "EffectCost.Cooldown.Link", c_playerAny);
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:154
}
if (((CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectInstant") || (CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectTarget"))) {
return CatalogFieldValueGet(c_gameCatalogItem, lv_itemEntry, "EffectCost.Cooldown.Link", c_playerAny);
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:175
}
if ((CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemAbil")) {
lv_abilEntry = CatalogFieldValueGet(c_gameCatalogItem, lp_itemType, "Abil", c_playerAny);
return "";
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:180
}
if (((CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectInstant") || (CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectTarget"))) {
return "";
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:180
}
if (((CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectInstant") || (CatalogEntryScope(c_gameCatalogItem, lv_itemEntry) == "CItemEffectTarget"))) {
return "";
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:503
for ( ; ( (auto8D9AF44D_ai >= 0 && lv_i <= auto8D9AF44D_ae) || (auto8D9AF44D_ai < 0 && lv_i >= auto8D9AF44D_ae) ) ; lv_i += auto8D9AF44D_ai ) {
lv_itBuff = UnitBehaviorGet(lv_caster, lv_i);
if ((CatalogEntryScope(c_gameCatalogBehavior, lv_itBuff) == "CBehaviorAttribute")) {
lv_itStack = UnitGetAttributePoint(lp_source, lv_itBuff, true);
UnitSetAttributePoint(lv_target, lv_itBuff, true, lv_itStack);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:1351
for ( ; auto37CC6DB9_i <= UnitBehaviorCountAll(auto37CC6DB9_u) ; auto37CC6DB9_i += BoolToInt(lv_itBehavior == UnitBehaviorGet(auto37CC6DB9_u, auto37CC6DB9_i)) ) {
lv_itBehavior = UnitBehaviorGet(auto37CC6DB9_u, auto37CC6DB9_i);
if ((CatalogEntryScope(c_gameCatalogBehavior, lv_itBehavior) == "CBehaviorUnitTracker")) {
lv_ug = UnitGetTrackedUnitGroup(lv_u, lv_itBehavior);
auto9CEDDE2C_g = lv_ug;
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicTactical.galaxy:181
// Implementation
if ((CatalogEntryScope(c_gameCatalogItem, lv_itemLink) != "CItemAbil")) {
return null;
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:1642
if ((CatalogEntryIsValid(c_gameCatalogAbil, lv_abilLink) == true)) {
lv_abilDataCollectionLink = (CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "DataCollection", c_playerAny));
if ((CatalogEntryIsValid(c_gameCatalogDataCollection, lv_abilDataCollectionLink) == true) && (CatalogEntryScope(c_gameCatalogDataCollection, lv_abilDataCollectionLink) == "CDataCollectionAbil")) {
libWCdr_gf_DataCollectionApplyTech(lv_abilDataCollectionLink, lp_player, true);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2365
// Implementation
auto7E80F3C8_val = CatalogEntryScope(c_gameCatalogDataCollection, lp_dataCollection);
if (auto7E80F3C8_val == "CDataCollectionUnit") {
lv_from = CatalogFieldValueGet(c_gameCatalogDataCollection, lp_dataCollection, "TechInfoUnitReplaced", lp_player);