[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: Scripting / Modding Moderators, Moderators for English X Forum

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

Post by ScRaT_GER »

It does not use commands, but hotkeys.
You can assign these under 'controls'.

The script gathers quite a lot of data and stores them on the ship. However this is only done, if you or your ships actually trade.
So the gathering part shouldn't be too CPU intensive.

However calculating and summarizing all data takes some time, but is only done when opening the main menu. The more ships you monitor, the longer it will take to open the menu.

I'm currently rewriting this script (which takes longer than expected) and I hope the menus will then open faster.

Greets,
ScRaT
DannyDSC
Posts: 7070
Joined: Sun, 5. Dec 04, 20:32
x4

Post by DannyDSC »

italian translation ready! :)
The Indie Seeker - The Twitter Channel for your indiegames!

Ex Egosoft Translator/Currently writer for www.ilvideogioco.com

@IlVideogiococom is the ONLY italian website that offers full coverage to ALL #indiegames! Are you an #indiedev?
Feel free to follow and contact us on Twitter/Facebook/Instagram!
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

Thanks!
Added (corrected) the download link.

A short note:
The next version can be expected with the new patch, as I am using some new commands, which come with it.

At the moment I'm still working on some parts and adding features, but the basis is already working and running correctly.

Greets,
ScRaT
Madtrack
Posts: 184
Joined: Tue, 25. May 04, 01:44
x3tc

Post by Madtrack »

this looks pretty nice

I'm having some issue though

when adding new ships, only a handful of my ships were listed, I have about 250 CAG's and CLS'es running, but only about 50 of my ships were listed (mostly non running ships), is this normal ?

also, everything worked perfectly the first time around, but then I quit the game, when I loaded my savegame the menu was gone, I tried everything (loading a save prior to the install of the script, uninstalling + reinstalling the files, installing cycrow's menu), but I could not find a way to get it back, not sure what happened here :?
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

I assume you are using the newest version, aren't you?

The issue with the ships not appearing is strange. There are only two reasons why a ship would not appear the list:
1. It is already monitored
2. The ship has a station, which is monitored, as homebase

In the latter case all transactions by the ship would be directly accounted to the station.

The issue with the menu is also quite strange. I know that it sometimes need a bit to open, since all the calculations take place on opening, so maybe you didn't wait long enough?
There is indeed a switch that hinders the menu from opening multiple times and when I introduced it, there where some problems, because sometimes the switch was not resetted when closing the menu resulting in the bug you described.
However I didn't find this in the current version and I also added extra code to reset this switch directly in the setup script, so that at least when you reload you should be able to reopen the menu.

The next version, a complete rewrite, is already quite functional and can be expected in the beginning of september (not before the next patch).
If your menu is not opening, because it loads too long, I guess that it will open much faster with the next version -- didn't try it with 250 traders though. ;)

Greets,
ScRaT
Madtrack
Posts: 184
Joined: Tue, 25. May 04, 01:44
x3tc

Post by Madtrack »

aah you're right about the ships, I tought there was a reason I only had inactive ships in my list, didn't think they were automatically monitored if the homebase was monitored tho :)

For the loading time you're also right, I did not wait extremely long, however I tought that going to a savegame that was from before I installed the script would reset everything and it would be loading as fast as the first time, unless parameters aren't stored in the savegame

at any rate, I'll give it another go tonight, I'll let you know if that was the problem

thanks for the fast answer :)
Madtrack
Posts: 184
Joined: Tue, 25. May 04, 01:44
x3tc

Post by Madtrack »

I found my problem

somehow, for some reason, using the open logbook hotkey breaks both hotkeys for that session

I've waited up to 15 minutes and nothing shows up, it doesn't matter if I have anything monitored or not, the logbook hotkey will ony work the first time I install the script

the trade overview hotkey however works, after 5-10 sec I get the trade overview screen popping up, but if I hit the loogbook hotkey, it won't work anymore

Got this problem on 2 different computers with different savegames

this is strange, any ideas ? :?
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

This is indeed strange. I rechecked the script and the only problem I could imagine is when pressing the logbook while aiming at nothing.
In this case, a list off all your ships having a logbook should come up.
If this list is completely empty (not a single entry) and you quit the menu, it might happen.

Did you try to open the logbook while aiming at something or while aiming at nothing?
the trade overview hotkey however works, after 5-10 sec I get the trade overview screen popping up, but if I hit the loogbook hotkey, it won't work anymore
But you do not try to open the logbook while the trade overview window is open, do you?

Greets,
ScRaT
Madtrack
Posts: 184
Joined: Tue, 25. May 04, 01:44
x3tc

Post by Madtrack »

I just tried again and I only get the problem when aiming at something

If I press the hotkey while aiming at nothing I get the empty list you spoke of (this is normal I guess, as I just installed the script), but I am able to close it and open the trade overview afterwards

However, I tried different combinations, aiming at different ships and stations, if I aim at something I own, I get the problem, Aiming at an NPC ship the logbook of my own ship opens and I do not have the problem.

Maybe a compatibility problem with another script ? I can send you a list of what I use if it can help, I can also provide a savegame if needed.

Madtrack

EDIT: sorry forgot to answer your other question, no I'm not trying to open the logbook while the trade overview is open
User avatar
Jaga_Telesin
Posts: 435
Joined: Sat, 16. Sep 06, 22:48
x4

Post by Jaga_Telesin »

I'm going to assume that CA and EST traders (added by community mods) are also trackable, though I didn't see mention of it in the first post. Just started a new game, and thought I'd ask here before applying this script to any of them.

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

Post by ScRaT_GER »

@Madtrack

I'm looking into it.

@Jaga_Telesin
Q: Does monitoring work with every kind of trader?
A: Yes, at least it should! It works fine with every type of trader I tried it with (CAG/ECS/ST/UT) and also monitors your playership correctly.
They are. ;)

Greets,
ScRaT
CharnowC182
Posts: 1
Joined: Thu, 3. Sep 09, 00:57

Post by CharnowC182 »

Hi.

I have an issue that popped up recently and i was wondering if there is a known fix.

Under the logbook of traders there is an entry named ***Destroyed***033X null(null)

At the time I was monitoring 9 traders and this one showed up as a 10th entry (without me telling the program i wanted a 10th ship monitored). It happened immediately after a ship, Your Jaguar Raider was destroyed while in an automap command.

Now i cannot get rid of this destroyed entry. my other 9 ships are still monitored correctly but now they are not in order of profit like they usually are and also the average profit per ship is now 0.

I cannot click on the destroyed entry like i can click on other entries so there is no way to stop monitoring of it or hide object or anything. Also this persists through a game save and reload (and reboot).

Any help is appreciated. I can provide a savegame file if needed.
Life Bringer
Posts: 128
Joined: Mon, 24. Jul 06, 18:46

Post by Life Bringer »

I had same problem with 2 entries called: ***Destroyed***033X null(null)

The only way I had to get that entries out was to reset the ships logbook then add again the ships.
Any chance to have an updated version of this great script? :D
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

Oh, sorry for the late reply -- didn't notice that you posted.

@CharnowC182

It seems to be the same bug as reported before. A savegame would be appreciated.
Any chance to have an updated version of this great script? Very Happy
Short after the next patch I'll upload a new version.
There are unfortunately still some problems and progress is slow, because of RL issues.
What I can say is, that performance, especially when monitoring many objects, has increased a lot. Additionally all data gathered will be 100% right, due to a new way of collecting them.
On the other hand the possibilities to alter the menus (like deleting single logbook entries) are gone, since I didn't see a real use in it and it would be quite hard to integrate it.

Greetings,
ScRaT
Life Bringer
Posts: 128
Joined: Mon, 24. Jul 06, 18:46

Post by Life Bringer »

Don't worry and thanx for the quick answer, another little issue is that sometimes the hotkeys stop working, I push them but without any result, to make them work again or I have to save and load the savegame or go to script editor and reinit script caches.
I check If I still have the savegame with the entries named destroyed etc.
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

Now that the new patch is out, I felt like releasing the new version of this script.

Since this version is completely rewritten and because internal structures changed, it does not use the data of the old version.
I recommend to uninstall the old version, but there's no porblem if they coexist.

Because of time issues I'll only mention the most important points:
  • Objects can be added to the overview by using the "Add new objects" button. You can now input various tokens like "TS", if you want to find all TS - class ships, or "Argon Prime", if you want to find all objects in Argon Prime.
    You can also simply type a name, e.g. "CAG" will find all ships with "CAG" in their name.
    Removing objects works exactly the same way.
  • Destroyed objects will stay in the overview and all information will be sustained. Via the settings menu you can delete them (automatically or manually).
  • Because very much information is gathered and saved the savegame will get larger (more than 23MB were reported). I'll try to counteract this situation in a following version, by reintroducing the possibility to summarize the logbook and to determine the depth of monitoring.
    However, apparently savegames of such size don't influence the games performance to a noticable degree.
  • In comparison to the old version, this version is much faster and safer. The information will always be 100% right.
---------------------------------------------
Download: Trade Overview 2.0 - Hotfix3
---------------------------------------------

I think this weekend I'll release the first real version and edit the OP accordingly. I would be nice, if some of you could report until then, if the english codes for searching objects work.

Greetings,
ScRaT
Last edited by ScRaT_GER on Thu, 26. Nov 09, 18:13, edited 6 times in total.
User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut »

Does this new version work with stations?
The previous versions only tracked my trader's profits, my station's profits remained unchanged.
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

The previous versions only tracked my trader's profits, my station's profits remained unchanged.
Are you sure? First time I heard that.
Generally, if you notice bugs, it's always good to report them.
Does this new version work with stations?
So, yes, this version does work with stations.

To monitor a station simply add it to the overview. All ships assigned to the station, will be automatically monitored, too. If you don't want a certain ships transactions to be counted to the station, you need to add this ship seperatly to the overview (for example if you have Universal Traders (UTs) and Commercial Agents (CAGs) assigned to one station, you should add the station and additionally the UTs. Like this the UTs will be monitored seperatly, but all transactions by the CAGs will be counted to the station).

Greetings,
ScRaT
User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut »

I add products to my trading stations using FDN, NPC traders dock and buy those goods, credits are exchanged and added to the station, and my record of the station remains unchanged. The entry for the trading dock remains as the cost of the station forever. I also have my EST traders buying goods from my stations. That only affects their entries?
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.
User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER »

I don't understand the following sentence:
The entry for the trading dock remains as the cost of the station forever.
Are you sure that you are using the new version?
The hotkeys have exactly the same name, so maybe by accident you confused the two hotkeys.

If you are using the new version, the first menu item should be
"Add new objects". In the old version the first menu item would be "Add new trader".

In your case the monitoring should work like this:
First add your trading station to the overview, so all transactions with this trading station or ships, which have this trading station set as homebase, will be monitored.

If your ESTs also have your trading station assigned as a homebase, they would also be monitored, but their transactions would be counted to the trading station. To avoid that, you have to add you ESTs manually to the overview, so that the EST and the station are monitored seperately again.
I also have my EST traders buying goods from my stations.
Actually your own traders don't "buy" goods from you own stations, they only load and unload. Loading and unloading activities however are not monitored by this script, because there is now money involved. =)

So, please make sure that you are using the new version and if so, please clarify the sentence I didn't get.

Greetings,
ScRaT

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