• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Cortex Game System Status Announcement

Mathias

Moderator
Staff member
I'd like to announce that I've been contracted by Lone Wolf Development to write the data files for the Cortex Game System by Margaret Weis Productions. This system is used for the Serenity, Battlestar Galactica, and Demon Hunters role-playing games, with other rpgs in the pipeline.


I'll be posting here with progress reports and some thoughts on how I've approached building the files, and how I've handled some of the mechanics that the Cortex Game System uses which are not used by the Skeleton data files or Savage Worlds system.

My intent is to provide a less technical walkthrough on how to build a set of data files for the game you're interested in than Rob has written (http://hlkitwiki.wolflair.com/index.php5/Savage_Worlds_Walk-Through) on the HL authoring kit wiki (http://hlkitwiki.wolflair.com/index.php5/Home). The idea is that the two walk-throughs will complement each other. The Cortex walk-through will go through the process of building datafiles, the sort of decisions you have to make when writing a game system with the HL authoring kit, and only touch on the mechanics, mostly for things that exist in Cortex but not in the Savage worlds system, so that anyone writing their own game will have more examples to draw from. The Savage worlds walkthrough goes into great detail on exactly how to make the changes.

This way, someone preparing to write their own game files can use mine to help them plan their overall approach, and use the Savage Worlds walkthrough to guide them through the details.

As I finish sections of my blog, I'll copy them to the wiki so they'll be better organized for someone not following the blog as its written.

Of course I welcome any comments or questions on what I'm doing. Please note that I can't give out work-in-progress files.

Mathias Gehl
 
I'll be roughly following the steps Rob went through for the Savage Worlds game system.

  • Attributes
  • Skills
  • Traits
  • On-the-fly modifications to your character (adjustments)
    • (As of 2/20/09 I'm here)
  • Spending AP (advancement)
  • Equipment
  • Weapons
  • At this point, I'll take a look at the user interface and see what overall layout elements need to be changed
  • Character sheet
  • NPCs
  • Small Vehicles
  • Large Vehicles
The Cortex system has gone through a rules revision from its first game to now. The Serenity rpg was the first written, the Battlestar Galactica and Demon Hunters games use what is essentially v2 of the Cortex game system.

I'm starting with BSG, since its a simpler example of the v2 rules than Demon Hunters. In most ways, the v2 rules add a little complexity to the v1 rules, so the v1 rules are a subset of the v2 rules. So, Rob, Colen, and I decided that modifying v2 to v1 would be easier than the other way around. We haven't decided which system to do next, or at what point in the process I add the other systems (for example, the BSG vehicle rules are mostly a subset of Serenity's, so it may be easier to add those first).
 
The Cortex system - quick summary from a HL programmer's perspective

For those of you who aren't familiar with the Cortex rules, a quick summary, concentrating on what's important when entering the mechanics into HL:

The elements of the game are all rated in dice, from d0 (no capability) to d12 for starting basic characters, and beyond that for more advanced characters (d12+d2, d12+d4, etc.). Of course dice only come in even numbers.

There are two modifications to a score that need to be taken into account in HL: Modifiers in play are "steps", modifications that change the type of die you're rolling. For example, you have a d6 strength (human average), but you're injured, and all attributes are at -1 step. Your strength is effectively a d4 at this point.

(I'll have to be careful in this blog to note the difference between traits in the HL skeleton data files, which refers to the core behaviors of most things in the game system and the Cortex system's Traits, which are what make characters distinctive - Assets and Complications that help to define your character's connections, personality, and background).

The other modification usually comes from the game's Traits, but can come from other sources. Dice can be added to a roll. Let's say your character has the Talented Asset - it says to pick two specialty skills you can justify as related, and add your trait die to all their rolls, so, we'll say you have Boxing d8 and Knives d10, and Talented Boxing/Knives d4. Therefore when making an Boxing roll, you roll d8+d4, and a Knife roll is d10+d4. What it would mean for your character is that you have a decent level of training in the two skills, and a real natural talent for them.

In play, rolls are almost always two separate things (not always attribute + skill, either), both related to the task you're trying to accomplish.

Let's take our injured, talented character trying to stab back with his knife - he would roll Strength of d4 + Melee of d10+d4, trying to equal or exceed a target number. The amount of excess adds to damage.

The game does try to maintain a separation between skills and attributes - there aren't any linked skills like there are in many other games. Because of this, I'm not going to try to put more than a couple of x + y rolls - only for things like initiative, which is always defined as Agility + Alertness

A melee attack might be Melee + the player's choice of Agility or Strength (depending on how they describe the attack), Alertness+ Melee might let you figure out which of the knives for sale was good quality, Intelligence + Melee to remember that this knife is used by this society of assassins, etc.
 
Last edited:
Basic mechanics

Now, I'll discuss setting up the basic mechanics of the Cortex system within HL. They're called traits in the skeleton files I'm using as a starting point for my files, and there are entirely too many references to them for me to change the name used, so I'll have to live with the trait/Trait confusion - the end user won't see the confusion if I can help it though.

I'll use the same basic mechanics as the skeleton files, and I'll be drawing on what Rob describes in the Savage Worlds walkthrough on how to convert number-based mechanics to dice-based mechanics.

So, my stats will go from 0-8, representing d0 - d12+d4 (base value * 2). I'm also being careful not to have any elements in the code itself that restrict the top limit - the max value of 8 is a field, and can be changed from inside a script if it needs to go higher or lower. That way, if someone writes a superhero game using the Cortex rules, your strongman can have a STR of 16, and HL will display it as 2d12+d4.

Steps are very easy to handle with the attributes as dice - adding +1 automatically becomes adding +1 steps. I'll re-name the various macros within HL to reflect the game's naming conventions, though. For example, the #trtinplay[] defined in the skeleton files will be renamed #steps[].

Handling dice additions is more complex, though. I'm going to need to record an arbitrary number of each type of die - that's what an array is for. I'll have an array, numbered from 0-6 (d0 - d12), with each number in the array representing the number of that size die.

Since this is the sort of thing that's likely to be useful to later data file designers:

Code:
<!-- Store a count of the dice used as an array -->
<field
id="trtArray"
name="Dice Used"
type="derived"
style="array"
arrayrows="7" > <!-- 6 dice + 0 -->
</field>
Code:
<!-- Calculate the trtDisplay field -->
<eval index="2" phase="Render" priority="5000" name="Calc trtDisplay">
<after name="Calc trtFinal"/><![CDATA[
~if this is a derived trait but not a rolls trait, our display text is the final value
if (tagis[component.Derived] - tagis[component.Rolls] <> 0) then
field[trtDisplay].text = field[trtFinal].value
done
endif
 
var display as string
var i as number
var dietype as number
i = 6
 
~Going from d12 - d0
while (i >= 0)
 
~If there are dice in the array
if (field[trtArray].arrayvalue[i] > 0 ) then
~add a "+" if this isn't the first things we've output
if (empty(display) = 0) then
display &= "+"
endif
~ if we're greater than 1, append the number
if (field[trtArray].arrayvalue[i] > 1) then
display &= field[trtArray].arrayvalue[i]
endif
 
~Append the value with a d in front
dietype = i * 2
display &= "d" & dietype
endif
i -= 1
loop
~put the final result into the proper field
field[trtDisplay].text = display
]]></eval>
Code:
<eval phase="Traits" priority="3500" name="Calc trtArray">
<after name="Calc trtFinal"/><![CDATA[
var dietype as number 
var dieremain as number
var diecount as number
 
dietype = field[trtFinal].value
~These values are not being multiplied by two before calculation
 
~diecount = the number of d12s used (so that trtFinal can go to infinity and still be handled)
diecount = round(dietype / 6, 0, -1)
diecount = maximum(diecount, 1)
 
~If our value isn't evenly divisible by 6 (if we don't have an exact multiple of d12s), add the remainder as a secon die
if (dietype >= 6) then
if (dietype % 6 <> 0) then
dieremain = dietype % 6
field[trtArray].arrayvalue[dieremain] = 1
endif
endif
 
~now that everything's calculated, bound dietype at d12
if (dietype > 6) then
dietype = 6
endif
 
~for low values, put 1 in the dietype, for high values, add the correct number of d12s
field[trtArray].arrayvalue[dietype] += diecount
 
]]></eval>

So, for the talented Unarmed/Melee d4 asset, it'll find the Unarmed and Melee skills, and add +1 to box 2 (d4) of their trtArray. When those skills are displaying themselves, they'll calculate their trtFinal value, add it to the existing trtArray, with the d4 already there, and trtDisplay will output 2d4 (the base Unarmed Skill + the Talented asset).
 
Last edited:
As I mentioned, there are a few things in the game which are always the sum of two attributes/skills. For example, initiative is always Agility + Alertness. Therefore, I've created the rolls component. It has two linkages, each of which is set to the relevant other thing. Then, it has this script to add the two linked things together and store them in its own trtArray:

Code:
<eval phase="Traits" priority="3600" name="Calc Rolls">
<after name="Calc trtArray"/><![CDATA[
~Because we have no trtFinal value of our own, the calc trtFinal script thinks we're at d0, so undo that
field[trtArray].arrayvalue[0] = 0
 
~Add the trtArrays from the two linkages
var i as number
for i = 0 to 6
field[trtArray].arrayvalue[i] += linkage[first].field[trtArray].arrayvalue[i] + linkage[second].field[trtArray].arrayvalue[i]
next
]]></eval>

Also, the rolls component will end up in the editor. That way, if you define new rolls for your game, or find that you're always looking up some pair of values, you can go into the editor, define the Roll, which will be a matter of picking the attributes/skills/traits involved from a drop-down list of everything, and HL will automatically add all the Rolls that have been defined to all characters, displaying them on the character generation screen and on the character sheets.
 
How easy will it be to add in "house rules" to the existing data files? Can they be added as an optional addition to the rules without changing the main data files?

I'm very excited to see the Cortex rules getting underway. From what I've read it seems as though the mainstay games (BSG, Serenity, Demon Hunters, and Basic Rules) in the Cortex rules set will be part of the rule set that can be purchased, is that correct?

I hope you don't mind, but I will probably have tons of questions as time goes on about this. And thank you for keeping everyone up to date on your progress.

And two more questions and then I'm done...for now.


Anyway to see any screen caps of your progress?

You said you had a blog, can you post or pm a link to your blog?

Thanks!!
 
What sort of house rules are you thinking of? If you mean adding or replacing skills, traits, rolls (initiative, dodge, endurance), equipment, vehicles, etc., that's what HL's editor is designed for - customizing the data files you're working with. If its a more fundamental change, please tell me, and I'll see about getting it in. So far the only optional rule I've implemented is one that allows you to make the maximum stat on any character (recruit/veteran/seasoned veteran) d12+d4, instead of following the standard rules that limit recruits to d12, etc. Static Initiative, Group Initiative, and other optional rules from the books are also on my list.

Actually, this thread is the blog I'm referring to. Is there a better term for that?

Mathias
 
As far as a particular house rule I don't have any examples right off. There always seems like there are rules that get implemented that streamline things. I know from playing 40k that we had tons of house rules, most were unwritten and understood.

Whenever I hear the word blog I automatically think of RSS feeds, and I do love getting blogs fed into my email client, it makes things a lot simpler for me. So naturally I thought if you were posting similar things in a seperate blog then I would hopefully subscribe to the RSS feed.

I've not yet gotten Hero Lab so I don't know the extent of what the program does, so some of my questions may be general and basic. I do know from experience with Army Builder that if HL is anything like that it will be right up my alley. In fact I have considered creating my own character generator, but so far HL has seemed to fulfill all the aspects I would want to put in it.
 
Attributes

Small section - once the traits are fully implemented, I just put in a script to control the maximum and minimums of attributes, added the attributes used in Cortex, and this section's done
 
Skills

Long section here. First, you should know that Rob, Colen, and I had a long phone conversation discussing what I would be doing in this project, and a lot of that time was spent on the Cortex skill system, since it uses mechanics that don't exist in any of the game systems that have already been added in HL.

For those who aren't familiar with Cortex, a short description of the skill system. Like attributes, skills are rated in dice - d0 (untrained) to d12+d4 (legendary mastery). If it were just that, skills would be as easy as attributes. What makes the Cortex skills unique is the way they handle specialties. A General skill, for example, Guns, can only be bought as high as d6. After that, you need to purchase specialties (ex: Pistols, Rifles, etc.) to go from d8 - d12+d4.

Implementing that in HL unfortunately requires that each specialty be added as a unique thing, rather than a selection menu. If your character is wielding a pistol, the weapon needs to be able to look up your Guns/Pistols skill. If it fails to find that, it will use your Guns skill, and if it fails to find that, it will be at d0. On the other hand, adding both the general skills and the specialties as separate things means that it's easy to present the skills a character has taken like the pre-generated characters in the book - Specialties are sorted under their general skill, and indented.

Coding skills:
There are three components written for skills. The Skills component includes all the behavior that all skills share, which is currently an identity tag (so that if something else wants to know if a skill is present on the hero, it can look for the tag Skill.xxx).

The SkillGen component includes all the behaviors that general skills have, Its trtUser is limited to a minimum of 1 and a maximum of 3 (d2-d6). General skills have an additional identity tag, SkillGen.xxx, along with the Skill.xxx identity tag they get from the Skills component. Unlike the Skill.xxx tag, which is forwarded to the hero as soon as the skill is taken, SkillGen.xxx is only forwarded to the hero if the General skill has a value of d6.

Specialties have a minimum value of 4 and a maximum of 8 (d8-d12+d4). Each is assigned (in the editor) a SkillGen.xxx tag that matches its parent General Skill. A pre-req defined on the specialty component will flag the specialty as invalid if its general skill isn't present, and isn't at a value of d6. Also, for each general skill, I've defined a specialty which unlike the rest, isn't unique, and has the User.NeedDomain tag. This adds the various domain behaviors to that skill, meaning that it shows a box for the user to fill in, defining its name. That way, if the user wants a specialty for their character that isn't defined, they just add the generic speialty, and name it whetever they want.

In the definition of the menu for choosing the skills your character has, I've used a needtag expression that requires both the hero and the skill to both have the same SkillGen tag, or the skill won't be displayed in the list of skills available. To make this work, I also had to define the tag SkillGen.zLast, and put that tag on the hero and on all general skills. The first reason for this is that if the needtag expression finds that there aren't any SkillGen's on the hero yet, it assumes that everything is a valid selection. So, at least one SkillGen needed to be on the hero before the user started selecting skills. Once you get into the skill selection, the various skills have to match at least one SkillGen that's on the hero. So, adding SkillGen.zLast to all the General skills means that they will show up in the list of skills you can take.

Here's what will happen as the user selects skills:
They'll click on the "Add Another Skill" button at the bottom of the skill list. Shown in the list are all the general skills available. Once they've choosen one of those general skills, and raised its value to d6, they can click on "Add Another Skill" again, and now the list of skills will show all the general skills they haven't taken, along with all the specialties that are available for the general skills they have at d6.

Sorting skills:
As I mentioned, each general skill generates its own SkillGen tag, and each specialty is assigned a SkillGen in the editor. Each general skill is also assigned SkillCat.General (order="1"), and each specialty has SkillCat.Specialty (order="2").

So, here's the sortset:
Code:
<!-- Sort skills, general first, then specialties -->
<sortset
id="Skills"
name="Skills">
<sortkey isfield="no" id="SkillGen"/>
<sortkey isfield="no" id="SkillCat"/>
<sortkey isfield="no" id="_Name_"/> 
 
</sortset>

What that means is that it first sorts all skills (general and specialty) by their SkillGen tag, so the Animal Handling skill and its specialties are sorted before Artistry and its specialties. The next thing it sorts by is the SkillCat tag. The SkillCat tag group is defined to have an explicit sort order, so within each SkillGen, the General skill gets sorted before all the specialties. The last thing to do is sort by _Name_, which simply means to sort the specialties alphabetically. The definition of the skill list in HL includes:

Code:
showsortset="Skills"
choosesortset="Skills"

so that the skills are sorted that way both before and after you select them.
 
All this makes my brain boil a bit. I never was very good at programming outside of basic html :( Mostly cause I've never been that patient.

You're doing a great job!! Keep it up!!
 
Sorry, I've been concentrating on my programming, and I haven't updated this. Status report: I've added equipment (all the mechanics are working, and 2/3 of the items are entered), weapons, armor, and character advancement (spending AP).
 
Last edited:
Traits:

In the Cortex system, the unique elements of a character (other than their skills and attributes) are called traits, and include assets (positive traits) and complications (negative traits).

Like attributes and skills, they are rated in dice, from d2 - d12. In HL, I'll be using the same basic fields as skills and attributes to store the final rating of the trait. I can also make use of the Ability component defined in the skeleton files - it includes a lot of the behaviors I need, and I won't have to write the panel to display them to the user from scratch. Here's what makes selecting a trait interesting from a HL perspective: not every trait is available at every die value. A few examples: Advanced Education: d2+, Ambidexterous: d2, Brawler: d2-d6, Lady Luck d4/d8/d12. All the traits in BSG could be defined in terms of a minimum, maximum, and step size between the available values, but the Demon Hunters game does have traits that can't be defined that way, and even if that wasn't the case, I don't want to restrict what can be added later. So, I've defined the Die tag group, which simply has the values 1-6 as its tags. Each trait can then be given the tags that it can select from (as a reminder, inside HL, each value is stored as 1/2 the die size, which simplifies the math, and then displayed as a die after all the calculations are done):

Advanced Education:
Code:
<tag group="Die" tag="1"/>
<tag group="Die" tag="2"/>
<tag group="Die" tag="3"/>
<tag group="Die" tag="4"/>
<tag group="Die" tag="5"/>
<tag group="Die" tag="6"/>

Ambidexterous:
Code:
<tag group="Die" tag="1"/>

To make use of those die values, I'm going to use a menu_array portal, which offers a drop-down menu for the user to select from, and displays the values stored in an array (which I'll generate based on the Die.? tags added to the trait). The first step is to add an array-based field for the manu to use, and a field which is text based and type="user" to receive the value. Here's the code for those fields, since I ran into a bit of trouble getting all the settings right before it worked:

Code:
<field
id="abRating"
name="Trait Rating"
maxlength="10"
type="user">
</field>
<field
id="abSelect"
name="Trait Rating Selections"
maxlength="10"
type="derived"
style="array"
arrayrows="9"> <!-- d0 - d12+d4 -->
</field>

Populating the array requires a for loop - loop i from 0-9, and if tagcountstr["Die." & i] <> 0 (if we have a tag of that die size), put "d2", "d4", etc. into that field. Once the user has selected a value, it's stored as a text value in abRating, and then there's a script to parse the text and add its value to the trtBonus field.

Now that the basic components of traits are done, I'll move on to assets and complications. There are separate components for assets and complications, in addition to the Trait component. The cost script from the skeleton file's Ability component gets moved to both the assets and complications components, so that the assets cost points from the resTraits pool, and complications add to the maximum value of resTraits. Because the game places a limit on the number of Trait Points your character can gain from the complications you buy, I have a second pool, resComp. The complications cost points from this pool, and unlike the pools of attribute points, skill points, and trait points you use to build a Cortex character, for this pool, it's okay if you don't spend it all, as long as you don't spend more than you have, so I fooled with the messages and colors used when displaying resComp.

Actually, I had better be more specific about that. In the miscellaneous.str file is the component for resources. Within that, you'll find the scripts that check how much of a resource you've used. If you've used it all, the value is displayed in grey. If you've used too much, it's displayed in red, and if you haven't spent it all, it's displayed in yellow (you can see this in play in the Savage Worlds files). My tab_traits.dat (which is renamed from the skeleton files' tab_abilities.dat) has separate portals for assets and complications. The assets portal is very close to the abilities portal defined in the skeleton files, the complications portal started out as the assets portal, but in the places where the assets portal can display field[resTrait].field[resSummary].text, and use the scripts defined for resSummary to display things in the right color, I went to miscellaneous.str, found the script for resSummary, and copied it to the Complications portal, and then modified it to display the colors and text I want it to.
 
Traits in Serenity:

I haven't implemented this yet, but one of the Cortex games (Serenity) was written with what's now considered v1 of the Cortex Game System. The biggest change is that traits have only two available values, major and minor. Rather than create a whole new set of mechanisms, what I'll do is define two of the values, probably d4 and d8, to mean minor and major. From there, I can put most of the scripts I wrote for the die values into if...then...else...endif statements, which will change the way everything is displayed depending on which game is being used. However, the end user won't see any of that. They'll only see that when creating a Serenity character, their assets and complications are available as minor and/or major, and in BSG, their assets and traits are rated as dice.
 
in the next serenity suppliment release i was under the impressions that they were goign to be havign a conversion for serenity to version 2 of the cortex rules. are you planning on making serenity able to choose what version of rules will be used?
 
flamepulse, I am planning on allowing the conversion, although it may not be in the initial release of the files.
 
I apologize for the lack of updates. The basic code is complete, the BSG game is entered, and the skin we're going to use for the Cortex system within HL has been designed and was implemented on Tuesday. I'm currently searching through the visual interface for anything that doesn't look just right and fixing those, and sometime this week (which is the GAMA trade show), Rob and Colen will have the change to meet with Margaret Weis Productions and show them what we've built.
 
Let's say your character has the Talented Asset - it says to pick two skills you can justify as related, and add your trait die to all their rolls, so, we'll say you have Unarmed d4 and Melee d6, and Talented Unarmed/Melee d4. Therefore when making an Unarmed roll, you roll 2d4, and a melee roll is d6+d4. What it would mean for your character is that you have a basic level of training in the two skills, but a real natural talent for them.
That's not quite right. I believe "Talented" lets you take two related specialties. So you could take Boxing and Judo, or Swords and Knives, or maybe even Savate and Cane.

Of course, it amounts to functionally the same thing, as long as you usually use the same specialty of your combat skill (which is likely).
 
That's not quite right. I believe "Talented" lets you take two related specialties. So you could take Boxing and Judo, or Swords and Knives, or maybe even Savate and Cane.

I'll edit my explanation - the code I wrote does only allow specialties for Talented, I just didn't specify that in in my writeup.
 
Last edited:
Back
Top