App-traveller

 view release on metacpan or  search on metacpan

script/traveller  view on Meta::CPAN

<h1>Traveller Sector Generator</h1>
<p>Submit your UWP list, or generate a
<%= link_to url_for('random', size => 'subsector', rules => $rules) => begin %>Random Subsector<% end %> or a
<%= link_to url_for('random', size => 'sector', rules => $rules) => begin %>Random Sector<% end %>.
</p>
%= form_for 'map' => (method => 'POST') => begin
<p>
%= text_area 'map' => (cols => 60, rows => 20) => begin
<%= $uwp =%>
% end
</p>
<p>
%= label_for 'wiki' => begin
URL (optional):
% end
%= text_field 'wiki' => 'http://campaignwiki.org/wiki/NameOfYourWiki/' => (id => 'wiki')
</p>
%= hidden_field rules => $rules
%= submit_button 'Submit'
%= end

%= include 'edit-footer'

@@ help.html.ep
% layout 'default';
% title 'Traveller Subsector Generator';
<h1>Traveller Subsector Generator</h1>
<p>This generator can generate the Universal World Profiles (UWP) for either 8×10
<%= link_to url_for('random', size => 'subsector') => begin %>random subsectors<% end %> or for 32×40
<%= link_to url_for('random', size => 'sector') => begin %>random sectors<% end %>.
This uses the <cite>Mongoose Traveller</cite> (MGT) rules (1st ed). Once you
have the UWP list generated, you’ll find links to switch to <cite>Classic
Traveller</cite> (CT) or to <cite>Classic Traveller</cite> with the
<cite>Merchant Prince</cite> trade system (CT+MPTS).</p>

<p>If you generate a random map, it will have a link to its UWP list at the
bottom of the map. It links back to the numeric seed used to generate the
list.</p>

<p>You can edit a randomly generated UWP list. In this case, however, there will
be no link back to the UWP list from the map, since the numeric seed is not
enough. You need to keep your edited UWP list safe in a text file on your system
somewhere.</p>

<h2>Trade</h2>
<p>For <cite>Classic Traveller</cite> (with or without the <cite>Merchant Prince</cite> trade system)
I’m using the 1977 rules to generate trade routes,
as discussed in the blog post <a href="https://talestoastound.wordpress.com/2015/10/30/traveller-out-of-the-box-interlude-the-1977-edition-over-the-1981-edition/"><cite>Interlude: Two
Points Where I Prefer the 1977 Edition Over the 1981 Edition</cite></a> by Chris Kubasik.

@@ layouts/default.html.ep
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
%= stylesheet '/traveller.css'
%= stylesheet begin
body {
  width: 600px;
  padding: 1em;
  font-family: "Palatino Linotype", PalatinoLinotype-Roman, "Book Antiqua", BookAntiqua, Palatino, Palatino-Roman, serif;
}
form {
  display: inline;
}
textarea, #wiki {
  width: 100%;
  font-family: "Andale Mono", AndaleMono, Monaco, "Courier New", CourierNewPSMT, Courier, Symbola, monospace;
  font-size: 80%;
}
table {
  padding-bottom: 1em;
}
td, th {
  padding-right: 0.5em;
}
cite {
  font-style: italic;
}
.example {
  font-size: smaller;
}
#density {
  width: 3em;
}
% end
<meta name="viewport" content="width=device-width">
</head>
<body>
<%= content %>
<hr>
<p>
<a href="https://campaignwiki.org/traveller">Subsector Generator</a>&#x2003;
<%= link_to 'Help' => 'help' %>&#x2003;
<a href="https://alexschroeder.ch/cgit/traveller/about/">Git</a>&#x2003;
<a href="https://alexschroeder.ch/wiki/Contact">Alex Schroeder</a>
</body>
</html>



( run in 2.146 seconds using v1.01-cache-2.11-cpan-5735350b133 )