Thread Tools Display Modes
12/03/15, 04:54 PM   #1
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Non-functional Campaign Functions

Why do functions like GetCampaignAllianceScore(campaignId, alliance) and GetTotalCampaignHoldings(campaignId, holdingType, alliance) not work for any campaign other than your Home Campaign?
  Reply With Quote
12/04/15, 07:25 AM   #2
LoveMusique
Join Date: Dec 2015
Posts: 2
I think it's isn't the good function !
  Reply With Quote
12/04/15, 07:26 AM   #3
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Working as intended no ?

leaderboards are only available for your home campaign...

Last edited by Ayantir : 12/04/15 at 07:49 AM.
  Reply With Quote
12/04/15, 05:00 PM   #4
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Originally Posted by Ayantir View Post
Working as intended no ?

leaderboards are only available for your home campaign...
Leaderboards yes, but they are personal to you, and are for your score, so that makes sense. Every campaign also has a score, and that's the global score of the alliance in that campaign, which is dependent on objective control, not AP. I don't see why you can only see the score of your home campaign; the campaign score has nothing to do with the leaderboards.
  Reply With Quote
01/26/16, 05:40 AM   #5
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Has anyone else got any comments on this? Are there any devs that frequent these forums who may be able to help explain the reasoning behind these functions not working?

Here's an example of what I would like to be able to do using GetCampaignAllianceScore(campaignId, alliance) and GetTotalCampaignHoldings(campaignId, holdingType, alliance):

(in this example, ZO_ColorDefs are assumed pre-defined, also assume campaignId for Chillrend is 15 and campaignId for Azura's Star is 12):

Lua Code:
  1. d(GetCampaignName(15))
  2. d(AD_ColorDef:Colorize("Aldmeri Dominion") .. ": " .. GetCampaignAllianceScore(15, ALLIANCE_ALDMERI_DOMINION))
  3. d("Keeps: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_KEEP, ALLIANCE_ALDMERI_DOMINION) .. "Outposts: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_OUTPOST, ALLIANCE_ALDMERI_DOMINION) .. "Resources: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_RESOURCE, ALLIANCE_ALDMERI_DOMINION) .. "Scrolls: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_DEFENSIVE_ARTIFACT, ALLIANCE_ALDMERI_DOMINION) + GetTotalCampaignHoldings(15, HOLDINGTYPE_OFFENSIVE_ARTIFACT, ALLIANCE_ALDMERI_DOMINION))
  4. d(EP_ColorDef:Colorize("Ebonheart Pact") .. ": " .. GetCampaignAllianceScore(15, ALLIANCE_EBONHEART_PACT))
  5. d("Keeps: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_KEEP, ALLIANCE_EBONHEART_PACT) .. "Outposts: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_OUTPOST, ALLIANCE_EBONHEART_PACT) .. "Resources: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_RESOURCE, ALLIANCE_EBONHEART_PACT) .. "Scrolls: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_DEFENSIVE_ARTIFACT, ALLIANCE_EBONHEART_PACT) + GetTotalCampaignHoldings(15, HOLDINGTYPE_OFFENSIVE_ARTIFACT, ALLIANCE_EBONHEART_PACT))
  6. d(DC_ColorDef:Colorize("Daggerfall Covenant") .. ": " .. GetCampaignAllianceScore(15, ALLIANCE_DAGGERFALL_COVENANT))
  7. d("Keeps: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_KEEP, ALLIANCE_DAGGERFALL_COVENANT) .. "Outposts: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_OUTPOST, ALLIANCE_DAGGERFALL_COVENANT) .. "Resources: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_RESOURCE, ALLIANCE_DAGGERFALL_COVENANT) .. "Scrolls: " .. GetTotalCampaignHoldings(15, HOLDINGTYPE_DEFENSIVE_ARTIFACT, ALLIANCE_DAGGERFALL_COVENANT) + GetTotalCampaignHoldings(15, HOLDINGTYPE_OFFENSIVE_ARTIFACT, ALLIANCE_DAGGERFALL_COVENANT))
  8. d("")
  9. d(GetCampaignName(12))
  10. d(AD_ColorDef:Colorize("Aldmeri Dominion") .. ": " .. GetCampaignAllianceScore(12, ALLIANCE_ALDMERI_DOMINION))
  11. d("[...]")
  12. d(DC_ColorDef:Colorize("Daggerfall Covenant") .. ": " .. GetCampaignAllianceScore(12, ALLIANCE_DAGGERFALL_COVENANT))
  13. d("Keeps: " .. GetTotalCampaignHoldings(12, HOLDINGTYPE_KEEP, ALLIANCE_DAGGERFALL_COVENANT) .. "Outposts: " .. GetTotalCampaignHoldings(12, HOLDINGTYPE_OUTPOST, ALLIANCE_DAGGERFALL_COVENANT) .. "Resources: " .. GetTotalCampaignHoldings(12, HOLDINGTYPE_RESOURCE, ALLIANCE_DAGGERFALL_COVENANT) .. "Scrolls: " .. GetTotalCampaignHoldings(12, HOLDINGTYPE_DEFENSIVE_ARTIFACT, ALLIANCE_DAGGERFALL_COVENANT) + GetTotalCampaignHoldings(12, HOLDINGTYPE_OFFENSIVE_ARTIFACT, ALLIANCE_DAGGERFALL_COVENANT))

To give:

Chillrend
Aldmeri Dominion: 434
Keeps: 6; Outposts: 2; Resources: 18; Scrolls: 2
Ebonheart Pact: 232
Keeps: 6; Outposts: 1; Resources: 19; Scrolls: 3
Daggerfall Covenant: 102
Keeps: 6; Outposts: 0; Resources: 17; Scrolls: 1

Azura's Star
Aldmeri Dominion: 1102
[...]
Daggerfall Covenant: 1230
Keeps: 5; Outposts: 1; Resources: 17; Scrolls: 5
  Reply With Quote
01/26/16, 12:22 PM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,602
Those functions only seem to work from inside a campaign.
You might want to use GetNumSelectionCampaigns and GetSelectionCampaignAllianceScore instead to get alliance scores.
I don't think there is a way to get the other information though.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Non-functional Campaign Functions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off