Moved character sheet above backstory

Fixed markdown type
Added a tool to htmlifize the output
master
Silverwizard 5 years ago
parent 4f834bccf9
commit c0134b6baf
  1. 47
      Cyberpunk.pl
  2. 4
      tohtml.sh

@ -2,12 +2,9 @@
use strict;
use warnings;
#print $#ARGV;
#if($#ARGV+1 >= 2){
# use constant depth => $ARGV[1];
#}else{
use constant depth => 5;
#}
use constant depth => 5;
$ARGV[0] =~ s/ /_/g;
mkdir $ARGV[0], 0755 unless -d $ARGV[0];
generate($ARGV[0], $ARGV[0], 1);
@ -26,7 +23,7 @@ sub generate {
my $EMP = roll(8,3);
my $BT = roll(8,3);
my $GENDER = table("Male", "Male", "Female", "Male", "Female", "Female", "Male", "Female", "Nonbinary", "Cyborg", "Gender");
my $SEX = table("Male", "Male", "Female", "Male", "Female", "Female", "Male", "Female", "Nonbinary", "Cyborg", "Sex");
my $SEX = table($GENDER, $GENDER, $GENDER, "Male", "Male", "Female", "Male", "Female", "Female", "Male", "Female", "Nonbinary", "Cyborg", "Sex");
my @ORIENTATION;
foreach my $item ("Male", "Female", "Nonbinary", "Cyborg"){
if(roll(2,1)>1){
@ -34,7 +31,23 @@ sub generate {
}
}
printf $CHAR "Name: " . $_[1] . "\n";
printf $CHAR "Name: " . $_[1] . "\n\n";
printf $CHAR "INT: " . $INT . "\n";
printf $CHAR "REF: " . $REF . "\n";
printf $CHAR "CL: " . $CL . "\n";
printf $CHAR "TECH: " . $TECH . "\n";
printf $CHAR "LK: " . $LK . "\n";
printf $CHAR "ATT: " . $ATT . "\n";
printf $CHAR "MA: " . $MA . "\n";
printf $CHAR "EMP: " . $EMP . "\n";
printf $CHAR "BT: " . $BT . "\n\n";
printf $CHAR $GENDER;
printf $CHAR $SEX;
printf $CHAR "Orientation: ";
foreach my $item (@ORIENTATION) {
printf $CHAR $item . " ";
}
printf $CHAR "\n\n";
printf $CHAR table("Biker Leathers", "Blue Jeans", "Corporate Suits", "Jumpsuits", "Miniskirts", "High Fashion", "Cammos", "Normal Clothes", "Nude", "Bag Lady Chic", "Generally Wears");
printf $CHAR table("Mohawk", "Long & Ratty", "Short & Spiked", "Wild & all over", "Bald", "Stripped", "Tinted", "Neat, short", "Short, curly", "Long, straight", "Hair");
@ -306,21 +319,6 @@ sub generate {
}
$age = $age-1;
}
printf $CHAR "INT: " . $INT . "\n\n";
printf $CHAR "REF: " . $REF . "\n\n";
printf $CHAR "CL: " . $CL . "\n\n";
printf $CHAR "TECH: " . $TECH . "\n\n";
printf $CHAR "LK: " . $LK . "\n\n";
printf $CHAR "ATT: " . $ATT . "\n\n";
printf $CHAR "MA: " . $MA . "\n\n";
printf $CHAR "EMP: " . $EMP . "\n\n";
printf $CHAR "BT: " . $BT . "\n\n\n";
printf $CHAR $GENDER . "\n\n";
printf $CHAR $SEX . "\n\n";
printf $CHAR "Orientation: ";
foreach my $item (@ORIENTATION) {
printf $CHAR $item . " ";
}
printf $CHAR "\n\n";
close($CHAR);
}
@ -331,7 +329,8 @@ sub roll{
sub name{
my $name = `notwhoami|head -n1`;
return $name;
$name =~ s/ /_/g;
return $name
}
sub table{

@ -0,0 +1,4 @@
for char in `ls $1`
do
markdown $1/$char > $1/`echo $char |sed 's/.md$/.html/'`
done
Loading…
Cancel
Save