Skip to content

Instantly share code, notes, and snippets.

@brianfeister
Last active November 4, 2016 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianfeister/3d5ccc202b566ca06ece00b984662591 to your computer and use it in GitHub Desktop.
Save brianfeister/3d5ccc202b566ca06ece00b984662591 to your computer and use it in GitHub Desktop.
Example YML formatting
- !
name: Alternate Form (I - III)
prerequisite:
- tier1:
- Attribute:
- Alteration: 2
- Feat:
- Some Other Feat Name
- tier2:
- Attribute:
- Alteration: 5
- tier3:
- Attribute:
- Alteration: 7
- Feat:
- Another Feat Name
tags:
- Supernatural
cost:
- 3
description: |
Alternate form is an ability possessed by lyncanthropes (werewolves, werebears, wererats), druids, vampires, and other creatures capable of assuming <emphasis>specific</emphasis> forms.
effect: |
You gain the ability to shapeshift into a single form (you choose that form when purchasing this feat and it cannot be changed). Assuming your new form is a major action. When you assume your new form, you gain a pool of points equal to your Alteration score, which you may immediately spend to temporarily increase your physical attributes. You cannot raise any physical attribute to be greater than your Alteration score, unless the physical attribute is already equal to your Alteration. In that case, you may increase it by a maximum of one point. This increase cannot be used to meet prerequisites for feats, but it can be used to give you access to banes and boons that you would otherwise not be able to use in your normal form. Until you purchase this feat at tier 3, you cannot use the supernatural attributes of the chosen form.
You return to your normal form immediately if you are reduced to zero hit points. You can also choose to voluntarily return to your usual form as a major action. Upon returning to your original form, your physical attributes return to their previous values.
<ul>
<li>Tier 1 – Your alternate form must be the same size as your normal form.</li>
<li>Tier 2 – Your alternate form can be one size different from your normal size.</li>
<li>Tier 3 – Your alternate form can be any size. In addition, you are able to use supernatural attributes for attacks (dragon’s breath, nymph’s charm, etc.) of your chosen form. Use your Alteration score for action rolls relating to these supernatural abilities.</li>
</ul>
var yaml = require('gulp-yaml');
// compile rules from yaml to json and output to
gulp.task('yaml', function(){
gulp.src(path.ymlSrc)
.pipe(yaml({
space: 2
}))
// replaces newlines from YAML "foo : |" linebreaks
.pipe(replace('\\n', '<br />'))
.pipe(gulp.dest(path.distClient+'/app'))
});
@jean1880
Copy link

yep, that will work nicely, I can have the data conform to that, for the purpose of my own application, will be writing it out as json, then will fork your repo, and attach them as converted YAML files when done. From there, will be easy to convert from your master source, whenever an update is pushed through.

@brianfeister
Copy link
Author

@jean1880 The one thing I want to warn you about with this project is that there's no guarantee that I won't also create my own project. I can guarantee I won't be doing it in the short-term, however, I just want to be 100% clear that I also have my eye on doing a character creator site as a stretch goal but it will be a very high stretch goal and it will involve a full Authorization API, the ability to login, save your character, share it across the community broadly, etc.

So, I just wanted you to be aware so that if I end up making an "official" one that you're prepared for that and don't feel like your project was a waste of time. Mine will take much longer because of my schedule, so yours will definitely be a great bridge to get us from where we are now to where I want to go with it eventually!

@raihje
Copy link

raihje commented Nov 4, 2016

I'm a bit new to Node/Gulp. How'd you pass feats.yml to the gulpfile when running gulp so it takes it as the "path.ymlSrc" So it doesnt' say "path is not defined" when I change it to 'feats.yml' it says replace is not defined which is even more odd.
edit after some tinkering and replacing references to things with strings, I got it to work 👍 Now to see if I can automate this and push it to a firebase for the other developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment