Difference between revisions of "Data Class Two"

From PCGen Wiki
Jump to: navigation, search
(Created page with "[Another transcript from an Email sent to the New Monkeys] Today's class will be going over Race, Class, Abilities / Feats and how to use Variables. If you have any questions...")
(No difference)

Revision as of 03:44, 26 October 2010

[Another transcript from an Email sent to the New Monkeys]


Today's class will be going over Race, Class, Abilities / Feats and how to use Variables.

If you have any questions about this or previous classes, send them to me. I'm planning on posting these on the WIKI, and hoping Rebecca will find it worthwhile to convert these to html files, and I'll add these to the Docs.


Overview - beyond the pcc file which we went over last lesson, everything else is geared towards the N/PC.

[Race] Without a Race, we don't have much of a foundation to build a character. The Race is the Actual Creature - Human, Dwarf, Elf, Gnoll, etc. The Race is our base building block. Everything that goes on the Race would be their Default Size, How many hands, Do They Get Feats, any Racial Special Qualities. Basically everything in a racial write up will go in the race.

- TIP - BONUS:STAT on a Race Line will appear on the Stat Block Summary as a Racial Bonus. No where else will that happen.

Let's build a Race, please open your text editor of choice, and find your Homebrew Race File.

Let's start a New Line at Line 3 [If you haven't done so, do enable your Text Editor Line Numbering Feature, it's a great tool for debugging].

The First Name is what the Race is called, since you'll be building this, we're going to be a little overly detailed. Instead of call out each tags' purpose I'm just going to put up a race, and I want you to mimic it exactly.

This next part is all on one line, tab separated, I'm putting each tag on it's own line and indented for easier reading on the email client.

  • Fluffy Bunny (Dire)
  • KEY:Dire Fluffy Bunny
  • OUTPUTNAME:Fluffy Bunny, [NAME]
  • SIZE:L
  • FACE:10,10
  • REACH:10
  • HANDS:3
  • LEGS:4
  • BONUS:STAT|DEX|10
  • BONUS:STAT|STR|6
  • BONUS:STAT|CON|4
  • BONUS:STAT|INT|-8
  • AUTO:FEAT|I is Fast
  • ABILITY:Special Ability|AUTOMATIC|Scent|Leap|Mutant Abilities ~ Dire Bunny
  • MOVE:Walk,50,Jump,30
  • NATURALATTACKS:Bite,Weapon.Natural.Melee.Piercing.Bludgeoning.Slashing,*1,1d6|Claws,Weapon.Natural.Melee.Piercing.Bludgeoning.Slashing,*2,1d4
  • MONSTERCLASS:Mutant:6
  • SOURCEPAGE:p.x
  • RACETYPE:Animal
  • RACESUBTYPE:Dire
  • STARTFEATS:1
  • HITDICEADVANCEMENT:10,20,20
  • TEMPLATE:Bunny Fu

Okay, that's a Dire Fluffy Bunny, a feared beast to be sure. Most of the tags should be self explanatory, so I'll press forward and point out some that need further discussion.

HANDS:3, that's the Bite, and two Claws.

I also want to point out we almost never use KEY in the race file, but this is to illustrate something. The NAME is always the First Item, and the Name is Always the KEY unless the KEY tag is set up. OUTPUTNAME is what the end user normally sees. [NAME] is a magic tag, it will either take the entire name of the race, or if present in the name, it will take the name fragment inside parenthesis '(' ')'.

OUTPUTNAME:Fluffy Bunny, [NAME] w/ the 'Fluffy Bunny (Dire)' would be seen as

  • "Fluffy Bunny, Dire".

Which brings up a PCGen LST code rule. We do not use commas in the KEY NAME, unless the KEY is set up separately. This is a universal rule, it applies to ALL files.

  • Cougar, Large < Illegal
  • Cougar, Large <> KEY:Cougar (Large) < Legal
  • Cougar (Large) <> OUTPUTNAME:Cougar, [NAME] < Legal

More on reserved characters can be found at 'http://wiki.pcgen.org/Data_LST_Standards'

Hit Dice Advancement is the tag used to determine if/when a creature has a growth spurt and the Maximum Monster Class it can obtain. Small becomes Medium, Medium becomes Large. All growth related functions are handled by PCGen for you. -1 to Hit, -2 to Dex, +4 Con, +8 Strength, +x to Grapple, etc. as determined by the gamemode file for that setting. It also says when the creature peaks - i.e. it can't take any further monster levels. A monster level is determined in the Class [Yes, we use Classes to handle both the Regular Base Classes, Prestige classes and monster classes or Racial HD, which include Animal, Magical Beast, Humanoid, etc.]

Review the tag for further information 'http://pcgen.sourceforge.net/autobuilds/pcgen-docs/listfilepages/datafilestagpages/datafilesraces.html#HITDICEADVANCEMENT'


Now say you had to Modify the race for your homebrew, instead of adding things directly, you may instead Modify the Race, in order to do that we put our 'MOD' version in a race file as well, and we use the KEY NAME of the race; remember the KEY NAME is ALWAYS the First Name / Object on the Line, unless the 'KEY' tag/object is used, and then KEY is the KEY NAME. [Which is why I used KEY in the race to illustrate this point. FYI - This holds true for ALL Objects, Race, Class, Feat, Ability, Template, etc.]

I can either put the mod in the same file [since we just made this ourselves, or in a separate file]. Here is my modification.

  • Dire Fluffy Bunny.MOD
  • TEMPLATE:Dire Bunny
  • DEFINE:BunnyMutantLvl|0
  • BONUS:VAR|BunnyMutantLvl|TL


Also of interest, I have a DEFINE in there, that's called defining a Variable name, and then you see I have a BONUS:VAR for the same Variable name. We DEFINE things to 0 to make them easier to manipulate, this is a common practice you should adopt. TL is a Hardcoded Variable that means 'T'otal 'L'evels. So, 'BunnyMutantLvl' is going to be identical numerically to the overall total levels of the Bunny, including class and monster levels. Which starting off will be 6. A Variable is a Word that is translated into a Number by PCGen. You'll see variables in action in a moment.

More on DEFINE and variables can be read here 'http://pcgen.sourceforge.net/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesdefine.html'


We'll need to set up those abilities next. PCGen is made up of different files that require each other to create a complete whole. In our race, we made a Call to the Ability File, the Feat File and the Template File. This could be termed object linking, if you want to think of it that way.

[Abilities & Feats + Variables] Feats were the precursor to abilities up until 5.10/5.12 for PCGen. You can still see them doing a dual role in our much older sets. However, with the advent of Abilities, feats have gone back to just feats. Nothing else really. Abilities actually encompass Feats. I'll go into ABILITYCATEGORY in a little later, but you'll see 'FEAT' has been grandfathered in. From this point forward, anything you can do in a Feat can be done with an Ability. However, ABILITY, as a tag, is a lot more versatile and flexible than FEAT, due to it's later adoption and requests from the data team. Feat is also special as it has it's OWN file type, but can be used in an ABILITY file, if it's set up as an ability.

Open up your feat file in your LST editor after you save your Race file. Note: You can work on multiple files at the same time in most text editors. This allows for fast switching when working on linked objects.

I put in the Dire Bunny a feat called 'I is Fast', that feat is granted automatically to the Bunny. But it must still exist, as PCGen will not add anything that isn't existing.

  • I is Fast
  • TYPE:General.Mutant
  • PRERACE:1,RACESUBTYPE=Mutant
  • DESC:You may add 10' to your base movement rate when using the run action

That is a simple feat. I have my feat KEY NAME, what TYPE it is, and in Abilities/Feats TYPE is a sort of pool for organization. It also has other uses. But if you were to look in your feats section of PCGen, select 'TYPE/Name' your feat would show up under General and Mutant.

- TIP - In order to make the Above a Feat in an ABILITY FILE, add 'CATEGORY:FEAT'

Next we need to open our Ability File, please do so.

Scent is already created in our sets, as long as we load a core set or something that includes it, we don't need to recreate it.

Instead we will need to create the 'Leap' and 'Mutant Abilities ~ Dire Bunny']

  • Leap
  • CATEGORY:Special Ability
  • TYPE:SpecialQuality.Extraordinary
  • DESC:The Bunny can cross any square as part of it's leap action without provoking an attack of opportunity.

[Okay, that's a fairly straight forward Ability, nothing to write home about. Abilities have to include a CATEGORY tag. I can have a Leap Special Ability, a Leap Mutant, a Leap Psychic Talent, and they would not overlap because they are different. To show how different let me show how you would modify them:

  • CATEGORY=Special Ability|Leap.MOD
  • CATEGORY=Mutant|Leap.MOD
  • CATEGORY=Psychic Talent|Leap.MOD

Nice and neat. Next the TYPE plays an important role. Our Output Sheets use the CATEGORY and TYPE to determine placement of the Ability so the end user may see it. SpecialAttack will display the Ability under the Special Attack Block; SpecialQuality, does the same for Special Qualities. There are a few others but those are the Basic two display blocks. Next we also set up the Ability to append the (Ex), (Su), (Sp) after the name if you use the following types WITH the SpecialAttack or SpecialQuality types > Extraordinary, Supernatural, SpellLike. This saves you work and effort.

Next we're going to hit some advanced techniques, I'm going to break apart the ability so you can see how it's built.]

  • Racial Abilities
  • KEY:Mutant Abilities ~ Dire Bunny
  • CATEGORY:Special Ability
  • TYPE:SpecialAttack.Extraordinary
  • DESC:%1/day, the Bunny may cause it's eyes to glow red and cause fear in %2 targetted opponents|BunnyMutantTimes|BunnyMuntantTargets|PREVARLT:BunnyMutantLvl,8
  • DEFINE:BunnyMutantTimes|0
  • DEFINE:BunnyMuntantTargets|0
  • BONUS:VAR|BunnyMutantTimes|BunnyMutantLvl/3
  • BONUS:VAR|BunnyMuntantTargets|BunnyMutantLvl/2

[This is interesting, the NAME is different, and guess what, in the absence of an OUTPUTNAME, that is what will be seen by the end user. Now, in the DESC tag you see '%' followed by a number, this is a Substitution Marker and the Number indicates which Variable Name to use in order they appear after the PIPE located at the very end of the DESC tag. 1 is first Name, 2 is the second name, etc. Remember, those names become numbers in PCGen.]

  • CATEGORY=Special Ability|Mutant Abilities ~ Dire Bunny.MOD
  • DESC:%1/day, the Bunny may cause it's eyes to glow red and cause paralysis in %2 targeted opponents|BunnyMutantTimes|BunnyMuntantTargets|PREVARLT:BunnyMutantLvl,12|PREVARGT:BunnyMutantLvl,8
  • CATEGORY=Special Ability|Mutant Abilities ~ Dire Bunny.MOD
  • DESC:%1/day, the Bunny may cause it's eyes to glow red and cause %3d%4 in %2 targeted opponents|BunnyMutantTimes|BunnyMuntantTargets|BunnyMutantDie|BunnyMutantDieSize|PREVARGTEQ:BunnyMutantLvl,12
  • DEFINE:BunnyMutantDie|0
  • DEFINE:BunnyMutantDieSize|6
  • BONUS:VAR|:BunnyMutantDie|(BunnyMutantLvl,15)

[Alright, PCGen makes HEAVY Use of Variables. Without Variables PCGen would not be the awesome program it is today. The Power and Versatility of the Variables is just too much to even put into words. The Greatest thing you'll need to master is Variables and Formulas. The complex beast above is a good example of a fairly complex set up, sadly, this is child's play compared to some of our other set ups. Okay, in total we have THREE Desc tags, normally a DESC tag would display the text, if you have more than one they'll add to each other. However, I'm controlling the Display of the Desc to be only one at any given level. I'm doing that by the PREVAR tag. PREVAR comes in a few flavors PREVAR plus LT [Less Than], GT [Greater Than], LTEQ [Less Than or Equals], GTEQ [Greater Than or Equals], NEQ [Not Equals]. Which means PREVARLT:BunnyMutantLvl,8 is allowed until the Bunny reaches 8th Level in total. You'll notice on the last one I added some more DEFINES and BONUSES. That bunny will be doing a 1d6 of damage per level up to 15d6. Variables can take Formulas, BunnyMutantLvl/3 means take the value of BunnyMutantLvl and divide by 3 for the total result.

This is really cool, cause it makes the abilities dynamic and change with the character. We do this in Sneak Attack, Turn Undead, Smite Evil, and many many more places.

Variables are used a lot in PCGen. Get to know them well. Okay, now that we've created the Race, and we've created the abilities and a feat, we need to give him his Monster Class which I called Mutant.


[Class] Please open the class file.

Class is one of the few files where your starting name must be CLASS:<ClassName> Class is also one of the few files where the tags are not all on one line, but actually be a Multi Line. Class must start with the CLASS and each line NOT starting with CLASS must start with a Number. For organization and neatness you may have Multiple CLASS Lines (Any line starting with CLASS) and Class Level Lines (Any number starting a line following a Class Line). Modifying a Class also requires the 'CLASS portion' example:

  • CLASS:Mutant.MOD
  • SAB:This is an old tag.

This is where I am going to correct the CLASS on this. Level Lines do NOT have to include every level. Only Levels which have something being added or changed on the character.

You'll see

  • CLASS:Class Name
  • 1
  • 2
  • 3
  • 4
  • 5

That is a waste of time, just include levels that do something and leave off the dead levels.

Standard Class Set up First Line is your HD, TYPE, BONUS Tags for BAB, Saving Throws (which we call CHECKS), and the SOURCEPAGE Second Line for Prestige Classes are the PRExxx tags - what do I need to qualify. Third Line is STARTSKILLPTS, and CSKILL Fourth Line is for your casters this includes SPELLSTAT, BONUS to Casterlevel, KNOWNSPELLS if any, and any related Caster Items.

The First Blocks are usually any weapon or armor proficiencies, anything that all characters get.

Since Mutant Bunny is simple this is how it should look:

  • CLASS:Mutant
    • HD:8
    • TYPE:Monster
    • BONUS:COMBAT|BAB|CL*3/4
    • BONUS:CHECKS|BASE.Fortitude,BASE.Will|CL/2+2
    • BONUS:CHECKS|BASE.Reflex|CL/3
    • SOURCEPAGE:p.x
    • MAXLEVEL:20


  • CLASS:Mutant
    • STARTSKILLPTS:2
    • CSKILL:Climb|Spot|Listen|Hide|Move Silently
  • ###Block: Proficiencies
  • 1
    • ABILITY:Special Ability|AUTOMATIC|All Automatic Proficiencies
  • ###Block: Level Advancement
  • 1
    • BONUS:ABILITYPOOL|Mutation Growth|CL/3
  • 1
    • ABILITY:Special Ability|AUTOMATIC|Mutant Kinship

Okay, I added a bonus to an abilitypool > which is set up when you have ABILITYCATEGORY:<NameOfPool/NameOfCategory>

Like coding a real book now, see we need to go back to the Ability file and add the Mutant Kinship.

  • Tip - Using '###Block:' and '#Block:' will organize your files, plus PrettyLST sees those and knows to organize that section as if it's own.

Back to the Ability File. You will likely want to organize your abilities. So, let's do that now

Above the Racial Abilities of the Bunny, add this

  • ###Block: Dire Fluffy Bunny Abilities

Below the last of the Racial Abilities make a couple of newlines [hit enter a couple of times if you're unfamiliar with the term 'newline'].

Add this:

  • ###Block: Mutant Class Abilities

and then let's add that ability -

  • Mutant Kinship
  • CATEGORY:Special Ability
  • TYPE:SpecialQuality
  • DESC:You take a -2 charisma check to non-mutant interactions, but a +4 to Charisma related checks when dealing with other mutants.

Fairly simple. Again, this is what coding up a book will be like, Race, Class, Ability, Class, Ability. You'll get your own method down.

Now, I mentioned Ability Categories before. We need to open the Ability Category File. There are TWO types of Ability Categories. Master or Parent, and then Sub or Child. The Parent is what we have for FEAT, or SPECIAL ABILITY. Those are the overarching categories. Below those we have the Subs or Pools.

This is a Parent:

  • ABILITYCATEGORY:Special Ability
  • CATEGORY:Special Ability
  • VISIBLE:NO
  • EDITABLE:NO
  • EDITPOOL:YES
  • FRACTIONALPOOL:NO

The ABILITYCATEGORY and the CATEGORY match exactly, indicating that is a Parent Category. A Parent does NOT use 'TYPE', or 'ABILITYLIST'.

This is a child: [You'll want to add this to your ability category file]

  • ABILITYCATEGORY:Mutation Growth
  • CATEGORY:Special Ability
  • TYPE:MutationGrowth
  • VISIBLE:QUALIFY
  • EDITABLE:YES
  • EDITPOOL:YES
  • DISPLAYLOCATION:Class Abilities
  • PLURAL:Mutation Growths

The ABILITYCATEGORY does NOT match the CATEGORY, it's using the CATEGORY of another defined Parent.

Now, you'll see I placed the TYPE:MutationGrowth, that means any Ability with CATEGORY:Special Ability and TYPE:MutationGrowth will populate my ABILITYPOOL.

Now we need to go make a couple of abilities for that pool, back to the Ability File!

I'll keep these ones simple:

  • Mutant Growth
  • CATEGORY:Special Ability
  • TYPE:MutationGrowth.SpecialQuality
  • Mutant Disguise
  • CATEGORY:Special Ability
  • TYPE:MutationGrowth.SpecialQuality

Finally, I snuck in a template - open up your template file and add

  • Bunny Fu

That's all you need for a template... more can be done with those, but for now, I think that's it for today's class.

Cheers, -- Andrew Maitland