PDA

View Full Version : 5E Sanity Extension : Help?



Lost Eventide
June 23rd, 2017, 05:34
Hi there. I was just hoping to get some help with a small little extension I've been playing around with. The group that I play with utilizes the Sanity optional rule, and I'm trying to add that in as an ability score. As it has been, we have just been tracking it via a custom skill check, but I figured I'd try my hand at going a bit more in-depth.

As a note, I'm primarily just trying to get the rolls to work off the character sheet. I know there is probably some stuff back-end concerning the combat tracker, but we'll get there xD Sanity saves are almost always manually rolled via the player playing the character, so back-end GM stuff isn't a high priority (yet).

I've gotten this MOSTLY working. Sanity appears on the main character page under the other abilities and saves. The modifiers are calculated appropriately, and when rolled it comes up as either a sanity check or save.

HOWEVER, the roadblock I hit is when you roll the sanity check/save, the modifier it adds is the ability score - not the appropriate modifier.

I'm not sure where to go from here in order to fix it. I'm not lua/xml proficient yet - it's a learning process that I'm kind of slowly working through by making little extensions like this. It's as much as learning experience for me as anything else so that I can (hopefully) do some more fun stuff for my group in the future. I know right now things are probably a bit sloppy seeing I'm piecing formatting and such together from what I have observed in other extensions. My main realm of coding expertise is in the design realm with CSS/HTML/ and that such, so programming is a new ballpark for me.

Here is the extension file I have so far, which will hopefully help.

Qoff
September 18th, 2017, 22:25
Any progress with this one sir?

Qoff
September 19th, 2017, 19:37
How do I install it?

Zacchaeus
September 19th, 2017, 21:02
Unzip it and place it in your extension folder. Not sure what's in that file though. It might not be a completed extension

YAKO SOMEDAKY
September 20th, 2017, 00:51
This extension add the stat, save to the character sheet, to combat tracker, to party sheet and to npc sheet and make all rolls.

Qoff
September 20th, 2017, 00:54
I did an extension based on sanity ... but then you need to improve it, when I say in improve, say, remove the excess files ....

Thanks sir.

sagemerlin
September 28th, 2017, 00:59
This extension add the stat, save to the character sheet, to combat tracker, to party sheet and to npc sheet and make all rolls.

Thanks for the extension.
Could you either share the files or also add Honor and Appearance to the extension?

YAKO SOMEDAKY
September 28th, 2017, 02:19
I could try making two other extensions, with these features ...
But since I'm not a deep DnD connoisseur, I need to know if she finishes check and save.

sagemerlin
September 28th, 2017, 12:39
I could try making two other extensions, with these features ...
But since I'm not a deep DnD connoisseur, I need to know if she finishes check and save.

It is working just fine, I ran some checks and saves yesterday at one of my games.

Calirae
August 7th, 2018, 15:06
Hey guys!

Sorry for bringing back this thread from the graveyard, but I just recently found out about this extension and am using the one that yako2020 provided! The extension itself is working perfectly, but while the it is loaded, the program is spitting out the following error message whenever I try to create a new entry in a character's inventory (it still lets me create new inventory entries, so it's mostly a nuisance):
Script Error: [string "campaign/scripts/char_invlist.lua"]: 129: attempt to call field 'setValue' (a nil value)

Do any of you coding-savvy people know of a way to fix this issue?

damned
August 7th, 2018, 15:18
Calirae unfortunately Yakos (Sorry Bruno) extension contains a lot of files that it doesnt need which means it is far more likely to get broken.
Try this one.

Calirae
August 7th, 2018, 17:21
Thank you, Damned; it's working like a charm!
Now back to making my players go mad...

kuthulu
January 1st, 2021, 19:10
Damned,
thanks for this extension. I'm running a Primeval Thule campaign and there are rules for Fame/Power/Sanity in the Gamemaster's Companion. I'm not sure of the etiquette for modifying/reusing code from your extensions so please let me know if I need to make changes.

I used your 5ESanity extension to add Power and Fame Ability/Saves as well as adding those options to the party sheet. Maybe someone else will find this useful.


5E Fame/Power/Sanity Ability and Saving throws for Primeval Thule Campaign Setting in Fantasy Grounds:

damned
January 1st, 2021, 22:49
very good - well done kuthulu

AuzieX
March 9th, 2021, 22:09
Figured I would reply to this thread rather than creating a brand new one. I'm having a hell of a time getting extensions like these to actually work.

What I'm trying to do is add an ability score called "Awareness", replace Perception with a skill called Intuition (for now I've just added Intuition and kept Perception), and then tie passive perception to the Awareness ability score + proficiency bonus rather than the Perception skill like it is now. I've written an extension to do this (at least the first part, I want that working before I tackle the rest) but it's just not working like it's supposed to.

What is working:
- It will add the ability score to the main character sheet window, and it does properly calculate the modifier. It will also add it to the saves section, but I don't really want Awareness saves so I've just haven't included that.
- The Intuition skill is showing up and working fine.

What isn't working:
- When making a check using the ability it will not add the ability modifier to the roll. I've installed damned's 5ESanity.ext and kuthulu's 5E-Fame-Power-Sanity.ext just to test if they work, and I'm having the same problem with those.
- Even though the Awareness ability is being added, it does not appear as an ability option under the skills menu. For example, if you click on the "Dex" under "STAT" on Acrobatics to cycle through the various ability's, the "Awr" that I've added is not an option. This matters because if I want passive perception to be calculated different I have two options, 1. tie it to a different skill that uses Awareness instead of Wisdom (this isn't as clean or ideal, but would be the simplest solution) or 2. change the record_char_main.xml section on passive perception to tie directly to the ability score and then add the character's proficiency bonus to that (not sure how to accomplish this).
- In order to accomplish #1 above, I changed the data_common.lua so that the perception skill uses awareness, i.e. [Interface.getString("skill_value_perception")] = { lookup = "perception", stat = 'awareness' }, however, perception is still just defaulting to Wis in FG so I must be missing something.

Any help would be greatly appreciated.

Thanks,
AuzieX

damned
March 10th, 2021, 04:17
Welcome AuzieX please try this:

AuzieX
March 10th, 2021, 06:04
Thanks a ton damned. Looks like the issue was with the template_sanity.xml. I did a FiF for "Wis" thinking that would get me to where those were defined, but didn't think to try "wis". Tricksy.

Now that is working I'll see if I can figure out the passive perception thing. I'm guessing I'll have to write a script to add "profbonus" and "abilities.awareness.bonus" together somehow within the <number_charmain_skill_passive name="perception"> area of record_char_main.xml.

Thanks!

edit: Oh man this is driving me nuts. So I took your extension, and I did a find/replace for every instance of "sanity" "SAN" and "san" in every file with "awareness" "AWR" and "awr" respectively, and now all the sudden it won't add the modifier to the roll. When I switch them all back to "sanity" "SAN" and "san" in the exact same way it suddenly works again. I'm at a loss. Is it a database issue?

damned
March 10th, 2021, 12:26
No the main issue was manager_actor_5E_sanity.lua not being called properly.
If you did a FiF replace then you probably replaced some strings like this:

<includefile source="strings/strings_5e_sanity.xml" />
<!-- Additional Templates for Sanity -->
<includefile source="campaign/template_sanity.xml" />

<!-- High-level scripts -->
<script name="DataCommon" file="scripts/data_common_sanity.lua" />
<script name="ActorManager5E" file="scripts/manager_actor_5E_sanity.lua" />

Did you also rename the files?

AuzieX
March 10th, 2021, 16:11
Right, no I didn't do a FiF replace, I went through each file separately and I didn't touch the extension.xml file or change the filenames. I changed the content, not the structure.

Gozer the Gozerian
October 13th, 2021, 11:23
I wanted to have a stat for divine spellcasters to keep track of their devotion to their god, so I took this script, and changed out every reference to "sanity" for "sanctity," works great! Now, is there a way to make that attribute only appear for certain classes? I'm not a coder, I just know how to use find/replace. :)

AuzieX
February 14th, 2022, 01:43
I wanted to have a stat for divine spellcasters to keep track of their devotion to their god, so I took this script, and changed out every reference to "sanity" for "sanctity," works great! Now, is there a way to make that attribute only appear for certain classes? I'm not a coder, I just know how to use find/replace. :)

Hiya Gozer, not sure if you still have that sanctity extension, but if you do would you mind posting it here so I can take a look at what you did? For whatever reason I'm still having problems getting the modifier to add to the ability roll.

Gozer the Gozerian
February 15th, 2022, 15:29
Hiya Gozer, not sure if you still have that sanctity extension, but if you do would you mind posting it here so I can take a look at what you did? For whatever reason I'm still having problems getting the modifier to add to the ability roll.

Actually, I'm just using it to display the stat, as a tracker. I just tested it, and it doesn't add the modifier for me either.

Bearded Wonder
May 1st, 2022, 01:59
I just downloaded the version posted here March 9th 2021 and when checking it in FGU I get the following script error. Script execution error: [string "charsheet_main"]:14: attempt to call field 'getPCSheetWoundColor' (a nil value). Is there a different version that I should be using or a different thread it might be in?

Bearded Wonder
May 1st, 2022, 05:30
Okay, update. I downloaded the previous version further back in the thread and it got rid of the error. Like AuzieX and Gozer I couldn't get the modifiers to add to ability rolls or saving throws. I don't see a way to upload my version but I got it to work correctly so I'll share my process.

1. I copied the entire 5e ruleset and unpacked it. Went to manager_actor_5e.lua and copied everything over to manager_actor2_sanity.lua then added elseif sShort == "san" then
nStatScore = DB.getValue(nodeActor, "abilities.sanity.score", 0); on line 184.
2. Went to data_common.lua and copied everything over to data_common_sanioty.lua then added "sanity", to line 14, ["sanity"] = "SAN", to line 24, ["SAN"] = "sanity", to line 34, "SAN", to line 191 and finally Interface.getString("sanity"), to line 342.
3. I went into the Extension.xml file and changed <script name="ActorManager2" file="scripts/manager_actor2_sanity.lua" /> to <script name="ActorManager5E" file="scripts/manager_actor2_sanity.lua" />

I then saved everything and put it into a test campaign as the only extension and everything works as it should for checks and saves. I also checked in my primary campaign with several other extensions and it works there as well. In case it matters I'm in Test and was up to date at the time of this post. Hope this helps others that were having the same issue. I'm not sure exactly what line I changed that fixed it. If I could I'd upload my zip file.

Merecraft
July 17th, 2022, 15:45
Just wanted to say a huge thanks to Bearded Wonder.

Since the recent FG update this extension was broken by giving the error message you reported and also causing tokens to display at the incorrect size when adding them to an image from an Encounter window.

Your clear instructions really helped and sorted the issue for me! Was tearing what little hair I have left out, so thanks for this!

JerradRex
January 14th, 2023, 23:47
I've just tried this and its got the same problem still, I'm guessing this hasn't been updated or fixed? I see the above post but have no clue how to do that fix! Would love to use Sanity in my campaig, will have lots of horror and Old Ones, but I'm 1st time DM'ing so learning how to do all this ATM!

Roach
August 31st, 2023, 11:34
Not sure when this ropped up, but when I have the ext loaded and, start the CharWizard and go to Abilitis, I get error messages and cannot ener maual values / use point-buy...