Thread Tools Display Modes
05/05/15, 05:25 PM   #1
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
AvA/Cyrodiil function differences

Apologies if this is in the wrong place, this is my first foray into ESO's API (or indeed, any API or LUA coding).

I was wondering if anyone is able to identify the functionality differences between the following API functions relating to AvA/PvP/Cyrodiil. ie, what the states are that return true to the following functions:

IsPlayerInAvAWorld() - boolean isInAvAWorld
IsInCyrodiil() - boolean isInCyrodiil
IsInAvAZone() - boolean isInAvAZone
IsInCampaign() - boolean inCampaign

To me, these seem essentially the same, but if they were actually the same, then only one would be needed. Thanks for any help!
  Reply With Quote
05/05/15, 05:36 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
There was some Capture the flag projects at the begenning of the game. I assume

Lua Code:
  1. IsPlayerInAvAWorld() - boolean isInAvAWorld
  2. IsInAvAZone() - boolean isInAvAZone
are for that kind of arenas.



Lua Code:
  1. IsInCyrodiil() - boolean isInCyrodiil
  2. IsInCampaign() - boolean inCampaign
are for Cyrodiil

and you forget

Lua Code:
  1. IsInImperialCity()
which will be for Imperial City


I guess that if there was a IsInRvR() function it will be :
Lua Code:
  1. IsInRvR() == IsInCampaign() and (IsInCyrodiil() or IsInImperialCity())


But yes, there almost sames. With Imperial City , we'll et a revamp of Cyro api, so let's wait.
  Reply With Quote
05/12/15, 05:31 AM   #3
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Cool, thanks for that. Has anyone tested this within delves? Since delves are separately-loaded instances, are they included with IsInCyrodiil(), or is that just for the overworld zone?
  Reply With Quote
07/18/15, 05:20 AM   #4
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Originally Posted by Enodoc View Post
Cool, thanks for that. Has anyone tested this within delves? Since delves are separately-loaded instances, are they included with IsInCyrodiil(), or is that just for the overworld zone?
Just for reference, I checked this myself, now that I know how to use /script d() in chat.

In a delve,
IsPlayerInAvAWorld() returns true
IsInCyrodiil() returns false
InInAvAZone() returns false
IsInCampaign() returns true

In overworld Cyrodiil, they're all true.
  Reply With Quote
07/18/15, 05:28 AM   #5
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Enodoc View Post
Just for reference, I checked this myself, now that I know how to use /script d() in chat.

In a delve,
IsPlayerInAvAWorld() returns true
IsInCyrodiil() returns false
InInAvAZone() returns false
IsInCampaign() returns true

In overworld Cyrodiil, they're all true.
Just curious, have you tried inside "gated" buildings, e.g. the temples near Brindle or Kingscrest? They're somewhat separate, as you can't enter/leave them in combat.
  Reply With Quote
07/29/15, 02:37 PM   #6
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Originally Posted by merlight View Post
Just curious, have you tried inside "gated" buildings, e.g. the temples near Brindle or Kingscrest? They're somewhat separate, as you can't enter/leave them in combat.
I haven't, but I certainly could do.

In the meantime, here's the Imperial City Sewers:
IsPlayerInAvAWorld() returns true
IsInCyrodiil() returns false
InInAvAZone() returns true
IsInCampaign() returns true

and of course
IsInImperialCity() returns true
  Reply With Quote
07/29/15, 04:43 PM   #7
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 181
IsPlayerInAvAWorld() return true if the world you're in is Cyrodiil, IC, IC Sewers, or one of the caves.
IsInCyrodiil() returns true if you're in Cyrodiil (not IC, and not the caves.)
IsInImperialCity() returns true if you're in IC or the IC sewers
InInAvAZone() returns true if either IsInCyrodiil() or IsInImperialCity() returns true
IsInCampaign() returns true if you are currently counted as inside a campaign (home or guest)

The differences are subtle, but they are used for different things, and while they may seem effectively the same now, they have the potential to diverge, giving us flexibility.
  Reply With Quote
07/29/15, 11:33 PM   #8
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Thanks for this clarification. I created a table on the wiki. Could anyone double check if I got it right?
  Reply With Quote
07/30/15, 03:01 PM   #9
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by sirinsidiator View Post
Thanks for this clarification. I created a table on the wiki. Could anyone double check if I got it right?
It looks good to me. I double checked the links from the API page too, looks good too, thanks for doing that.
  Reply With Quote
07/30/15, 04:33 PM   #10
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
Originally Posted by ZOS_DanBatson View Post
IsPlayerInAvAWorld() return true if the world you're in is Cyrodiil, IC, IC Sewers, or one of the caves.
IsInCyrodiil() returns true if you're in Cyrodiil (not IC, and not the caves.)
IsInImperialCity() returns true if you're in IC or the IC sewers
InInAvAZone() returns true if either IsInCyrodiil() or IsInImperialCity() returns true
IsInCampaign() returns true if you are currently counted as inside a campaign (home or guest)

The differences are subtle, but they are used for different things, and while they may seem effectively the same now, they have the potential to diverge, giving us flexibility.
That's awesome, thanks!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » AvA/Cyrodiil function differences


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