Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 9th, 2017, 05:29 PM
Our group's consensus is that it is silly to get bloodline spells 3 or so levels after one could cast that level spell... example: Shadow Bloodrager bloodline has Ray of Enfeeblement (a level 1 spell) granted at level 7 even though Bloodrager can cast level 1 spells at 4. So I want to fix this.

I actually went through the editor and made a copy of every Sorcerer and Bloodrager bloodline and corrected the level on the bootstraps then used the Replaces ID field to replace the original bloodline. I'm not finding that this is creating problems with scripts in other places (like the one on the Crossblooded archetype).

So my philosophy has shifted recently to instead of editing objects in the editor, use a mechanic to handle some of these changes. This makes things more compatible because you don't have to reference specific sources (so some of my players who don't have as many books can still use the edits) and saves work in having to edit so many objects. Also means that if LW does updates on those objects, those changes will carry forward.

Anyway, so I now need a mechanic script that can correct these spells to the right level. I started with Bloodrager and came up with the following so far:

Code:
      ~ If we aren't Bloodrage, get out now
      doneif (hero.tagcount[Classes.Bloodrage] = 0)

      foreach pick in hero from BaseSpell where "SpellSort.cHelpBlr"
        var newLvl as number
        newLvl = eachpick.tagvalue[BonusSplAt.?] - 3
        perform eachpick.delete[BonusSplAt.?]
        perform eachpick.assignstr["BonusSplAt." & newLvl]
      nexteach
This is currently running at Post-attributes 10001, though I'm just guessing. Obviously, I'm posting because it doesn't work. I don't get any compiler errors. After enabling the script, Ray of Enfeeblement still has BonusSplAt.7 (should be 4).

Steps to reproduce:
1) New profile
2) Add level of Bloodrager
3) Switch to Bloodrager tab and add Shadow (or really any bloodline, but note the level 7 spell before making the selection)
4) Develop > Floating Info Windows > Selection Tags
5) Find the level 7 spell for the selected bloodline (for Shadow that is Ray of Enfeeblement)
6) Note BonusSplAt.?
Valdacil is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 10th, 2017, 03:37 PM
Add some debugs to see what your foreach is iterating through.
Aaron is offline   #2 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 10th, 2017, 10:26 PM
Got it figured out. It didn't like SpellSort. Changed back to First/10001 so it would run earlier:

Code:
      ~ If we aren't Bloodrager, get out now
      doneif (hero.tagcount[Classes.Bloodrage] = 0)

      foreach pick in hero from BaseSpell where "BonusSplAt.? & SpellType.cHelpBlr"
        var newLvl as number
        newLvl = eachpick.tagvalue[BonusSplAt.?] - 3
        perform eachpick.delete[BonusSplAt.?]
        perform eachpick.assignstr["BonusSplAt." & newLvl]
      nexteach
Sorcerer version:

Code:
      ~ If we aren't Sorcerer, get out now
      doneif (hero.tagcount[Classes.Sorcerer] = 0)

      foreach pick in hero from BaseSpell where "BonusSplAt.? & SpellType.cHelpSor"
        var newLvl as number
        If (eachpick.tagvalue[BonusSplAt.?] = 3) Then
          newLvl = 1
        Else
          newLvl = eachpick.tagvalue[BonusSplAt.?] - 3
        EndIf
        perform eachpick.delete[BonusSplAt.?]
        perform eachpick.assignstr["BonusSplAt." & newLvl]
      nexteach
Valdacil is offline   #3 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 10th, 2017, 11:15 PM
There isn't any way to alter a bootstrap from a script is there? I'd like to add to above scripts an adjustment to the bootstraps that add bonus spell selector for Crossblooded archetype. But I'm guessing bootstraps are read-only from scripts since all of my attempts give a compiler error saying perform delete and perform assign are not valid in this context.
Valdacil is offline   #4 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 11th, 2017, 12:30 AM
Maybe it's late, but I don't understand your second sentence, could you rephrase?

Bootstraps can have conditions which may be satisfied or not by eval scripts, but eval scripts can't directly add/remove picks.
Aaron is offline   #5 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 11th, 2017, 09:23 AM
Aaron - that was essentially my question. I wanted to loop through the bootstraps on a thing and alter the level (ClSpecWhen.?) that the thing was bootstrapped. In this specific scenario, I'd successfully changed the BonusSplAt.? of the spells (which are bootstrapped as soon as the bloodline is selected), but the Crossblooded Archetype bootstraps an ability to select which bonus spell you get from the 2 bloodlines. I wanted to alter the level at ability is bootstrapped w/out having to replace the Crossblooded Archetype thing. Since you said you can't add/remove picks to the bootstrap, I'm assuming that also means you can't alter the bootstrap via an eval script. So I'm going to have to edit the thing.
Valdacil is offline   #6 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 11th, 2017, 09:44 AM
I think we may be operating on different understandings of how bootstraps work? You are talking about changing the levels at which the cSorChBonS pick works, right? Those are class specials, so they are always bootstrapped when the Crossblooded archetype is added, what is important here is that they aren't active until they have reached the appropriate level (which is marked by their current ClSpecWhen tag). I don't think you need to replace them, it should be possible to just have them trade ClSpecWhen tags in a foreach, similar to what you did with bonus spells.
Aaron is offline   #7 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 11th, 2017, 11:12 AM
I had thought that as well, however I'd added Crossblooded archetype and didn't find the abilities. Turns out it doesn't add the abilities until AFTER you select BOTH bloodlines. Once I realized that, I was easily able to find the abilities and adjust the levels. Thanks for the tip.

Below is the final code. Please note the extra chuck at the top is to fix a bug in the 4 Draconic (XXX) bloodlines. These bloodlines from Blood of the Dragons (on both Bloodrager and Sorcerer) had a HasAbility tag from the other class to make sure you choose the same bloodline for both classes. However, these 4 bloodlines only had the cSorDracon and cBlrDracon (base Draconic bloodline from Advanced Players Guide) and not the specific Draconic (xxx) bloodline selected. So the correct matching bloodline on the other class was not a valid selection. I've already submitted this as a bug.

Bloodrager (First/10001):
Code:
      ~ If we aren't Bloodrager, get out now
      doneif (hero.tagcount[Classes.Bloodrage] = 0)

      ~ Check for the 4 broken bloodines
      If (hero.tagcount[Ability.cBlrDraEso] <> 0) Then
        foreach pick in hero from Ability where "thingid.cBlrDraEso"
          perform eachpick.assign[HasAbility.cSorDraEso]
        nexteach
      EndIf
      If (hero.tagcount[Ability.cBlrDraImp] <> 0) Then
        foreach pick in hero from Ability where "thingid.cBlrDraImp"
          perform eachpick.assign[HasAbility.cSorDraImp]
        nexteach
      EndIf
      If (hero.tagcount[Ability.cBlrDraOut] <> 0) Then
        foreach pick in hero from Ability where "thingid.cBlrDraOut"
          perform eachpick.assign[HasAbility.cSorDraOut]
        nexteach
      EndIf
      If (hero.tagcount[Ability.cBlrDrPri] <> 0) Then
        foreach pick in hero from Ability where "thingid.cBlrDrPri"
          perform eachpick.assign[HasAbility.cSorDraPri]
        nexteach
      EndIf
      
      ~ Loop through spells added by Bloodrager and adjust level added
      foreach pick in hero from BaseSpell where "BonusSplAt.? & SpellType.cHelpBlr"
        var newLvl as number
        newLvl = 0
        newLvl = eachpick.tagvalue[BonusSplAt.?] - 3
        perform eachpick.delete[BonusSplAt.?]
        perform eachpick.assignstr["BonusSplAt." & newLvl]
      nexteach
      
      ~ If we aren't Crossblooded archetype, get out now
      doneif (hero.tagcount[ClassVary.arBlrCross] = 0)
      
      ~ Loop through Bonus Spell Choice ability and adjust level added
      foreach pick in hero from BaseClSpec where "thingid.cBlrChBonS"
        var newLvl as number
        newLvl = 0
        newLvl = eachpick.tagvalue[ClSpecWhen.?] - 3
        perform eachpick.delete[ClSpecWhen.?]
        perform eachpick.assignstr["ClSpecWhen." & newLvl]
      nexteach
Sorcerer (First/10001):
Code:
      ~ If we aren't Sorcerer, get out now
      doneif (hero.tagcount[Classes.Sorcerer] = 0)
      
      ~ Check for the 4 broken bloodines
      If (hero.tagcount[Ability.cSorDraEso] <> 0) Then
        foreach pick in hero from Ability where "thingid.cSorDraEso"
          perform eachpick.assign[HasAbility.cBlrDraEso]
        nexteach
      EndIf
      If (hero.tagcount[Ability.cSorDraImp] <> 0) Then
        foreach pick in hero from Ability where "thingid.cSorDraImp"
          perform eachpick.assign[HasAbility.cBlrDraImp]
        nexteach
      EndIf
      If (hero.tagcount[Ability.cSorDraOut] <> 0) Then
        foreach pick in hero from Ability where "thingid.cSorDraOut"
          perform eachpick.assign[HasAbility.cBlrDraOut]
        nexteach
      EndIf
      If (hero.tagcount[Ability.cSorDraPri] <> 0) Then
        foreach pick in hero from Ability where "thingid.cSorDraPri"
          perform eachpick.assign[HasAbility.cBlrDrPri]
        nexteach
      EndIf

      ~ Get bloodline bonus spells and adjust level added
      foreach pick in hero from BaseSpell where "BonusSplAt.? & SpellType.cHelpSor"
        var newLvl as number
        newLvl = 0
        If (eachpick.tagvalue[BonusSplAt.?] = 3) Then
          newLvl = 1
        Else
          newLvl = eachpick.tagvalue[BonusSplAt.?] - 3
        EndIf
        perform eachpick.delete[BonusSplAt.?]
        perform eachpick.assignstr["BonusSplAt." & newLvl]
      nexteach
      
      ~ If we aren't Crossblooded archetype, get out now
      doneif (hero.tagcount[ClassVary.arSorCross] = 0)
      
      ~ Loop through Bonus Spell Choice ability and adjust level added
      foreach pick in hero from BaseClSpec where "thingid.cSorChBonS"
        var newLvl as number
        newLvl = 0
        If (eachpick.tagvalue[ClSpecWhen.?] = 3) Then
          newLvl = 1
        Else
          newLvl = eachpick.tagvalue[ClSpecWhen.?] - 3
        EndIf
        perform eachpick.delete[ClSpecWhen.?]
        perform eachpick.assignstr["ClSpecWhen." & newLvl]
      nexteach
Valdacil is offline   #8 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:48 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.