FG Spreadshirt Swag
Page 5 of 19 First ... 3456715 ... Last
  1. #41
    Quote Originally Posted by bmos View Post
    I don't think I can do D or M because there are spells that do actually use those capital letters in their name.
    I'll include this in my next update or you can just download the github repo as a zip and rename the extension to ext.
    Regarding the APXX notation, I could have it remove the capital letters AP followed by any number of digits. Sound like a good idea?
    As for M or D, well there could be some help in that it's suffix. I am not aware of any spell ending with capital D or M.
    From what I've seen in lua 5.1 documentation we could use string.find (s, pattern [, init [, plain]]) to check this. We could either check if
    string.find(spellname, 'D') === string.len(spellname)
    or check last character:
    string.find(spellname, 'D', string.len(spellname)) != nil
    Ah I forgot about (DC ) notation. Nevermind.

    APXX sounds good.
    Last edited by Corun; March 6th, 2021 at 17:20.

  2. #42
    Quote Originally Posted by Corun View Post
    From what I've seen in lua 5.1 documentation we could use string.find (s, pattern [, init [, plain]]) to check this.
    Great idea! I'll test this and implement if it works. Sure, it won't work with spells with specific DCs, but it will help with some...

  3. #43
    Quote Originally Posted by bmos View Post
    Great idea! I'll test this and implement if it works. Sure, it won't work with spells with specific DCs, but it will help with some...
    If only lua had full regex features, then it would be easy :C
    Unfortunately capture groups cannot be treated with repetition operators(?, +, * etc.).
    Maaaybe if we would strip out DC first together with space before it checking for [DM] character set.
    So
    strsub (spellname, %s%(DC%s%d+%), '')
    I hope I use right syntax for escaping parentheses.
    Last edited by Corun; March 6th, 2021 at 17:48.

  4. #44
    Quote Originally Posted by Corun View Post
    Maaaybe if we would strip out DC first together with space before it checking for [DM] character set.
    I think you should take a look at the function that I'm using for this. It's already trimming out the DC stuff.
    To summarize the process:
    1. trim off DC in parentheses
    2. remove any series of 4 consecutive uppercase letters
    3. remove any series of 3 consecutive uppercase letters
    4. remove "AP" followed by any number of consecutive digits
    5. remove any series of 2 consecutive uppercase letters
    6. remove any number of consecutive spaces followed by a colon
    7. remove a comma followed by any number of consecutive spaces
    8. remove square brackets containing a single letter
    9. remove any non-letter characters
    10. move "greater" to the end in case it's at the beginning

    Quote Originally Posted by Corun View Post
    Unfortunately capture groups cannot be treated with repetition operators(?, +, * etc.).
    Are you sure about this? I think there is such a feature.
    https://riptutorial.com/lua/example/...ttern-matching
    You can see this in action in FG here.

    EDIT: thanks for your help. I think I have it working in v1.9.
    Last edited by bmos; March 7th, 2021 at 23:21.

  5. #45
    v1.10-beta.2 adds some NPC actions to the spells tab automatically.

    If anyone wants to try automating more abilities, you can do so here.
    string_ability_type can be Feats or Special Abilities
    level is what spell level the ability should be added as (usually 0)
    actions / zeffect-1, zeffect-2, etc are the individual effects that will be added if this is a match
    within zeffect-X are tables containing type=string/number/etc and value=the value of that db node.
    the table named label in zeffect-X can also contain a number keyed as "tiermultiplier" which will be replaced in the label string when it is created. This tiermultiplier value will be multiplied by a number that is entered after the ability name (such as Ancestral Enmity 2 (resulting in +4) vs Ancestral Enmity 1 (resulting in +2).

    Next up: breath weapons
    Last edited by bmos; March 9th, 2021 at 22:45.

  6. #46
    Quote Originally Posted by bmos View Post
    v1.10-beta.2 adds some NPC actions to the spells tab automatically.

    If anyone wants to try automating more abilities, you can try doing so here.
    string_ability_type can be Feats or Special Abilities
    level is what spell level the ability should be added as (usually 0)
    actions / zeffect-1, zeffect-2, etc are the individual effects that will be added if this is a match
    within zeffect-X are tables containing type=string/number/etc and value=the value of that db node.
    the table named label in zeffect-X can also contain a number keyed as "tiermultiplier" which will be replaced in the label string when it is created. This tiermultiplier value will be multiplied by a number that is entered after the ability name (such as Ancestral Enmity 2 (resulting in +4) vs Ancestral Enmity 1 (resulting in +2).

    Next up: breath weapons
    So exited about this. This will be a HUGE help. Breath weapons are common. And dragons are a pain since they dont have their abilities automated.
    I looked into your code, and be aware that ATK also affects CMB, so in your power attack example you subtract CMB twice for each.

  7. #47
    Quote Originally Posted by bmos View Post
    I think you should take a look at the function that I'm using for this. It's already trimming out the DC stuff.
    To summarize the process:
    1. trim off DC in parentheses
    2. remove any series of 4 consecutive uppercase letters
    3. remove any series of 3 consecutive uppercase letters
    4. remove "AP" followed by any number of consecutive digits
    5. remove any series of 2 consecutive uppercase letters
    6. remove any number of consecutive spaces followed by a colon
    7. remove a comma followed by any number of consecutive spaces
    8. remove square brackets containing a single letter
    9. remove any non-letter characters
    10. move "greater" to the end in case it's at the beginning

    Are you sure about this? I think there is such a feature.
    https://riptutorial.com/lua/example/...ttern-matching
    You can see this in action in FG here.
    EDIT: thanks for your help. I think I have it working in v1.9.
    1) Ah, awesome somehow I've misunderstood purpose of grabbing this character "(".

    2) It's close but not exactly what I want
    I don't want to have only [DM], I though about grabbing everything by using one complex pattern. Grab things such as (2, DC 15), (2, DC 9), (3), (DC 27) by looking for repeating parentheses with optional combination digit followed by optional comma and optional combination of DC + spacebar + one to two digits. Bit complex to describe.
    According to:
    https://www.lua.org/manual/5.1/manual.html#5.4.1
    Lua allows to use pattern items of length of 1 character, or exactly one of the first nine captures or %bxy balanced expressions. So there is no such feature.

    3) Awesome I will test both versions soon.

  8. #48
    Quote Originally Posted by Svandal View Post
    Be aware that ATK also affects CMB, so in your power attack example you subtract CMB twice for each.
    Wow! Can't believe I didn't know this.
    Thanks for the heads up.

  9. #49
    Quote Originally Posted by bmos View Post
    Wow! Can't believe I didn't know this.
    Thanks for the heads up.
    Yes, this caused me much headache before I found out.
    Same with AC, AC also increase CMD since CMD is a form of AC, but not all types of AC increase CMD.

  10. #50
    Basic breath weapon action creation included in v1.10-beta.3.
    FG's 3.5E ruleset has been updated and now all included effects relying on QBAB should be functional.
    Please report npcs that have breath weapons that are not picked up correctly so I can try to improve parsing.
    Last edited by bmos; March 9th, 2021 at 23:12.

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
  •  
DICE PACKS BUNDLE

Log in

Log in