EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Get Trade Stats For Sector/s
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 6665 on topic
Location: Leicester
Thank you for registering your game
PostPosted: Thu, 21. Jun 12, 21:42    Post subject: Get Trade Stats For Sector/s Reply with quote Print

Can anyone see how this works?
It returns a load of arrays of wares and numbers, and I assume the indexes of the values relate, so the first ware and the first number in all of the integer arrays are all to do with that ware.
But what are the numbers, how does it get them, and why does it return 2 lots of everything? One products, one resources?

It's just, I really need something that basically does what this nice new script seems to do, which is brilliant. Very Happy


_________________
_______________________________
The Trade Plugin - Finally out of Beta.
STFUnit - Military Plugin
Find All Crates/Ships!
I Feel Like Killing GoD.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 6665 on topic
Location: Leicester
Thank you for registering your game
PostPosted: Thu, 21. Jun 12, 22:06    Post subject: Reply with quote Print

As far as I can work out, it finds an array of 9 things in this order:

- The number of stations it picked up.
- Unknown array of values, possibly related to production.
- Array of values. (Max storage)
- Array of values. (Current storage)
- Ware array. (All resources and "goods")
- Unknown array of values, possibly related to production.
- Array of values. (Max storage)
- Array of values. (Current storage)
- Ware array. (All products)


For example, I got


246, 0
1328, 16
422, 3
Space fuel, Incendiary bomb launcher

For Weaver's Tempest, and I can confirm that 1328 and 16 are the respective max totals, 422 and 3 were the current totals, but I have no idea what the 246 and 0 is.

I've just checked again and I'm still getting 246... I think it might be the amount which can be made with current resources, as the IBL forges are on 0. I'll 1000xSETA and see what it's like in a few "hours".


EDIT:

A short wait and some value checking shows it doesn't seem to be related to price at all... nor the amount stored, or resources... I'll do something else and take a look.

---

I filled one of the IBL forges up and checked again, no change from 0. No change after it took the resources and began to produce either, and it has enough for more cycles so it's not something related to that. Space Fuel's value has gone up and down in that time, between about 242-248 depending on when I've checked. Obviously no trading has taken place: Yaki.

---

I removed ALL the resources and products from the SFDs, no change.
I deleted one of them. The number halved exactly.
Huh.


EDIT2:

New game. 0 for both of them.
0.
0.
0.
252 for spacefuel.
WHAT?
Y U CHANGE!
Y U CHANGE SUDDENLY TO BIG NONSENSICAL NUMBER.

EDIT3: Updated original information, didn't notice station number.
Still no idea what the first set means mind you.
I give up for now.
I tried it on all the cluster sectors around Argon Prime, and Energy Cells for example in the PRODUCT area had a value of hundreds of thousands... it could be some sort of demand value, but if it was then why would there be an entry for it in product/good and resource?

EDIT4: I meant resource/good and product, and I'm posting this here instead of just altering because I've just realised it might be of significant interest... why group the RESOURCES with the GOODS? o_O They act like products in every other circumstance, I'm sure. But it sure does it that way, for example the Yaki only have SF and IBLs under one, obviously Products, whereas the other contains Wheat, Ore, etc. Obviously Resources... but also CBE, ET, RO, and software...

EDIT5: I've got a feeling Litcube would like this thread... crazy adventures, ahem... Wink


_________________
_______________________________
The Trade Plugin - Finally out of Beta.
STFUnit - Military Plugin
Find All Crates/Ships!
I Feel Like Killing GoD.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
UberWaffe





Joined: 25 Apr 2012

Location: Orbiting reality at +3 irrationalities

PostPosted: Fri, 22. Jun 12, 10:02    Post subject: Reply with quote Print

Taking a shot in the dark here, but is this not possibly the local demand?

A demand for 252 Spacefuel and 0 Incendiary Bomb Launchers makes sense. Logically, if you have how full (%) a station's product stocks are, you know how much of the local demand it is meeting (in %).
(Station.Product.Current / Station.Product.Max) * 100% = %Demand met.
(Space fuel: 422 / 1328 * 100% = 32%)
Along with local demand, you can see how much (in amount) is unmet.

(100% - %Demand met) * Local demand = Unmet demand amount.
(Space fuel: ( 100% - 32% ) * 252 = 172 )

And from that you can determine how many stations that produce that product can still be supported.


The:
0.
0.
0.
252 for spacefuel.
Is probably due to pirate base or something similar popping up.

Again, shot in the dark here.

Back to top
View user's profile Send private message
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 6665 on topic
Location: Leicester
Thank you for registering your game
PostPosted: Fri, 22. Jun 12, 12:54    Post subject: Reply with quote Print

There's a lot more than room for 252 space fuel... and remember, the number halved exactly when I blew up one of the distilleries. Even though it was empty.
I was considering the number created per hour, or something, but that makes no sense; it was fluctuating up and down...


_________________
_______________________________
The Trade Plugin - Finally out of Beta.
STFUnit - Military Plugin
Find All Crates/Ships!
I Feel Like Killing GoD.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
UberWaffe





Joined: 25 Apr 2012

Location: Orbiting reality at +3 irrationalities

PostPosted: Fri, 22. Jun 12, 14:12    Post subject: Reply with quote Print

Do you know what !script it uses for this? I'll take a look inside it tonight.

Otherwise I'll just dig around tonight and see if I can find it.

Back to top
View user's profile Send private message
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 6665 on topic
Location: Leicester
Thank you for registering your game
PostPosted: Fri, 22. Jun 12, 14:30    Post subject: Reply with quote Print

I'm not sure if there's an actual visible script call. It seems odd to me to make it an actual useable function instead of just any other script which you can call, and it makes it more or less impossible to work out what it's doing... ¬¬


_________________
_______________________________
The Trade Plugin - Finally out of Beta.
STFUnit - Military Plugin
Find All Crates/Ships!
I Feel Like Killing GoD.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
UberWaffe





Joined: 25 Apr 2012

Location: Orbiting reality at +3 irrationalities

PostPosted: Fri, 22. Jun 12, 14:58    Post subject: Reply with quote Print

Okay, another shot in the dark here.

Is it not perhaps the amount of goods traded in the last hour?

0 IBL were traded, 246 space fuel was traded. (In requested sector(s) only perhaps?)
SETAx1000 variation would then suggest slight fluctuation in how much was traded over time.

It could also explain why ECells have such large values, and why a restart went:
0.
0.
0.
252. (<- First trade occured here)


That would also make sense why it can pass back the same info for resources. (Expect that would be how much were bought, as opposed to sold in the sector(s) over the last hour).

Again, shot in the dark.

[EDIT]Also, the halfing when you destroyed a factory might be because that factory's trades over the last hour is then no longer countable. Perhaps its grabbing the data from the factory.[/EDIT]

Back to top
View user's profile Send private message
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 6665 on topic
Location: Leicester
Thank you for registering your game
PostPosted: Fri, 22. Jun 12, 15:05    Post subject: Reply with quote Print

Unless there's a local on the factory, then it wouldn't be able to get that info surely. Still, if it's storing that, impressive. I'll do a quick check, should be easy enough to check.

More importantly, I started work on what I needed anyway, as all the values I need are given. I just got sidetracked with wondering what the stuff I didn't understand was, in case it turned out the be unexpectively helpful.


_________________
_______________________________
The Trade Plugin - Finally out of Beta.
STFUnit - Military Plugin
Find All Crates/Ships!
I Feel Like Killing GoD.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
UberWaffe





Joined: 25 Apr 2012

Location: Orbiting reality at +3 irrationalities

PostPosted: Fri, 22. Jun 12, 15:20    Post subject: Reply with quote Print

Quote:
More importantly, I started work on what I needed anyway, as all the values I need are given. I just got sidetracked with wondering what the stuff I didn't understand was, in case it turned out the be unexpectively helpful.

Good to hear. I'll stop after this then.


Quote:
Unless there's a local on the factory, then it wouldn't be able to get that info surely.

Which might explain why it is a built-in function and not a script. Might only be accessible by the engine on a lower level. Confused

[EDIT]I'm thinking that perhaps the GoD-engine uses these same numbers to decide when to kill/create stations. Essentially such economic decisions would have to be based on how a station had sold vs. bought in the last hour (or some time period).
Egosoft would have had to code it to make their GoD-engine work, so they are just reusing it for the player's sake.[/EDIT]

Back to top
View user's profile Send private message
EmperorJon



MEDALMEDAL

Joined: 29 Dec 2008
Posts: 6665 on topic
Location: Leicester
Thank you for registering your game
PostPosted: Fri, 22. Jun 12, 15:24    Post subject: Reply with quote Print

Except I'm not sure GoD works that nicely. Razz You may be on to something similar though.


_________________
_______________________________
The Trade Plugin - Finally out of Beta.
STFUnit - Military Plugin
Find All Crates/Ships!
I Feel Like Killing GoD.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Sun, 26. May 13, 08:19

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2009
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.21451 seconds, sql queries = 55