PDA

View Full Version : [programming]Keywords



pr6i6e6st
October 16th, 2019, 20:03
Hey guys! Wondering if anyone can take a moment to explain what I need to set up some kind of keyword system in my Alien rpg ruleset.

So something like 5e’s effects. I see in the code where some of that is but I’m unsure if I need to set up any kind of templates or what the syntax is.

So let’s say we’re working on critical injuries. These can apply penalties to ability/skill rolls. I’d wan to be able to type into the critical injury field “mobility and ranged combat -2” and automatically have that applied.

Obviously I need a Function for keeping track of penalties on the abilities and skills. But how to I get find more than one penalty in a single stringfield? Is it much like how i had the automatic table rolls set up on the npcs? Would the typed next need to read more like “Mobility -2, Ranged Combat -2”?

Trenloe
October 16th, 2019, 20:15
Effects and conditions are coded into each individual action script within the ruleset.

Taking the 5E ruleset as an example - the ATK (attack) effect is coded in the manager_action_attack.lua script - do a search for ATK. This is a simple one as it only applies to one action - the attack action.

However, some effects and conditions can impact more than one action. For example, the "Encumbered" condition impacts attacks, ability checks, initiative, saves and skill checks. You'll see the "Encumbered" condition checked for in each of the manager scripts for all of those actions. With the relevant modifier being applied to each action.