• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.

Traveller UWP web service

robject

SOC-14 10K
Admin Award
Marquis
I've been meaning to deploy some of my code as a web service. I finally did. It's not full-featured yet, but it does a number of useful things. You can call it here:

http://traveller5.net/tools/worldbuilder/uwp-helper.cgi

Code:
*****************************************************
UWP-HELPER

DESKTOP USAGE EXAMPLE:
perl uwp-helper.cgi uwp=A788899-C bases=DS tldm=-2

WEB USAGE EXAMPLE:
http://.../uwp-helper.cgi?uwp=A788899-C&bases=DS&tldm=-2

INPUTS:
- uwp
- bases
- TL die modifier

If you don't supply a UWP, an example one will be used,
and this help message will be included in the output.

OUTPUTS:
- recalculated TL
- UWP with new TL
- recalculated Trade Codes
- reclaculated Importance
- recalculated Infrastructure
- recalculated Cultural Extension

The output is in JSON with the following example for the format:

{ 
   'uwp': 'A788899-9',
   'starport': 'A',
   'siz': 7,
   'atm': 8,
   'hyd': 8,
   'pop': 8,
   'gov': 9,
   'law': 9,
   'tl': 9, 
   'bases': 'DS',
   'naval_base': 1,
   'scout_base': 1,
   'trade_codes': 'Ph Pa Ri',
   'ix': { 'importance': 1 }
   'ex': { 'infrastructure': 3 }, 
   'cx': { 'acceptance': 9, 'symbols': 4, 'strangeness': 1, 'homogeneity': 3 }, 
}
*****************************************************
 
Last edited:
Interesting, I've been having a bit of fun with it. I've implemented a few web services in Python/Flask. What did you use for this?

Simon Hibbs
 
Just so you know:
I'm experimenting with a new career for Traveller, and as part of that, I'm writing a program (Python 3, JSON) to generate characters with that career. I'm using the program to test what large numbers of these characters look like. As part of that program, I'm going to use your UWP web server (to give me the homeworlds of the characters). I'll let you know how it goes.

And thanks very much for this! Made my life easier, in terms of not having to generate homeworlds, just so I could generate characters! Division of labor and all that.

Joshua Levy
 
And thanks very much for this! Made my life easier, in terms of not having to generate homeworlds, just so I could generate characters! Division of labor and all that.

Bear in mind this doesn't generate homeworlds. I'm not quite sure what it does. It seems to take a UWP as input and apply some transformations to it and generate some additional attributes.

Simon Hibbs
 
Back
Top