5E Character Create Playlist
  1. #1

    requesting help with first mod

    Hi all. I've been poking around in the ruleset xml (core rpg and 5e, specifically) and reading some of the basic tutorials on making your first mod. I got a few tutorials working and am moving on to creating my own. I've started the process of tinkering and endlessly /reloading and I have some questions.

    I've worked out how I think it should work, but am open to suggestions from more experienced modders if there's a better way. Here's what I've got so far.

    Name: Procability
    Description: Creates a new ability within the 5e ruleset called "Proc" which appears as an action within the "cast" section of the character's actions tab. When the cast button is pressed, a user defined die is rolled (after any existing cast button behaviors are done, like saves).

    My minimum viable product and first milestone is just enabling a d100 roll when the cast button is clicked. Longer term, I'll want to enable arbitrary die rolls specified by the user. Additional long term improvements would include using a table roll as the proc die, and only proc'ing on "success" (target is hit or fails it's save)

    With my MVP in mind, I've been reading through the 5e ruleset. It looks like I want to add a new entry in the collection of actions under manager_gamesystem.lua called "proc" and then make a copy of manage_action_recharge.lua called manager_action_proc.lua where I will do the actual coding. For the mvp, I'd just hard code it as a d100. And I guess I would package it as an .ext so that my extension.xml would specify the script to run as the handler (the copy/paste/edit of manage_action_recharge.lua).


    So here are my questions:
    1) How do I update the list in manager_gamesystem.lua to include "proc" ?
    Is it just a matter of this (within the extension.xml) ?
    Code:
    GameSystem.actions["proc"] = { }
    And then I'd as basically a copy of manage_action_recharge.lua with my modifications?
    2) Do I also need to add "proc" to the targetactions list under manager_gamesystem.lua?
    If not, for my own understanding; What's this used for?
    3) Where do I allow the user to enable it from the existing "cast" dialog rather than leaving it always on?
    3a) Would it be better to make it another kind of action all on it's own which could be added to any action by right clicking and adding like effect dmg, cast, etc...?
    3b) If making a new ability effect type is better, where do I start with that?
    Last edited by nickabbey; December 26th, 2020 at 23:21.

  2. #2
    As I'm mulling things there seem to many alternatives to how this could be implemented. One thought that might be pretty straightforward is to replicate the "recharge" exactly by using the requirement to have "proc" in the title. It could follow the format (proc 55%) and always use a d100. The user would have to convert die faces to % but that's not too hard. Wondering if this approach would be simplest since it allows me to copy the vast majority of the existing "recharge" logic and really only change the onRoll function.

    Obvi, I'm still totally open to suggestions, here.

Thread Information

Users Browsing this Thread

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

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
  •  
Starfinder Playlist

Log in

Log in