• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Making Incense, but not sure how to get the effects

Jobe00

Well-known member
A friend running a PF1 campaign gave the party three blocks of incense that once you meditate for 8 hours and prepare spells or regain your spell slots, you gain a +2 alchemical bonus to Int and gain +1 caster level for 24 hours.

I know this is an activation, but how do I do the eval script to get the bonus when active?
 
How would I make it a +2 Alchemical Bonus to a selected casting attribute (Int, Wis, Cha) and the +1 Caster Level bonus?

I figure something like an Alchemist's Mutagen, but I'm not sure what to copy and paste for it which is how I do most things because I go too long working on HLC datafiles that I basically have to relearn everything.
 
Does the hero need to choose a specific class affected by the incense that determines which caster level and spellcasting attribute are boosted, or does the hero gain +1 CL to all spell casting classes and just choose an attribute?
 
The +1 CL is to all casting classes. They would choose their casting attribute if single class or one casting attribute if they have more than one spellcasting class.
 
The orange prism ioun stone has script to add +1 to all CLs, and the magenta prism ioun stone from Seeker of Secrets has conditional code for increasing a user-selected ability score (although I ended up using the #applybonus macro instead).

In addition to the script, you'll need to add some stuff in the "Item Selection" section of the details in the editor.

You'll want to check the "Show selection options on the in-play tab" box, and add "component.BaseAttr & AttribCat.Mental" to the Custom Expression text box.
The component.BaseAttr part limits it to ability scores, and the AttribCat.Mental limits it to Int/Wis/Cha.

I also added a few extra lines of script to hide the mental attribute menu when the incense isn't active, since it only needs to be there when it is being used.


Code:
if (field[abilActive].value <> 0) then
      
    ~ add +1 to caster level of all spell casting classes
    foreach pick in hero from Spellcast where "CasterType.?"
        eachpick.field[cCasterLev].value += 1
    nexteach

    ~ add +2 alchemical bonus to selected ability score
    if (field[usrChosen1].ischosen <> 0) then
       #applybonus[BonAlch, field[usrChosen1].chosen, 2]
    endif

else
	
    ~ hide the attribute selection menu when the incense isn't active
    field[usrCandid1].text = ""

endif
 
Thank you. You are awesome.

Now to figure out how much this costs.
Orange Prism Ioun Stone is 30K, so half that as it's not a permanent equipped item.
The +2 Alchemical Bonus to an attribute would be 4000.
So 15,000+6000 is 21,000.
As a 1 use item for a day, it would be a divisor of 5.
So final cost for one block of this incense would be 4200 gp.
That seems a little high though.
 
I put in the Eval Script as you posted. Copy/paste. I went Pre-levels and Priority 5000.
I checked "Show selection options on the in-play tab."
I added the Custom Expression. Copy/paste.
I checked "Show in Activated Abilities list."
I gave Activation Name as "Inhaled."

It isn't showing up on the In-Play tab.
So what did I do wrong?
 
Is the "Can be Equipped" box checked in the "Equipping" section of the details?

If it is, that item will only show up on the in-play tab if the box to equip it is checked in the list of magic items.
 
Derp. That did it.
Once more, you are awesome.

Is there a way to remove the free spell in a spellbook for spellbook casters that pops up? Nothing else is affected with Intelligence selected.
 
There isn't really a clean way to remove that bonus spell. The built-in spell adjustment for Fox's Cunning causes the same error.

The underlying mechanism that tracks and applies bonuses doesn't distinguish between temporary and permanent bonuses, so there isn't any way to tell how much of the current attribute is temporary or permanent when the built-in class script determines how many bonus spellbook spells should be added.

It should be possible to code the item to subtract a bonus spellbook spell, but it would do the wrong thing if another alchemical bonus was also affecting Intelligence, and it would have to be written to specifically handle each class that has some sort of ability-based bonus that shouldn't be affected (another example would be the extra starting Alchemist formulas gained).
 
Last edited:
And please report the bug - there's two sub-totals on each ability score - the permanent modifiers that can change languages, bonus spells, etc. and the temporary modifiers that shouldn't affect those values. We've either got a bug where the alchemical bonus is being put into the permanent sub-total, or a bug where the spellbook spells are looking at the final total, not the permanent sub-total.
 
Mathias, as far as I can tell there isn't a division between permanent and temporary; it's separated by bonus type for the ability scores to determine what goes into the aNormal/aBonus and aFinalVal/aModBonus versions of the attribute.

I think the scripts for bonus spell book spells / alchemist formulas / etc are working off the aFinalVal/aModBonus values because enhancement bonuses can be permanent or temporary depending on the source, and enhancement bonuses aren't included in the aNormal/aBonus attribute values.

For example, ability score boosting items like the headband of vast intelligence or the belt of giant strength have enhancement bonuses which should be treated as permanent bonuses after the first 24 hours, with the added hiccup that the intelligence items still aren't supposed to affect skill points (since the items grant ranks in a particular skill instead).

The enhancement bonus from ability boosting spells like Fox's Cunning should be temporary, but there isn't a way to tell hero lab whether the enhancement bonus is a temporary enhancement bonus or a permanent one.

If the bonus wizard spell book / alchemist formula scripts are modified to use the current aNormal/aBonus they won't have the correct values when there is a permanent enhancement bonus from a stat-boosting item, and if all enhancement bonuses are added into aNormal/aBonus then we will still have a different error when there is a temporary enhancement bonus from a spell/etc.


(The number of languages known is an example of something that seems to use aNormal/aBonus instead of aFinalValue/aModBonus, and the stat-boosting items which raise intelligence have to manually increase the number of languages known. But using that approach for other things would require the script for those items to manually increase the wizard spell book spells and alchemist formulas too -- and probably more things which I don't know about off the top of my head -- and breaks in the case where a hero is wearing multiple items which grant a permanent enhancement bonus to intelligence since the manual adjustments "stack" even though the bonuses shouldn't.)
 
Last edited:
Back
Top