Chargenner

Dependencies

  • Sheet Formatter
  • Sheet Stat Handler
  • Sphere Terms Lister

Commentary

This is The Rock Bottom's latest chargen code. You can have it in its entirety. There are no major bugs in it, unless I just made one by ripping it up in notepad to be in copy-and-paset installable form. Email questions to moc.evil|xumbrt#moc.evil|xumbrt.

This iteration of TRBChargen purposefully only supports the generation of Vampires and human characters, but it is set up in a way designed to make adding more things very easy.

The above dependencies are also going to be ulploaded very soon.

Code

@@ DBTEMPLATES: This refers to the ROOM, TRBChargen: Templates
@@ DBLISTER: This refers to the OBJECT, Sphere Terms Lister.
@@ DBFORMATTER: This refers to the OBJECT, Sheet Formatter.
@@ DBHANDLER: This refers to the object Sheet Stat Handler.
@@ DBVIRTUES: This refers to the room, TRBChargen: Virtues.
@@ Make sure that you have the following, the code for which available on this site:  Sphere Terms Lister <STL>, Sheet Formatter Object <SFO>, and  Stat Handler <SSH>.  You need the DB numbers for these (read above).  If you do not have these, first install these objects.  Then make sure that you have created the rooms (you don't have to have done anything with them, they just need to exist), TRBChargen: Templates and TRBChargen: Virtues.  You need to have these because the code has you teleport to these locations in certain instances, so @dig these two rooms, save their DB numbers, then replace instances of  "DBTEMPLATES" to be your desired number (including the pound sign), and "DBVIRTUES" as well.  All of the replacements require you to include the pound sign that precedes the number.
+ooc
@dig TRBChargen: Hub = Chargen <CG>;cg;chargen, OOC Lobby <OOC>;ooc;ooc lobby;lobby;back;exit;leave
cg
@set here=inherit
@desc here = %tWelcome to Chargen, coded by Vilkas@TheRockBottom. If you have already made a character, be aware that proceeding will eat %chall of your stats%cn and they will not be recoverable.%r%r%tFirst, we need the basic building blocks of your character: sex, description, nature, demeanor and concept.%r%r%tType these commands one by one:%r%t@sex me=<male or female>%r%t@desc me=<Describe your character.>%r%tnature <choose a nature>%r%tdemeanor <choose a demeanor>%r%r%tType '%chlist%cn' to see the available choices for both nature and demeanor.%r%rTo go into the next step of Chargen, type +concept <your concept>.%rTo view a census of existing characters, type +census.
@@
@@
@@
@@ The VA here looks at your character and sees if you have put words in your description, have se tyour nature/demeanor, and have a sex that is either starting with m, or f.  Then if those all check out, it resets your sheet and pops you into the next room.  
@@
@@
@@
@va here=$+concept *:@switch/first [and(or(strmatch(get(%#/sex),f*),strmatch(get(%#/sex),m*)),gt(words(get(%#/desc)),0),hasattr(%#,nature),hasattr(%#,demeanor))]=0,@pemit %#={Please make sure you have your nature, demeanor, gender and description set.},{&concept %#=mid(%0, 0, 1024);&race %#=null;@set %#/race=wizard;@set %#/race=hidden;&class %#=null;@set %#/class=wizard;@set %#/class=hidden;&breed %#=null;@set %#/breed=wizard;@set %#/breed=hidden;&auspice %#=null;@set %#/auspice=wizard;@set %#/auspice=hidden;&attributes %#=1 1 1 1 1 1 1 1 1;@set %#/attributes=wizard;@set %#/attributes=hidden;&abilities %#=- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;@set %#/abilities=wizard;@set %#/abilities=hidden;&specabils %#=;&specabillist %#=;&alliance %#=null;@set %#/alliance=wizard;@set %#/alliance=hidden;@tel %#=DBTEMPLATES}
&LIST_ARCHETYPES here=$list:@pemit %#=[center(%ch%ccArchetypes%cn,79)]%r%r%b[iter(lnum(11),[ljust(extract(u(DBLISTER/list_archetypes),add(1,##),1),18)][ljust(extract(u(DBLISTER/list_archetypes),add(12,##),1),18)][ljust(extract(u(DBLISTER/list_archetypes),add(23,##),1),18)]%r)]
&CHOOSE_NATURE here=$nature *:&nature %#=[if(strmatch(u(DBLISTER/list_archetypes),*%0*),[capstr(%0)])];@pemit %#=The nature you have chosen [if(strmatch(u(DBLISTER/list_archetypes),*%0*),has been set on your sheet!,does not exist in the list of available archetypes. Type 'list' to see what you may choose.)];@set %#/nature=wizard;@set %#/nature=hidden
&CHOOSE_DEMEANOR here=$demeanor *:&demeanor %#=[if(strmatch(u(DBLISTER/list_archetypes),*%0*),[capstr(%0)])];@pemit %#=The demeanor you have chosen [if(strmatch(u(DBLISTER/list_archetypes),*%0*),has been set on your sheet!,does not exist in the list of available archetypes. Type 'list' to see what you may choose.)];@set %#/demeanor=wizard;@set
@@
@@
@@ Now we're going to make the Template selection room.  This chargenner code only includes the Vampire the Masquerade sphere, but this gives you a framework to add more stuff in!
@@
@@
@tel DBTEMPLATES
@set here=inherit
@desc here = %tNow you have begun character generation.  Type "I'm a ____" to begin.  Current available choices are 'human' and 'vampire'. 
&valid_choices here = human vampire
&cmd_choose_race here= $i* a *:@switch/first 0=match(u(me/valid_choices),%1),{@pemit %#=I'm sorry, but I did not see that as a viable option},{&race %#=grab(u(me/valid_choices),%1);@pemit %#=Your race has been set to [u(%#/race)]. [if(match(human,u(%#/race)),Please move on by typing 'next'.,Now I'd like to know your particular flavor of [u(%#/race)]. Your choices are the following:%r%r%b%b[iter(1 2 3 4 5 6 7 8,[ljust(extract(u(DBLISTER/list_[u(%#/race)]_classes),##,1,|),25)][ljust(extract(u(DBLISTER/list_[u(%#/race)]_classes),add(8,##),1,|),25)][ljust(extract(u(DBLISTER/list_[u(%#/race)]_classes),add(16,##),1,|),25)]%r)%rPlease take your pick and tell me "type ____".])];&xp %#=0;&totalxp %#=0}
&cmd_choose_class here=$type *: @switch/first 0=match([u(DBLISTER/list_[u(%#/race)]_classes)],*%0*,|),{@pemit %#= I'm sorry, but [capstr(%0)] does not match an entry in the listings for [capstr(u(%#/race))]. Check your choice/spelling.},{&class %#=extract([u(DBLISTER/list_[u(%#/race)]_classes)],match(u(DBLISTER/list_[u(%#/race)]_classes),*%0*,|),1,|);@pemit %#=You have now been flagged as a [capstr(u(%#/class))] [capstr(u(%#/race))].[u(me/[u(%#/race)]_response)]}
&vampire_response here= %b%bNow, I'd like to know wherein your loyalties lie. Are you a Camarilla, Anarch, Sabbat, or Autarkis? Please answer with "sect ____".
&cmd_set_sect here=$sect *:@switch 0=match(vampire,u(%#/race)),{@pemit %#=You are not a vampire, you can not use this command.},match(autarkis sabbat camarilla anarch,%0*),{@pemit %#=Your choice did not fit in with the listing.},{&alliance %#=[capstr(%0)];@pemit %#=Alright, you have been sorted. Please type 'next'.}
@dig TRBChargen: Attributes = Next <N>;n;next, Back <B>;b;back
@set n = inherit
@asucc n = &sheet_template %#=[if(hasattr(%#,sheet_template),u(%#/sheet_template),1)];&specabillist %#=[u(DBLISTER/list_[u(%#/race)]_specabils)] [u(DBLISTER/list_[u(%#/class)]_specabils)];@set %#/specabillist=wizard;@set %#/specabillist=hidden;&specabils %#=[iter(u(%#/specabillist),-,|)]
@@
@@
@@ You'll notice from here on out that there are 'templates' here.  If you give someone an attribute called sheet_template and set it to a numerical value between one and five, then they will receive more attributes, abilities, backgrounds, XP to spend.  These levels were dictated by the Werewolf the Apocalypse storyteller's guide, except for the XP conversion for vampiric Disciplines, naturally.  Secondly, there is a Sabbat character creation option that you will notice.
@@ Unlike standard WOD there is no stat category prioritization here: you get a flat rate of points to distribute without priority requirements.  Mainly because it's easier this way.
@@
@@
@@
@desc here = u(DBFORMATTER/showattrs)]%r%rPoints remaining: [sub(if(strmatch(vampire shifter mage,*[u(%#/race)]*),first(extract(u(me/template_cap),[u(%#/sheet_template)],1,|),.),last(extract(u(me/template_cap),[u(%#/sheet_template)],1,|),.)),ladd(u(%#/attributes)))]%r%rCommands%r%bincrease <stat> by <number>%t%tLift an Attribute%r%bdecrease <stat> by <number>%t%tLower an attribute%r%breset%t%t%t%t%tDrop all attributes to 1%r%bIn this room you set your Attributes, which represent the essential aspects of your character's body, mind, and character. If you shorten the increase and decrease command, chargen will still understand you. So, for instance, you can write "inc str by 3" or "dec int by 3" and it will understand what you mean.
@adesc here= &attribute_cap %#=[if(strmatch(vampire shifter mage,*[u(%#/race)]*),first(extract(u(me/template_cap),[u(%#/sheet_template)],1,|),.),last(extract(u(me/template_cap),[u(%#/sheet_template)],1,|),.))];@set %#/attribute_cap = wizard
&cmd_lower_attribute here=$d* * by *:@switch/first 0=match([xget(DBHANDLER,attrnames)],[%1]*),{@pemit %#=%chThat isn't a valid attribute, check your spelling or selection.%cn},isnum(%2),{@pemit %#=%chError:%cn You need to enter the value by its number, not by its spelling.},lt(sub(%2,u(DBHANDLER/retrieveattrvalue,[%1]*)),0),{@pemit %#=%chError:%cn You can't drop a stat under 1.},lt(0,%2),{@pemit %#=Crafty crafty. You cannot increase by a negative number.},{setq(0,u(%#/attributes));setq(1,u(DBHANDLER/retrieveattrvalue,[%1]*));&attributes %#=[replace(r(0),u(DBHANDLER/cg_return_attr_index,[%1]*),sub(r(1),%2))];@pemit %#=Your [%1] is now [u(DBHANDLER/retrieveattrvalue,[%1]*)].}
&cmd_lift_attribute here= $i* * by *:@switch/first 0=match([xget(DBHANDLER,attrnames)],[%1]*),{@pemit %#=%chThat isn't a valid attribute, check your spelling or selection.%cn},isnum(%2),{@pemit %#=%chError:%cn You need to enter the value by its number, not by its spelling.},gte(xget(%#,attribute_cap),add(%2,ladd(xget(%#,attributes)))),{@pemit %#=%chError:%cn You don't have enough points to spend that much.},gte(5,add(%2,u(DBHANDLER/retrieveattrvalue, [%1]*))),{@pemit %#=%chError:%cn You can't raise a stat above 5.},{setq(0,u(%#/attributes));setq(1,u(DBHANDLER/retrieveattrvalue,[%1]*));&attributes %#=[replace(r(0),u(DBHANDLER/cg_return_attr_index,[%1]*),add(r(1),%2))];@pemit %#=Your [%1] is now [u(DBHANDLER/retrieveattrvalue,[%1]*)].}
&cmd_reset here=$reset:&attributes %#=1 1 1 1 1 1 1 1 1;@pemit %#=%chYour attributes have been successfully reset.
&template_cap here = 24.22 | 28.25 | 29.26 | 30.27 | 31.28
@@
@@
@@ Abilities: Here is where you might want to change things.  DBHANDLER stores the ability names in an attribute called abilnames.  If you wanted to do something like remove 'etiquette' and replace it with 'repair' for every single character, then you would do it by changing the content of DBHANDLER's attribute, abilnames. 
@@
@@
@dig TRBChargen: Abilities = Next <N>;n;next, Back <B>;b;back
n
@set here=inherit
@Desc here= [u(DBFORMATTER/showabils)]%r%rPoints remaining: [sub(u(%#/ability_cap),add(ladd(u(%#/specabils)),ladd(u(%#/abilities))))]%r%rCommands%r%bincrease <stat> by <number>%t%tIncrease an ability%r%bdecrease <stat> by <number>%t%tDecrease an ability%r%breset%t%t%t%t%tDrop all stats to zero%r%bcreate <stat>%t%t%t%tCreate a new ability%r%r%bIn this room, you set the things your character has learned to do. Talents are those which life experience naturally teaches. Skills are those which training will usually teach. Knowledges are those which formal education will usually teach. Personal abilities hold your sphere-specific abilities and whatever abilities you want to make, like Automechanics or Archery. Add them with the 'create ___' command mentioned above.
@Adesc here= &ability_cap %#=[if(strmatch(vampire shifter mage,*[u(%#/race)]*),first(extract(u(me/template_cap),[u(%#/sheet_template)],1,|),.),last(extract(u(me/template_cap),[u(%#/sheet_template)],1,|),.))];@set %#/ability_cap = wizard
&CMD_INCREASE here= $i* * by *:@break [strmatch(u(%#/specabillist),*[%1]*)];@switch/first 0=match([xget(DBHANDLER,abilnames)],[%1]*),{@pemit %#=%chThat isn't a valid ability: check your spelling or selection.%cn},isnum(%2),{@pemit %#=%chError:%cn You need to enter the value by its number, not by its spelling.},gte(xget(%#,ability_cap),add(%2,ladd(xget(%#, specabils)),ladd(xget(%#,abilities)))),{@pemit %#=%chError:%cn You don't have enough points to spend that much.},gte(5,add(%2,u(DBHANDLER/abilvaluebyname, [%1]*))),{@pemit %#=%chError:%cn You can't raise a stat above 5.},{setq(0,u(%#/abilities));setq(1,u(DBHANDLER/abilvaluebyname,[%1]*));&abilities %#=[replace(r(0),u(DBHANDLER/cg_return_abil_index,[%1]*),add(r(1),%2))];@pemit %#=Your %1 is now [u(DBHANDLER/abilvaluebyname,[%1]*)].}
&CMD_DECREASE here= $d* * by *:@break [strmatch(u(%#/specabillist),*[%1]*)];@switch/first 0=match([xget(DBHANDLER,abilnames)],[%1]*),{@pemit %#=%chThat isn't a valid ability, check your spelling or selection.%cn},isnum(%2),{@pemit %#=%chError:%cn You need to enter the value by its number, not by its spelling.},gte(u(DBHANDLER/abilvaluebyname,[%1]*),%2),{@pemit %#=%chError:%cn You can't drop a stat under 0.},{setq(0,u(%#/abilities));setq(1,u(DBHANDLER/abilvaluebyname,[%1]*));&abilities %#=[replace(r(0),u(DBHANDLER/cg_return_abil_index,[%1]*),sub(r(1),%2))];@pemit %#=Your [%1] is now [u(DBHANDLER/abilvaluebyname,[%1]*)].}
&CMD_RESET here= $reset: &abilities %#=- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;&specabils %#=iter(u(%#/specabillist),-);@pemit %#=Your abilities have all been dropped to zero.
&CMD_ADD_ABIL here= $create *:@switch/first match(xget(%#,specabillist),%0)=1,{@pemit %#=%chThat ability is already on your list!},@pemit %#=Added %0 to your ability list.;setq(0,capstr(%0));&specabillist %# = insert(xget(%#,specabillist), 1,[r(0)]|);&specabils %#=insert(xget(%#,specabils), 1, 1);@pemit %#=capstr(%0) has been added to your custom list at novice level (level 1). Use 'add (number) to (skill)' to increase it.
&CMD_PERSONAL_INCREASE here= $i* * by *:@break [strmatch(u(DBHANDLER/abilnames),*[%1]*)];@switch/first 0=match([u(%#/specabillist)],*[%1]*,|),{@pemit %#=%chThat isn't a valid personal ability: check your spelling or selection.%cn},isnum(%2),{@pemit %#=%chError:%cn You need to enter the value by its number, not by its spelling.},gte(xget(%#,ability_cap),add(%2,ladd(xget(%#, specabils)),ladd(xget(%#,abilities)))),{@pemit %#=%chError:%cn You don't have enough points to spend that much.},gte(5,add(%2,u(DBHANDLER/specabilvaluebyname, [%1]*))),{@pemit %#=%chError:%cn You can't raise a stat above 5.},{setq(0,u(%#/specabils));setq(1,u(DBHANDLER/specabilvaluebyname,[%1]*));&specabils %#=[replace(r(0),u(DBHANDLER/cg_return_specabil_index,[%1]*),add(r(1),%2))];@pemit %#=Your %1 is now [u(DBHANDLER/specabilvaluebyname,[%1]*)].}
&CMD_PERSONAL_DECREASE here= $d* * by *:@break [strmatch(u(DBHANDLER/abilnames),*[%1]*)];@switch/first 0=match([xget(%#,specabillist)],*[%1]*,|),{@pemit %#=%chThat isn't a valid ability, check your spelling or selection.%cn},isnum(%2),{@pemit %#=%chError:%cn You need to enter the value by its number, not by its spelling.},gte(u(DBHANDLER/specabilvaluebyname,[%1]*),%2),{@pemit %#=%chError:%cn You can't drop a stat under 0.},{setq(0,u(%#/specabils));setq(1,u(DBHANDLER/specabilvaluebyname,[%1]*));&specabils %#=[replace(r(0),u(DBHANDLER/cg_return_specabil_index,[%1]*),sub(r(1),%2))];@pemit %#=Your [%1] is now [u(DBHANDLER/specabilvaluebyname,[%1]*)].}
&TEMPLATE_CAP here= 27.22 | 43.37 | 49.43 | 52.46 | 55.49
@@
@@
@@
@@
@@
@dig TRBChargen: Backgrounds = Next <N>;n;next, Back <B>;b;back
n
@set here=inherit
@desc here=[center(%chBackgrounds%cn,79,%cr=%cn)]%cn[iter(lnum(match(u(%#/bglist),last(u(%#/bglist),|),|)),%r[center(ljust(trim(extract(u(%#/bglist),add(1,##),1,|)),15)%b%b%b[extract(u(%#/backgrounds),add(1,##),1)],79)])]%r%b%r%chYour current choices: %([sub(extract(u(me/template_levels),u(%#/sheet_template),1),ladd(u(%#/backgrounds)))] points remaining%)%cn:%r[table([u(DBLISTER/list_standard_backgrounds)] [u(DBLISTER/list_[u(%#/race)]_backgrounds)] [u(DBLISTER/list_[u(%#/class)]_backgrounds)])]%r%r%chCommands:%cn%r%bincrease <stat> by <number>%t%tIncrease a background%r%bdecrease <stat> by <number>%t%tDecrease a background%r%breset%t%t%t%t%tDrop your stats to 0.%r%tBackgrounds represent what kind of holdings your character has in this world, whether it is money, things, people, or connections.
@asucc here= @force %#=[if(and(eq(1,u(%#/sheet_template)),match(sabbat,u(%#/alliance))),next)]
&RESET here= $reset:&backgrounds %#;&bglist %#;@pemit %#=Your backgrounds have been cleared.
&LIFT_BACKGROUND here= $in* * by *:@switch/first 0=match([u(DBLISTER/list_standard_backgrounds)] [u(DBLISTER/list_[u(%#/race)]_backgrounds)] [u(DBLISTER/list_[u(%#/class)]_backgrounds)],%1*),{@pemit %#=I do not understand your input.},isnum(%2),{@pemit %#=I'm sorry, but you will have to tell me how many points you want in numerical form, like 3 instead of spelling 'three'.},lt(0,%2),{@pemit %#=You cannot increase by a negative number.},lte(ladd([u(%#/backgrounds)] [%2]),[extract(u(me/template_levels),u(%#/sheet_template),1)]),{@pemit %#=That would exceed your maximum amount of [extract(u(me/template_levels),u(%#/sheet_template),1)] background points.},gte(10,[add(%2,u(DBHANDLER/univbgvaluebyname,%1))]),{@pemit %#=You can't have a background valued above ten.},match(u(%#/bglist),*%1*,|),{&bglist %#= [u(%#/bglist)] [grab([u(DBLISTER/list_standard_backgrounds)] [u(DBLISTER/list_[u(%#/race)]_backgrounds)] [u(DBLISTER/list_[u(%#/class)]_backgrounds)],%1*)] |;&backgrounds %#= [u(%#/backgrounds)] %2;@set %#/backgrounds=wizard;@set %#/backgrounds=hidden;@set %#/bglist=hidden;@set %#/bglist=wizard;@pemit %#=Now I'm adding [grab([u(DBLISTER/list_standard_backgrounds)] [u(DBLISTER/list_[u(%#/race)]_backgrounds)] [u(DBLISTER/list_[u(%#/class)]_backgrounds)],%1*)] to your sheet and setting it to [%2].},{&backgrounds %#=[replace(u(%#/backgrounds),match(u(%#/bglist),*[%1]*,|),add(%2,[u(DBHANDLER/univbgvaluebyname,%1)]))];@Pemit %#=Your %1 is now [u(DBHANDLER/univbgvaluebyname,%1*)].}
&LOWER_BACKGROUND here=$d* * by *:@switch/first 0=match(xget(%#,bglist),*[%1]*),{@pemit %#=%chThat isn't one of your backgrounds, are you sure it's on your list of backgrounds?%cn},isnum(%2),{@pemit %#=%chSorry:%cn You need to enter the value by its number, not by its spelling.},gte(u(DBHANDLER/univbgvaluebyname,[%1]*),%2),{@pemit %#=%chSorry:%cn You can't drop a stat under 0.},lt(0,%2),{@pemit %#=You can't decrease by a negative number.},{&backgrounds %#=[replace(u(%#/backgrounds),match(u(%#/bglist),*[%1]*,|),sub([u(DBHANDLER/univbgvaluebyname,%1)],%2))];@Pemit %#=Your %1 is now [u(DBHANDLER/univbgvaluebyname,%1*)].}
&TEMPLATE_LEVELS here = 5 8 10 15 20
@@
@@
@@ Powers - What we're doing here is making a sorter room and then popping people into race specific rooms automatically.  I have put all of the powers in one room before once and it works just fine, but this is easier to absorb, concept-wise, and a lot more friendly to the idea of adding more spheres at will.
@@
@@
@dig TRBChargen: Powers Hub = Next <N>;n;next, Back <B>;b;back
n
@set here=inherit
@dig TRBChargen: Vampire Disciplines = Vampire <V>;v;vampire
@dig TRBChargen: Virtues = Human <H>;human;h
@@
@@
@@ We're going to Powers before we're going to Virtues because if you're adding other spheres you might not want that sphere to hit the Virtues room, and besides, humans largely do not need to set paths of enlightenment, which is what's after Disciplines.
@@
@@
&race me = derp
@asucc here = @force %#=go [u(%#/race)]
@@ So what we're doing here is, when someone walks into this room, they are poofed right into whatever room corresponds to their race by taking an exit.  To make this work, you need to make the aliases of an exit correspond to race.  So  see that vampire exit as an example. 
vampire
@@
@@
@@ Disciplines.  This room was a pain in the ass.
@@
@@
@set here=inherit
@Desc here= [center(%chDisciplines%cn,79,%cr=%cn)]%r%cn[iter(lnum(match(u(%#/mainpowers),last(u(%#/mainpowers),|),|)),%r[center(ljust(trim(extract(u(%#/mainpowers),add(1,##),1,|)),15)%b%b%b[extract(u(%#/powervalues),add(1,##),1)],79)])]%r%b%r%chYour Clan disciplines %([if(match(u(%#/alliance),sabbat),4,3)] default dots plus [u(%#/xp)] experience points remaining%)%cn:%r%b[iter(1 2 3,extract(u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines),##,1,|)%r)]%r%chCommands:%cn%r%bincrease <stat> by <number>%t%tIncrease a Discipline%r%breset%t%t%t%t%tDrop your stats to 0.%r%bdisciplines%t%t%t%tList all of the disciplines%r%bthaumaturgy%t%t%t%tList the Thaumaturgical paths%r%bpath <number> <name>%t%t%tSet your primary/secondary/etc path%r%bnew tpath%t%t%t%tTo start a new Thaumaturgical path%r%b%r%r%tYour Disciplines are essentially your superpowers. If you have a level 2 or higher template, chargen understands the first three points you spend to be your basic expenditures, and then will start to eat your XP on further expenditures. %chFor help with Thaumaturgy, type "thaumhelp"
@asucc here=&virtuenames %#=Conscience Self-Control Courage;@set %#/virtuenames=wizard;@set %#/virtuenames =hidden
&RESET here= $reset:&mainpowers %#=;&powervalues %#=;@dolist lattr(%#/thaumaturgy_*)=&## %#=;@pemit %#=All disciplines and thaumaturgies dropped.
&TEMPLATE_LEVELS here=: 0 25 50 65 80
&SHOW_DISCIPLINES here= $di*:@pemit %#=[center(%chDISCIPLINE LIST%cn,79,%ch%cr%cu=)]%r%r%b[iter(lnum(10),[ljust(index(u(DBLISTER/list_vampire_disciplines),|,add(##,1),1),20)][ljust(index(u(DBLISTER/list_vampire_disciplines),|,add(##,11),1),20)][ljust(index(u(DBLISTER/list_vampire_disciplines),|,add(##,21),1),20)][ljust(index(u(DBLISTER/list_vampire_disciplines),|,add(##,31),1),10)]%r)]
&INCREASE_DISCIPLINE_DEFAULT here= $in* * by *:@break [gte(ladd(u(%#/powervalues)),[if(match(u(%#/alliance),sabbat),4,3)])];@switch/first 0=match(u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines),%1*,|),{@pemit %#=Your first [if(match(u(%#/alliance),sabbat),4,3)] disciplines must be in-clan disciplines.},lte(add(%2,ladd(u(%#/powervalues))),[if(match(u(%#/alliance),sabbat),4,3)]),{@pemit %#=Please first choose your initial [if(match(u(%#/alliance),sabbat),4,3)] discipline dots. Then, if you have XP to spend, you can add more dots onto your sheet.},gte(%2,0),{@pemit %#=Please don't try to increase by a negative number.},match(u(%#/mainpowers),*%1*,|),{&mainpowers %#= [u(%#/mainpowers)] [grab([u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines)],%1*,|)] |;&powervalues %#= [u(%#/powervalues)] %2;@set %#/mainpowers=wizard;@set %#/mainpowers=hidden;@set %#/powervalues=hidden;@set %#/powervalues=wizard;@pemit %#=Now I'm adding [grab([u(DBLISTER/list_standard_mainpowers)] [u(DBLISTER/list_[u(%#/race)]_mainpowers)] [u(DBLISTER/list_[edit(u(%#/class),%b,)]_mainpowers)],%1*)] to your sheet and setting it to [%2].},{&powervalues %#=[replace(u(%#/powervalues),match(u(%#/mainpowers),*[%1]*,|),add(%2,[u(DBHANDLER/retrievepowervalue,%1)]))];@Pemit %#=Your %1 is now [u(DBHANDLER/retrievepowervalue,%1*)].};&xp %#=[extract(u(me/template_levels),u(%#/sheet_template),1)]
&INCREASE_DISCIPLINE_XP here= $in* * by *:@break [lt(ladd(u(%#/powervalues)),[if(match(u(%#/alliance),sabbat),4,3)])];@switch/first 0=match([u(DBLISTER/list_vampire_disciplines)],%1*,|),{@pemit %#=I do not recognize this as a Discipine.},lte(add(%2,u(DBHANDLER/retrievepowervalue,%1*)),extract(5 5 5 5 5 6 7 8 9 10 10 10 10,add(1,u(DBHANDLER/UNIVBGVALUEBYNAME,generation)),1)),{@pemit %#=The highest you can bump a stat is [extract(5 5 5 5 5 6 7 8 9 10 10 10 10,add(1,u(DBHANDLER/UNIVBGVALUEBYNAME,generation)),1)]. You can lift this by buying more dots in Generation in the Backgrounds section.},gte(%2,0),{@pemit %#=Please don't try to increase by a negative number.},[not(lt(u(%#/xp),mul(sub(add(%2,u(DBHANDLER/retrievepowervalue,%1),1)),[if(match(u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines),grab(u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines),%1*,|),|),5,7)])))],{@pemit %#=You do not have the right amount of XP.},add(gte(u(%#/xp),10),match(u(%#/mainpowers),*%1*,|)),{@pemit %#=You need at least 10 XP to start a new discipline.},match(u(%#/mainpowers),*%1*,|),{&mainpowers %#= [u(%#/mainpowers)] [grab([u(DBLISTER/list_vampire_disciplines)],%1*,|)] |;&powervalues %#= [u(%#/powervalues)] 1;@set %#/mainpowers=wizard;@set %#/mainpowers=hidden;@set %#/powervalues=hidden;@set %#/powervalues=wizard;@pemit %#=Now I'm adding [grab([u(DBLISTER/list_standard_mainpowers)] [u(DBLISTER/list_[u(%#/race)]_mainpowers)] [u(DBLISTER/list_[edit(u(%#/class),%b,)]_disciplines)],%1*)] to your sheet and setting it to 1. Increase it by using this command again.;&xp %#=[sub(u(%#/xp),10)]},{&powervalues %#=[replace(u(%#/powervalues),match(u(%#/mainpowers),*[%1]*,|),add(%2,[u(DBHANDLER/retrievepowervalue,%1)]))];@Pemit %#=Your %1 is now [u(DBHANDLER/retrievepowervalue,%1*)];&xp %#=sub(u(%#/xp),mul(sub(u(DBHANDLER/retrievepowervalue,%1*),1),[if(match(u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines),grab(u(DBLISTER/[edit(u(%#/class),%b,)]_disciplines),%1*,|),|),5,7)]))}
&DECREASE here= $de*:@pemit %#=I'm sorry, but 'decrease ___ by ___' doesn't work here. You need to just reset your Disciplines instead by typing 'reset'.
&SEE_THAUMATURGIES here=$thau*:@pemit %#=[center(%chThaumaturgical Paths%cn,79,%ch%cr%cu=)]%r%r%b[iter(lnum(10),[ljust(index(u(DBLISTER/list_thaumaturgies),|,add(##,1),1),29)][ljust(index(u(DBLISTER/list_thaumaturgies),|,add(##,11),1),32)]%r)]%r%b[iter(lnum(10),ljust(index(u(DBLISTER/list_thaumaturgies),|,add(##,21),1),25)%r)]
&BUY_EXTRA_THAUMATURGY here= $new t*:@switch/first 0=not(match(u(%#/mainpowers),*thaumat*,|)),{@pemit %#=I see 'thaumaturgy' on your sheet already but it doesn't have a name for a path. You need to pick your path by typing path [add(1,words(lattr(%#/thaumaturgy_*)))] <your choice>, since you currently have [words(lattr(%#/thaumaturgy_*))] decided paths.},gte(ladd(u(%#/powervalues)),3),{@pemit %#=Opening a new Thaumaturgy path!;&mainpowers %#=[u(%#/mainpowers)] thaumaturgy|;&powervalues %#=[u(%#/powervalues)] 0},gte(u(%#/xp),7),{@pemit %#=Opening a new Thaumaturgy path by spending your XP.;&mainpowers %#=[u(%#/mainpowers)] thaumaturgy|;&powervalues %#=[u(%#/powervalues)] 0;&xp %#=sub(u(%#/xp),7)},{@pemit %#=You cannot use this command anymore. Try letting a few points go. }
&PICK_T-PATH here=$path * *:@switch/first 0=isinum(%0),{@pemit %#=You need to tell me the numerical value of your path orders. So if this is your secondary path, tell me path 2 %1. If this is your tertiary path, tell me path 3 %1. And so forth.},eq(%0,add(1,words(lattr(%#/thaumaturgy_*)))),{@pemit %#=You don't have that many paths to set just yet. Try going down by 1 number or more.},match(u(%#/mainpowers),*thaumaturgy*,|),{@pemit %#=I'm sorry, but you have to have "Thaumaturgy" on your sheet for me to work!},match(u(DBLISTER/list_thaumaturgies),*%1*,|),{@pemit %#=I do not know what path that you want for me to give you as your next path!},{&thaumaturgy_1 %#=[grab(u(DBLISTER/list_thaumaturgies),*%1*,|)];&mainpowers %#=replace(u(%#/mainpowers),match(u(%#/mainpowers),*thaumaturgy*,|),[u(%#/thaumaturgy_1)],|);@pemit %#=Your current path is now written down as [u(%#/thaumaturgy_1)]! Your 'Thaumaturgy' discipline has been replaced and your primary path is also recorded in your notes, which you can see if you type +sheet2.;@set %#/thaumaturgy_1=wizard;@set %#/thaumaturgy_1=hidden}
&THAUMHELP here=$thaumh*:@pemit %#=The commands you have to work with are 'thaumaturgy', 'path', and 'new tpath'. First, you need to get "thaumaturgy" on your sheet. If you are Tremere, then Thaumaturgy is on your native list of disciplines so you can use your first 3 points on it. Otherwise, you will have to first spend your discipline dots on in-clan disciplines and then type "new tpath". Typing "new tpath" adds Thaumaturgy to your list of disciplines if it isn't there already.%r%rSecond, you need to set which path you are wanting. Scroll up to see the list of all paths available. Then type "path 1 <your selection>", so for instance if I type, "path 1 destruction", it will give my primary path to be Hands of Destruction. You will notice that "thaumaturgy" disappears from your sheet and is replaced by whatever you set your primary path as. You can then increase or decrease this attribute by typing "inc ___ by ___".%r%rSo, what if I want to add a second path? I type "new tpath", then I type "path 2 <choice>". Then I type "increase <choice> by <amount>". Voila!
&INC_THAUMATURGY here= $in* * by *:@break [not(match(u(DBLISTER/list_thaumaturgies),*%0*,|))];@pemit %#=I recognize this as a Thaumaturgical path.;@switch 0=isnum(%2),{@pemit %#=Please enter a numerical value.},gte(%2,0),{@pemit %#=You have to give me a positive number, please.},match(u(%#/mainpowers),*%1*,|),{@pemit %#=I am not finding this on your sheet.},[if(lte(ladd(u(%#/powervalues) %2),3),1,0)],{@pemit %#=You need to use your first three dots before you start to buy more dots.},{&powervalues %#=[replace(u(%#/powervalues),match(u(%#/mainpowers),*[%1]*,|),add(%2,[u(DBHANDLER/retrievepowervalue,%1)]))];@Pemit %#=Your %1 is now [u(DBHANDLER/retrievepowervalue,%1*)].}
&INCREASE_THAUMATURGY_XP here=$in* * by *:@break [lt(ladd(u(%#/powervalues)),[if(match(u(%#/alliance),sabbat),4,3)])];@break [not(match(u(DBLISTER)/list_thaumaturgies),*%0*,|)];@pemit %#=My patience kind of ran out right around here, since it's more or less unlikely that someone is applying for an advanced template tremere... Please forgive the inconvenience and send in a +reqest for your extra stuff! Thanks, dahling.
@@
@@
@@ Paths.
@@
@@
@dig TRBChargen: Paths of Enlightenment = Next <N>;n;next, Back <B>;b;back
n
@set here=inherit 
@desc here = [center(%chPaths of Enlightenment,79)]%r%rHo ho, you're a Vampire. Here is where you are going to set your vampire-specific information: Paths of Enlightenment and some small details about your unlifespan.%r%rCommands:%rPaths%t%t%tTo show the available Paths of Enlightenment%rpick <key word>%t%tTo pick a Path (example, 'path accord')%rborn <MM/DD/YYY>%tTo set your birthdate%rdied <MM/DD/YYY>%tTo set the date of your Embrace
@Asucc here= &virtuevalues %#=last(extract(u(DBPATHROOM/path_values),match(u(DBPATHROOM/path_values),*[u(%#/virtuenames)]*,|),1,|),~);&defaultvals %#=last(extract(u(DBPATHROOM/path_values),match(u(DBPATHROOM/path_values),*[u(%#/virtuenames)]*,|),1,|),~);@set %#/virtuevalues=wizard;@set %#/virtuevalues=hidden;@set %#/virtuenames=wizard;@set %#/virtuenames=hidden;@set %#/defaultvals %#=wizard;@set %#/defaultvals=hidden
&PATH_LISTING here=Humanity ~ Conscience Self-Control Courage | Path Of The Beast ~ Conviction Instinct Courage | Path Of Blood ~ Conviction Self-Control Courage | Path Of The Bones ~ Conviction Self-Control Courage | Path Of Caine ~ Conviction Instinct Courage | Path Of Cathari ~ Conviction Instinct Courage | Path Of Death and the Soul ~ Conviction Self-Control Courage | Path Of Honorable Accord ~ Conscience Self-Control Courage | Path Of Lilith ~ Conviction Instinct Courage | Path Of Night ~ Conviction Instinct Courage | Path Of Metamorphosis ~ Conviction Instinct Courage | Path Of Power and the Inner Voice ~ Conviction Instinct Courage | Path Of Orion ~ Conviction Instinct Courage | Path Of Paradox ~ Conviction Self-Control Courage | Path Of Redemption ~ Conscience Self-Control Courage | Path Of Revelations ~ Conviction Instinct Courage | Path Of Typhon ~ Conviction Self-Control Courage
&SET_DOB here=$born */*/*:@pemit %#=Is your input is in the format MM/DD/YYYY?;@break [not(and(isnum(%2),isnum(%1),isnum(%0)))];@pemit %#=Great! Your birthdate has been set.;&DOB %#=%0/%1/%2;@set %#/dob=wizard;@set %#/dob=hidden
&SET_RIP here= $died */*/*:@pemit %#=Is your input is in the format MM/DD/YYYY?;@break [not(and(isnum(%2),isnum(%1),isnum(%0)))];@pemit %#=Great! Your Embrace has been set.;&rip %#=%0/%1/%2;@set %#/rip=wizard;@set %#/rip=hidden
&SEE_PATHS here= $paths:@pemit %#=[iter(u(me/path_listing),first(##,~)%r,|)]
&CHOOSE_PATH here=  $pick *:@switch/first 0=match(u(me/path_listing),*%0*,|),{@pemit %#=I don't understand.},{&vamppath %#=[last(grab(u([num(me)]/path_listing),*%0*,~),|)];&virtuenames %#=[last(extract(u([num(me)]/path_listing), match(u([num(me)]/path_listing),*[last(grab(u([num(me)]/path_listing),*%0*,~),|)]*,|),1,|),~)];&virtuevalues %#=[last(extract(u([num(me)]/path_values),match([u([num(me)]/path_values)],*[u(%#/virtuenames)]*,|),1,|),~)];&defaultvals %#=[u(%#/virtuevalues)];@Pemit %#=I just set your Path to [last(grab(u([num(me)]/path_listing),*%0*,~),|)].}
&PATH_VALUES here = Conscience Self-Control Courage ~ 1 1 1 | Conviction Self-Control Courage ~ 0 1 1 | Conviction Instinct Courage ~ 0 0 1
@open Next <N>;n;next=DBVIRTUES
@@
@@
@@ Virtues.
@@
@@
@tel #100
@set here=inherit
[center(%chVirtues%cn,79)]%r%r%b[iter(1 2 3,center([extract(u(%#/virtuenames),##,1)] - [extract(u(%#/virtuevalues),##,1)],79)%r)]%rVirtue points: [u(me/virtues)] total with [sub(u(me/virtues),sub(ladd(u(%#/virtuevalues)),ladd(u(%#/defaultvals))))] remaining%r%r%chCommands%cn%r%bincrease ___ by ____%r%bdecrease ____ by ____ %r%breset
&VIRTUES here= [if(match(sabbat,u(%#/alliance)),5,7)]
&RESET here= $reset:&virtuevalues %#=[u(%#/defaultvals)];@pemit %#=Your virtues have been reset to their defaults.
&LIFT_VIRTUE here= $in* * by *:@switch/first 0=match(u(%#/virtuenames),%1*),{@pemit %#=I do not understand.},isnum(%2),{@pemit %#=Please put in a number, not a word.},gt(%2,0),{@pemit %#=Please enter a positive value.},lte(ladd(u(%#/virtuevalues) [%2]),[if(match(sabbat,u(%#/alliance)),[ladd(u(%#/defaultvals) 5)],[ladd(u(%#/defaultvals) 7)])]),{@pemit %#=You would be using more points than you actually have.},lte(add(%2,u(DBHANDLER/virtuevaluebyname,%1*)),extract(5 5 5 5 5 6 7 8 9 10 10 10 10,add(1,u(DBHANDLER/UNIVBGVALUEBYNAME,generation)),1)),{@pemit %#=You cannot raise your stat that high with your current generational limit.},{&virtuevalues %#=[replace(u(%#/virtuevalues),match(u(%#/virtuenames),%1*),add(u(DBHANDLER/virtuevaluebyname,%1*),%2))];@pemit %#=Lifting your %1 by %2.}
&LOWER_VIRTUE here= $de* * by *:@switch/first 0=match(u(%#/virtuenames),%1*),{@pemit %#=I do not understand.},isnum(%2),{@pemit %#=Please put in a number, not a word.},gt(%2,0),{@pemit %#=Please enter a positive value.},[lt([extract(u(%#/defaultvals),match(u(%#/virtuenames),%1*),1)],[add(%2,extract(u(%#/virtuevalues),match(u(%#/virtuenames),%1*),1)))],{@pemit %#=That would lower this stat past its minimum value.},{&virtuevalues %#=[replace(u(%#/virtuevalues),match(u(%#/virtuenames),%1*),sub(u(DBHANDLER/virtuevaluebyname,%1*),%2))];@pemit %#=Lowering your %1 by %2.}
@dig TRBChargen: Approval = Next <N>;n
n
@set here=inherit
@set me=ansi
think %ch%cnCongratulations%cn, you have now installed the TRB Chargen.  Now, your task is to customize this chargen: the only thing available in it is currently Vampire.
@tel #0