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

Web Based CT Character Generator

subbob

SOC-5
I recently made my Perl TravCharGen program available for public access.

The link is http://www.subbob.us/TravCharGen/TravMain.pl

I wrote it originally as a command line (shell) application. Although the script has interactive options, I have not yet designed the CGI forms to enable user interaction.

Currently it is running AUTOMATIC GENERATION mode, so it creates a character each time the page is visited or refreshed in the browser.

Below I've provided an example of the script output.

HTML:
General Jamal Brown (Male) 42 years old

Enlisted in the Army

STR: 3  ->  2
DEX: 4  ->  2
END: 5  ->  3
INT: 3  ->  3
EDU: 5  ->  8
SOC: A  ->  B

Served 6 terms in the Army, Rank: General (6)

Status: Forced Out

Skills

Aircraft: 1
Automatic Rifle: 1
Body Pistol: 1
Carbine: 1
Cudgel: 1
Dagger: 1
Gambling: 1
Laser Rifle: 2
Mechanical: 2
Revolver: 1
Rifle: 1
Submachinegun: 1

Cash: $25000

Equipment

	Laser Rifle: 1


History

Term 0 Events
	ServiceSkills: Gained service skill: Rifle

Term 1 Events
	Commissioned
	Promoted to Rank 1 (Lieutenant)
	RankSkills: Gained service rank skill: Submachinegun
	Promoted to Rank 2 (Captain)
	Dagger
	Cudgel
	Automatic Rifle
	Revolver
	Successfully reenlisted

Term 2 Events
	Promoted to Rank 3 (Major)
	Stat Mod: +1 EDU
	Mechanical
	Successfully reenlisted

Term 3 Events
	Promoted to Rank 4 (Lt Colonel)
	Carbine
	Gambling
	Successfully reenlisted

Term 4 Events
	Promoted to Rank 5 (Colonel)
	Aircraft
	Stat Mod: +1 STR
	-1 STR due to aging
	-1 DEX due to aging
	-1 END due to aging
	Successfully reenlisted

Term 5 Events
	Promoted to Rank 6 (General)
	Mechanical
	Body Pistol
	-1 STR due to aging
	Successfully reenlisted

Term 6 Events
	Stat Mod: +1 STR
	-1 STR due to aging
	-1 DEX due to aging
	-1 END due to aging
	Failed to reenlist
	Earned 6000 annual retirement pay
	Mustered Out
	  10000
	  10000
	  5000
	  +1 SOC
	  Gun: Laser Rifle
	  +2 EDU
	  Mid Psg
	  Gun: +1 Laser Rifle
	  Mid Psg
	  Gun: +1 Laser Rifle
 
Revised to Accept Filter Criteria via URL

I modified the program to accept some filter criteria within the URL

Filter Options

RANK=n

SERVICE=ServiceName

Terms=#

(The filter names & values are case insensitive)

Method

The algorithm does NOT use those criteria to alter character generation.

It generates characters one at at time, discarding the results until a match is found.

If you are willing to wait, it will generate results with TERMS > 7; but the higher you go above 7, the less likely it will ever finish.

Multiple options are possible; I'll list a few examples below.

Each URL starts the same: http://www.subbob.us/TravCharGen/TravMain.pl?

Service Only

http://www.subbob.us/TravCharGen/TravMain.pl?service=navy

Terms Only

http://www.subbob.us/TravCharGen/TravMain.pl?terms=4

Rank Only

http://www.subbob.us/TravCharGen/TravMain.pl?rank=6

Army Colonel with 5 terms

http://www.subbob.us/TravCharGen/TravMain.pl?SERVICE=Army&RANK=6&TERMS=5

Result (I just used that link above to generate this one)

Code:
	General Mollie Adams (Female) 46 years old

	Enlisted in the Army

	STR: 6  ->  5
	DEX: 5  ->  5
	END: 8  ->  5
	INT: 9  ->  C
	EDU: 7  ->  8
	SOC: A  ->  B

	Served 7 terms in the Army, Rank: General (6)

	Status: Retired ($8000 annually)

	Skills

	Aircraft: 1
	Brawling: 1
	Electronic: 1
	Fwd Obs: 1
	Gambling: 1
	Laser Rifle: 2
	Pike: 1
	Revolver: 1
	Rifle: 1
	Submachinegun: 1
	Sword: 1

	Cash: $35000

	Equipment

		Shotgun: 1


	History

	Term 0 Events
		ServiceSkills: Gained service skill: Rifle

	Term 1 Events
		Commissioned
		Promoted to Rank 1 (Lieutenant)
		RankSkills: Gained service rank skill: Submachinegun
		Promoted to Rank 2 (Captain)
		Fwd Obs
		Stat Mod: +1 STR
		Stat Mod: +1 EDU
		Stat Mod: +1 STR
		Successfully reenlisted

	Term 2 Events
		Promoted to Rank 3 (Major)
		Electronic
		Laser Rifle
		Successfully reenlisted

	Term 3 Events
		Promoted to Rank 4 (Lt Colonel)
		Sword
		Gambling
		Successfully reenlisted

	Term 4 Events
		Promoted to Rank 5 (Colonel)
		Pike
		Laser Rifle
		-1 END due to aging
		Successfully reenlisted

	Term 5 Events
		Promoted to Rank 6 (General)
		Revolver
		Stat Mod: +1 DEX
		-1 STR due to aging
		-1 DEX due to aging
		Successfully reenlisted

	Term 6 Events
		Aircraft
		-1 STR due to aging
		-1 END due to aging
		Successfully reenlisted

	Term 7 Events
		Brawling
		-1 STR due to aging
		-1 END due to aging
		Retired at end of term
		Retired
		Earned 8000 annual retirement pay
		Mustered Out
		  10000
		  20000
		  5000
		  High Psg
		  +1 INT
		  +1 SOC
		  +1 INT
		  Gun: Shotgun
		  +1 INT
		  Mid Psg
		  Mid Psg
 
Back
Top