• 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.

Yet Another Traveller World Exlainer

coliver988

SOC-14 1K
Baron
Yes, this has been done to death. But I had time while laid off (and starting a new job Monday). Seems each time I get laid off I spend a lot of time working on Traveller software trying to learn new things.

Anyway, this is using the MAUI architecture, so in theory runs on both Windows and Android (and if I had a Mac, iOS as well). I may see if I can get it into the Android store if I can get permission (free of course) just to see if I can get a published app out there (hey, it may lead to an even better job!).

Longer term I'll be adding in the trade codes, but right now I've got the UWP. For those who want to know, it is a c# program and I am wanting to learn a few more things with the data binding and observable patterns. And I need to figure out unit testing because I think that is important for some things.

Even longer term, I'd love to throw trade back into this as well. I did that 20+ years ago when I first got laid off. it actually used the TravellerMap API to load systems and do some of the displays (i.e., the J6 maps around a system).

The Github repo is here: https://github.com/COliver988/TravellerWorldExplain if interested in code

As I do start an actual job (now with a commute longer than my stairs, and more traffic than just avoiding my cats on said stairs) I may not have a lot of time to devote to this again. So many paused/abandoned projects...

BTW, maybe I should call this YATWE for Yet Another Traveller World Explainer. Unix does have YACC for yet another compiler compiler. As at a guess there are dozens of websites and software that does this already. But hey, I like Traveller software :)

And yes, that is one of my worlds I created. Guess I could also include a lot of worlds and load based on the UWP, or, once I get fancier, generate an appropriate world somehow.

1684602823054.png
 
The explainers I like are the ones that go into temp, atmosphere, what it smells like, weather, just in general the feel and impact of the world.

I expect that involves the stellar type, orbit, rotation, more precise atmosphere, etc so not casual.
 
I've finally asked Marc if I can publish this via an email. Until then, I've added the passenger listing. Long term this should evolve into a trade tracker, but I am taking it in very small bites right now. I also wanted to add testing and things so this is an exploration for me as well. But it would be cool to get an application published. It would be free of course, and both Windows and Android (using the same source and UI code - cool!)

I plan on doing the freight next (which is similar to passengers). Then available speculative trade. Then the next step is to actually save off what you buy, and try & sell it in the next system. But as I said - baby steps. And testing: need to test that I am interpreting the dice roll tables for passengers
correctly: I basically copied the table so we have things like 1D-1D, 4D. Need to make sure that those get translated and rolled and have the correct range (i.e., 1D-1D can range from 0 to 5, as we drop anything < 0. 4D is 4-24, that sort of thing. And I realize I also need to verify that it is in the correct format, though anything incorrect will actually just be 0, so probably okay).

Of course, everything this can currently do is available via TravellerMap. Again - long term plans is for this to be available w/o internet access. I know - going against the flow of progress. I just prefer actual software running on my machine as that cannot be taken away. I'm strange that way.

To Kilemall's note above: I was going by pure rules, Classic. Though I've written it so that it should not be difficult to update for multiple rule sets. As the Classic rules do not have anything about temperature, atmosphere and anything beyond the basic UWP, that's where I left it. I may do an "experimental" option to do those things. In fact. Mongoose is redoing the system creation book which goes into the various things like that. And I will recheck Book 6 Scouts to see. I think that has albedo and temperatures, I'll have to look.

But first, the freight tables. Then displaying speculative trade (1 roll per week!) then start storing the data locally. Then add the TravellerMap API so you can download a sector at a time and have all those systems available locally. Fun times.

Though I got a lot of this done as I had an extended weekend: that's about to end so it will be a while before I get much further. I actually refactored a bit and created a service base class to handle common stuff, like die rolls & loading data from the text files. Heck - I may go overboard & see about the repository pattern for the database. Way, way overkill for this sort of project, but as I have to learn the one at work which DOES use that level of abstraction, it may help if I do it myself!
 

Attachments

  • Screenshot 2023-07-04 125457.png
    Screenshot 2023-07-04 125457.png
    128.6 KB · Views: 9
I will recheck Book 6 Scouts to see. I think that has albedo and temperatures
LBB6 does cover albedo and the generation of planetary average temperature ... but the system for how to determine albedo is poorly explained and lacks a How To checklist process for the generation of average world temperature.

The parts and pieces are there, but the instructions for assembling those parts and pieces coherently are threadbare to the point of being of little use at all, leaving WIDE latitude for individual interpretation owing to the lack of a clearly explained process to make the calculations.
 
yeah, true of a lot of the rules (requiring a fair amount of interpretation). And I was not planning on adding in the stellar type and then calculating the habitable zone from that. I could, but I was going from a different direction rather than system generation: long term goal is to have a flexible trade tracker. Flexible in that it has the rules, but a lot of the underlying data will be editable by the user. Your own set of speculative trade goods, worlds linked to specific trade goods, that sort of thing. I already see it in my head (and honestly already wrote it 20+ years ago - the origins of my blog in fact cover all that. Just want to redo it in a more "modern" stack that can do it on Android & Windows. theoretically iOS as well but as I don't have a Mac, can't really do that. Though in theory someone w/a Mac could: source code is out in the repo in the 1st post and I've added the MIT Open Source license to it, so have at it for those who can)

And I like "small" software I can wrap my head around. Comes from being a solo developer at small companies the last almost 40 years. Though that's a lie: I've been in software teams now the last 10+ years, but still mostly doing my own thing.

Anyway...working with the classic rules for the basic stuff in book 2 (maybe book 6) first.
 
and re: rules open to interpretation. The tables give a DM based on population on the destination world. Is that a DM for each die roll, only for one, or just subtract from the result?

I.e., 1D-1D is basically the T5 flux: roll a die, and then subract another die roll. If there is a -4 DM, is that per die, so that it is really (1D-4) - (1D-4) (which can never be > 0 anyway as the max is 4 - 4, unless we decide that 1D-4, giving us a range of -3..2 means that we *add* the negative as subtracting a negative...

anyway, going with the simple just subtract from the final result. As some of the results would otherwise make no sense. Ahh yes, the fun times when codifying a 40+ year old game and trying to follow the RAW. When the RAW does not always make sense if taken literally.

Should have the freight finished up shortly as it is basically the same thing as passengers. Though I did notice that the tables sometimes have a thing like 1D-2, where it is just 1D - 2 and not the 1D - 2D. And the freight table does adds as well, so taking both of those new things into account.

think this will work, but still playing:
C#:
 /// <summary>
 /// calculate a die roll based on a text string
 /// format: nD-xD or nD, '-' = no roll
 ///         nD+xD, nD+x
 ///         nD-x where x is a simple number
 /// </summary>
 /// <param name="dieRolls"></param>
 /// <returns>int results</returns>
 public int calculateRoll(string dieRolls)
 {
    int d1, d2 = 0;
    if (dieRolls == "-")
      return 0;
    string[] rolls = dieRolls.Split(new char[] { '-', '+' });
    bool isSubtract = dieRolls.Contains("-");
    Int32.TryParse(string.Concat(rolls[0].Where(char.IsDigit).ToArray()), out d1);
    if (rolls.Length == 2)
      Int32.TryParse(string.Concat(rolls[1].Where(char.IsDigit).ToArray()), out d2);
    if (rolls[1].Contains("D"))
      d2 = rollDice(d2);
    int results = isSubtract ? rollDice(d1) - (d2) : rollDice(d1) + d2;
    if (results < 0)
       return 0;
    else
      return results;
}

Note that only the 2nd part of the roll, if it exists, can be either a number or a die roll.

To quote something I read: if AI can generate software, it will require the users to clearly define what they want. Our jobs are safe.
 
okay, basic freight seems to be working. I need to add some tests for the various dice rolling possibilities, but hey, it is there.

Though I am really thinking of moving the next table I import into SQLite. the existing tables are almost a 1:1 copy of what is in the book as text files that get included in the software when it is deployed. The theory was that if I could find it, the user may be able to make adjustments to suit their MTU vs the OTU. But if I start to shift things to SQLite (a lightweight DB) then I could also (in theory!) give access to that for some stuff. Long term plan of course is ingesting the data from TravellerMap so that it is available off-line (plus reducing the calls to the API - websites cost $ and while that resource is freely given [and I actually help subsidize this site and possibly that one by being a Moot member, a Baron, so that is a Sir to you!] I'd rather not pillage it. Of course, I seriously doubt that even should I publish this that we would have that many users. I can see a few dozen tops honestly. But I could be missing something)

Also you may note that a couple of those fields are green. I've only added validation to a couple of them (those that are green). It is not complicated, but it does tie it to a specific rule set at the moment: T5 has much wider ranges on some of those fields (world size, population, etc). My current validations are based on CT as a test to see if I could do validations. But if I open this to other rule sets, those validations shift. Behind the scenes some of that is simple: the files I load can be version specific so that when loading the descriptions, I load the appropriate version list. But validations for specific UWP stats may differ based on version. So I really want to think about abstracting out the validation even more to be able to pass in the version rules. And preferably in a DB so that the users can then have an MTU version for a lot of this.

Yes - I really try to be flexible in my software. My biggest nemesis in developing software is hardcoded values. Sadly, the code base at work is almost all hardcoded values it seems....been that way the last couple of jobs honestly. Stuff that users should be able to change require a code change and redeploy. Not good planning - I don't want to maintain data! Anyway, I digress. I got more done this weekend than expected at least on this personal project.

edit: I need to re-read the freight rules: supposed to be lots I think. And in know we've all talked about this in another thread somewhere! Where I was conflating freight vs speculative trade. Anyway, maybe I'll get that corrected tonight.

And Happy 4th for those in the USA!

Screenshot 2023-07-04 160203.png
 
Is that a DM for each die roll, only for one, or just subtract from the result?
Modify the final result after rolling the dice.
1D - 1D - 4 = (roll 1d6) - (roll 1d6) - 4

Treat any result below zero as being zero.
So in that instance, you would need to roll 6 and 1 (respectively) in order to get 6-1-4=1 ... with all other potential rolls yielding zero.
 
Modify the final result after rolling the dice.
1D - 1D - 4 = (roll 1d6) - (roll 1d6) - 4

Treat any result below zero as being zero.
So in that instance, you would need to roll 6 and 1 (respectively) in order to get 6-1-4=1 ... with all other potential rolls yielding zero.
That is what I went with. I was also illustrating how rules can often have multiple interpretations. What may be clear in the designers head may not come out that way on paper (or on screen I suppose it's more accurate now)
 
for me, multiple interpretations are always possible and while I enjoy listening to other viewpoints, I don't have the need to force someone to my point of view. The only time I really care is when I have to write the code that uses those rules: then I need to know exactly what is needed. Though as I've said, I try to make my software flexible. Long, long term I'd love to have a rules-based system so that the user could enter their own rules. Probably never going to happen but I do like the idea. things like your external cargo: while I don't personally like it, and it does not exist in MTU except for what are essentially battle riders but are really cargo riders. If I get this software to the point where I am tracking cargo, version 1 would be limited to what your cargo bay can carry. But eventually I could add an option for external cargo pods, with the assumption you get all the fittings and so forth, and let that impact your jump and all that.
 
Forgot I had written this close to 20 years ago. Keep trying to rewrite it but there is something about the old Winforms I like (plus it was a lot easier than all the stuff now in some ways!) Even managed to get the print to work, as I was (and am) into something you can hold in your hand. Ironic as it is a SF game :)
I added in the BITS cargo stuff (that's what the profile section is). I must have had more free time back then. Think this was when I added an Aslan cargo generator in.

lbb2_manifest.JPG
lbb2_main.JPG
 
lbb2_manifest.JPG
Huh.
Regina/Regina has TL=A according to the UWP.

That really shouldn't be a surprise ... 😜
 
Huh.
Regina/Regina has TL=A according to the UWP.

That really shouldn't be a surprise ... 😜
the data actually came from the TravellerMap - the map view took you to that site, and all the data loaded from there. And it was almost 20 years ago so before T5 and any other things that may have changed things.

Basically, first time you used a new sector, it would load the data from TravellerMap into a local Sqlite DB. That way it could work off-line (other than the map view). If you were within a sector already loaded, it just used the local DB.
 
About 25 years ago I created an excell spreadsheet to setup and manage colonies, from the loadout of the first ship to running the colony from year to year. I should be able to recover the spreadsheet from the old computers I managed to bring with me when I moved from Texas to Alaska. Using the spreadsheet you can set up your balkinized worlds for trading with the specific cultures on the world. Rule set used was world tamer's handbook.
 
when I moved from Texas to Alaska.
;)

Know why Texans don't like Alaskans?

Because Alaskans look at Texans with condescending pity before shrugging melodramatically and then casually admitting (as if it were nothing), "Well, we can just divide our state in half and then you'll be third biggest ..." :sneaky:





Not intending to thread derail, but it was too good of an opportunity to pass up on that Dad Joke™.

We now return you to your regularly scheduled discussion of how to set up and colonize worlds in Traveller. 😁
 
;)

Know why Texans don't like Alaskans?

Because Alaskans look at Texans with condescending pity before shrugging melodramatically and then casually admitting (as if it were nothing), "Well, we can just divide our state in half and then you'll be third biggest ..." :sneaky:





Not intending to thread derail, but it was too good of an opportunity to pass up on that Dad Joke™.

We now return you to your regularly scheduled discussion of how to set up and colonize worlds in Traveller. 😁
AK: Our state is bigger than yours.
TX: Well, it won't be when it melts!

(Been to both, would be ok with going back to Alaska... it's its own planet, sort of.)
 
Well I have an Ex that lives in Texas/Oklahoma area has guns and dementia, was telling strangers that she was going to shoot my ass. That is why I moved to Alaska. I perfer to hold the crosshairs of my dad's 30-06 between the eyes on that brown bear while two buddies yell at it and hold 5000 lumen lights on it, than live in texas waiting for a demented woman to sneak into my home and shoot my ass. (The bear can be convinced to go away, the Ex, not so much.)
 
Last edited:
Back
Top