![]() |
Member
Join Date: Apr 2018
Location: New York
Posts: 32
|
In my playthrough of the Strange Aeons AP, we're using the Sanity system, and to make the knowledge the PCs are gaining feel more impactful and dangerous, I'm trying to make a Knowledge (Mythos) skill similar to that seen in the Call of Cthulhu/Delta Green systems, and also present in the variant d20 Sanity system.
Mechanically, I'm trying to make an eval script that codes so that every rank in Knowledge (Mythos) (id skKnoMyth) results in a -1 reduction/penalty to either the Sanity (tSanity) or the Displayed Sanity (tDispSan). The problem is that I have no clue to to do something like that. Any advice on how to at least get started? |
![]() |
![]() |
Senior Member
Join Date: Sep 2013
Location: Vancouver, Canada.
Posts: 804
|
Skeld has a recently bumped thread on modifying Sanity.
Not sure if it helps at all: http://forums.wolflair.com/showthread.php?t=58268 There is an adjustment in the Community Package (probably what they're referring to in that thread) for "Horror Adventures, Sanity". I didn't see any feats or traits that directly change sanity. |
![]() |
![]() |
Member
Join Date: Apr 2018
Location: New York
Posts: 32
|
My questions about some of my Sanity projects are actually why that thread was bumped
![]() |
![]() |
![]() |
Member
Join Date: Apr 2018
Location: New York
Posts: 32
|
Here's what I've been able to piece together as an approximate (yet unstable) eval script, based primarily on the wonderful work of ShadowChemosh's Adjustments:
Code:
var skRanks as number ~each rank in skKnoMyth reduces total Sanity by 1 herofield[tSanity].value -= skRanks |
![]() |
![]() |
Senior Member
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 1,032
|
Where are you assigning a value to skRanks? The code above will be subtracting 0 (zero) from Sanity unless something else is giving a value to skRanks.
You need a line something like: skRanks = #skillranks[skKnoMyth] or try leaving out the var line entirely, and using: herofield[tSanity].value -= #skillranks[skKnoMyth] Current RPG's: Pathfinder (GM), Pathfinder (Player), Gamma World (GM, Pathfinder homebrew). HeroLab: 3.5 & Pathfinder. HL User Files for PF: Greyhawk Setting, Gamma World (WIP). DM and player of D&D since 1980. |
![]() |
![]() |
Member
Join Date: Apr 2018
Location: New York
Posts: 32
|
That worked! Thank you! You're a genius!
As an aside, I've gotten a subsequent piece of code working now that also utilizes this, but it feels overly large and clunky. For every 5 ranks you have in Knowledge (Occult), you gain a +1 bonus to Knowledge (Mythos) and take a -1 penalty to your Sanity score. Code:
if (#skillranks[skKnowOcc] >= 20) then #skillbonus[skKnowMyt] += 4 herofield[tSanity].value -= 4 elseif (#skillranks[skKnowOcc] >= 15) then #skillbonus[skKnowMyt] += 3 herofield[tSanity].value -= 3 elseif (#skillranks[skKnowOcc] >= 10) then #skillbonus[skKnowMyt] += 2 herofield[tSanity].value -= 2 elseif (#skillranks[skKnowOcc] >= 5) then #skillbonus[skKnowMyt] += 1 herofield[tSanity].value -= 1 endif |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,134
|
round(The number, 0, -1)
will round something to 0 digits beyond the decimal, and the -1 in the third place means round down. |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|