• 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.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Crewgen

Leitz

SOC-14 1K
Admin Award
Baron
Fun stuff with Perl today. Well, the past few days as I've been working on this.

With a config file like this:
Code:
#Ship name:hull size:jump:maneuver:cargo:max passengers:drive tonnage:weapons
Miss Rosa:400:2:3:200:4:50:Trip_Beam, Trip_Pulse, Trip_Pulse, Trip_Miss
BN-4594:400:1:6:20:0:40:Trip_Beam, Trip_Beam, Trip_Pulse, Trip_Miss
Slaver's Folly:600:2:3:200:0:50:Trip_Beam, Trip_Beam, Trip_Pulse, Trip_Pulse, Trip_Miss, Doub_Miss_Sing_Sand

And a command line like this:

Code:
bin/crewgen.pl --config=data/ships.csv --name=Rosa

I get output like this:

Code:
Miss Rosa
=========

 Pilot          Madelaine Bradshaw [F] 766876
 Navigator      Kim Tellier [M] 5A5379
 Engineer       Claudio Bond [M] A57678
 Engineer       Lura Glover [F] 76989B
 Medic          Louann Melton [F] 26C7A9
 Gunner         Lorine Serre [F] 5AA6A3
 Gunner         Joaquin Moen [M] A68A97
 Gunner         Gino Jakobsen [M] 55982A
 Gunner         Karyn Jansson [F] 975785
 Steward        Luis Monin [M] 459B64


Still lots to do, like skills and such. Code is in the perl_tools repo.
 
For some silly reason I always thought it would be interesting to have a fleet crew simulation.

Something like this, but over time.

It generates the crews for ships, and then it plays out their careers. Who gets promoted? Who just quits? Who gets a battle ribbon for participation? Who's lost when a ship is hit.

Let it run for 20-30 years. There's always that great story of the seaman who enlisted and eventually ended up an Admiral and Secretary of the Navy (I think, something like that, talk about bottom to top advancement!).

The basic premise is that after you run it, you can look at a random Fleet Admiral, and read his jacket, see where he's been, what he's done, his ships and commands and actions.

Detail is I don't know enough about how a Navy works to flesh something like that out.

I always thought it would be interesting color to, like, a Starfire campaign. Give players, if nothing else, a glimpse at the human cost of the battles and operations.
 
I have Zozer's "Solo" and the new Triplanetary game so a ship crew is high on my list. I usually make stories behind the game mechanics. Besides adding skills I want to duplicate some of the Ruby work I've done. Eventually the characters will have data like:

Code:
PO1 Russ Young M Age: 26 BB8C93 Navy: 2 Other: 1 
Curly medium auburn waist length hair, albino skin 
Temperament: Protector   Plot: Obstacles to love (5) 
Traits: Optimistic, Evasive
Blade-1 Leader-1 VaccSuit-1 Electronic-1 Gambling-1 
Cash: 95782 LowPsg (1) TAS (1)

Another plan is "plotgen", where I create the people involved in one of the dozen or two "standard" plots.

The long term fleet idea does sound like a fun read!
 
Updated Person.pm and crewgen.pl to use skills. Not even close to regular chargen but heading that way.

Code:
Slaver's Folly
==============

Flight Crew
===========
Aurore Pollet [F] 7677A9 
Pilot-1 
Donnie Thebault [F] 65A864 
Navigation-2 

Engineering
============
Rita Cameron [F] 257726 
Enginnering-2 

Jarvis Bergman [M] 364584 
Enginnering-2 


Medical
=======
Rutha Heath [F] 28B956 
Medical-2 


Gunnery
=======
Jermaine Benjamin [M] 788359 
Gunnery-2 

Monet Parks [F] 34A586 
Gunnery-2 

Arlene Vaughn [F] 45B386 
Gunnery-2 

Dwight Pataki [M] 56B775 
Gunnery-1 

Bessie Prost [F] 587CA3 
Gunnery-2 

Tula Guilbert [F] 748B92 
Gunnery-2
 
It has been a difficult month; work stuff starting being less than ideal after the holidays. There's a better than zero chance I'll have to look for a job in a few months so I'm learning the skills I want to move to now. For the community, that means a web app may be in the works. :cool:
 
For some silly reason I always thought it would be interesting to have a fleet crew simulation.

Something like this, but over time.

It generates the crews for ships, and then it plays out their careers. Who gets promoted? Who just quits? Who gets a battle ribbon for participation? Who's lost when a ship is hit.

Let it run for 20-30 years. There's always that great story of the seaman who enlisted and eventually ended up an Admiral and Secretary of the Navy (I think, something like that, talk about bottom to top advancement!).

The basic premise is that after you run it, you can look at a random Fleet Admiral, and read his jacket, see where he's been, what he's done, his ships and commands and actions.

Detail is I don't know enough about how a Navy works to flesh something like that out.

I always thought it would be interesting color to, like, a Starfire campaign. Give players, if nothing else, a glimpse at the human cost of the battles and operations.

That definitely sounds interesting, though I'm not quite sure how you would implement it. Would you have each character run the risk/reward rolls and other regular parts of chargen, or would you create a new mechanism, a sort of greater-scale risk/reward for the whole ship to simulate when it gets into battles and such? Similarly, would promotion rolls, medals etc. also follow the established rules for individual chargen, or something different to account for the fact these characters are all connected by a single ship?
 
Well, that's a nice passel of good news/bad news.

Good luck.

Thank you! It's not a total surprise; I took the job knowing the contract was up for rebid. It let me make my career change while still giving work good value for salary.

Meanwhile, I'm working in the career I've been trying to get to for years.
 
That definitely sounds interesting, though I'm not quite sure how you would implement it. Would you have each character run the risk/reward rolls and other regular parts of chargen, or would you create a new mechanism, a sort of greater-scale risk/reward for the whole ship to simulate when it gets into battles and such? Similarly, would promotion rolls, medals etc. also follow the established rules for individual chargen, or something different to account for the fact these characters are all connected by a single ship?

You just need a domain of ships and such "doing things".

You can look at it as much as a "fleet" simulator as a crew sim, as the crew is necessary to man the fleet. But it's the fleet "doing the work".

For example, it's not as if "Able Spacehand Rick Rogers" WANTED to go to the Fleet Action over Tobia 6, he just happened to be there.

The modern navy does "stuff" all day, every day, every month, every year...stuff we who are not-in-the-navy don't hear much about. They're constantly running operations.

Spacehand Rogers can get a note in his jacket for participating in Operation Redbird on the INS DD Hedgehog, a joint exercise between fleet elements and local SDB squadrons. Something that's not conflict related at all, but because of a commendation rewarded during the operation, he gets a promotion. Or a transfer to a combat unit. Or, who knows what.

Another way to look at it is an engine that fleshes out the rolls during extended CharGen. Something that just fills out the narrative. But you can have triggering events.

Spachehand Rogers rolled to get a promotion. By being promoted, he was not just bumped up in rank, he was moved to another position and responsibility. Now there's a gap that the Navy needs to fill. Similarly, Rogers needs to find someplace to go (or maybe he doesn't get the promotion, or maybe he has to wait). The die roll kind of subsumes all of those details (i.e. he missed his promotion roll, he didn't get promoted not because he wasn't capable, but because there was no job for him this year).

So, it could be "as simple" as that.

Start with a Navy, come up with a mechanism of assigning ranks to broad positions (i.e. Engineer Mate can be an E2-E4, or something). Populate them with characters (assigning proper skills as necessary). Then, perhaps on a quarterly basis, start rolling dice. Some folks muster out, some get promoted, folks get transferred to fill spots.

Be interesting to see where the dice show us there are gaps to be filled. Let ships go understaffed for a spell, but if we find there's a gap, perhaps start tossing some DMs on to folks to promote in to them.

It could be an interesting exercise, even without fleet motion.

My vision was how to handle combat losses. Deal with field promotions, such like that. Where do you get a 400 fresh crew to staff a new starship. What were they doing before?
 
If the overall commander has the ear of senior senior officers, like 2 stars and up, they can go into a conflict over staffed. That happened in Operation Just Cause, I think staffing was at the 110-125% level. It was about that time I found out the chow hall cooks had a secondary tasking as mortuary affairs.

There's always new recruits in the pipe-line. There has to be major losses to require Imperial scrounging for bodies. Of course, if they lose a fleet they probably lose the ships as well. If the fleet wins but with high crew losses new crew can be assigned to the ships as they are rebuilt.

That said, I find the idea of a computer simulation of this a bit light, story wise. I'll work on the crew generation stuff, you all can do the admiralty. :)
 
Making some progress on the crewgen code. There's a lot for me to learn and I'm pulling it together one line at a time. It's written in Go, so anyone with a C-ish background or similar (Python, Perl, Ruby, Java, etc) should be able to read most of it.

The plan is to get working code and then put it up on Heroku, Google App Engine, or similar.
 
In a total surprise move I was able to figure out conditionals in templates and converting a slice to a struct throughout the code. The program generates engineers based on drive size, a steward if you have passengers, and one gunner per mounted weapon. Adds a medic if the hull is >= 200 dT.

No real data scrubbing or error checking on the form yet, and only nominal tests. Still need to add skills and such to the crew as well. Not a bad couple hour's work though.
 
If you're interested in being a Beta Tester for the web version, PM me. While not great, it is live.
 
Updated the code to use Go Modules. Should be able to compile and run under current Go versions.
Working on how to generate a Star Trek ship crew with this. :)
If anyone wants to play with Go, let's talk!
 
Updated the README.md with instructions on building a Docker container to run the app.
 
One day I will settle on one programming language and just enjoy it. No looking at other languages, wondering how they would handle this issue or that challenge. Today isn't that day. Tomorrow isn't looking too hot either...

I've spent three years on Perl, a short sting in PHP for a friend, and the past few months on Python. Now I'm back to Go, and looking to improve crewgen. It's still a working web app, but I haven't tried putting it back on GAE. I'm thinking to remove the database and go to flat files, so that anyone who wants to add or change things like skills, species, etc, can do so.
 
After learning BASIC, I remember wanting to learn FORTRAN, LISP, Pascal, Ada, C/C++, ASM, COBOL. It was going to be awesome, etc. I suffered through all of them. Since I am a hobbyist, I just use Python now. Problem solved.
 
Back
Top