PDA

View Full Version : Adding Savage Settings


rob
March 16th, 2010, 03:41 PM
For those of you looking to add Savage Settings or other content from supplements, there are a few things added in the V1.7 release of the Savage Worlds data files that you should be familiar with. I'll outline those items in subsequent posts within this thread. If something isn't clear, please ask and I'll do my best to explain more fully.

rob
March 16th, 2010, 03:58 PM
Adding a New Source

The first thing you'll need to do is add a new source through which the user can toggle whether to enable your new content. There are two ways to do this.

If you are editing the data files by hand with a text/XML editor, then you can add your new source within an augmentation file (see the wiki for syntax). For example, you can add the XML element below to an augmentation file named "mysetting.aug".

<source
id="mysetting"
name="Setting Name"
parent="Settings"
description="insert text here">
</source>


The above code will define a source for the new setting and position it as a child of the "Savage Settings" source entry (it has the id "Settings"). Toggling the setting on/off is as simple as checking the box next to it.

To utilize your source, you must then associate a source requirement for each thing that should only appear when the source is enabled. This can be done in the Editor via the "Sources" option at the bottom of the configurable list for each thing. If you're writing your things by hand, you can use the "usesource" element.

If you are only using the integrated Editor to add your content, you can add a new source entirely via the things you define. Sources can be defined dynamically in the Editor and you can also assign a parent relationship for a source. You can use the following steps.

1. Using the "Sources" option at the bottom of the configurable list for a thing, select the "-New Source-" option at the top of the list.
2. Once you click "OK" to assign the sources, a new window appears to specify your new source.
3. Enter the unique id for your new source (e.g. "mysetting").
4. Enter the unique id of the parent source to use ("Settings").
5. Assign a name to your source for display to the user (e.g. "My Setting").
6. Click "OK" to save the source info.
7. Save the thing and then save your data file.
8. Switch to Hero Lab and use the "Quick Reload" feature to recompile and reload the data files.

Once you've reloaded the data files after adding your source, it will be fully available. You can toggle it on an off on the Configure Hero form. For subsequent things, it will appear in the list of available sources for easy selection. You only need to specify the name and the parent id a single time and reload the data files for Hero Lab to know about your new source and handle it properly.

rob
March 16th, 2010, 06:10 PM
Disabling Standard Gear

The core rulebook includes a wide assortment of standard gear (including weapons, armor, and vehicles). This gear spans multiple time periods and is merely representative. For some Savage Settings, a completely new assortment of gear is employed that wholly replaces the standard gear in the core rulebook. Replacing all that gear, one item at a time, is very annoying. So we've included a way to conveniently omit all the standard gear.

This is achieved by assigning the "Hero.NoStdGear" tag to the hero. As long as this tag is assigned at the start of evaluation, all standard gear will automatically disappear. You can then define all the custom gear for the setting and have it appear instead of the standard gear.

This technique can be employed entirely through the integrated Editor. Start by defining a new Mechanics thing and assigning it a dependency on the new source for the setting. This Mechanics thing will automatically be added to every new hero created.

Within the thing, add an Eval script with a timing *earlier* than Initialize/2000. This script then assigns the necessary tag to the hero. The XML for the Eval script would look something like below.

<eval index="1" phase="Initialize" priority="1000"><![CDATA[
perform hero.assign[Hero.NoStdGear]
]]></eval>


Once the above Mechanics thing is in place, reload the game system. Make sure the source is enabled that the new thing depends upon. Then go to the Armory or Gear tab and try to add a piece of equipment. All of the standard gear is omitted from the various lists. You can now start adding your own custom gear for the setting without having to worry about the standard gear getting in the way.

rob
March 16th, 2010, 06:29 PM
Faction Support

A number of Savage Settings have groups to which characters can belong. For example, in the Rippers setting, there are a variety of factions. Support for these groups has been built into the core Savage Worlds data files and can be leverage easily for settings that require them. To keep these groups distinct from other uses of the term "group" within Hero Lab (e.g. tag groups), the term "faction" is used. However, the mechanism is generalized and can be used for other groups with a similar behavior.

Enabling support for factions involves assigning a tag to the hero. This can be most easily achieved via a Mechanics thing, just like was demonstrated in the previous example. Create a new Mechanics thing in the Editor and assign it a dependency on the new source for the setting. Within the thing, add an Eval script in which factions support will be setup. In fact, you can easily add this logic to the exact same Eval script you added above to disable standard gear.

The Eval script must assign one of two tags to the hero. If every character is required to select a faction, then the "Hero.FactionReq" tag should be assigned. If characters may optionally select a faction, then assign the "Hero.FactionUse" tag.

You can also specify a custom term to be used for factions when displayed to the user, with the default term being "Faction". The term is specified by assigning it to the "acFactTerm" field on the hero.

Putting all this together, the XML for an Eval Script to setup optional faction use with the custom term "Cabal" would look something like below.

<eval index="1" phase="Initialize" priority="1000"><![CDATA[
perform hero.assign[Hero.FactionUse]
herofield[acFactTerm].text = "Cabal"
]]></eval>


Once the above Mechanics thing is in place, reload the game system. Make sure the new source is enabled. At the top, you will see a new chooser appear next to the race selection. It should say "Select Cabal". Clicking on it will say there's nothing to choose from since no factions have yet been defined, but faction handling is now enabled.

Adding factions is easy. Simply go to the Faction tab within the Editor and add new factions normally. Factions have no special fields - simply a normal name and a short name for use in space-constrained situations. If you want to assign special behaviors to certain factions, that can be done via Eval scripts and/or bootstrapping tags or other things to the faction. Once factions have been added, they can be selected via the chooser that now says "Select Cabal".

rob
March 16th, 2010, 11:02 PM
Disabling Race Selection

For some Savage Settings, all characters are human. Consequently, there is no need to display the race chooser for these characters. You can disable the race chooser by assigning the "Hero.NoRace" tag to the hero. This can be achieved using a Mechanics thing, just like has been demonstrated above.

When the use of race is disabled, no reference to race is made for the character. Not only is the chooser hidden, but no race is mentioned in either character sheet or statblock output.

rob
March 16th, 2010, 11:08 PM
Smarts-based Languages

The Rippers setting offers an alternate way of handling languages. Instead of each language being a skill, the number of languages known is half the character's Smarts die type (e.g. two languages for a d4, 3 for a d6, etc.).

This behavior is separately selectable via a configuration setting. However, if you want to force this behavior as part of a Savage Setting you can do so by assigning the "Hero.SmartsLang" tag to the hero at an early evaluation timing (e.g. Initialize/1000). As with everything above, you can accomplish this easily with a Mechanics thing and an associated Eval script.

tatteredking
June 16th, 2011, 08:20 AM
hey rob, in the source files, where would I find scripts that create the faction dropdown on the main page, and the faction tab in the editor? I'd like to play around and see if I could add in a "deity" functionality. If you can point me in the right direction...I'll have the files destroyed in no time :)

Don't worry, I've already created a "mysavage" directory and copied everything over.

CapedCrusader
June 17th, 2011, 01:16 AM
Are you talking about in addition to the Faction drop-down? I've used the regular Faction drop-down in my newest Hellfrost file for Deities.

tatteredking
June 17th, 2011, 02:52 AM
that was my initial thought, yes, but it doesn't allow for two choices, like Worshipper of Thrym and member of The Grey Legion.

CapedCrusader
June 18th, 2011, 07:12 PM
Being a member of the Grey Legion is a Professional Edge. You can join by taking that Edge...

tatteredking
June 20th, 2011, 02:54 AM
OK so I didn't have my books handy and was just pulling things out of the air....there are some factions you can join in some games that don't require Edges. You wouldn't be able to join a faction like that and be a priest of a certain god.

tatteredking
June 20th, 2011, 06:24 AM
bad TK....double post

rob
June 20th, 2011, 12:29 PM
hey rob, in the source files, where would I find scripts that create the faction dropdown on the main page, and the faction tab in the editor? I'd like to play around and see if I could add in a "deity" functionality. If you can point me in the right direction...I'll have the files destroyed in no time :)

Don't worry, I've already created a "mysavage" directory and copied everything over.

The faction handling logic is distributed across various places in the data files. In each case, just do a search for the word "faction" within the file in question. Here's a quick road map....


tags.1st - Contains the tags that control the enablement and behavior of the factions mechanism
actor.str - Handles the custom naming behaviors for the faction so an author can change the name to "Cabal", "Order", or whatever
traits.str - The Faction component and component set are defined here, from which every faction will derive
form_static.dat - Integrates the display of the faction chooser into the panel at the top of HL
editor.dat - Mechanism for defining custom factions via their own tab in the Editor
sheet_standard1.dat - Includes the faction in character sheet output
sheet_standard2.dat - Includes the faction in character sheet output for allies
out_statblock.dat - Includes the faction in statblock output
out_custom.dat - Includes the faction in any custom output
procedures.dat - Includes the faction in mouse-over output shown on the Dashboard and TacCon
thing_validate.dat - Verifies that a faction is selected when one is required

rob
June 20th, 2011, 12:33 PM
OK so I didn't have my books handy and was just pulling things out of the air....there are some factions you can join in some games that don't require Edges. You wouldn't be able to join a faction like that and be a priest of a certain god.

If you want, I can add to the todo list a second faction that would behave the same way as the current one. Or... what if I guided you through the process and you added it? Then I could drop it into an update and it would be generally available for everyone to use. Would you be game for that?

CapedCrusader
June 20th, 2011, 01:09 PM
I'd be willing to give it a try...