Skip to content

Commit

Permalink
Merged kfsone/tradedangerous into master
Browse files Browse the repository at this point in the history
  • Loading branch information
orphu committed Mar 17, 2015
2 parents df6abf1 + b9c6ef2 commit 2d10728
Show file tree
Hide file tree
Showing 21 changed files with 14,782 additions and 14,145 deletions.
29 changes: 29 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,41 @@
TradeDangerous, Copyright (C) Oliver "kfsone" Smith, July 2014
==============================================================================

v6.14.2 Mar 15 2015
. (kfsone) Minor tweaks
. (kfsone) Removed the "tradingWith" cache because its hit rate was so low
it was actually decreasing performance
. (kfsone) Tweaked how --prune and --max-routes interact
. (kfsone) Little performance boost

v6.14.1 Mar 13 2015
. (kfsone) Minor fixes
. (kfsone) Derp defense,
. (kfsone) Added misc.importeddbstats
. (kfsone) Imported Station attributes from eddb,
. (kfsone) Cleaned out some cruft,

v6.14.0 Mar 13 2015
. (kfsone) Station data:
- Added "outfitting", "rearm", "refuel" and "repair" fields,
- Added options to "local" and "station" commands,
- Added output to "local", "station" and "nav" commands,
- Added support to maddavo import,

v6.13.4 Mar 13 2015
. (WombatFromHell) "run" command:
- Added "--max-gain-per-ton" (--mgpt) option
Default: 10000cr
Controls the maximum profit/ton that TD will believe

v6.13.3 Mar 11 2015
. (kfsone) Fixed "--blackmarket" and "--trading" in local,
. (Dry411s) Resolves #200 New ships for 1.2,
. (kfsone) +103 Systems
. (kfsone) OCR Derp fixes
. (kfsone) Station cleanup
. (Dry411s) Resolves #203 New ShipPrices per 1.2.03,
. (orphu) ShipVendor updates

v6.13.2 Mar 10 2015
. (Tromador) Added "Painite" to Item.csv
Expand Down
267 changes: 146 additions & 121 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,14 @@ RUN sub-command:
--max-days-old 7 (data less than a week old)
-MD=2 (data less than 2 days old)

--max-gain-per-ton N
--mgpt N
DEFAULT: 10,000
Sets an upper threshold on the maximum profit/ton that TD will
believe. This is a way to avoid bad data.
e.g.
--mgpt 2000

--pad-size SML?
--pad SML?
-p
Expand Down Expand Up @@ -562,6 +570,11 @@ IMPORT sub-command:
use2d: Force download of the 2-days .prices file
usefull: Force download of the full .prices file

Options can be comma separated, the following are equivalent:
--option systems --option stations --option shipvendors --option csvonly
--opt=csvs --opt=csvonly
-O csvs,csvonly

--ignore-unknown
-i
Any systems, stations, categories or items that aren't recognized
Expand All @@ -574,92 +587,6 @@ IMPORT sub-command:
you may need to add the "-i" flag to the buildcache command.


RARES sub-command:

This command looks for known rare items within the space around
a specified system.

trade.py rare [-q] <system> [--ly N.NN] [--limit N] [--price-sort] [--reverse]

<system>
System to center search on
e.g.
Lave
@Sol

--ly N.NN
DEFAULT: 42
Maximum distance to search from center system.
e.g.
--ly 0 (unlimited)
--ly 21.2

--limit N
Maximum number of results to show
e.g.
--limit 10

--reverse
-r
Reverse the order, can be used with "--ly" and "--limit" to find
the furthest-away rares

--away N.NN
--from SYSTEM1 --from SYSTEM2 ... --from SYSTEMN
Limits results to systems that are at least a given distance away
from additional systems.
e.g.
trade.py rare --ly 160 sol -r --away 140 --from lave
Shows systems starting at 160ly or less from sol,
but that are also 140ly or more from lave.
trade.py rare --ly 160 sol -r --away 140 --from lave --from xihe
As above but also compares for <= 140ly from xihe

--pad-size SML?
--pad SML?
-p
Limit results to stations that match one of the pad sizes
specified.
--pad ML? (med, lrg or unknown only)
-o ML? "" "" "" ""
--pad ? (unknown only),
--pad L (large only, ignores unknown)

--price-sort
-P
Sort by price rather than proximity

--quiet
-q
Don't include the header lines


Examples:

$ trade.py rare sol --ly 10
Station Rare Cost DistLy Alloc
------------------------------------------------------------------------
ALPHA CENTAURI/Hutton Orbital Centauri Mega Gin 3,319 4.38 7

$ trade.py rare @neto --ly 50 --price --limit 5
Station Rare Cost DistLy Alloc
-----------------------------------------------------------------------------
XIHE/Zhen Dock Xihe Biomorphic Companions 4,482 48.10 7
VEGA/Taylor City Vega Slimweed 2,398 33.44 0
LFT 1421/Ehrlich Orbital Void Extract Coffee 2,357 26.45 0
ALTAIR/Solo Orbiter Altairian Skin 489 39.78 18
V1090 HERCULIS/Kaku Plant Herculis Body Rub 160 37.33 20

Finding where to take a rare from Bast:
$ trade.py rare bast --ly 180 -r --limit 4
Station Rare Cost DistLy Alloc StnLs Pad
------------------------------------------------------------------------------------------
DELTA PHOENICIS/Trading Post Delta Phoenicis Palms 412 179.42 17 3,743 Lrg
DEURINGAS/Shukor Hub Deuringas Truffles 1,892 174.22 0 ? Lrg
HR 7221/Veron City HR 7221 Wheat 415 173.57 0 ? Lrg
ANY NA/Libby Orbital Any Na Coffee 1,790 170.32 11 ? ?


MARKET sub-command:

Lists items bought / sold at a given station; with --detail (-v) also
Expand Down Expand Up @@ -797,6 +724,18 @@ LOCAL sub-command:
--blackmarket
Limit stations to those known to have a black market.

--outfitting
Limit stations to those known to have outfitting.

--rearm
Limit stations to those known to rearm.

--refuel
Limit stations to those known to refuel.

--repair
Limit stations to those known to repair.

-v
Show stations + their distance from star

Expand Down Expand Up @@ -854,6 +793,53 @@ LOCAL sub-command:
> trade.py local SOL --blackmarket --ly 6 -vv


STATION sub-command:

This command can be used to add a new station:

> trade.py station --add "i bootis/nowhere port"
> trade.py station -a "i bootis/nowhere port" --ls 123 --pad m

Or it can be used to delete a station:

> trade.py station --remove "i bootis/nowhere port"
> trade.py station -rm "i bootis/nowhere port"

Or it can be used to update the ls-from-star, pad-size, or blackmarket
flags of an existing station:

> trade.py station --update "i bootis/nowhere port" --pad=L --ls-from-star=123 --black-market=N
> trade.py station -u "i bootis/nowhere port" --pad L --ls 123 --bm=N

If can also be used to show some basic data about a given station:

> trade.py station -v i bootis/chango
Station Data:
System....: I BOOTIS (#10438 @ -22.375,34.84375,4.0)
Station...: Chango Dock (#1288)
Also here.: Maher Stellar Research
Stn/Ls....: 1,095
B/Market..: Yes
Pad Size..: Lrg
Prices....: 33
Price Age.: 6.77 days
Best Buy..: (Buy from this station)
Tea* @ 1,217cr (Avg Sell 1,570cr)
Coffee* @ 1,047cr (Avg Sell 1,369cr)
Fish* @ 296cr (Avg Sell 482cr)
Best Sale.: (Sell to this station)
Marine Equipment* @ 4,543cr (Avg Buy 3,937cr)
Crop Harvesters* @ 2,568cr (Avg Buy 1,997cr)
Domestic Appliances* @ 714cr (Avg Buy 445cr)


This shows that 'Tea' is a star buy at this station: it is being
sold by the station for 1217cr but the average selling price is
1570credits.

A star trade (indicated by '*') is at least 10% better than the
average trading price for that commodity.

BUY sub-command:

Finds stations that are selling / where you can buy, a named list of
Expand Down Expand Up @@ -1008,52 +994,91 @@ EXPORT sub-command:
Export Table 'System' to 'data/System.csv'


STATION sub-command:
RARES sub-command:

This command can be used to add a new station:
This command looks for known rare items within the space around
a specified system.

> trade.py station --add "i bootis/nowhere port"
> trade.py station -a "i bootis/nowhere port" --ls 123 --pad m
trade.py rare [-q] <system> [--ly N.NN] [--limit N] [--price-sort] [--reverse]

Or it can be used to delete a station:
<system>
System to center search on
e.g.
Lave
@Sol

> trade.py station --remove "i bootis/nowhere port"
> trade.py station -rm "i bootis/nowhere port"
--ly N.NN
DEFAULT: 42
Maximum distance to search from center system.
e.g.
--ly 0 (unlimited)
--ly 21.2

Or it can be used to update the ls-from-star, pad-size, or blackmarket
flags of an existing station:
--limit N
Maximum number of results to show
e.g.
--limit 10

> trade.py station --update "i bootis/nowhere port" --pad=L --ls-from-star=123 --black-market=N
> trade.py station -u "i bootis/nowhere port" --pad L --ls 123 --bm=N
--reverse
-r
Reverse the order, can be used with "--ly" and "--limit" to find
the furthest-away rares

If can also be used to show some basic data about a given station:
--away N.NN
--from SYSTEM1 --from SYSTEM2 ... --from SYSTEMN
Limits results to systems that are at least a given distance away
from additional systems.
e.g.
trade.py rare --ly 160 sol -r --away 140 --from lave
Shows systems starting at 160ly or less from sol,
but that are also 140ly or more from lave.
trade.py rare --ly 160 sol -r --away 140 --from lave --from xihe
As above but also compares for <= 140ly from xihe

> trade.py station -v i bootis/chango
Station Data:
System....: I BOOTIS (#10438 @ -22.375,34.84375,4.0)
Station...: Chango Dock (#1288)
In System.: Maher Stellar Research
Stn/Ls....: 1,095
B/Market..: Yes
Pad Size..: Lrg
Prices....: 33
Price Age.: 6.77 days
Best Buy..: (Buy from this station)
Tea* @ 1,217cr (Avg Sell 1,570cr)
Coffee* @ 1,047cr (Avg Sell 1,369cr)
Fish* @ 296cr (Avg Sell 482cr)
Best Sale.: (Sell to this station)
Marine Equipment* @ 4,543cr (Avg Buy 3,937cr)
Crop Harvesters* @ 2,568cr (Avg Buy 1,997cr)
Domestic Appliances* @ 714cr (Avg Buy 445cr)
--pad-size SML?
--pad SML?
-p
Limit results to stations that match one of the pad sizes
specified.
--pad ML? (med, lrg or unknown only)
-o ML? "" "" "" ""
--pad ? (unknown only),
--pad L (large only, ignores unknown)

--price-sort
-P
Sort by price rather than proximity

This shows that 'Tea' is a star buy at this station: it is being
sold by the station for 1217cr but the average selling price is
1570credits.
--quiet
-q
Don't include the header lines


Examples:

$ trade.py rare sol --ly 10
Station Rare Cost DistLy Alloc
------------------------------------------------------------------------
ALPHA CENTAURI/Hutton Orbital Centauri Mega Gin 3,319 4.38 7

$ trade.py rare @neto --ly 50 --price --limit 5
Station Rare Cost DistLy Alloc
-----------------------------------------------------------------------------
XIHE/Zhen Dock Xihe Biomorphic Companions 4,482 48.10 7
VEGA/Taylor City Vega Slimweed 2,398 33.44 0
LFT 1421/Ehrlich Orbital Void Extract Coffee 2,357 26.45 0
ALTAIR/Solo Orbiter Altairian Skin 489 39.78 18
V1090 HERCULIS/Kaku Plant Herculis Body Rub 160 37.33 20

Finding where to take a rare from Bast:
$ trade.py rare bast --ly 180 -r --limit 4
Station Rare Cost DistLy Alloc StnLs Pad
------------------------------------------------------------------------------------------
DELTA PHOENICIS/Trading Post Delta Phoenicis Palms 412 179.42 17 3,743 Lrg
DEURINGAS/Shukor Hub Deuringas Truffles 1,892 174.22 0 ? Lrg
HR 7221/Veron City HR 7221 Wheat 415 173.57 0 ? Lrg
ANY NA/Libby Orbital Any Na Coffee 1,790 170.32 11 ? ?

A star trade (indicated by '*') is at least 10% better than the
average trading price for that commodity.


==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion TradeDangerous.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<LaunchProvider>Standard Python launcher</LaunchProvider>
<InterpreterId />
<InterpreterVersion />
<CommandLineArguments>buildcache -f -i</CommandLineArguments>
<CommandLineArguments>run -vv --ly=20.75 --empty=27.76 --cap=124 --jumps=4 --cr=5810815 --from="vaucansonplat" --prune-score=20 --prune-hops=4 --progress --gpt 1400 --hops=5 --age=20 --jumps=5 --ls-p=2.5</CommandLineArguments>
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
Expand Down
7 changes: 4 additions & 3 deletions cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
\bREA([O0]D|D[O0]) |
\bRD[DO0][DO0]EN |
\bR[O0]([O0]D|D[O0])EN |
(?<!BR)[O0]ECK |
(?<!BR)[O0]ECK$ |
SE?TTL(FMENT|EMFNT|FMFNT) |
SE?TTLMENT |
STTL[E38]?M[E38]?NT |
Expand All @@ -218,7 +218,6 @@
\bREILLI\b |
\bRIN[FC]\b |
\bOL[E3]ARY |
‹ |
\bSATION\b |
,\w |
\bI?NGLY\b |
Expand Down Expand Up @@ -276,7 +275,9 @@
^AN\sI?DREW |
^WATSO\sIN |
^QSSW |
^RTZEN
^RTZEN |
\bI?NAL$ |
\b''I\b
)''', flags=re.X)


Expand Down
Loading

0 comments on commit 2d10728

Please sign in to comment.