|
Author |
Thread Statistics | Show CCP posts - 184 post(s) |
Cor'len
Remnant of an Empire Psychosomatic.
2
|
Posted - 2014.04.20 00:05:00 -
[1] - Quote
As both a PI enthusiast (who need to go set up 20+ planets again and oh god the RSI) and an API dev, getting PI information exposed in the API makes me super happy!
Keep up the good work, and it'd be awesome to get a listing of how full each spaceport/etc is. |
Cor'len
Remnant of an Empire
2
|
Posted - 2014.07.30 16:02:00 -
[2] - Quote
Awesome! I'm going to be using that too, and I'm not even writing an Android application!
I did have some issues with the code though - I've got it running (had to compute numIterations from total running time divided by cycle time, and there were a couple issues with variable names), but it's not computing identical results to what the EVE client does. Is it doing integer math and having issues with me using floats, or? The difference is generally pretty slight, but the total ends up being off by 13% or so. I'm also using the default decayFactor (0.12) and noiseFactor (0.8), because I didn't find any overrides in dgmTypeAttributes.
(Also, I changed it to use sec=1 as opposed to sec=10 000 000, and I'm feeding time in as Unix time with installTime clamped to zero and expiryTime adjusted to match, because currentTime also starts at zero. You get the same results if you leave installTime as-is and just add it to currentTime; if you don't do either, you get nonsense results because cycleNum starts at some hilarious offset.)
Any tips? |
Cor'len
Remnant of an Empire
2
|
Posted - 2014.08.07 11:50:00 -
[3] - Quote
Cor'len wrote:Awesome! I'm going to be using that too, and I'm not even writing an Android application! (bluh bluh broken stuff) Any tips? Turns out that a variety of things went wrong when I tried porting it to PHP. If anyone's interested, here's a C# port which is accurate enough (0.006% error - probably some rounding issue): http://pastebin.com/8tgU4E8K
I also reorganized some of the code - no point in keeping the constants inside the main loop.
Thanks again for being awesome, CCP FoxFour! |
Cor'len
Remnant of an Empire
2
|
Posted - 2014.08.07 18:01:00 -
[4] - Quote
CCP FoxFour wrote:You're more than welcome! Thank you so much for sharing your code and digging into this. If you have the chance, and think you can, please do go back and update the EVElopedia entry to make it better/more understandable.
Done. I also removed some redundant code (lots of math to get cycleNum when you can just use your iterator variable...). It's also entirely in spec now - perfect match to the EVE client, give or take a single unit. |
Cor'len
Remnant of an Empire
3
|
Posted - 2014.08.16 01:01:00 -
[5] - Quote
I certainly would love to have the ability to make corp keys corresponding to the roles I have ingame - I had to pester my CEO for weeks to get one made. And I'd really like a corp AssetList key which didn't require divulging all the secret items in the secret hangars to anyone who has it - if I could make one myself that used my roles, that problem would no longer apply.
I'd be rather surprised if you ever can do it, though. We can always hope... |
Cor'len
Remnant of an Empire
3
|
Posted - 2014.09.10 00:23:00 -
[6] - Quote
Not the greatest relationship with your boss, I take it? |
Cor'len
Remnant of an Empire
5
|
Posted - 2014.09.15 21:01:00 -
[7] - Quote
Roshni Ellecon wrote:I've searched for this a number of times but can't find the answer so please excuse me if it's a duplicate and point me to the thread or resource.
I'm having problems with the PlanetaryPins API. What do I need to do trigger a refresh in the data? I've tried keeping the planet open in Planet Mode and clicking on each facility to open them up. Still the data is stale. I don't mind jumping through hoops to get refresh the data but at this point I'd be better off manually inputting the data... and I hate data entry.
As Foxfour said, the data is only updated when you view the planets (or customs offices) - you may even have to import/export/change something for it to update, I haven't tested it.
If you want to know the "current" state of something, you essentially need to simulate all the features of PI yourself, and internally iterate over it until you can get from lastUpdated to the current time - this is what I'm doing.
Feel free to evemail me if your application is written in PHP - I've got a fairly complete and stable PI simulator. It's missing some features I don't use myself (multiple output routes, silos), but I'm sure something could be done about that. It's still a work in progress, mind you.
(The awesome thing about running the sim yourself as opposed to relying on a pre-computed result is that it only requires an API update when things change, and it automatically generates alerts if something's not routed correctly, if factories don't get enough materials, a launchpad gets full, etc.) |
Cor'len
Remnant of an Empire
5
|
Posted - 2014.09.17 12:33:00 -
[8] - Quote
So on the matter of PI:
Any chance of releasing the code that generates pin names? I expect them to be derived from the pinID, and hopefully not run through too many iterations of CCP's magical randomizer. I'd like to show alerts for various things, and it'd be convenient to be able to use the same naming scheme as is used ingame.
|
Cor'len
Remnant of an Empire
5
|
Posted - 2014.09.17 16:04:00 -
[9] - Quote
Kali Izia wrote:I've only tested with one pin because I'm lazy but this should work:
- The name is calculated using the string '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- Calculate 5 indexes using pinID / len^i % len, where len is the length of the string above, and i is 0 to 4
Thanks! Didn't work out of the box (probably because PHP is horrible; the modulo operation (%) returned negative numbers...). Changed $pinName .= $baseStr[$pinID / pow($baseStrLen, $i) % $baseStrLen]; to $pinName .= $baseStr[fmod($pinID / pow($baseStrLen, $i), $baseStrLen)];
Works like a charm now. |
Cor'len
Remnant of an Empire
7
|
Posted - 2014.10.13 10:56:15 -
[10] - Quote
Would it be possible to set the installTime (or expiryTime) property for PI factories depending on whether they're running or not?
Currently it's impossible to tell whether a factory pin (Industry Facility) is waiting for more materials or not, unless you have a sizeable buffer of said material ready to fill it up - it may have a partial fill but still be running, as materials are consumed upon activation. This makes it pretty much impossible to accurately predict yield, because you will lose the first cycle or two when simulating it.
I could obviously assume it is running if it's not been idling for very long, but it's not reliable. |
|
Cor'len
Remnant of an Empire Independent Stars Allied Forces
8
|
Posted - 2014.12.11 18:28:06 -
[11] - Quote
Hey, CCP Foxfour!
Could you take a look at the cache timer for the MemberTrackingExtended API call? You mentioned that you'd look into reducing it a few months ago, and it'd be very convenient if you could do just that. ;)
|
Cor'len
Remnant of an Empire Independent Stars Allied Forces
10
|
Posted - 2015.09.07 18:39:30 -
[12] - Quote
Enrique d'Ancourt wrote:Hi, After reading all of this thread (please ISDs, cut out the non-topic whining of the wormhole pvp please!), I can tell you that PI only updates when you press "submit" in-game in the planet view. Luckily the method for calculating resources gained by extractors are also in this pastebin note: PasteBin CalculationAnd in this thread: Industry calculationsCCP FoxFour does an awsome job. Sadly, the gems in this thread are hidden by a sheer volume of similar posts, many of which are due to the sparse documentation available ( that's a big fat HINT!)
Totally late, but please use the code in the Industry Calculations wiki link. They're more correct - the pastebin code has a rounding issue.
Source: I wrote both sets of code, as it happens.
(Edit: Also, if you have questions about PI math in general, shoot me an evemail and I'll help you out.) |
Cor'len
NERV Reborn Independent Stars Allied Forces
10
|
Posted - 2015.09.23 11:41:03 -
[13] - Quote
Was poking the AssetList API and noticed that only laser POS turrets list their contents? Projectile and hybrid turrets don't, at least.
Should I file a bug report? ISTR this was mentioned before, but a quick google didn't get me any results. |
|
|
|