« Contents☯2007年1月 | トップページ | TRAVELLER 世界白書 »

2007年5月11日

TRAVELLER 星系作成 Python スクリプト

雷鳴から翻訳版も出ている Classic Traveller の Book 3 準拠です。

ダウンロード world.py (8.1K)

example:

>>> import world
>>> s=world.System()
>>> print s
C450579-8  G    Ni,Po Desert >>> print s.starport,s.size,s.atmosphere,s.hydrographics
C 4 5 0 >>> print s.population,s.government,s.low_level,s.tech_level
5 7 9 8 >>> s.gas_giant True >>> s.desert,s.water (True, False) >>> for s in world.systems(10):print s
E220000-7  G    Ni,Po Desert A00059A-G NG    Ni,   Asteroid E567698-5  G Ag,Ni,Ri C576265-6 S     Ni,  D9A5568-5 SG    Ni,  C640311-7 SG    Ni,Po Desert B884048-A  G    Ni,  C136777-B  G          B89A032-8 NG    Ni,   Water C3359CA-A SG          >>> world.toukei_all(100000) 星系100000個作成中
(レベル 星系数ベース, 人口ベース)

starport
A 16.70%  16.70%, 16.07%  16.07%
B 24.79%  41.50%, 25.71%  41.78%
C 30.55%  72.04%, 30.56%  72.34%
D 11.07%  83.11%, 10.69%  83.04%
E 14.09%  97.20%, 13.92%  96.96%
X  2.80% 100.00%,  3.04% 100.00%

naval_base
0 82.65%  82.65%, 84.00%  84.00%
1 17.35% 100.00%, 16.00% 100.00%

scout_base
0 71.25%  71.25%, 70.95%  70.95%
1 28.75% 100.00%, 29.05% 100.00%

gas_giant
0 16.48%  16.48%, 16.21%  16.21%
1 83.52% 100.00%, 83.79% 100.00%

size
0  2.79%   2.79%,  2.85%   2.85%
1  5.29%   8.07%,  5.82%   8.67%
2  8.38%  16.45%,  8.04%  16.71%
3 11.04%  27.49%, 10.81%  27.52%
4 14.02%  41.52%, 14.30%  41.83%
5 16.64%  58.15%, 16.02%  57.85%
6 14.04%  72.19%, 13.64%  71.49%
7 10.97%  83.16%, 11.08%  82.56%
8  8.47%  91.62%,  8.82%  91.39%
9  5.54%  97.16%,  5.60%  96.99%
A  2.84% 100.00%,  3.01% 100.00%

atmosphere
0 10.73%  10.73%, 11.00%  11.00%
1  5.81%  16.54%,  5.47%  16.47%
2  7.65%  24.19%,  7.07%  23.54%
3  9.48%  33.67%,  9.46%  33.00%
4 10.67%  44.34%, 11.27%  44.28%
5 11.06%  55.40%, 10.66%  54.94%
6 10.75%  66.15%, 10.73%  65.67%
7  9.78%  75.92%,  9.23%  74.89%
8  8.06%  83.99%,  8.68%  83.57%
9  6.26%  90.25%,  6.94%  90.51%
A  4.26%  94.51%,  4.05%  94.56%
B  2.76%  97.27%,  2.75%  97.32%
C  2.73% 100.00%,  2.68% 100.00%

hydrographics
0 20.72%  20.72%, 20.41%  20.41%
1  4.50%  25.22%,  4.53%  24.94%
2  6.00%  31.22%,  6.37%  31.30%
3  7.60%  38.82%,  8.00%  39.31%
4  9.05%  47.88%,  8.66%  47.97%
5  9.87%  57.75%,  9.46%  57.42%
6  9.79%  67.53%,  9.17%  66.59%
7  9.18%  76.72%,  9.70%  76.29%
8  8.00%  84.72%,  8.24%  84.53%
9  6.11%  90.83%,  6.53%  91.06%
A  9.17% 100.00%,  8.94% 100.00%

population
0  2.73%   2.73%,  0.00%   0.00%
1  5.52%   8.24%,  0.00%   0.00%
2  8.38%  16.62%,  0.00%   0.00%
3 11.07%  27.68%,  0.00%   0.00%
4 14.01%  41.70%,  0.00%   0.00%
5 16.56%  58.26%,  0.00%   0.01%
6 13.86%  72.12%,  0.04%   0.04%
7 11.02%  83.14%,  0.32%   0.36%
8  8.46%  91.60%,  2.43%   2.79%
9  5.57%  97.17%, 15.97%  18.76%
A  2.83% 100.00%, 81.24% 100.00%

government
0  9.78%   9.78%,  0.00%   0.00%
1  6.18%  15.96%,  0.00%   0.00%
2  8.07%  24.03%,  0.01%   0.01%
3  9.65%  33.68%,  0.09%   0.10%
4 10.64%  44.32%,  0.57%   0.67%
5 11.28%  55.60%,  3.34%   4.01%
6 10.81%  66.40%,  6.18%  10.20%
7  9.56%  75.97%,  8.42%  18.62%
8  7.99%  83.95%, 12.51%  31.13%
9  6.24%  90.19%, 14.32%  45.45%
A  4.28%  94.47%, 15.99%  61.44%
B  2.81%  97.28%, 12.76%  74.20%
C  1.53%  98.80%, 10.95%  85.15%
D  1.20% 100.00%, 14.85% 100.00%

low_level
0 13.56%  13.56%,  0.11%   0.11%
1  6.40%  19.96%,  0.45%   0.56%
2  7.63%  27.59%,  0.82%   1.38%
3  8.57%  36.16%,  1.76%   3.15%
4  9.12%  45.29%,  3.06%   6.20%
5  9.26%  54.55%,  5.04%  11.24%
6  9.10%  63.65%,  6.75%  17.99%
7  8.39%  72.04%,  8.21%  26.20%
8  7.21%  79.25%,  9.75%  35.96%
9  6.16%  85.42%, 10.77%  46.72%
A  4.89%  90.31%, 11.30%  58.02%
B  3.53%  93.84%, 11.60%  69.62%
C  2.61%  96.44%,  9.70%  79.32%
D  1.63%  98.08%,  7.56%  86.88%
E  0.94%  99.02%,  5.19%  92.07%
F  0.54%  99.56%,  3.66%  95.73%
G  0.31%  99.86%,  2.69%  98.42%
H  0.10%  99.97%,  1.04%  99.46%
J  0.03% 100.00%,  0.54% 100.00%

tech_level
0  0.90%   0.90%,  0.17%   0.17%
1  0.86%   1.75%,  0.26%   0.43%
2  1.82%   3.57%,  0.48%   0.91%
3  3.48%   7.05%,  1.16%   2.07%
4  5.63%  12.68%,  1.53%   3.60%
5  7.98%  20.66%,  3.05%   6.64%
6  9.93%  30.59%,  4.62%  11.26%
7 11.44%  42.03%,  7.17%  18.43%
8 12.35%  54.38%,  9.09%  27.53%
9 11.70%  66.09%, 11.08%  38.60%
A 10.48%  76.57%, 11.90%  50.50%
B  8.44%  85.01%, 12.18%  62.68%
C  6.27%  91.27%, 10.36%  73.04%
D  4.30%  95.57%,  8.77%  81.82%
E  2.61%  98.18%,  7.13%  88.95%
F  1.23%  99.41%,  4.89%  93.84%
G  0.44%  99.85%,  3.44%  97.28%
H  0.11%  99.96%,  1.60%  98.88%
J  0.03%  99.99%,  0.86%  99.74%
K  0.01% 100.00%,  0.23%  99.97%
L  0.00% 100.00%,  0.03% 100.00%

agricultural
0 86.13%  86.13%, 99.88%  99.88%
1 13.87% 100.00%,  0.12% 100.00%

non_agricultural
0 88.39%  88.39%, 72.86%  72.86%
1 11.61% 100.00%, 27.14% 100.00%

industrial
0 95.76%  95.76%, 50.44%  50.44%
1  4.24% 100.00%, 49.56% 100.00%
non_industrial 0 27.88%  27.88%, 99.96%  99.96% 1 72.12% 100.00%,  0.04% 100.00% rich 0 95.39%  95.39%, 99.62%  99.62% 1  4.61% 100.00%,  0.38% 100.00% poor 0 81.53%  81.53%, 81.25%  81.25% 1 18.47% 100.00%, 18.75% 100.00% water 0 90.83%  90.83%, 91.06%  91.06% 1  9.17% 100.00%,  8.94% 100.00% desert 0 79.28%  79.28%, 79.59%  79.59% 1 20.72% 100.00%, 20.41% 100.00% vacuum 0 89.27%  89.27%, 89.00%  89.00% 1 10.73% 100.00%, 11.00% 100.00% asteroid 0 97.21%  97.21%, 97.15%  97.15% 1  2.79% 100.00%,  2.85% 100.00% ice_capped 0 99.29%  99.29%, 99.26%  99.26% 1  0.71% 100.00%,  0.74% 100.00%

追記

2007-05-13 world.py を ver.1.0.1 に差し替え
法律レベル(low_level)に最大10の制限を付けていたのを解除。 example もその結果に書き換え。

« Contents☯2007年1月 | トップページ | TRAVELLER 世界白書 »

Python」カテゴリの記事

TRAVELLER」カテゴリの記事

トラックバック

この記事のトラックバックURL:
http://app.cocolog-nifty.com/t/trackback/68856/15034293

この記事へのトラックバック一覧です: TRAVELLER 星系作成 Python スクリプト:

« Contents☯2007年1月 | トップページ | TRAVELLER 世界白書 »

ブログ妖精

  • ココロ

Affiliate

無料ブログはココログ