[SCR] [07.02.11] Trade Overview 2.05 by ScRaT

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
wga
Posts: 34
Joined: Thu, 19. Feb 09, 15:04

Post by wga » Sun, 29. Jan 12, 09:02

When buying Cargo Bay Extension, the unit bought with the total price, however 'Trade Overview' calc as unit * total price. Oh. ...

How about not to record the Cargo Bay Extension (enginning tunning, rudder ...) trade. Or only record one unit for extension buying if player want to know the ship real spend.

Dakota-
Posts: 128
Joined: Sun, 25. Dec 11, 06:14
x4

Post by Dakota- » Sun, 29. Jan 12, 09:04

I was going to report that too, but kept forgetting.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Sun, 29. Jan 12, 10:20

@wga

Thanks for your input. Unfortunately, because of my upcoming exams I don't have much time at the moment. Not recording specific wares is actually quite easy - you only have to filter them in the script "plugin.trov.sell" and "plugin.trov.buy", by putting the following lines at the top:

Code: Select all

skip if not $ware == {Cargo Bay Extension}
  return null
So if you want, simply put these lines in yourself - you really can't break anything.

Greetings,
ScRaT

Insolentfool
Posts: 8
Joined: Tue, 23. Feb 10, 23:29

Post by Insolentfool » Sun, 29. Jan 12, 23:41

Hi, i saw that someone was running this in AP but when i have tried to use it i cant see any of my ships.

Add new objects
Remove objects
settings



when i pick add new objects it asks me to input something, nothing comes up no matter what i type...




Edit: typing " " got me results, no idea why "your" for example didn't work.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Mon, 30. Jan 12, 09:36

Edit: typing " " got me results, no idea why "your" for example didn't work.
I guess "Your" (uppercase) would have worked.
You should also be able to search e.g. for transporters by entering "TS" (the ship type).

Greetings,
ScRaT

wga
Posts: 34
Joined: Thu, 19. Feb 09, 15:04

Post by wga » Sun, 5. Feb 12, 05:29

How about add a 'clear all logs' in settings ? Sometimes we may want to trace all transactions from new biginning .. :)

Sanderfox
Posts: 26
Joined: Mon, 25. Feb 08, 23:45
x4

Post by Sanderfox » Wed, 7. Mar 12, 15:48

I'm having a weird issue here. For some reason the Trade Overview shows a nice amount of profit from the last several hours that I've played (with seta on for a large part). I started around a million credits profit and it's now at 3.3 million credits. At least, according to the Trade Overview window. When I look at my account credits, it has gone up from around 200k to 600k.

As you can see, these numbers don't really fit together. Any idea how this is possible? (the only thing bought by the universe trader were some cheap fighter drones, so that doesn't really make up for the large difference) Thanks for your time.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Wed, 7. Mar 12, 18:41

That's weird. Did your traders maybe buy that many extensions (speed and rudder)?
How about add a 'clear all logs' in settings ? Sometimes we may want to trace all transactions from new biginning ..
Once I get to work on this script again, I can add that.

Greetings,
ScRaT

Sanderfox
Posts: 26
Joined: Mon, 25. Feb 08, 23:45
x4

Post by Sanderfox » Wed, 7. Mar 12, 19:44

ScRaT_GER wrote:That's weird. Did your traders maybe buy that many extensions (speed and rudder)?
Afaik, all extensions were already installed by me before I activated the universe trader.

It is really weird. I tested it again (I cleared everything first) and even did some calculations. The values in the Trade Overview seem to be correct (profits per item seem correctly calculated and then added up for total profit), but the current total profit of 3.5M does not compare to the ~780k that was added to my wallet.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Wed, 7. Mar 12, 20:36

Mh, unfortunately I can't tell what's going on. You could try to reset all your traders and then observe the trades more closely. It's known that extensions aren't calculated properly, but that's only a problem when your ships buys them, which result in a huge deficit not in a profit...

EDIT:
Just to be sure: You are not talking about the profit/stazura, but the overall profit - right?

Greetings,
ScRaT

Sanderfox
Posts: 26
Joined: Mon, 25. Feb 08, 23:45
x4

Post by Sanderfox » Wed, 7. Mar 12, 21:07

Overall profit indeed.

I looked the logbook for my universe trader and found something interesting.

http://dl.dropbox.com/u/3206574/LogComparison.jpg

The above shows a comparison of log entries of Energy Cells. As you can see, all sell/trade values overlap. However, many buy values are wonky. For example, the second item for example shows as a buy order of 3517 units in the Energy Cells log, but as a buy order of only 190 units in the General log. This will mess with the profit calculation, because selling 3327 units when you have only bought 190 will give much more profit than selling when you have bought 3517. The same log shows many more of these oddities.

Am I missing something (it happens :P) or is this a bug that has been overlooked by accident? Thanks in advance for the help! :)

Update: in addition, I also checked out some others items and found something else. Looking at my General log, there are no buy orders shown, except for Energy Cells. For all other items, only Trade orders appear.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Thu, 8. Mar 12, 00:32

Mh, it could very well be that there is a bug hidden in there.
However, concerning the first few trades, I actually think they are correct.

The thing is, that I try to unify any sell with a corresponding buy, resulting in a trade.
So, first your trader bought 370 EC (most likely jump energy) and then goes on to buy another 3517 EC. Then it sells 3327, resulting in having traded 3327 EC at a profit of 7 credits each.
The leftover at this point is 190 EC (not counting the jump energy).
Then the trader goes on to buy another 3427 EC and sells 3327 again, thus he traded 3327 EC with a profit of 7 credits each and 100 EC leftover.

I think it continues like that (correctly).

The reason why the other wares only have "trade" oders is due to the special role of EC as both jump energy and resource. When trading with EC, universe traders will always keep some of the EC as jump energy, which results in incomplete trades.

Greetings,
ScRaT

Sanderfox
Posts: 26
Joined: Mon, 25. Feb 08, 23:45
x4

Post by Sanderfox » Thu, 8. Mar 12, 01:01

Thank you for the explanation. I was not aware trade meant buy+sell. Together with the leftovers, that would indeed explain the results in the images.

Somehow there must still be a bug somewhere though. Even though all the calculation in the Trade Overview now seem to be correct (I did some more calculations as well), the amount of profit I am earning according to the Trade Overview is so much more than I really earned. My trader was attacked 15 minutes ago and I received a notification of that, which also included the total money that had been made by the trader. This was about 2.87M, while the Trade Overview indicated a profit of more than 6M credits.

I am going to reinstall the script to see if that works. I installed some other scripts afterwards that may or may not have changed something.

blue fox
Posts: 167
Joined: Sat, 14. Feb 04, 18:02
x3tc

discription on setting up

Post by blue fox » Fri, 9. Mar 12, 01:21

I have installed the Script and have set up the hot key but I do not know what todo next. I get a menu but nothing that looks like you show in your post. I know I will like this once it is set up. I have 10 complexes with ships do various jobs. Including stand alone SPPs.

Thank you for any help.

Sanderfox
Posts: 26
Joined: Mon, 25. Feb 08, 23:45
x4

Re: discription on setting up

Post by Sanderfox » Fri, 9. Mar 12, 01:23

blue fox wrote:I have installed the Script and have set up the hot key but I do not know what todo next. I get a menu but nothing that looks like you show in your post. I know I will like this once it is set up. I have 10 complexes with ships do various jobs. Including stand alone SPPs.

Thank you for any help.
You have to add stations or ships to watch. Once you've done that, buy/sell orders will start to show up.

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Tue, 3. Apr 12, 09:01

Just wanted to inform, that I tested this nice piece of code with my MK3 Improvement script and it works just fine!

So I'm happy to have a new script for my collection :)

And btw, I did recomment this script on my thread as an alternative to the MK3 Trading log, which I unfortunately had to remove the support for during the reprogramming.

Nevertheless, this seems to be far better (because completely ingame) anyway :)

User avatar
bluenog143
Posts: 885
Joined: Wed, 26. Oct 11, 23:35
x3tc

Post by bluenog143 » Wed, 4. Apr 12, 18:11

Thanks Scrat, I'm going to try this script out! :D
SinisterDeath wrote:This reminds me of something...

"I don't believe in GoD, but GoD sure believes in blowing up my factories."
Dark_Ansem wrote:Seeing your creation in-game and working makes one feel all warm and fuzzy inside.

MetroWolf
Posts: 12
Joined: Mon, 29. Nov 10, 03:38
x3tc

Post by MetroWolf » Wed, 23. May 12, 20:54

Noob - script user. I have extracted this script into my X3TC (3.2) folder (Steam user) as illustrated. I verified the files and scripts were added/updated. I launch the game, but I do not see the new command in the controls? I also looked in the X3AP (2.0) game no command there either. This was such a simple install not sure how i messed this up. Any suggestions on what other steps I may have missed?

Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen » Wed, 23. May 12, 21:01

There isn't a command for it, in the commands section. You will find an entry in your controls->Interface settings to assign a hotkey to it. That will open TO for you, and the rest is on that menu.

MetroWolf
Posts: 12
Joined: Mon, 29. Nov 10, 03:38
x3tc

Post by MetroWolf » Thu, 24. May 12, 01:18

Thx for the help.

I looked there but do not see a key binding option for this: Controls>Interface. Which grouping should it be under?
Last edited by MetroWolf on Thu, 24. May 12, 01:33, edited 1 time in total.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”