Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.158 does not have last_spend available #10

Closed
Damianbv opened this issue Aug 5, 2019 · 23 comments
Closed

Version 1.158 does not have last_spend available #10

Damianbv opened this issue Aug 5, 2019 · 23 comments
Labels
bug Something isn't working

Comments

@Damianbv
Copy link

Damianbv commented Aug 5, 2019

Even after updating to 0.4.0 it will show you the message "A new version of FoEI is available: 0.4.0"

All great buildings now show " Invalid date " , but this was also broken in the previous release after the update of this morning ( 1.158 ).

As improvement:
A list of members you've previously sniped and how much profit you take in total from that person and from that day/week?

@paskyorg
Copy link

paskyorg commented Aug 5, 2019

The last_spent key has been removed in version 1.158, so this information becomes depreciated.

@veger
Copy link
Owner

veger commented Aug 5, 2019

Thank you for your report, I will look into these 2 bugs!

A list of members you've previously sniped and how much profit you take in total from that person and from that day/week?

🤣
That would be funny, but as I am pretty limited in my time, I don't think this will make it (it does not help you in saving time...)

@paskyorg Thank you for your info, I'll take a look to see if I can replace it by something else (or remove the 'last updated'). I already saw some other things that got changed recently in their payloads...

@veger veger added bug Something isn't working enhancement New feature or request labels Aug 5, 2019
@Damianbv
Copy link
Author

Damianbv commented Aug 5, 2019

@veger No problem :) Haha yeah would be a funny feature but wont give any big advantages in time!

@paskyorg
Copy link

paskyorg commented Aug 5, 2019

As improvement:
A list of members you've previously sniped and how much profit you take in total from that person and from that day/week?

Sorry. What is "sniped"? I'm spanish and I don't understand some words in context. Does it referer to motivate/polish, trade, plunder or gb investments?

@veger
Copy link
Owner

veger commented Aug 5, 2019

gb investments: you take a GB place (usually lower than 1.9 boost) and make profit

@veger
Copy link
Owner

veger commented Aug 6, 2019

The version issue is solved (I messed up the v0.4.0 release; added a space accidentally)

@veger
Copy link
Owner

veger commented Aug 6, 2019

I checked, last_spend is still available and being properly used.
But, GBs that do not have a new level open, do not include this value, resulting in the Invalid date message. I'll fix this.

@Damianbv
Copy link
Author

Damianbv commented Aug 6, 2019

Thank you let me test latest build @veger

@Damianbv
Copy link
Author

Damianbv commented Aug 6, 2019

The new version message has been fixed, however I don't think last_spend is returning something.
image

As you can see these GB's are open for a new level

@veger
Copy link
Owner

veger commented Aug 6, 2019

Hm... Interesting. Maybe depending on server (beta?) this got changed? I only play/test on non-beta servers.
When I look at the JSON payload of GreatBuildingsService.getOtherPlayerOverview I can see the last_spend:

[{
  "city_entity_id": "X_ProgressiveEra_Landmark1",
  "last_spent": 1565091941,
  "level": 4
}]

(removed current_progress, entity_id, max_progress and name for brevity and anonymity)

You can check the payloads in the 'debug console' of the extension when debug option is enabled

@veger
Copy link
Owner

veger commented Aug 6, 2019

Oh, I checked the server version I am playing on and it is (still) 1.157.

Can you provide an (anonymous) JSON payload of GreatBuildingsService.getOtherPlayerOverview? (Or send original/non-anonymous by email) So I can see what I can do about this...

@veger veger changed the title 0.4.0 bugs Version 1.158 does not have last_spend available Aug 6, 2019
@veger veger removed the enhancement New feature or request label Aug 6, 2019
@veger
Copy link
Owner

veger commented Aug 6, 2019

(I moved the request to "keep a list of sniped people" to #11)

@Damianbv
Copy link
Author

Damianbv commented Aug 6, 2019

{"responseData":[{"entity_id":**, "city_entity_id":"X_VirtualFuture_Landmark2", "name":"Himeji Castle", "level":18, "current_progress":****, "max_progress":1512, "player":{"canSabotage":false, "player_id":******, "name":"******", "avatar":"portrait_id_****", "__class__":"OtherPlayer"}, "__class__":"GreatBuildingContributionRow"},

No last_spend too be found

@veger
Copy link
Owner

veger commented Aug 6, 2019

I see... I wonder how the game will sort the GBs, to show the active ones on top in the GB dialog.
Maybe they added another message we need to capture?

I think I'll have to wait until I get upgraded to 1.158 to figure this out

@Damianbv
Copy link
Author

Damianbv commented Aug 6, 2019

I checked all messages, none provided. Maybe they do it server side now and just provide it in order?

@kkumler
Copy link

kkumler commented Aug 6, 2019

What I have seen previously is the list is sent in order (the order being when the current player last donated). last_spent was the helpful item to see if the building was active or not. This should have lined up with the order from the other player overview result.

@veger
Copy link
Owner

veger commented Aug 6, 2019

so in this new version we cannot show anymore if the GB is active or not... 😞 (I use(d) it a lot)

@Damianbv
Copy link
Author

Damianbv commented Aug 6, 2019

So what if we put #11 and combine it with a feature that shows a great building is active? If the data gets stored of all GB's you see, you know if it has changed from your last visit. This way there can be a flag on GB's that it has been changed since your last visit. Then you'll know it's active and if you haven't already checked if you can make profit from it.

@veger
Copy link
Owner

veger commented Aug 6, 2019

The GB data is already stored, first time all GBs are shown, next only the active ones.
Biggest problem is how to 'detect' a new visit...? Clicking to open the dialog, opening a GB itself, spending FPs, all refreshes the 'visit'. So it will never show as active.

I do have some idea how to solve this, but it is fairly complex (and probably error prone), I'll first wait and see what 1.158 brings and if there is something to use (instead)

@paskyorg
Copy link

paskyorg commented Aug 7, 2019

A few years ago I made a python script and used the current_progress and level keys. All these values were stored in a dictionary (like a javascript object). If either of the two keys changed, then the GB had been updated. The problem with this is that it is more complicated than the previous way and need more coding and storage management.

@veger
Copy link
Owner

veger commented Aug 7, 2019

yes, and it still does not say when it got updated, unless you check them all frequently...

@Damianbv
Copy link
Author

Damianbv commented Aug 7, 2019

But atleast you know if the person is active and if you have to re-check the building if you can snipe it. I check atleast once a day, even if you check once in every few days you'll know if a person is still active. Else you'll have to visit every city to check if they have old collects

veger added a commit that referenced this issue Aug 12, 2019
* `last_spend` is not available anymore
* use `is_active` to (at least) show if player was active in last 7 days
@veger
Copy link
Owner

veger commented Aug 18, 2019

The extension is now able to track last_spend by itself, using the information of previous visists. So it is (much) less accurate (depending on how many times you visit the others)

@veger veger closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants