Thread Tools Display Modes
04/08/17, 03:25 PM   #1
Sacralletius
Join Date: Apr 2017
Posts: 10
[Request/Help with] RP AddOn Fame and Infamy points

Hi there

I have an idea for an addon which would like to request/try to make myself as my first AddOn.

It's an RP AddOn which does the following:

- Keep track of 2 values: fame and infamy, which persist through logging in/out, disabling/re-enabling the AddOn, etc. In short it will save both values. (These values are purely for roleplaying and have no in game advantage.)
- You infamy points will go up, each time you steal an item, pickpocket or murder an innocent, completing certain achievements/dailies/quests.
- You fame points will go up, each time you give money to beggar NPCs, complete certain achievemnts/dailies/quests, or win a duel (or kill in Cyrodiil) with a player that has a certain achievement (Silencer, Master Thief, etc). (The dueling points increase should have a one day cooldown per player.)
- An option to link your current fame and infamy points in chat.

For longer term:

- The value of (fame points minus infamy points) will give you a certain cosmetic rank.

Examples
-1000 = Grand Criminal
-500 = Crime Professional
-100 = Popular Lawbreaker
-10 = Petty Thief
0 = Citizen
10 = Upstanding Citizen
100 = Guardian of the People
500 = Hero
1000 = Legend

Example 1: You have 10 fame points and 120 infamy points -> 10 - 120 = -110 -> Which will make you a "Popular Lawbreaker".
Example 2: You have 130 fame points and 70 infamy points -> 130 - 70 = 60 -> Which will make you an "Upstanding Citizen".

Would any of this be possible with the current API?

Thanks in advance

Kind regards

Sacralletius
  Reply With Quote
04/08/17, 03:30 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
If by "cosmetic rank" you mean a visible title: only to others with the addon and it'd be a bit tricky.
  Reply With Quote
04/08/17, 04:22 PM   #3
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by Rhyono View Post
If by "cosmetic rank" you mean a visible title: only to others with the addon and it'd be a bit tricky.
Nah, not a visible title. I meant just for linking in chat. For instance, when you post your information in chat, it will say:

I have "x" fame points and "y" infamy points. My current rank is "z".

I'm actually more curious on which events are possible to track.

For instance, is it possible to track whether another player has a certain achievement?

Last edited by Sacralletius : 04/08/17 at 04:25 PM.
  Reply With Quote
04/08/17, 04:54 PM   #4
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
So you'd like to be able to verify whether they have legitimately reached that rank?
  Reply With Quote
04/08/17, 05:09 PM   #5
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by Rhyono View Post
So you'd like to be able to verify whether they have legitimately reached that rank?
Well, no, not really. Just through chat. They can post in chat: "I have "x amount of " fame points and "y amount of" infamy points. My current justice rank is "z".

What I meant by checking the "achievements", is not these ranks (from the addon) I'm referring to, but actual in game achievements.
So for instance, is possible to check through lua scripting if another player has the Silencer Dark Brotherhood achievement?

I don't know that much about actual lua scripting syntaxis, but that information could be used in this way:

Code:
Event OnDuelWon(Opponent)
    If Opponent.HasAchievement(Silencer) Then
        FamePoints = FamePoints + 20
        Victory.PlaySound()
        DisplayMessage(Another criminal has been brought to justice!)
    EndIf
End Event
I hope this makes sense. I was wondering whether there are any other events (OnStealItem, OnPickPocket, OnQuestCompleted(QuestID), etc) we could use to increase the values.
  Reply With Quote
04/08/17, 05:22 PM   #6
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
You have very limited access to other player's data. I'm not on to check, but does that achievement give a title? If it did and they were using the title: yes. If it does not: no.
  Reply With Quote
04/08/17, 05:24 PM   #7
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by Rhyono View Post
You have very limited access to other player's data. I'm not on to check, but does that achievement give a title? If it did and they were using the title: yes. If it does not: no.
Yes, it does give a title.

Just interested, what kind of player data do we have access to?

Last edited by Sacralletius : 04/08/17 at 05:26 PM.
  Reply With Quote
04/08/17, 05:44 PM   #8
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
The title would also have to be in use. On the API page, search for "unit" and many (not all) of the functions apply to players. You have pretty vast access to your own data, though.
  Reply With Quote
04/08/17, 06:25 PM   #9
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
it would be very complicated and should use some features that only a few know howw to properly use and that for a very fancy purpose... in other term, welcome to coding.
  Reply With Quote
04/08/17, 06:33 PM   #10
Sacralletius
Join Date: Apr 2017
Posts: 10
GetUnitBuffInfo -> This one is interesting. Could we use it to return whether the targeted player has the "Blade of Woe" (http://esoitem.uesp.net/viewlog.php?...kills&id=76325) and/or "Padomaic Sprint" ( http://esoitem.uesp.net/viewlog.php?...kills&id=76325) buffs?

Also, are there any events we could use for the player himself, to track whether he has done a particular quest?

Something like this:

Code:
Event OnQuestCompleted(QuestID)
     If QuestID == xxxxxx Then
         FamePoints = FamePoints + 5
     ElseIf QuestID == yyyyyy Then
         FamePoints = FamePoints + 10
     EndIf
End Event
Or when the player himself pickpockets something:

Code:
Event OnPickPocket(NPC)
     InfamyPoints = InfamyPoints + 5
End Event
  Reply With Quote
04/08/17, 07:15 PM   #11
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
If the two players in a duel are in the same group, then you could use LibGroupSocket to transfer the values of the infamy and fame. I think you can retroactively check what quests a player has completed, and there is an event you can use for quest completion, as well as pickpocketing. You could also differentiate between items stolen from say a drawer.
  Reply With Quote
04/09/17, 02:06 AM   #12
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Originally Posted by Sacralletius View Post
GetUnitBuffInfo -> This one is interesting. Could we use it to return whether the targeted player has the "Blade of Woe" (http://esoitem.uesp.net/viewlog.php?...kills&id=76325) and/or "Padomaic Sprint" ( http://esoitem.uesp.net/viewlog.php?...kills&id=76325) buffs?
(...)
In Cyrodiil not possible... sadly Z decided to allow only viewing other players buffs/debuffs that have been applied by/on you.
  Reply With Quote
04/09/17, 06:02 AM   #13
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by Dolgubon View Post
If the two players in a duel are in the same group, then you could use LibGroupSocket to transfer the values of the infamy and fame. I think you can retroactively check what quests a player has completed, and there is an event you can use for quest completion, as well as pickpocketing. You could also differentiate between items stolen from say a drawer.
Interesting. Some questions, though.

I'm not really interested in having to group up with someone to share the info, but I assume that is the only way to track whether another player has completed a quest/achievement? Which functions/events could be used for that?
  Reply With Quote
04/09/17, 06:06 AM   #14
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by Letho View Post
In Cyrodiil not possible... sadly Z decided to allow only viewing other players buffs/debuffs that have been applied by/on you.
But you can view their titles or check whether or not they are a Vampire/Werewolf, in Cyrodiil?
  Reply With Quote
04/09/17, 09:08 AM   #15
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Originally Posted by Sacralletius View Post
Which functions/events could be used for that?
There aren't any that do this directly. Ayantir was probably alluding to using map pings to send a few bytes of data at a time. You'd have to group with the person, then have them use a custom function that calls all of the builtin functions for checking that data, then use LibGroupSocket to send that data to you. In terms of first add-on, you're jumping in the deep end of the pool.
  Reply With Quote
04/09/17, 10:18 AM   #16
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
It's a nice idea you have there. You should try to keep it simple at first and try to reduce it to the core functionality.

Try make something that just keeps track of one event for famity and one for infamity, saves the resulting points and allows you to share it via chat with a keybind. From there you can still expand it however you want.

For the infamity points you could listen to EVENT_JUSTICE_INFAMY_UPDATED and convert them to your own points. For famity maybe just listen to EVENT_QUEST_COMPLETE at first and add points based on quest type and xp gain.

If you haven't done so you should read the getting started guide and do some of the tutorials on the wiki's main page.
  Reply With Quote
04/09/17, 11:44 AM   #17
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by Rhyono View Post
There aren't any that do this directly. Ayantir was probably alluding to using map pings to send a few bytes of data at a time. You'd have to group with the person, then have them use a custom function that calls all of the builtin functions for checking that data, then use LibGroupSocket to send that data to you. In terms of first add-on, you're jumping in the deep end of the pool.
Well, I don't really want the fame and infamy points tracked and shared. I assume you meant this would require people to group up.

But even then, the other player needs to have the addon as well, which I doubt many people will have. I think only a very small percentage of all players will actually use this addon, so I'll have to find other ways to make it work. One way, as pointed out, is tracking the active buffs or titles the other player has.
Although, I understand that it isn't possible to track passive skills, quests or achievements without grouping up?

So, for instance, I want to be able to do the following: if I see another player with the Silencer title, I can challenge them to a duel, without needing to group up. If I win the duel, I will get 20 points added to my fame points. Perhaps add a fancy message that will display in my game only (not the opponent or anyone else), saying "I've brought a criminal to justice." or something like that. Maybe play a simple sound, as well. The message and sound could be done similar to the messages you get from the Alliance War: "Player X of your alliance has been crowned Emporer."

Is this possible?

So, if I understand correctly:

Outside of Cyrodiil, without grouping up, it is possible to track:

- Titles
- Active buffs

Outside of Cyrodiil, I'll need to group up (LibGroupSocket requirement), in order to track:

- Quests
- Achievements
- Passive Skills

Inside Cyrodiil, it's only possible to track titles.

Is this correct?
  Reply With Quote
04/09/17, 11:47 AM   #18
Sacralletius
Join Date: Apr 2017
Posts: 10
Originally Posted by sirinsidiator View Post
It's a nice idea you have there. You should try to keep it simple at first and try to reduce it to the core functionality.

Try make something that just keeps track of one event for famity and one for infamity, saves the resulting points and allows you to share it via chat with a keybind. From there you can still expand it however you want.

For the infamity points you could listen to EVENT_JUSTICE_INFAMY_UPDATED and convert them to your own points. For famity maybe just listen to EVENT_QUEST_COMPLETE at first and add points based on quest type and xp gain.

If you haven't done so you should read the getting started guide and do some of the tutorials on the wiki's main page.
Thank you, I'll try that and add some more functionality as I go on.
  Reply With Quote
04/09/17, 12:11 PM   #19
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Sacralletius View Post
Well, I don't really want the fame and infamy points tracked and shared. I assume you meant this would require people to group up.

But even then, the other player needs to have the addon as well, which I doubt many people will have. I think only a very small percentage of all players will actually use this addon, so I'll have to find other ways to make it work. One way, as pointed out, is tracking the active buffs or titles the other player has.
Although, I understand that it isn't possible to track passive skills, quests or achievements without grouping up?

So, for instance, I want to be able to do the following: if I see another player with the Silencer title, I can challenge them to a duel, without needing to group up. If I win the duel, I will get 20 points added to my fame points. Perhaps add a fancy message that will display in my game only (not the opponent or anyone else), saying "I've brought a criminal to justice." or something like that. Maybe play a simple sound, as well. The message and sound could be done similar to the messages you get from the Alliance War: "Player X of your alliance has been crowned Emporer."

Is this possible?

So, if I understand correctly:

Outside of Cyrodiil, without grouping up, it is possible to track:

- Titles
- Active buffs

Outside of Cyrodiil, I'll need to group up (LibGroupSocket requirement), in order to track:

- Quests
- Achievements
- Passive Skills

Inside Cyrodiil, it's only possible to track titles.

Is this correct?
Things you can do:
* play a sound (but only from the list of existing sound effects, no custom stuff)
* show a message like the emperor one
* track all your own titles, buffs, quests, achievements passives
* read the currently selected title of another player (but only as a string)

Things you cannot do:
* track anything about the progress of another player (like titles, achievements, quests, etc.)

The thing with LibGroupSocket is, that both players need to have your addon and be in a group and then you can only send a maximum of 7 bytes at a time. It's simply not made for tracking a lot of information about someone. More to transport specific data between group members (like stamina and magicka values).

I am also not sure about tracking buffs of other players. A few things changed recently and I haven't tried yet what's still possible.
  Reply With Quote
04/09/17, 04:38 PM   #20
Sacralletius
Join Date: Apr 2017
Posts: 10
I know that you can see buffs from a targetted player by using S'rendar Buff tracker. This also allows you to view whether or not the targetted player has the vampire or werewolf buffs, which could be useful.

Other than that, I would prefer not using the LibGroupSocket and the grouping up part, for two reasons:

- I prefer to keep my addon lightweight (not sending/receiving too much data).
- Having the addon and grouping up with other players will make it much less convenient and only a very small amount of other players will meet this requirement.

I think using the selected other players title (and maybe buffs if I can figure out S'rendarr) is the best and most lightweight way to approach this.

I think I'll start with implementing the fame/infamy increase on quest completion/pickpocketing first, though.
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » [Request/Help with] RP AddOn Fame and Infamy points

Thread Tools
Display Modes

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