FG Spreadshirt Swag
Page 1 of 2 12 Last
  1. #1

    Extension for custom damage types

    Forge link: https://forge.fantasygrounds.com/shop/items/45/view
    Hi

    After some request on Discord I wanted to outline how to inbuild your own custom damage types (and creature types) You will see here some dummy extension which you can modify to add your own damage types; you may want to see that also as a first mini-mini-mini step towards extension building No worries, it is really not complicated, I just did that in a minute or so So, it is quick with some exercise

    Download the dummy extension, unzip it, and go to /scripts/data_common2.lua. Then you see the following:
    function onInit()
    table.insert(DataCommon.dmgtypes, "ballistic");
    table.insert(DataCommon.dmgtypes, "laser");
    table.insert(DataCommon.dmgtypes, "electric");
    table.insert(DataCommon.dmgtypes, "radiation");
    end
    You now probably see the structure; the four damage types are the ones requested on discord, you can simply replace them and/or add additional lines with the same structure. Just replace the damage type of that new line then Then zip the extension again (inside its first layer of folder), then rename to .ext

    Have fun

    Best,

    Kelrugem

    PS: Written like that it is very compatible with everything as long as nothing drastic with the data structure of 5e's damage types happens

    PPS:
    You want more?
    Of course this only works for the standard damage types; there is also the critical damage type with some special properties. Such things are of course a little bit more complicated to code, but one thing is easy to add: The critical damage added as an effect as in DMG: d6 critical does not only trigger on crits but the d6 will also carry all the other native damage types from your weapon, it won't just have the type critical. If you want that your custom damage type behaves similarly, i.e. if used in such effects the native damage types shall be inherited and additionally added, then additionally add the following line in the code above:
    table.insert(DataCommon.specialdmgtypes, "ballistic");
    (ballistic is just an example of course)
    That extra should work, but I did not test it separately, I just looked at the code (and it is similar in 3.5e/PF1)

    New creature types:

    If you want to have a new creature type, then use

    Code:
    table.insert(DataCommon.creaturetype, "new type");
    (replace new type with your custom types)

    You can also use creaturesubtype instead of creaturetype, but that is just for sorting purposes, the automation is the same
    Attached Files Attached Files
    Last edited by Kelrugem; July 20th, 2021 at 00:04.

  2. #2
    Haha, this was actually a question I had asked a friend and he posed it in the Discord, those are even the damage types I needed for a 5e scifi module I am doing. Thank you for putting this out there, I am fairly new to FG.

  3. #3
    Quote Originally Posted by Nathrak View Post
    Haha, this was actually a question I had asked a friend and he posed it in the Discord, those are even the damage types I needed for a 5e scifi module I am doing. Thank you for putting this out there, I am fairly new to FG.
    If you or your friend asked DmDomination, then, yeah, you are probably the person why I made this initially
    Last edited by Kelrugem; February 7th, 2021 at 23:45.

  4. #4
    Yep, my friend is DmDomination.

  5. #5
    You, my friend. Are awesome. It's amazing how much more helpful a simple example is than trying to slog thru any wiki. You have allowed me to add the level of depth and RP to the damage system I have been thinking about for years. I've always wanted a system where "only a weapon tied with a red ribbon can kill the beast" or "a weapon wrapped in the cloth a corpse was buried in" or 100 other interesting RP situations that reflect real mythology outside "silver". I now have salt damage. I love it. And with a "unique" damage type I can make anything happen and just call it "unique". Not to mention add all (the ones I want?) the special materials that have been published and aren't coded in.

    Thank you x100

  6. #6
    Quote Originally Posted by Kelevraa View Post
    You, my friend. Are awesome. It's amazing how much more helpful a simple example is than trying to slog thru any wiki. You have allowed me to add the level of depth and RP to the damage system I have been thinking about for years. I've always wanted a system where "only a weapon tied with a red ribbon can kill the beast" or "a weapon wrapped in the cloth a corpse was buried in" or 100 other interesting RP situations that reflect real mythology outside "silver". I now have salt damage. I love it. And with a "unique" damage type I can make anything happen and just call it "unique". Not to mention add all (the ones I want?) the special materials that have been published and aren't coded in.

    Thank you x100
    Cool, I am glad that my small tutorial helps you so much

  7. #7
    At the end of my first post I now also added how you can add your own creature types It is very similar

  8. #8
    Also this tutorial extension is now on the forge, see the link in the first post But: Only download it if you do not already use it to avoid that the forge overwrites your version The forge is then just for new users (or rename your file, but there is actually no reason that you need to download it again from the forge)

  9. #9
    Is it possible to create a separate HP-like stat that only custom damage types affect? How involved would that be? I want to create a sanity stat that functions like a second HP that is only affected by sanity damage.

  10. #10
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,153
    Blog Entries
    9
    Quote Originally Posted by GEONE View Post
    Is it possible to create a separate HP-like stat that only custom damage types affect? How involved would that be? I want to create a sanity stat that functions like a second HP that is only affected by sanity damage.
    Sure, but maybe the Sanity and Honor extension already does what you want?
    https://www.fantasygrounds.com/forum...nity-amp-Honor

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

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
  •  
5E Character Create Playlist

Log in

Log in