Starfinder Playlist
  1. #1

    Need Help With Custom Extension

    I'm currently working on an extension to implement a house rule I use in my 5e game. I'm a novice when it comes to coding extensions. I've read other posts and watched some videos. I've had success with creating new ability scores but I'm having no luck with this thing.

    The house rule is a mana system. It works just like hitpoints but instead of being calculated with CON and HD it'll be calculated with the modifiers of CHA, INT, and WIS combined. Basically what I want to do is duplicate the code for hp, rename it, and adjust the visual locations so they all appear somewhere that isn't overlapping with other stuff. I'd like to make this work at least on PC character sheets but the goal is to have it work with everything.

    Does anyone have any tips for how to do this?

  2. #2
    I have no clue how to get started on that. But I can tell you it's going to be a pretty advanced extension. Good luck!
    Fantasy Grounds Unity Lives! Good job, Smiteworks!

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Quote Originally Posted by Death Rodent View Post
    I'm currently working on an extension to implement a house rule I use in my 5e game. I'm a novice when it comes to coding extensions. I've read other posts and watched some videos. I've had success with creating new ability scores but I'm having no luck with this thing.

    The house rule is a mana system. It works just like hitpoints but instead of being calculated with CON and HD it'll be calculated with the modifiers of CHA, INT, and WIS combined. Basically what I want to do is duplicate the code for hp, rename it, and adjust the visual locations so they all appear somewhere that isn't overlapping with other stuff. I'd like to make this work at least on PC character sheets but the goal is to have it work with everything.

    Does anyone have any tips for how to do this?
    Welcome Death Rodent

    As far as what you have outlined so far - eg no automation other than calculating the Mana value - either of these should give you enough to go by:
    https://www.youtube.com/watch?v=UPKJDwUt554
    https://www.youtube.com/watch?v=x4leZBomtOc

    You have broken down the main components already I think this is quite achievable.

  4. #4
    Thank you very much!

    I've made slow but steady progress. Currently, I have a usable version of the extension. It'll function for this week's game but it's not at the level of functionality I'd like it to be.

    The character sheet is able to record values for mana but isn't able to automate its value. What I mean is that on increasing level the mana's max doesn't increase as HP's max would. I'm not sure if I fully understand the scripting. I've tried duplicating the code that calculates hit points and renaming it, but no luck. I may not understand how the .lua files work or there may be another part of the code that I'm missing. The console reads
    Script Error: [string "mp"]:1: attempt to call field 'onManaChanged' (a nil value)
    whenever I adjust the max value of man on the character sheet. "mp" and "onManaChanged" were originally "hp" and "onHealthChanged" before the rename. I don't really know where to begin to fix this.

    I'm confident that I can add fields to the combat tracker, party sheet, and npcs but I want to try to get this script figured out first. I appreciate the tutorials and encouragement. Any more leads will be greatly appreciated.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in