# Catalog Link Replace

Grammar — Replace catalog links set to value with replacement for player player
FlagsNative | Action

Most game functionality will switch to using the replacement value when possible instead of the original value.

# Arguments

  • int — Player
  • int [ preset::CatalogType ] — Catalog
  • string — Value
  • string — Replacement

Returns — void

native void CatalogLinkReplace(
	int player,
	int catalog,
	string idA,
	string idB,
);

Category: Catalog / Support

# Examples

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L22471
CatalogLinkReplace(1, c_gameCatalogUnit, (lv_unitType), (lv_unitUsed))

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L6157
CatalogLinkReplace(lp_player, c_gameCatalogUnit, (libVoiC_gf_PC_ArmyCategoryUnitType(lv_armyCategory)), (libVoiC_gf_PC_ArmyCategoryUnitType(lv_armyCategory)))
// L6170
CatalogLinkReplace(lp_player, c_gameCatalogUnit, (libVoiC_gf_PC_ArmyCategoryUnitType(libVoiC_gf_PC_ArmyCategoryOfArmyUnit(lv_armyCategory2))), (libVoiC_gf_PC_StoryArmyUnitUnitType(lv_armyCategory2)))

# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod

LibPEB1.galaxy

// L723
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Diablo_LightningBreath_Launch", "Diablo_LightningEndless_Launch")
// L734
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_Cast", "Kerrigan_Omegastorm_Cast")
// L735
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_Loop", "Kerrigan_Omegastorm_Loop")
// L736
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_Impact", "Kerrigan_Omegastorm_Impact")
// L737
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_End", "Kerrigan_Omegastorm_End")
// L761
CatalogLinkReplace(lp_playerIndex, c_gameCatalogModel, "StitchesSlamModel", "StitchesSlamSmashModel")
// L764
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Stitches_Slam_Cast", "Stitches_Slam_Pulverize_Cast")
// L709
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Diablo_LightningBreath_Launch", "Diablo_LightningEndless_Launch")
// L720
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_Cast", "Kerrigan_Omegastorm_Cast")
// L721
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_Loop", "Kerrigan_Omegastorm_Loop")
// L722
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_Impact", "Kerrigan_Omegastorm_Impact")
// L723
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Kerrigan_Maelstrom_End", "Kerrigan_Omegastorm_End")
// L747
CatalogLinkReplace(lp_playerIndex, c_gameCatalogModel, "StitchesSlamModel", "StitchesSlamSmashModel")
// L749
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Stitches_Slam_Cast", "Stitches_Slam_Pulverize_Cast")
// L750
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Stitches_Slam_WideSlam_Cast", "Stitches_Slam_Pulverize_Cast")
// L751
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Stitches_Slam_MegaSmash_Cast", "Stitches_Slam_Pulverize_Cast")
// L763
CatalogLinkReplace(lp_playerIndex, c_gameCatalogSound, "Stitches_MeatHook_AttackLaunch", "Stitches_FishingHook_AttackLaunch")

# mods/heroesdata.stormmod

GameLib.galaxy

// L5875
CatalogLinkReplace(lp_player, lv_catalog, lv_replaceFrom, lv_changeTo)
// L5912
CatalogLinkReplace(lp_player, lv_catalog, lv_replaceFrom, lv_replaceFrom)
// L18639
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountMoveStartSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_moveStartSound))
// L18643
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountMoveStopSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_moveStopSound))
// L18647
CatalogLinkReplace(lv_mountingPlayer, c_gameCatalogSound, "GenericMountTurboSound", (libGame_gv_players[lv_mountIndex].lv_mountData.lv_turboSound))

# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod

LibMHtM.galaxy

// L93
CatalogLinkReplace(lv_itPlayer, c_gameCatalogModel, "CaptureMacGuffinBeamRavenCourt", "CaptureMacGuffinBeamUnderground")
// L94
CatalogLinkReplace(lv_itPlayer, c_gameCatalogSound, "Event_RavenCurse_CollectTributeStart", "Event_Mines_EnterMinesStart")
// L95
CatalogLinkReplace(lv_itPlayer, c_gameCatalogSound, "Event_RavenCurse_CollectTributeLoop", "Event_Mines_EnterMinesLoop")
// L96
CatalogLinkReplace(lv_itPlayer, c_gameCatalogSound, "Event_RavenCurse_CollectTributeEnd", "StormNoSound")

# mods/missionpacks/campaigncommon.sc2mod

LibComC.galaxy

// L1873
CatalogLinkReplace(lp_player, c_gameCatalogUnit, (libComC_gf_CC_ArmyCategoryUnitType(lv_armyCategory)), (libComC_gf_CC_ArmyCategoryUnitType(lv_armyCategory)))
// L1886
CatalogLinkReplace(lp_player, c_gameCatalogUnit, (libComC_gf_CC_ArmyCategoryUnitType(lv_armyCategory)), (libComC_gf_NC_StoryArmyUnitUnitType(lv_armyCategory2)))

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L5466
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_Attack", "TrooperMengsk_Attack_MoraleLow")
// L5467
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_What", "TrooperMengsk_What_MoraleLow")
// L5468
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_Yes", "TrooperMengsk_Yes_MoraleLow")
// L5471
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_Attack", "TrooperMengsk_Attack")
// L5472
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_What", "TrooperMengsk_What")
// L5473
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_Yes", "TrooperMengsk_Yes")
// L5476
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_Attack", "TrooperMengsk_Attack_MoraleHigh")
// L5477
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_What", "TrooperMengsk_What_MoraleHigh")
// L5478
CatalogLinkReplace(lv_mengskplayer, c_gameCatalogSound, "TrooperMengsk_Yes", "TrooperMengsk_Yes_MoraleHigh")
// L26403
CatalogLinkReplace(UnitGetOwner(libCOMI_gf_EventTychusHero()), c_gameCatalogUnit, "TychusResearchCenter", "TychusResearchCenterUnlocked")

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L4015
CatalogLinkReplace(lp_player, c_gameCatalogUnit, (libCOOC_gf_CC_ArmyCategoryUnitType(lv_armyCategory)), (libCOOC_gf_CC_ArmyCategoryUnitType(lv_armyCategory)))
// L4022
CatalogLinkReplace(lp_player, c_gameCatalogUnit, (libCOOC_gf_CC_ArmyCategoryUnitType(libCOOC_gf_CC_ArmyCategoryOfArmyUnit(lv_armyCategory2))), (libCOOC_gf_CC_StoryArmyUnitUnitType(lv_armyCategory2)))

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L5400
CatalogLinkReplace(lv_replacePlayer, c_gameCatalogAbil, lv_replaceTarget, (lv_abil))

# mods/warcoop/warclassicsystem.sc2mod

WarClassicSystem.galaxy

// L127
CatalogLinkReplace(lp_player, c_gameCatalogAbil, lv_oldLink, lv_newLink)

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L2043
CatalogLinkReplace(lp_legendPlayer, c_gameCatalogAbil, (UserDataGetGameLink("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityToReplace", 1)), (UserDataGetGameLink("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityReplacement", 1)))
// L2109
CatalogLinkReplace(lp_player, c_gameCatalogAbil, lv_oldLink, lv_newLink)
// L2371
CatalogLinkReplace(lp_player, c_gameCatalogUnit, lv_from, lv_to)
// L2387
CatalogLinkReplace(lp_player, c_gameCatalogAbil, lv_from, lv_to)
// L2402
CatalogLinkReplace(lp_player, c_gameCatalogAbil, lv_from, lv_to)
// L2410
CatalogLinkReplace(lp_player, c_gameCatalogButton, lv_from, lv_to)

# mods/warcoop/warmeleeai.sc2mod

LibW3AI.galaxy

// L75
CatalogLinkReplace(lv_p, c_gameCatalogModel, "Ofar", "Othr")