[SCRIPT] MK3 Trading Log (plus MK3 Technical Datasheet)

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

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

[SCRIPT] MK3 Trading Log (plus MK3 Technical Datasheet)

Post by SymTec ltd. » Wed, 17. Jun 09, 15:31


MK3 Trading Log
Logging function for Trade Command Software MK3
(for X3TC 2.1 and higher)

Image

MK3 Logging

Setting up a MK3 trader takes a lot of money. You need to buy a good ship, with excellent shielding and quite expensive software extensions. As soon as you start the trader, you give him full access to your bank account, so he could possibly be spending all your money to buy fighter drones and jumpfuel. With all that in mind, you should be very interested in your trader's cashflow.

The MK3 Trading Log uses a debug logging function of X3: Terran Conflict to write a detailed log for your traders' actions. You can then view this log with every web browser. The logging function has been part of the MK3 Software since X2, but many people forgot about it in the meantime. You can view a log of my personal trading empire here.



Links and Downloads
  • datasheet_en.pdf (Outdated link) - Manual for the Trade Command Software MK3, including a chapter on the logging function
    logging.zip (Outdated link) - Files to activate and deactivate logging and view the log (New link from xdownloads: logging.zip)
    x2trader.xml (Outdated link) - example log
Quick Readme

Step-by-step-instructions to get to your trading log
1.: Download "logging.zip" and extract the folder "trader" to the X3TC game folder
2.: Double-click "logging_on.bat" in the "trader"-folder to turn the logging function on
3.: Play the game
4.: Double-click "create_stats.bat" to create the trader log
5.: Double-click "view_stats.html" to view the trader log

If your log gets too long: Double-click "clear_log.bat"
To uninstall: Double-click "logging_off.bat" to turn the logging back off.

If you want easier access to the "create_stats" and the "view_log"-buttons, you can create a shortcut to the respective file and move it wherever you like. As the logging function is a mostly external tool that changes almost nothing inside the game, this tool does not create a *modified*!


Color codes
  • Grey: Loading a new savegame
  • Green: Starting a new trader
  • Yellow: Completed trade run
  • Orange: Pilot Training
  • Red: Buying ship upgrade/Energy/Drones
Known Limitations
  • This tool works only with English and German windows installs. For other languages, you must edit the file "create_stats.bat"
  • ".bat"-files are very powerful and are therefore blocked by some virus scanners. It is possible to work without them, but that's not as simple
  • This tool does not work with X3TC versions prior to 2.1
  • It is not possible to turn the logging on or of depending on your savegame. Every game will log to the same file.
Links

UTProfit by euclid
MK3 Handelsprotokoll (German)

Image Image


Edit: Added working xdownloads link for main download (logging.zip) and marked outdated links. X2-Illuminatus
Last edited by SymTec ltd. on Wed, 17. Jun 09, 16:06, edited 1 time in total.

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Wed, 17. Jun 09, 15:31

You may also want to take a look at the MK3 Blacklist Manager, a little plugin for managing a blacklist of sectors and stations that will be excluded from MK3 trading.
Last edited by SymTec ltd. on Sat, 10. Apr 10, 22:56, edited 1 time in total.

Logain Abler
Posts: 2254
Joined: Mon, 31. Oct 05, 09:44
x4

Post by Logain Abler » Thu, 18. Jun 09, 20:43

I've been taking a look at the logging feature and it's cool 8) . Could I use this feature on my FDN mod? Please.....


LA

Edit: I'll have to test the feasibility as the amount of entries FDN will generate could get huge, especially with lots of stations :(

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Thu, 18. Jun 09, 21:28

Logain Abler wrote:I've been taking a look at the logging feature and it's cool 8) . Could I use this feature on my FDN mod? Please...
There's nothing stopping you from writing things to a specific logfile, but you should not break the syntax, no additions to the stylesheet, and give the players the choice of using it or not (i.e. include a switch to turn it on or off).

Logain Abler
Posts: 2254
Joined: Mon, 31. Oct 05, 09:44
x4

Post by Logain Abler » Thu, 18. Jun 09, 21:34

SymTec ltd. wrote:
Logain Abler wrote:I've been taking a look at the logging feature and it's cool 8) . Could I use this feature on my FDN mod? Please...
There's nothing stopping you from writing things to a specific logfile, but you should not break the syntax, no additions to the stylesheet, and give the players the choice of using it or not (i.e. include a switch to turn it on or off).
Cheers your a star.

LA

Shagsbeard
Posts: 63
Joined: Wed, 13. May 09, 22:28

Post by Shagsbeard » Fri, 19. Jun 09, 00:47

I haven't been able to get the log to work... I'm using STEAM version so it might be that. I believe I've read the instructions correctly and have turned logging on, but am getting nothing but a blank page for the view_stats document.

Edit: Here's the path to my folder:

C:\Program Files (x86)\Steam\steamapps\common\x3 terran conflict\trader

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Fri, 19. Jun 09, 15:43

Shagsbeard wrote:I haven't been able to get the log to work... I'm using STEAM version so it might be that. I believe I've read the instructions correctly and have turned logging on, but am getting nothing but a blank page for the view_stats document.
Hm, I didn't test with steam installs.

* In your "scripts"-folder, can you give me the "last modifed"-date of file "!plugin.autotrade.logging.pck"?
* Does a file "log01500.txt" exist in your "\My Documents\Egosoft\X3TC"-directory? (Do you have such a directory?)

Shagsbeard
Posts: 63
Joined: Wed, 13. May 09, 22:28

Post by Shagsbeard » Fri, 19. Jun 09, 20:04

There is no "!plugin.autotrade.logging.pck" in my scripts folder.

There is a log01500.tex file... its current with my last game played and 64K in length. I can cut/paste it here if you want it.

scaseman
Posts: 76
Joined: Sat, 13. Mar 04, 20:24
x3tc

Post by scaseman » Sat, 20. Jun 09, 01:34

Im had a few problems as well, But after a bit of poking around I found that the .xml file ends up in a subdirectory of trader called files. This subdirectory is hidden for some reason. You can just view this file as normal.

XGamer
Posts: 1403
Joined: Sun, 25. Apr 04, 19:09
x4

Post by XGamer » Sat, 20. Jun 09, 03:23

the view_stats.html does nothing else than redirecting to said .xml file. the files folder is hidden so that ppl dont mess around with the more or less important stuff in there and / or dont get confused with the techinal stuff behind it ;)

While I myself open the xml file directly aswell its working fine with the view_stats.htm file. Try using a proper Browser and check if there is an Option and / or Plugin (in case of FireFox) that prevents Autoredirection. If so you have to disable said Option and allow Autoredirecting for it to work.

If thats not the case then check the (hidden) files directory for an x2trader.xml File. If there is none or its empty you will have to doubleclick create_stats.bat again. If its still not there or still empty something is blocking the bat execution. In this case see below.


@Shagsbeard:

You have to doubleclick the logging_on.bat File in the Trader Folder first. After you doubleclicked said file there will be a black window popping up for a splitsecond. Once this has happened check the scripts folder again for the File Symtec mentioned. If it still does not exist your Antivirus, or Firewall Software probably blocked it and you will have to turn both of them off. After you turned those off try again from the beginning of this Text (doubleclicking logging_on). If it worked then you can turn your Firewall and Antivirus on again.

greetz
XGamer
X:BtF: 7/10 | X2: 8/10 | X3:R/TC/AP: 8/10 | X:R: 3/10 | X4: 0/10 (2.50 still pretty much unplayable due to bugs)

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Sat, 20. Jun 09, 11:10

!plugin.autotrade.logging.pck is a default file of X3TC (and my .bat's don't remove it), so I don't believe that it isn't there.

If the log01500.txt already exists, then you turned the logging on correctly (this means that batch execution works and you don't have to worry about the logging.pck anymore). In this case, the following problems are possible:

* you did not execute create_stats (solution: do so)
* the path to your log01500.txt is not "My Documents/Egosoft/X3TC/", so that create_stats does not find the file (solution: correct the path in create_stats.bat)
* the redirect-function of your browser is disabled (solution: open /trader/files/x2traders.xml with your browser)

Shagsbeard
Posts: 63
Joined: Wed, 13. May 09, 22:28

Post by Shagsbeard » Sat, 20. Jun 09, 14:20

Thanks everyone. It was the third one. The xml file was there in the hidden dirrectory and I could view it correctly when I opened it.

siman
Posts: 5
Joined: Fri, 7. Nov 08, 06:36
x4

Post by siman » Sat, 27. Jun 09, 19:14

if you are using Vista, the log is in the folder "document" instead of "my document"

I modified create_stats.bat to work on my pc:
if exist "%userprofile%\Documents\Egosoft\X3TC\log01500.txt" set logfile=%userprofile%\Documents\Egosoft\X3TC\log01500.txt

louwok
Posts: 26
Joined: Mon, 27. Jul 09, 19:52
x3tc

Post by louwok » Sun, 2. Aug 09, 13:33

hello
I'm french and I would know how I can translate the wiew stats in french please. Because I have translate a file but it doesn't work after :D
and I don't understand what is "Checksum total" ???

and it can possible to update the log only with a refresh of the page in the browser ???

floppo
Posts: 15
Joined: Sat, 8. Aug 09, 00:45
x3tc

Post by floppo » Sat, 22. Aug 09, 06:05

I have a problem using this. I can't find either !plugin.autotrade.logging.pck (there's one called plugin.autotrade.writelog.pck, though), or log01500.txt. I tried disabling my virus scanner before running the bat file, but it still doesn't seem to work.

Post Reply

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