Trustee

Share your finished and ready for use addons here.
User avatar
Mugi
Posts: 9
Joined: Tue Feb 20, 2018 11:30 am

Re: Trustee

Post by Mugi » Fri Apr 20, 2018 8:42 am

Sinnersslayer wrote:
Thu Apr 19, 2018 10:17 pm
Was thinking that would be great to have a possibility to parse current summoned Trusts into the list.
I assume it's not a difficult feature to add. I haven't looked into the Ashita API for party interaction, so I don't know how much information it gives me. Assuming I can pull the names of the current party members (and the API doesn't skip NPCs in the party) it shouldn't be that hard to save the party as a Trust list.
Yunamahoutsukai
Posts: 20
Joined: Tue Oct 24, 2017 11:28 am

Re: Trustee

Post by Yunamahoutsukai » Fri Apr 20, 2018 11:57 am

Ashita has everything you should want.
You can get the name of the party members like this:

Code: Select all

    local count = AshitaCore:GetDataManager():GetParty():GetAllianceParty0MemberCount()
    if count > 0 then
        for i = 0, (count - 1) do
            local id = 'p' .. i
            res[id] = {}
            res[id]['name'] = AshitaCore:GetDataManager():GetParty():GetMemberName(i)
        end
    end
User avatar
Mugi
Posts: 9
Joined: Tue Feb 20, 2018 11:30 am

Re: Trustee

Post by Mugi » Sat Apr 21, 2018 11:39 am

Trustee was updated today to v1.1.0, with the following changes:

New Feature: Generate a Trust set based on your current Trust party.
To generate a Trust set this way, use "/trustee add SetName party". It's important to note that this has a drawback when it comes to alternate Trust versions. Since version 2 Trusts (such as Lion vs. Lion II) use the same name in the party list once they're summoned, Trustee will only be able to store the name of the default Trust version when it saves the party list. For example: in the case of Lion II, when you summon her her name in the party still appears as "Lion", so when Trustee saves the party list it will only be able to recognize Trust: Lion, not Trust: Lion II. I don't think there's much I can do about this other than create specific default behaviours (such as always attempting to add Lion II first, rather than Lion).

I also updated the help information to indicate when an input is case sensitive, specifically with set names.
Sinnersslayer
Posts: 38
Joined: Thu Jan 25, 2018 6:48 am

Re: Trustee

Post by Sinnersslayer » Sun Apr 22, 2018 7:40 am

Still a great help, thanks!
Can also edit the set list in notepad to replace v1 trusts versions with v2.
Sinnersslayer
Posts: 38
Joined: Thu Jan 25, 2018 6:48 am

Re: Trustee

Post by Sinnersslayer » Tue Apr 24, 2018 11:24 pm

Hmmm I've tried the new feature typed in /trustee add magic party, addon reported that it created a list, but when I wanted to load it next time it wasn't there after I've used /tr list.
User avatar
Mugi
Posts: 9
Joined: Tue Feb 20, 2018 11:30 am

Re: Trustee

Post by Mugi » Wed Apr 25, 2018 2:26 am

Sinnersslayer wrote:
Tue Apr 24, 2018 11:24 pm
Hmmm I've tried the new feature typed in /trustee add magic party, addon reported that it created a list, but when I wanted to load it next time it wasn't there after I've used /tr list.
Who was in your party at the time? I just tried it some some more and all of my Trust sets seem to work fine, but I don't own every Trust. It could be a bug with how I search for Trust names. Maybe there's a Trust with a very different party name from the spell name that I haven't accounted for. Also, if there was a new Trust recently added it won't be in the core list (so I'd have to update it) but that just means Trustee would skip the unknown name and make a Trust list using the names it considers valid.

Oh, I also forgot to mention that I added the "/trustee save" command in the current version (the same version that I added the party functionality to) to immediately save a Trust list. I'll add that to the documentation on my next update.
Sinnersslayer
Posts: 38
Joined: Thu Jan 25, 2018 6:48 am

Re: Trustee

Post by Sinnersslayer » Thu May 10, 2018 11:02 am

I used /trustee save command, addon reported that the trust list was save to a file, but can't see the file
User avatar
Mugi
Posts: 9
Joined: Tue Feb 20, 2018 11:30 am

Re: Trustee

Post by Mugi » Thu May 10, 2018 1:26 pm

Sinnersslayer wrote:
Thu May 10, 2018 11:02 am
I used /trustee save command, addon reported that the trust list was save to a file, but can't see the file
It updates the main set file right away. It doesn't save it as another file. If you want to save the current list to a file with the date appended, you can use /trustee backup.
Sinnersslayer
Posts: 38
Joined: Thu Jan 25, 2018 6:48 am

Re: Trustee

Post by Sinnersslayer » Thu May 10, 2018 2:35 pm

So how to parse my current summoned trusts into a new set without having to use /trustee add [setlist] [trust names]?
User avatar
Mugi
Posts: 9
Joined: Tue Feb 20, 2018 11:30 am

Re: Trustee

Post by Mugi » Thu May 10, 2018 7:10 pm

Sinnersslayer wrote:
Thu May 10, 2018 2:35 pm
So how to parse my current summoned trusts into a new set without having to use /trustee add [setlist] [trust names]?
So "/trustee add [setList] [trustNames]" takes a list of Trusts that you provide and stores them in a set named by whatever you have in place of [setList]. The "/trustee add [setList] party" does the same thing, except the "party" keyword is used in place of the list of Trust names. To create that list when you run this command, Trustee grabs all the names from your current party and compares them to known Trust names from the settings/name_map.json file. Any name in your party that matches one of the names in that database is placed in a list internally (that we can call [partyTrustList]), which it then uses in a "/trustee add [setList] [partyTrustList]" command for you. So it still performs the same operation that the add command always did, it just gets the Trust names from your party rather than from you.

To see what I mean, go outside a town, summon Trusts until your party is full, then use the command: /trustee add test1 party

It should create a Trust set named "test1" with all of the Trusts in your party as the names in the set, with the caveats I mentioned in a previous post (most notably how the game handles Trusts with multiple versions, such as Lion and Lion II both showing up as "Lion" in the party list).
Post Reply