#tooldev-general
1 messages Β· Page 43 of 1
You would have to process the data in a queue
Either way you have to process them in the order you get them
well, if he starts grabbing the data in next_change_id, before he completed the current stream of changes
he may lose out on some changes.
hm
Ah, true
It all depends on what you're doing. I assume your goal is to snipe items as quickly as possible?
Otherwise, there seems to be very little reason to chase milliseconds by concurrently processing river data
then again, the extent of my API use is only to find specific items, not to index them
and i've got some code running that prevents exact duplicates from showing
Well, I don't really want to get into a distributed computing science class here, but... I urge you to deep diver into what the consequences are of what you're doing π
I'm not completely clear on whether or not the backend generates all of the content for a change_id upon request before sending, or if it chunks/streams that data from generation while it's happening
I suppose it would be pretty easy to see by simply calling a next_change_id page immediately and seeing if there are duplicates
but certainly the intent of the design is that you fully complete one page before requesting another, whether or not it matters depends on implementation
"If the number of stashes returned is zero, you get back the same change ID you passed in (a hint to keep trying until the endpoint has some tabs for you)."
from the documentation
that happens when you're ahead of the stream
So the ids are generated ahead of time
I do get duplicate changeIds from time to time
But generally they are just ignored and then another request is sent
presumably you'd want to multi-request at a point in time when the stream is more active than your ability to grab in one request, which does happen early in leagues
but i'm also asusming that it's like a linked list, with multiple pointers...
i.e. I can get change_id X if I create a requset at time A, meanwhile you get change_id Y if you request at time B?
i.e. when you're getting back 250+ tabs in one stream you might be behind
if you start from 0 on two different nodes you will get different change ids
right
but doubtful that will improve resolution
so that leads me to believe that you will have to follow the linked list, otherwise you'll be missing out on changes
theoretically yes
i really have no idea how they've solved this technically, but it's actually quite fascinating
I haven't looked at it in a long time but initially it seemed clear the change_id data was cached in some way
I'm guessing there is a database table or similar that tracks which changes have been sent by which change ids
it does seem to be a computed id based on the request you've made
interesting
I have an old e-mail that explains it a little bit but it's nda'd
and one should also take into consideration that it's always current data, meaning that the stuff changes all the time, meaning that change_id=0 response may be different from each request... and consequently all other changes have the same characteristic
however, i have not lost any of my own items when testing/debugging
Well, again, I am not going to attempt to prove any of this, as I'm just speculating. It's up to you how you use this information @deft jolt .
yeah, i know
there is some indication that they may be using a behind the scenes system to actually add stashes by id to change_id triggers
As far as I'm concerned, it works fine as is
which wouldn't scale with thousands of consumers but the original design didn't expect very many people to use it, so that kinda makes sense
For the purpose im using it for
Well, the current solution doesn't seem to be 'scaled' much, as you can see a big variance of response time from the API endpoint
yeah can confirm some sort of similar thing to what I said above
the list of stashes in a change_id are updated when the backend stash is saved
(or at least that's what I was told during the first stash tab api beta, could've changed since then to scale differently)
Ok, so assume the following:
App A and App B
- Both requests change_id=X at the same time. They receive identical response.
- App A waits 1 second, and request the next_change_id
- App B waits 10 seconds, and request the next_change_id
during a time period where 1 second would not fill up a "full payload"
How these two apps now are diverged would be interesting to visualize
theoretically they both get the same payload (though randomized)
They would get the same payload over time
Are you sure?
sorry, my response was assuming no changes were made after t1
better would be:
at t1, app A requests
at t10, app B requests
at t15, app A requests
at t15, app B requests
At that point they should have the same data
The apps get data that they don't have yet
Ok, let me rephrase so we're on the same page.
Let X = specific change id
T01 App A requests X. Receives payload with Change Y
T01 App B requests X. Receives payload with Change Y
T02 App A requests Y. Receives small payload (few stashes).
T30 App B requests Y. <-- What will App B receive? (change id)
Assuming that there are more stash changes between T02 and T30
is it possible to receive few stashes? (as long as they are the last current instance)
yes
π€ but when that ID is released to the river isn't it locked for new entries?
that's the interesting part... no it seems like it's not
the change_id seems to be a from->to temporal pointer
that is a problem i think, trackers may miss some items
it is normally not a problem, as long as you process the current request before making and processing next change
Say I got an extremelly powerful computer where processing the data takes about 0.1 sec
Network speed is also top-notch, takes about 0.5 sec to download the data package
hah, processing the data isn't important, it's ggg's time to send data, but yeah, assume it's instant
Yeah
CAP Theorem β€
So if I were to download the whole data package and process it in under a second, would I miss out on items compared to a consumer that waits 10 seconds between each pull?
no
I suppose what it alll boils down to is how the changeIDs are generated
I would assume that the change_id is a pointer, much in a linked list
so it doesn't really matter
what matters in your case, is that you're not overwriting a stash with old data after storing newer data
when doing multi-threading
You mean I am overwriting new data with older data?
No, I mean that it may be a possibility in case of a race condition
It is 5 nodes calculating what has changed since the last time you requested items
Can you elaborate, @mortal bone ?
5 nodes have all of the stash tab data (each number is a node in the change id). They know what they have sent you and send you the difference between what they have sent you and the current state of the system
The api is basically a diff
"each number in the ID is a nice" - what do you mean with 'nice'?
With node, you mean a shard?
Yeah, sane thing in this case
Ah, so if they scale the service out, we'll observe longer change_ids
Yes
I can recall that I saw quite short change_ids a long time ago, and they've become longer, so that makes sense
61606646-65054765-60958520-70862647-65851290
61606649-65054765-60958521-70862647-65851290
61606650-65054767-60958522-70862654-65851290
this means some nodes did not change while i was requesting?
Yes
That actually makes total sense
Some of the shards didn't have any different data
At the start of the 3.0 beta:
5515-5686-6169-6549-5538
vs now:
80812-81981-72617-99989-84552
That makes this less mindblowing.. but still cool heh
I suppose for the extent of my usage, creating a new request every 1 seconds is perfectly fine
I have a tool in python where I can put in the quality numbers of my quality items and it gives me all combinations that make 40 with 4 or less items. Is this of any interest to anyone or has it already been done? Difference with some tools are it only goes for your desired items. Like one specific stash you have, instead of all combinations with everything in every stash, as long as you manually put in the numbers.
Does it group by item category?
only manually, haven't got it working with stash API, but want to improve it to work with stash API so I can choose armours from stash named "Quality" for instance. Don't know where to start with that, any help is welcome
same person, new picture
I'm assuming that you're fetching your personal stashes.
My suggestion is that you group them by item category (gems, flasks, armour, weapon)
mhm, no idea how to fetch using python, API, sessions... Don't know which libraries to look at even :/ or essential functions...
how does your tool "visualize" it? i mean after you have the combination
if i where going to make it i would make using javascript/browser extension @shadow flax
so you could just browser your tabs
that's a pretty good idea.
a secondary idea would be to create a GUI application, that perhaps does other things as well
interesting, displaying in PyCharms run window now
@radiant tangle Yein
Not interested in GUI, makes it too big to handle I feel on a hobby level for now
@elder hearth Heh, I thought that was you.
no, but want to reach that level eventually
did you see my message, you have the code there
@elder hearth Yeah, I noticed. The other avatar you had was quite similar, hence me thinking it was you. Oh well. Fun!
this one right? lol
I can't remember
@elder hearth Any good place to learn POE API for browser extension as well as a good place to learn coding browser extensions?
inb4 they all look the same
right now I manually transfers the numbers on my items one category at a time, so for now no api is involved :/
@shadow flax I don't think you need any API for browser extension, you just log in and do your stuff with javascript based on what page you are
huh, any good starting place for javascript interacting with browser, not sure on the detecting browser info part
to get started calculating
starting place as in a good tutorial in learning that stuff
doing it because I want the tool, and like to learn, definitely up for better ways of doing it
the step of using browser extension or stash API would be learning though, as I don't know it well enough
well, if you already started something in python and have an easy way to point out what combination you need to grab then i think you have the following options with python:
1 - Log in your account using python (may involve cookies/password and shit)
2 - Make your tool to get you tab items via public stash by forcing an update on that tab and then your tool will get that info from the river
or you can do it via browser extension like i said
If you assume the user uses Chrome, you can always grab the session cookie from the cookie store.
2 and browser extenstion sounds most interesting
It involves a little bit of decryption, but completely doable.
for login purposes @simple ravine ?
2 is the easiest but it is a bit of "workaround"
@shadow flax yea
yeah, got premium ones so no problem there. Might want to do both the workaround and browser actually...
if its for learning porpuses, dealing with json with python is easy to learn
i liked it a lot
json and python structures (dicts) are similar
Personally, I would do this kind of thing through the "logged-in" way
Publishing your items on the stash river just to get the data would be a huge pain
yeah, when I see the json in browse it all looks doable, just don't know the next steps to do it ^^
true @simple ravine
also clutters the river :/
@simple ravine he can set his tool to listen to name account, char name and stash name, no biggy
poe.ninja also gives you the last IDs
so it is
start program,
go to PoE, put some shit inside that tab, change instances
and your program will receive it immediatly
god that sounds exiting!
how mad would people be on me for putting up public items just to calculate the 40% recipe? With no intention of selling?
people don't even care, they look for priced items, not unpriced
if you get msg about your unpriced items they will lowball you
yeah, good point
https://www.pathofexile.com/character-window/get-stash-items?accountName=<accountName>&tabIndex=0&league=Standard&tabs=1
start there, imo
yeah, but how to do that in the python code?
[tangent]: is it beta_standard or standard_beta or third?
so some kind of listener in python to specific API?
isn't it gonna eat my CPU having the listener going forever during gameplay? or simply not have it go forever and just when I wanna look it up...?
for fetching websites https://docs.python.org/3/library/urllib.request.html#module-urllib.request
@shadow flax he linked the webpage api, not premium stash.
@simple ravine how ppl "login" on that link? or you need to send cookies to that?
@elder hearth yes, you need to send a cookie to that. Much like you'd do in Acquisition/Procurement. Either let the user specify user/password, the php-session-id or grab the cookie from the browser cookie store on disk.
sending a cookie that you grab manually is the easiest way
POESESSID on the .pathofexile.com domain
when i used Acquisition i used php_session, not a big deal to press F12 and get that
so for premium I would use latest from poe.ninja, from there go forwards until meeting my requirements then stop and calculate 40%
?
@compact isle For sure, but not the most user-friendly way for the people who are non-technical.
if you're writing a script to do something, isn't that by definition technical?
Hehe, sure for scripts - I would completely agree. I was perhaps generalizing it a little.
if he wanted to distribute it then sure
but the overhead of handling the login flow is a pain
@shadow flax yes, until your program gets a tab that matches account name, char name, stash name
then you run your thing
would I have to always manually update to latest from ninja?
The smoothest way (user experience context), in my opinion, is to grab the cookie from the user's browser cookie store. If he or she isn't logged in, ask them to login using the browser.
poe.ninja got an api too
ooh
@shadow flax you can grab the latest change_id just requesting poe.ninja api
right π interesting
@shadow flax try the stash thing, looks a bit easier if you get the login thing going
@compact isle Feature suggestion: Path of Exile OAuth with scope/claims. Imagine the possibilities.
sweet
π±
@compact isle Happy to beta test with you.
I'm gonna go sleep, thanks for all the help! Hope to come back with further improvements later on
hah, we'll get there eventually
soonβ’
that's pretty much anything web related
What are the scopes/claims you're planning to add?
act 8 takes place in Sarn
i'd say software dev in total π
well for a start I was just going to do a basic profile scope (for verifying accounts) and then just scope each api endpoint
maybe convert some data that people scrape into apis as well
I think that would be a great idea. Using unofficial ways of acquiring data isn't really ideal world for anyone. If you then choose to dogfood those APIs, that'd be up to you, however it'll ensure developers that the APIs are reliable and won't change without notice.
any plans on switching to trending graphene or you guys prefer to stick with good old rest?
You mean GraphQL?
yeah, just different implementations in languages (graphene goes for python)
GraphQL seems cool but our data isn't really centralized which makes it harder on our end
Graphene is perhaps an implementation of the specification GraphQL
definitely a nice thing to consume though
@simple ravine you're right
GraphQL is very nice, especially as it could reduce the load of the backend system overall as well - as you can build fetching strategies that is optimized, rather than grabbing stuff over and over using REST, meanwhile you're probably requesting data that is not going to be used.
So it's a win-win.
@compact isle Another suggestion that has been discussed, is additional "static" APIs for item and modifier data. I'm sure this has been suggested before, but would like to "+1" that. I'd be happy discuss that further if interested.
unfortunately for you, I'm in the boat of no official data until it's discovered in game naturally!
π
π
@compact isle well, i guess you guys atleast have some kind of spa? that would be a good point to start from (back to graphql comment)
It'd help trading tools such as poe.trade to index however.
also when it comes to modifier data, that should probably be represented in-game before we make an API to access that kind of thing
so you have to convince those people first
some kind of spa?
Let's say it'd help democratize the space somewhat.
Right now, it's quite a big hurdle to get over to get to that level, which is quite unfortunate to people who aspire to create altneratives
i mean single point app, well.. hard to explain it at 4am π nvm
oh, not really
I mean @simple ravine it'd probably be better for us to just host those kind of thing ourselves in the long run
that's just my personal opinion though
Probably, it would. There's a macro-economic aspect to it, which is beyond the technical discussion, which is the more auxiliary tools and apps that gets published around a game, the more relevancy the game gets on top of its own efforts. One great example is Riot Games and their APIs to their game League of Legends. They took it a notch further, and encourage people to build tools on it, and have a yearly(?) reward, where they acknowledge the best tool of the year etc.
I don't think our company wants that kind of relationship
No.. no relationship with Riot Games of course.
π
I mean relationship between tool developers and the company behind the game
It was merely an example on how a game developer leverages 3rd party developers to boost their own relevancy in the game jungle.
Sure.. I mean it's your company and game. But what they're doing, in my opinion makes sense.
yep, and I can agree with that but I'm not the one that needs to be convinced
there are benefits as well as downsides, and I think the downsides are hard to overcome for an indie studio
as well as any official API becoming another dependency to maintain
Oh I agree, official APIs is something you don't want to just smack up and be done with. Unless you have a glowing beta label on it
well, on another side there're lots of things you have to implement by yourself then (spent working hours, hire new devs etc.)
I'm a co-owner of an online business, with around ~90 staff, and we do around 2 million transactions a day, with a decent amount of 3rd party integrations. The tech team decided to release some of the internal APIs to some 3rd parties.
It was not a fun discussion around the way they just did it without planning.
well, you have to remember that GGG is a game company not an online API provider
if dev time can be spent on improving the game, then that takes priority
or in web devs case, on the payment / backend systems
Right, same here - not a game company, but... similar. We're not in the API business either
right, but hey, where's an AH then? π
But the integration, after some hurdles, made sense. It just had to be properly managed.
AH?
hah
@simple ravine auction house (trading system apart from /trade channel)
lol @radiant tangle
AH talk is above and beyond me I'm afraid π
love that Ranger-Cyclone weapon skin, i would skin transfer NPC to weapons
@compact isle Looking at a couple of interviews, it seems to me that the hierarchy at GGG is not super traditional. Is that correct? Seems to me that someone read the Valve manifesto π
I mean it seems pretty traditional to me
Do you have a CEO, CTO and other CxOs, product owner(s) etc?
aren't product owners a SCRUM thing?
hmm.. i agree with @simple ravine , at least from my pov (almost 6 yrs in game dev company)
but i guess that's related to the company size
@compact isle Nah, that's a Scrum Master, or a project manager
well we don't run multiple projects, so I'm not sure how relevant those positions would be
So when you see public appearances of Chris, he labels himself as lead developer.
we don't operate on scrum or anything like that
well, product owners, feature owners
Waterfall? :trollface:
well I mean, most of scrum is just dancing and rituals
the important part is to keep shorter cycles
which we do with expansion releases / patches anyway
dancing around the boards π
We structured it as having a product owner that is part of the management team, planning features with the design team, backend team and front-end team, based on feedback from the executives.
that's effectively how it works, just with some people having multiple roles π
It's quite intersting, because our companies are of similar sizes, if I understood it correctly
well a lot of our bulk is from our support staff which are kind of their own department
then art sort of has their own department as well
Same here, around 50% is CRM, VIP and first-line-support
probably slightly more.
But we positioned them in different offices, different timezones, and for some compliance reasons
So does that mean that Chris is till involved as a developer?
oh, btw, while i'm here and have a chance to ask a member of ggg team π @compact isle are you guys doing anyth to separate web from the game servers itself? i mean, when maintenance is going on game servers, all of your web resources also on stub.
oh man, Chris does so much
@simple ravine i don't think so, he's acting mostly as a "face" of the company and, i'd say, he is more "lead manager" rather then "lead developer" π
yeah @solemn crypt we're working on reducing / removing downtime from the website during deploys
but, ofc, i may be wrong
That is both cool and troubling at the same time π
But I know how it is, I am still involved in development. Similar journey, starting a company, grow a team and then refusing to step away from the details, even though the management parts required of you in combination makes your workhours 16 hours.
Hat off.
@elder hearth Hey, you made a script that would simulate mod-rolling, right?
Wondering if you would want to sanity-check my procedure for weighted randomization
private static IMaterializedModifier RandomizeNewModifier(this Item item, IReadOnlyList<IModifier> modifiersToUse)
{
var totalWeight = modifiersToUse.Sum(p => p.GetSpawnWeight(item));
var pickInt = Randomizer.Next(0, totalWeight);
var i = 0;
var pickedModifier = modifiersToUse.SkipWhile(v =>
{
i += v.GetSpawnWeight(item);
return i >= pickInt;
}).First();
var values = pickedModifier.Stats.ToDictionary(p => p.Stat, p => Randomizer.Next(p.Min, p.Max));
return pickedModifier.Materialize(values);
}
It's C#, but let me know if it's not understandable.. would be interesting to compare methods
I miss LINQ so much
You can't use it at GGG?
we don't use C#
@simple ravine looking at it
.net core / netstandard 2.0 - cross platform and all that
@elder hearth the two last rows are not part of the actual picking of modifier itself
that's completely out of my domain, man
How is this even possible?
I thought the Added Physical Damage to Attacks was 9-15 max.
is this in beta?
No, standard
essence?
I just put it in my inventory on character p_o_l_i_c_e (account name thezensei) if you wanna take a look for yourself
no, i rolled this using alteration orbs
wat
with essence
yes, with essence
yep, that's with deafening of contempt
but I am pretty confident I didn't use essence on this ring
then you broke the game
probably.
Dev talk :)
@mortal bone It's related.
oh new gems, Path of More incoming?
@simple ravine so about your C# code
modifiersToUse is a List with already filtered mods by your base item tags? (like "body_armour", "two_handed_weapon", etc?
@elder hearth Yes
ok
@simple ravine are you aware that there are some mods that adds tags to your item, and you will need to reevaluate your modifiersToUse (they affect GenerationWeight_Values)
just making sure if you have that before your code
can you say how you randomize it (pickInt), in Python i do
random.choices[modList, modWeightList]
and it is already gives me the mods
mod*
totalWeight is it a list or Int?
what is the structure of modList and modWeightList in this case?
var totalWeight = modifiersToUse.Sum(p => p.GetSpawnWeight(item));
This will get the total weight of all the applicable mods. (int)
var pickInt = Randomizer.Next(0, totalWeight);
This will randomize a number between 0 and the total weight of all mods. (int)
modList = ['ModIdHere', 'SomeOtherMod', 'MoreModsHere']
modWeightList = [1000, 500, 250]
Oh, okay so python has a weighted randomizer built in
yes
numpy?
random
ah ok
Base random library yeah
I'm using a cryptographic randomizer for mine
i was reading about having the best randomizer and so, but what i read so for the random one looks decent, also don't know what kind of randomizer GGG uses
what algorithm or something
probably something equivalent to that
based on using System.Security.Cryptography;
so with my example, you would randomize from 0 to 1750?
yes
π€ from 0 to 1000 you got 1001 numbers? or am i missing something?
well, I should perhaps have 1 to 1750
ok, so make a cumulative weight list, and stop when you reach that number?
1000, 1500, 1750
what would the difference be in comparison to the current method?
sorry its a question
I'm not familiar with cumulative weight list, and how it works, sorry
you are doing that i guess
i += v.GetSpawnWeight(item);
i gets 1000
then 1500
then 1750
?
well it doesn't sort the list based on weight
no need to sort
ok, yeah then I guess it's that heh π
.First()
first what? xD
var i = 0;
var pickedModifier = modifiersToUse.SkipWhile(v =>
{
i += v.GetSpawnWeight(item);
return i < pickInt;
}).First();
This will loop until i >= pickInt and pick that item (.First())
SkipWhile will skip all the items until criteria is met
and then chained with First to pick the first element
(edited, found a typo)
looks fine for me then
if you already handle GenerationWeight_Values with GetSpawnWeight i don't see anything that would cause an issue
@simple ravine GetSpawnWeight handles already rolled/crafted ModGroups too, right?
yes
well, not GenerationWeight as of right now, but it will, I am adding it in a second
private static int GetSpawnWeightImpl(this Item item, IModifier modifier)
{
var tags = item.Tags.ToList();
var mod = modifier.SpawnWeights.FirstOrDefault(c => tags.Any(e => e == c.Tag));
return mod?.Weight ?? 0;
}
all shields got new spawn mods
On class Item:
public IReadOnlyList<string> Tags =>
Explicits.SelectMany(c => c.Modifier.AddsTags).Concat(Base.Tags).Distinct().ToList();
item.Tags is with other words tags added by adds_tags on existing explicit mods and then concatenated with the base items tags.
i see
i need to work on my lambda expressions π’
seems like it does wonder and i'm not using them much
lambdas β€
@velvet fog poecraft.com dev said that there are some mods (Hybrid +life +ES, in Str armour for example) in .dat file but we can't roll or reproduce that in beta, do you know something about that?
@simple ravine do you know about chaos spaming an item with Multimod + Cannot chance prefix + cannot change suffix? π€£
i watched DemiGodKings videos
but the can add mods if you have open something
so when you roll 4, 5 or 6 mods, you need to subtract already existing mod count
@elder hearth I don't sure what you mean
demigod used some chaos before he hit 6 mods roll and then added that Fire Resistance mod
@velvet fog let me link reddit post
brownymaster post
he's pointing out that's probably a bug or not updated in the data
I don't get problem on that, checked the tags: str_armour, body_armour, armour
@velvet fog he is saying that he can't roll that ingame
but i'm not playing beta
i can't test
@elder hearth Brain super fried, mind reminding me how I apply generation_weight to final spawn weight?
I don't have beta access too, can't test it
private static int GetSpawnWeightImpl(this Item item, IModifier modifier)
{
var tags = item.Tags.ToList();
var selectedMod = modifier.SpawnWeights.FirstOrDefault(c => tags.Any(e => e == c.TagId));
var factor = modifier.GenerationWeights.FirstOrDefault(p => p.TagId == selectedMod.TagId)?.Weight / 100 ?? 1;
return selectedMod?.Weight * factor ?? 0;
}
I am assuming this is wrong?
@simple ravine its just a multiplier %
if it exists like 65, you get your spawnweight (1000 for ex)
1000 * 65/100
new spawnweight = 650
is it based on if tag exists at all on item, or on the modifier in question
oops, that is complete nonsense code, one sec
@simple ravine lets say your item have a spell damage mod (so it added 175 tag or "has_caster_mod")
the next time you try to sum up your weights, when it reach mods that have
"GenerationWeight_TagsKeys": [176, 175, 0],
"GenerationWeight_Values": [100, 65, 100],
for example, it need to match that 175, so you get that 65 value, then multiply with the normal spawnweight
Can it have more than 1 matching?
i think you can, like having %Spell damage + %phys damage (so you will have 175 and 176 tags) but you only grab the first item that matchs anyway
why only first?
its how tags works, you return your left most matching value
Find the Tags on the entity.
Match the Tags against the mod's list of tags.
For the found mods get the associated spawn weighting of the tag.
If the spawn weighting is zero, discard the mod, otherwise use it.
If multiple tags apply, the left-most tags are most important, where the right most tags are the least.
this is about regular spawnweight
not generation
its the left most on your new Mod list, not your Item Tags list
right, i was under the assumption that the first is the only one that matters
the first is the only one that matters
the first that matches?
well, its right...
private static int GetSpawnWeightImpl(this Item item, IModifier modifier)
{
var itemTags = item.Tags.ToList();
var selectedTag = modifier.SpawnWeights
.FirstOrDefault(c => itemTags.Contains(c.TagId));
var factor = modifier.GenerationWeights
.FirstOrDefault(p => itemTags.Contains(p.TagId))?.Weight / 100d ?? 1;
return Convert.ToInt32((selectedTag?.Weight ?? 0) * factor);
}
would that be correct?
that is given 1 item and 1 modifier, what would the final weight be
you may get float values, like 25 * 65 /100
right, is the factor and selectedTag in this function correct though?
actually, selectedMod should be selectedTag
ugh, it's getting late
so in pseudo it does this:
selectedTag = find the first tag (if any) in modifier's spawn tag list that has a match in item's tag list
factor = find the first generation weight (if any) that has a match in item's tag list and divide it by 100, otherwise 1
selectedTag gets the weight value, right?
spawn weight, yes
seems right
selectedTag = { TagId = "some_tag", Weight = 1000 }
ok, let's see if this works
before I get 3 hours of sleep xD
π’
@simple ravine when you get to a point were you can simulate some items we can compare results to see what we get
yeah, that was my thought as well
did you add mastercraft/essences/corrupted mods?
fuck essences, i hated doing that lol
lol isnt that related to some NZ language or something about NZ?
i can't remember
what is that spelldamagejewel?
if I understood it correctly it's something like "tales of the sea"
my logic apparently think it's perfectly fine to have a jewel mod on a steel ring
oh ok, you are rolling steel ring, how did you get that mod π
I think I need to take the Item Domain into consideration
yup
@compact isle I'm not gonna get a nasty seize and desist letter and a bunch of lawyer fees if I use talamoana.com will I?
hah I doubt it
catch me if you can, i'm in sweden! π
(although, I need an excuse to pop over to NZ)
ModDomainsID=1 for item
how many possible mods?
var totalMods = mods.Count(p => p.GetSpawnWeight(item) > 0); = 203
Steel Ring ilvl84
does that seem correct?
191 with prefix or suffix only
len(baseitem.basemods)
191
06:28
π±
@elder hearth I can't find any 'domain' information in the .ot-files. But I guess not too hard to map to Item Class though
@simple ravine yeah, there is no domain info there.
What i do is set domain to 1 by default and while i'm getting the tag from .ot files i look for texts like 'Jewel', 'Flasks' and change when necessary
aye, i think i will do that using the ItemClass information
I think i read from InheretsFrom metadata
yea
Are you going to make a lookup table for ItemClass?
I did embed the ItemClass information onto the BaseItem data
It would be really nice if the logic could be purely data driven, but I doubt I can do that right now without having to make a few assumptions
Something tells me that's not right
@elder hearth If you have time, would you like to run your thing to see how much it would take to craft the above mods on a Steel Ring
@simple ravine ilvl 84?
yes
ok
that seems slightly off lol
....slightly
slightly
@simple ravine I still don't simulate inside values rolls like 70-79 life (when crafting you pretty much will divine it anyway if its a top tier item)
i will try to get some tiers/mods (and above)
sure, that's perfectly fine
for all resistances 10%, can i get 'of the Kaleidoscope' (AllResistances3 - 9-11%) or AllResistances4+?
I'd choose AllResistances4
ok
what about pyshical damage?
Gleaming Req. Lv. 35 Adds (5-7) to (11-12) Physical Damage to Attacks
Annealed Req. Lv. 44 Adds (6-9) to (13-15) Physical Damage to Attacks
T1
ok
@simple ravine looks like you are Augmentating regardless of previous mod (if phys/life or resist exists or not)
but this looks hard to hit anyway :|
i let it run until it reachs 10 rings and it is still running
Maybe I'm not crazy afterall
private void AttemptReachGoal(Item item, Dictionary<Type, int> cost,
IReadOnlyDictionary<string, IReadOnlyDictionary<IStat, int>> desiredModGroupValues, CancellationToken ct)
{
while (!ct.IsCancellationRequested)
{
if (item.Rarity == ItemRarity.Rare)
Roll<ScourOrb>();
if (item.Rarity == ItemRarity.Normal)
Roll<TransmutationOrb>();
if (item.AllDesiredSatisfied(desiredModGroupValues)) break;
if (!item.SoFarSoGood(desiredModGroupValues))
Roll<AlterationOrb>();
if (item.AllDesiredSatisfied(desiredModGroupValues)) break;
if (!item.SoFarSoGood(desiredModGroupValues)) continue; // <-- added this (edit)
if (item.Explicits.Count == 1)
Roll<AugmentationOrb>();
if (item.AllDesiredSatisfied(desiredModGroupValues)) break;
if (!item.SoFarSoGood(desiredModGroupValues)) continue;
Roll<RegalOrb>();
if (item.AllDesiredSatisfied(desiredModGroupValues)) break;
if (!item.SoFarSoGood(desiredModGroupValues)) continue;
while (item.Explicits.Count < Math.Min(6, desiredModGroupValues.Count))
{
Roll<ExaltedOrb>();
if (!item.SoFarSoGood(desiredModGroupValues) ||
item.AllDesiredSatisfied(desiredModGroupValues)) break;
}
if (item.AllDesiredSatisfied(desiredModGroupValues)) break;
}
void Roll<T>()
{
_actions.Apply<T>(item);
cost.Increment<T>();
//PrintStatus(item, cost, desiredModGroupValues);
}
}
ah yes, there is a little bug in there
To craft
10 rings
2T1 Life/Add Phys + all resist (t2+) using alt regal
Trans: 1300
Alts: 1948571
Augs: 24640
Regals: 1300
Scours: 1299
π
i will debug and see what makes it hard, maybe too many suffixes to get that lucky regal
ok, i'll run multiple and average them as well
meh, hit a snag... rerunning now
To hit any desired prefix/suffix when rolling 1 mod with alt:
4000/159650 (2.5%)
To hit suffix with 1 mod already desired:
2000/98400 (2%)
To hit prefix with 1 mod already desired:
2000/61250 (3.26%)
To hit Life with regal if you have Adds Phys:
1000/((98400-6000)+(61250-6000)) = 1000/147650 (0.67%)
To hit Adds Phys with regal if you have Life:
1000/((98400-6000)+(61250-8000)) = 1000/145650 (0.68%)
going to run a ilvl 48 Diamond Ring, same stats
so.. it's not as slightly off as it may have seemed from the get-go
@simple ravine yes, but because we are being too specific too and ignoring all the rest, just for testing purpouses
I'm sure we are getting rid of Attack speed, Accuracy, +Str/+All, also +%Specific resistances
for suffix?
IncreasedLife7
AddadPhysicalDamage6
IncreasedEvasionRating7
AllResistances5
IncreasedAttackSpeed1
ChaosResist6
It's gonna cost 100 mirrors lol
i'm not experienced enough to run multi-threading here π’
i would need to refactor my code to suport it i guess
It's running multiple items in parallel. You don't want to run multiple threads for the same item.
Well I guess you can use multiple threads to filter those mods, and calculate the weights etc
var strategy = new AltCraftingStrategy(allMods);
var queue = new ConcurrentQueue<int>(Enumerable.Range(0, 1000));
var costResults = new ConcurrentBag<IReadOnlyDictionary<Type, int>>();
var tasks = Enumerable.Range(0, 8).Select(t =>
{
return Task.Run(() =>
{
while (queue.TryDequeue(out var _))
{
var result = strategy.Execute(new Item(baseItem, 84) { Rarity = ItemRarity.Magic },
desiredModifiers, CancellationToken.None);
costResults.Add(result);
}
});
}).ToArray();
while (tasks.Any(c => c.Status == TaskStatus.Running))
{
Console.SetCursorPosition(0, 0);
Console.WriteLine($"Queue: {queue.Count,-5} Concurrency: {tasks.Length.ToString().PadRight(10)}");
Console.WriteLine("\r\n");
var result = costResults.SelectMany(c => c).GroupBy(c => c.Key, c => c.Value).ToDictionary(c => c.Key, c => c.Average());
result.ToList().ForEach(c => { Console.WriteLine($"{c.Key.Name,-20} {c.Value,10:###,###}"); });
await Task.Delay(1000);
}
await Task.WhenAll(tasks);
when i needed to run alt regal with Regalias i started my script 4 times, and at the end i just added each result :p
nice!
So it's been running for 5 minutes with those 6 mods, and still no results whatsoever.
Ok, let me create a Chaos Spam strategy and see how that'll work out instead
let me upload the stuff to github, and I'll show you
Line 46 - 92, essentially
Not sure if that's all greek to you @elder hearth , let me know if you'd like me to explain it
@simple ravine the desired mods are currently all inclusive?
desiredMods = the required outcome
ok
With your chaos spam routine, do you exalt as well, or just chaos spam?
you can exalt it, because you will get 4 to 6 mods when spamming, sometimes you will get room for it
right - i'm just curious if you're doing it when you simulate
the only thing i simulated so far with exalteds were regalias
Mind sharing your code?
the alt-regaling logic?
yeah, just curious how your code looks like
ok, it was my first simulation so it contains some workaround for some not implemented things like calculating stats (in this case energy shield, i needed it to know what did i roll)
sure π
i'm commenting
@simple ravine https://pastebin.com/jKRmAHiX
mod crafting is that way because it is not fully implemented
regalias.get(986, 0) < 100
986 is the max ES possible, i was running until reach 100 regalias
the underlying library/framework, is that something you've made as well?
i used PyPoe for json files
baseitem.craftmod('StrMasterFireResistanceCrafted2')
no I mean the craftmod function etc
oh hehe
probabilities would be intersting to compare
yea, i just picked a random function above
Essence Mod could have higher ES on Regalias?
which PoE version?
def __rollrare(self, roll_type):
if roll_type == 'reroll':
self.__clearmods('regular')
self.rarity = self.RARE
if roll_type == 'essence':
affixes = random.choices([4, 5, 6], [65, 25, 10])[0]
affixes -= 1
else:
if self.basedomain == 11:
affixes = random.choices([3, 4], [65, 35])[0]
elif self.basedomain == 2:
print('Flasks can\'t be rare.')
return
else:
affixes = random.choices([4, 5, 6], [65, 25, 10])[0]
current_affixes = len(self.prefixes) + len(self.suffixes) + \
len(self.cr_prefixes) + len(self.cr_suffixes)
affixes -= current_affixes
if affixes > 0:
self.__add_affixes(affixes)
meh, it doesnt mark down
@simple ravine
i roll 4 mods 65%
5 mods 25%
6 mods 10%
if they are jewel, 65%, 35%
careful with item.Reset() in the future with those Cannont Change master mod π
hehe indeed
I want to find an as elegant method as possible
This code doesn't really adhere to SOLID entirely, nor will it - but I'm going to strive to have it as good as possible, so it's easy to build on
yeah no need to rush
@velvet fog is the poedb guy
http://cb.poedb.tw/us/cb.php I will make gem changes at weekend
@velvet fog do you have uniq changes already?
Hey guys, i have a question about running trade API, http://prntscr.com/fl6sqi is this server be able to do it?
Depends on what do you mean by 'it'
If you only want to poll trade api and, for example, send discord message when something you want is found then you don't need any power at all, the cheapest 5$ digitalocean vps will be more then enough
Im still learning, but the goal is to collect data and make graphs of unique item prices over time, i dont care about sniping, for now.
You will need a shit ton of space or offload the data somewhere
you will not need much cpu and ram then, not sure about storage though
Depends on how long he wants to run it, but if you just held league, prices and unique name it may be good for some time
but if you will optimise data collection properly, you can save a lot of space (for example store all daily data in separate table and then merge it into a single 'daily' price for each uniq for your graph)
Something like that is the plan, i dont plan on saving all the data in 3 month league
But as i said, im not very experience so this will be my learning project π
Poe.ninja does kind of what you are trying to do
Or perhaps not use sql-esque database for those type of stuff in the first place.
I'll let you in on a little secret. There are databases that are specifically built for these type of problems.
But they are built to be a cluster, meaning a 1-node setup isn't going to cut it
mr condescending guy are you going to tell us a name of such database?
I'm sorry, it wasn't meant to be condescending at all. I just got caught up with some things
I'd take a look at Datomic and Druid
We use Druid in production right now for our internal ad-tech solution, and it's great
I see
They're built to store temporal data, which is essentially what @keen owl was looking to do.
Datomic is more based on events, however it can be interesting to look at it briefly
Perhaps that fist comment came off wrong, but I see a lot of people default to SQL, even in 2017 π
Some form of a TSDB should work if all you're doing is timeseries data
No need to store the raw logs if you just want a chart
I would go with SimpleDB on AWS before I go for something large like datomic and the like.
No need for a distributed system for a hubby project
i understand all that hype about nosql
but honestly, i don't think this is a case for it
@keen owl I'm the author of poe-rates.com which is a site that lets you see price trends for unique, gems, div cards and so on. That may be obvious, but the amount of RAM you will have on your server will definitely condition the amount of items you can index and retrieve efficiently. The backend is running on an Intel Xeon W3520 (4 cores / 8 threads at 2.66 GHz+) with 16 Go RAM and 300 Go SSD storage. The indexer and the computing programs are written in C++ with MySQL storage. A bit old school I know, but it works nicely π
@lost wigeon Awesome website, do you maybe have data for whole league?
I only keep up to 1 month of data to keep everything running fast enough. I'm not sure I would be able to handle more data efficiently.
Too bad, i really want somethnig that can track whole league (only one only sofcore intrests me) so i can see trends and stuff like that, im a trading junkie. poeprices.info does a good job of doing that but sometimes intervals are way too long. example: http://www.poeprices.info/uniqueitempages/Xoph_s_Blood.html.
I guesss im gonna have to build it myself ><
Anyway, thank you everyone for providing ideas, suggestions and advice.
Sure, good luck with your project and feel free to ask for some advices
@mortal bone tbh I would just go with a SQL based database, it's not like they are doing anything intensive and when it becomes intensive they can move, over-engineering is a real thing π
Yeah, I know. I wasn't suggesting anything much more advanced than just a simple database solution
Someone was suggesting cloud based solutions and such
Refactoring and re-architecting tech-debt is also a real thing...
But getting a proof of concept/prototype doesn't require scale.
That I agree with
Even self use or a small number of uses doesn't require much
It is hard to suggest the solution when we only know part of the problem I guess
The way I interpreted it was
- to store time-based pricing information
- data was going to become somewhat heavy, due to entire leagues
Might have misunderstood the situation, but I agree that considering that he's learning, SQL might be the best entrypoint, however some of the other databases out there today aren't that much more complicated, and some also run in single-node settings. If you choose to use cloud-based solutions from azure / google / aws, then you don't really have to worry that much about scale.
The biggest headache we face is to deal with database infrastructure at scale. It becomes a big part of planning and execution ops-wise.
The other part about SQL type of databases are schema changes in production environments, where you have > 10M rows is - you don't really want to do that, and will be faced with data migration situations which require decent amount of work
one thing I found incredibly useful when first writing code for the stash tab api (and frankly the forums before as well) was to keep a local mirrored copy, either in flat files or something like kafka, to replay when fixing bugs/etc. on conversion to whatever schema. Much much faster than trying to download it all again.
That is a good piece of advice. If one want to take it further, taking a couple of sample-files to use in domain logic unit testing offline, and then further - integration testing on the latest data to detect any anomalies (this can be a little tricky, but useful if you have a live production site that people depend on)
@compact isle hi, I noticed that beta stash api started returning images with URLs relative to the domain (i.e. starting with /), how should I link to these images so that they are displayed?
They don't set-up a beta cdn for hosting beta images
looking into solutions for that
you can now load images with the betaapi subdomain
okay, thank you
@compact isle same for skill tree icons?
seems only for /Art/2DItem/
Hmm, damn
why would you want skill tree icons? o.o
'Website APIs' forum?
sshh
Is it a surprise in 3.0?
nah I was just going to move the developer docs to a forum so that I can improve on it easier
Easier beta icon download when people mess up their installs lol
Is there any possibility for a FPS lock besides vsync? I'd like my GPU to have lower load overall and vsync gives me fps drops out of hell x)
like some starting parameter or even in the options menu
Reason: There is some instability when streaming with dips here and there since I can only use NVENC as encoder. I cannot play/stream in fullscreen; OBS will either not grab the game or have some stuttering issues. For this an FPS limiter would be more than great.
does anyone know, if path of building takes the multiple hits of spectral throw into account in the damage calcs? can't seem to find it anywhere
it just multiplies the hit dps with the attack speed, but not the hits per projectile
limited it with nvidia profileinspector now, but that can't be a solution for forever. lesser knowledgeable users will have trouble with that
uh oh! i've just build an indexer with couchdb
works nicely but it's ugly.
moving forward with scikit-learn & classification for determining a price for a specific item
how does poe.trade knows how an item is sold or removed ? is the stash id unique and if an item is removed from it, will it appears in the next change id ?
also, is the item id unique for each item ?
(basic question but ive never played with GGG data)
When you add an item to your public stash, the whole stash will be pushed through the api. And when you remove an item, again, same stash but without the item. Poetrade indexes nearly every item out there. Parsing and saving all that data may take a lot of resources. However, just parsing the items without saving is low effort, you could technically even run it off your smartphone these days.
Can't say about stash/item ids though, haven't messed around with those much. I guess poetrade would make some use out of those
You will have to do delta checks
can I delta check with item id ?
yes
item id will stay the same, unless:
- it is being crafted on
- stacked / unstacked (for stackable currency)
- changed owners
ah perfect, thank you for the clarification
np
couchdb is so much fun
did you write an indexer and/or used a "document" storage database for these big json blob ?
I've done some preliminary tests so far, working on some other things right now, but what I'd do is separate each item into it's own Document
i was thinking the same since it simplify the view by a lot
are those milliseconds or seconds?
seconds.miliseconds
yeah, that isn't fast heh
i'll use ujson and see if it gets better
actually, it's python-couchdb that is slow, i'm around 0.20s (still slow) with no insert
0.2s for the entire change-result or 0.2s per stash inside of the result from ggg's API?
0.2s per stash - i've modified my code to create one document per item instead of one document per next_change_id
@timid hemlock Heya, is this a known issue? I was trying to use the Shared Items feature, but editing an item and then attempting to save results in this error http://puu.sh/wtlu1/e23ef677d2.png
@desert roost Well it is now! Fixed in the next update.
Anyone else find that poe trade isnt working?
works fine.. actually super fast right now
what is your account name?
lol
app is just not working.
which app?
poe trade.
I am pretty sure it just only ever works for around 90% of players.
And we just take turns getting fucked.
which league?
Standard
poeapp isn't indexing your crap either
jedininjman -> account doesn't exist according to pathofexile.com
@chrome topaz doesn't like you π
Prob not
cause I message him whenever his app isnt working
so he hears from me a lot
Not his fault though. It's just completely fucking ridiculous ggg havent added actual trade support. Like this game would not playable without its 3rd party apps. Completely absurd situation.
And still, they want to keep an official arms-length away from 3rd party developers, relationship wise
I want xyz just shut his shit down and we can allwatch this game fucking crubmle.
I think he gets enough traffic for it to pay a decent chunk of change
and yet ggg has done fuck all.
it's the same intelligence as when they say "we're not going to use BI tools to understand how to improve this game, but we'll use our guts"
that's how you'll be left behind in the dust heh
^ yep
Cool it would be awesome if ppl searched that way.
I find most of them search like this
wher oyu notice, none of my stuff shows up
@chrome topaz any idea why the currency trade interface does not show my listings?
It is the same for gear, I search for affixes my for sale gear has, and nothing comes up.
It doesn't make sense why it would show up on one but not the other.
@summer wadi yea which is why I have been trying to message the dev for the past few hours
Also its not the first time.
@lethal flume I am online.
and have been for hours.
and even messaged is thing to indicate I am online
two hours ago
Dont get me wrong, I equally appreciate your tone and helpful insight though
Especially the helpful insight.
Half of the other ppl I message are offline so I think it might just be bugged out. But it seems many offline ppl appear as online normally so who knows.
I think it's on ggg side, i don't see you in online api @foggy vortex
that it then? Its been this way for last 5 hours atleast.
@foggy vortex what's your ign that you are playing right now on?
account: jedininjaman
char: myfreedomandmybowthats
did you just log on?
Sev min ago yes, I was on the last four hours though.
yeah the api's broken, i'll ask them to fix it
@chrome topaz ty. Fyi whats the best way to contact you? This happens a lot but I dont want to annoy you or spam you on forum / discord / etc
it is completely pointless for me to pay this game without trade so this is imporant to me.
The ladder online and Public online checks are separate right?
it's because poeapp sets users as online when they update their tabs
iirc
the checks are separate
Cool
Then @foggy vortex start power leveling so you show up on any ladder. 95+ in sc and 90+ in hc.
@lethal flume Im good. I pretty much only play as a merchant and play random builds
you could also use acquisition to set online status
if i level to 95 would it fix this issue?
no, because I actually remembered I removed ladder check a while ago
rip
guess im installing more 3rd party shit just to play this game.
it took like 30 minutes to refresh so it was really unreliable and contributed a lot to the "i message online players but game says they are offline" problem
@chrome topaz ive always wondered what your stance on obvious proce manipulators are?
Like Husky Dingo is an obvious one. Dude never trades and has pages of listings.
Hes been doing it forever.
report them to ggg
ok
Hehe... couldn't resist the worst pun of the day.
@chrome topaz why would GGG do anything about them?
it's their game
I installed acquisition .6 and logged in, It saays online in bottom right corner
is that what you menat?
Anyone else having rotated monitors? I'm having some latency issues on the flipped ones
there's a tutorial somewhere on youtube, you need to put your online link in
I made thread listed one item in it and entered the thread number
entered the thread number in aquisition
you don't actually need to create a forum thread if you list items with the api
jesus. Just in time for me to get off and make dinner
thanks for help all, was it the aqusition stufff that put me online?
or ggg just turn server on
Hello i am making a XYZ killer can someone help
probably acquisition
is my script not working or is the stash api janky?
it is working fine now
though
http://cdn.poe.ninja/api/Data/GetStats nextchangeid has jumped back quite a bit
so mightve not been just me
jumped back?
i used that to start up my script, got trades from way back
should be in the 60mil range
i guess
yes
ive no idea what happened, but it started at around 2 hours ago
It's highly likely something happened on poe.ninja's side
And since my tool decided to grab a changeid from there, it messed mine up aswell
oh, you don't store the ID yourself, rather get poe.ninja's latest
I do, however in case of a hickup it grabs one from poe.ninja
And it overwrote mine, so yeah
ouch π¦
I'm gonna take a break from my utility tool and start working on an indexer as well
Utility tool?
Multi-purpose. It'll be a crafting simulation, trade-macro/item-info, and sniping tool
Oh nice, would be cool to see em all bundled up
yeah... I also wanted a bit richer experience than the current item-info/trade-macro ahk scripts provide
Some people are summoning @timid hemlock to add this
https://www.reddit.com/r/pathofexile/comments/6jl4qh/discussion_doryanis_fist_new_ability_lightning/
making an indexer is easy
try adding machine learning to it to predict the price of an item
yolo regression
and what features are you adding?
i wish i've indexed at least 3 month of data
which are categorical and which are numerical?
I don't see any machine learning algorithms in the link you posted. It's just a linear regression model
yeah, well, i must admit that behind the buzzword, it is a model that i'm planning to use (and this model is probably the most basic one beside classification model)
it's considered machine learning but yeah, it's only some basic math/stats π
so you don't use any support vector machines, neural networks, bayseian stuff etc?
nah and i don't know how to use tensorflow yet
i'll do simple stuff for now such as predicting the price of a "prophecy wand" and i'll throw up additional variables such as item properties
are you doing this on items or just currency?
heh, allright
it's been discussed at length, and some people already tired this, fyi - but don't get discouraged though
what i am trying to say is that throwing some obvious parameters into a regression model, will probably not be good enough for a good probability/accuracy
yeah... i'll see how it goes, maybe i'll try the classification model to estimate the value of the item.. it'll be easier
you'll spend more than 80% of the time cleaning and preparing your data, and 20% sciencing the shit out of it
and i'll end up playing the game instead, right ? π
i wonder what sgdb poe.trade is using
sgdb?
database
I know as much as he's using a lucene based (elastic search), but not sure if he stores it in a canoical database as well
i wonder what is the optimal setup for indexing GGG feed
u said it was easy...
ex: an indexer that is able to track stashes removed items
i find it easy to store the data in couchdb or postgres but updating/manipulating it in an effective and efficient manner is more challenging
you'd probably want to move the logic as close to the data as possible - if possible, manipulate the data in a stored procedure
fetching, mutating and updating might not be your best choice
i'd try to use relational db for the storage first time. in postgres there is also jsonb type so we can have table with basic fields (ids etc) and put all variable stuff into jsonb field
Not sure about performance though, but it may be enough
it's work for small scale, for me, in garena taiwan trade search, only have 3.5m to 4m items for standard league
using Elasticsearch https://www.elastic.co/ will better, but im lazy
hey guys, What is the current best way to search for an item listed in poe.trade
doesnt need to be the fastest, like an item sniper just one that can put in certain values and search, obviously I can write a script to fill out the form using post and get the response back but wondering if there is a better way
before I started was hoping the link up the top would be something like poe.trade&search=rare+ilvl65+dmg43 wtc but its seemingly random words hiding it
you can use GET instead of POST
@chrome topaz when you make the get request does the server just return the entire page source?
@opaque hatch use live search
@ancient nymph what do you mean by this? the live sreach still uses the random letters in the name. What I am trying to do is submit a query by filling in certain fields and then return the result.
the idea is that I can in the end use the ctrl + c data from in game to automatically search for rares of similar values to find its worth
you dont need to search poe trade for that, just highlight t1 rolls
?
3 Tier rolls are usually worth something, unless its a base no one uses like assassin garb
3 tier 1 rolls*
I think we are on different wavelengths here
no, you are trying to compare items on poe trade to find value??
yes
yea using the tier 1 count is a good heuristic to bypass that, unless you just trying to learn
yes sort of learning
but
the core focus of this
is to SEARCH poe trade for similar items, I have a few ideas from some other functionality probably nothing that hasnt already been done.
i think you can dothat why highlighting hte tier 1 rolls of hte item then searchign those, otherwise you get too limited search
knowing if it had 5 t1 rolls tells me nothing about its value in that market without further research
yea you just search those, if you add in the other rolls, you might find just a few items and it skews your valuation
ok yeh I se what you are saying now
so back to my original thing I am hvaing trouble figuring out what the best approach to getting information back from poe.trade. Since the links are randomly generated or at least appear to be it sems difficult to send information off and recieve information back. Like i need a combo of GET and POST to achieve the result
you can scrape the table for data, althought if i remember right theres a api i think
PoeTradeMacro's advanced search uses something like that and builds an url with selected fields
o i got it now @opaque hatch just download the poe api yourslef and search it yourslef, instead of using poe trade, that would be easier
You can take a look at poetrademacro source code to learn how to build their URL
I dont think I ahve the power to scrape through the entires worlds stash tabs ahah. @elder hearth Yeh I am going to have a look at that now cheers
yep it seems they ahve figured out hwo to build the link or at least generate the page
@opaque hatch http://pathofexile.gamepedia.com/Public_stash_tab_API
its not a large file
@opaque hatch what is your goal? Are you a user or dev? If user just use poetrademacro or http://poeprices.info
wannabe dev
man what language are you doing this in @opaque hatch
it would be easy to query that json in python, they already give all the keys
probably python or c# if I wan to make a gui for it
i have been looking at that page you sent me, so my understanding is that file contains everything
yep
you will just have to keep updating the api file yourslef
yeh
the file is only 4.12mb so pretty managable
well the one I just tested was anyway
@chrome topaz the url structure for searches - those are server-side generated IDs, I presume?
they seem too short to be something else?
it's md5/hash for queries
right, so it's nothing you can generate client side, similar to skill-tree query
@opaque hatch a simple way of getting a poetrade search url
def get_example_pt_url():
payload = {
"name": "Grand Spectrum Viridian Jewel",
"rarity": "any",
"league": "Legacy",
"has_buyout": 1,
"online": "x"}
r = requests.head("http://poe.trade/search", data = payload)
return r.headers["Location"]
@deft jolt thanks sardel sorry Just seen it now. Will check it out when I get home π
thanks that was exactly what I wanted mate!
not I just get the source of that link and webscrape it I am assuming
So i have most of the script working thanks for Sardel, however I am having issue specifying the different mods avaiable into the payload. Been fiddling around the inspect tab for an hour or so now.
hmm, funny how translatoin texts says "Supported Skills deal {0}% increased Elemental Damage" on opal rings
meanwhile in game it says "{0}% increased Elemental Damage"
any idea why that is the case?
nope haha
I am still trying to figure out how to add mods into that search payload.
"mod_name": "# Life Regenerated per second",
"mod_name": "63",
"mod_name": 2,
Are the only combinations I can think so so far, I just keep getting 500 error. I have figured out every other field except for this one
I ahve also tried with prop_mods
I figure I need to do something with an onclick request or something to actually add the property to the page.
ah, figured it out - RePoE was initially grabbing "wrong" translations
@opaque hatch
payload = {
"name": "vaal regalia",
"rarity": "rare",
"league": "Legacy",
"online": "x",
"mod_name": [
"(pseudo) (total) +#% to Cold Resistance",
"(pseudo) (total) # Life Regenerated per second",
"#% increased Energy Shield"],
"mod_min": [10, 1, 100],
"mod_max": ["", 10, ""],
"group_type": "And",
"group_min": "",
"group_max": "",
"group_count": 3}
empty fields are important
ah ok
its funny I just actually moved on to using the stash api
becuase I could not figure it out
this might be a dumb question, and I am pretty sure I know the answer just want to check, I found out that the file size returned from the stash api is roughly 0.5mb. Does this mean that everytime I request it I am downloading 0.5mb. Thereofre if I caleld it once every 2 seconds and ran it for an hour it would download roughly 0.5 30(per min) x 60(per hour) = 900mb per hour?
I got that here
more or less yes
hmm, ok how on earth do people run these sniping tools on their home computers
unlimited network plans
haha ok
or you could just get a server for around $4 a month
and i guess I would also be correct in saying that if I only ran to tool every say 10 seconds I would miss data, and potentially items
no, you wouldn't miss anything
however
if you're going slower than the data is being generated
you might end up getting delayed trades
as far as I can tell the json api only returns the last 20 accounts to update their public stash
so lets say only ran the script every 10 minutes and 500 character stashes got updated wouldnt that mean I miss 480 of them?
if you follow the nextchangeid from the api, no
Oh wait hang on I think I see my mistake now, I am using the most current changeID always insterad of using the one from the previous json file
yep i get it now, I am currently just grabbing the most recent one
so really you could build an entire database of everyones stashes from the moment you start he script as long as you kept it running. Which I guess is exactly what poe.trade is
Ye
wait you don't have unlimited network on your broadband connection?
is that common in Australia with other words?