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
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: