• 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

Feat Eval Script help needed

Jobe00

Well-known member
I'm working on a file for the Forgotten Realms book Lost Empires of Faerûn, and I'm working on the Servant of the Fallen feat.

The feat allows you to worship a dead god like Bhaal or Myrkul and still get divine spells.

Now, I get a validation error: Dead Gods cannot grant spells to divine spellcasters.

However, the feat Servant of the Fallen allows just that.

I know it's a matter of making an Eval Script that ignores the fact that the character's deity is a Dead God, but how would I script it?
It's a matter of making HL ignore the fact that the Deity is DeityCat.DeadGod or DeityCat.Forgotten when making a divine spellcaster. thus getting rid of the validation error.

I've been looking for a feat or ability to base the script for it, but I can't think of any feat or ability that would do anything like that.
 
Just delete the DeityCat.DeadGod tag from the hero, unless there is some reason you need that to be around?
 
All the deities introduced in Lost Empires of Faerûn are dead gods, thus all of them fall in DeityCat.Dead God.

The purpose of the Servant of the Fallen feat is that you can get power from those dead gods in their name. Servant of the Fallen requires you to worship a dead or forgotten god, so it's the whole point of the feat.

I was able to find feats that marked the prerequisites of being a divine spellcaster and worshiping a dead or forgotten deity from other feats, but eval scripts are slightly more involved.

I know the script of the feat will basically be something similar to being able to ignore prerequisites for feats like monks and rangers can sometimes do.

So, how do I make this work?
 
Last edited:
As I said, delete that tag from the hero. I think that will clear up your error. Nothing that you've mentioned requires it be present.
 
Just delete the DeityCat.DeadGod tag from the hero, unless there is some reason you need that to be around?
Just to make sure everyone is on the same page. Aaron is not saying to change each god but to write a script on the "Feat" that deletes the Dead God tag from the hero.

In example like this:
Pre-Levels/10000
Code:
~ Remove dead god tag from hero
perform hero.delete[DeityCat.DeadGod]

This way you don't change any of the gods marked as dead. Instead we delete the tag from the Character only if you take this feat.
 
ShadowChemosh, THANK YOU!

I didn't know HOW TO DO THAT!

It was what I was asking how to do!

You Lone Wolf guys need to learn how to actually answer questions as opposed to dismissing them.


Aaron, you don't seem to be very familiar with the Forgotten Realms setting. A deity's status is very important to worshipers (and the gods themselves).
Sometimes fluff text is based on game mechanics crunch and vice versa.

Shadow, is there any way that instead of deleting the tag, it's effectively turned off by taking the feat? That way the feat just makes the dead god not a dead god for purposes of getting divine spells?

I'll try the code you gave me here in a minute and see what happens.
 
Shadow, your suggestion worked, but caused a new problem.

Here's the feat in its entirety.

Servant of the Fallen
You keep alive the worship of a deity who has died or vanished. Your faith in this fallen deity allows you to wield divine magic in his or her name.

Prerequisites: Ability to cast divine spells, dead or forgotten god (for example, Amaunator, Bhaal, Moander, or Myrkul) as patron deity.

Benefit: You can name a dead god as your patron deity and still receive your cleric spells normally. In addition, you can call upon the universal remnant of your deity’s power once per day to gain a +1 luck bonus on any single die roll. You can also be raised or resurrected normally.

Normal: Dead or fallen deities cannot grant divine spells and powers, so divine casters who choose such patrons do not normally receive spells. Characters who do not worship active gods in Faerûn suffer the fate of the Faithless in the Fugue Plane after death.

Special: You can take this feat only once. Choosing this feat changes your patron from your previous deity to the dead or forgotten deity of your choice, and you take no penalties for making this change. If you later choose a different patron deity, you lose the benefit of this feat, but your new patron may grant you spells just as he or she would for any other cleric.
See Ancient Deities, page 41, for a list of notable dead gods, their alignments, and their domains.



Adding in the 1/day tracker was easy enough.


I have 2 Expr-reqs:

Ability to cast divine spells.
Is Error? and Highlight Panel? are both checked.
Pre-Requisite Expression: hero.tagis[Hero.Divine] <> 0

Deity is dead god or forgotten god.
Is Error? and Highlight Panel? are both checked.
Pre-Requisite Expression: hero.tagis[DeityCat.DeadGod] + hero.tagis[DeityCat.Forgotten] >= 1


Your code made the feat illegal since it deleted one of the pre-reqs for the feat. By deleting the Deity.Cat.DeadGod, the character was no longer qualified to have the feat because it didn't recognize Bhaal as a Dead God (which he most certainly is. I read the Avatar Trilogy where Cyric as a mortal killed him.).
So with your initial suggestion, it's a catch-22. The feat allows you to chose a dead god and receive spells, but the feat then invalidates itself since it deleted the DeityCat.DeadGod tag.

So is there a way to code it where HL acknowledges the DeityCat.DeadGod or DeityCat.Forgotten tag, but says that's alright to get divine spells anyway?
 
You Lone Wolf guys need to learn how to actually answer questions as opposed to dismissing them.
To answer the technical part of your post I will need to get home and be in front of HL actually. I have an idea to get things to work but can't do it off the top of my head. :)

But wanted to address what you said here as I have to say its 100% not true. Aaron and Mathias work very hard to answer questions here and in the bug reports. If sometimes they are short with an answer its not them being rude but being very busy. LW is a very small company and they do allot each and every day.

I can also say now that I have meet both Aaron and Mathias in person and they are NOT dismissive of people at all. What Aaron said was correct in what he said actually it just was not maybe as detailed of an answer as you needed but he had no way to know that. Many times all a person needs is a direction to go in actually. If you needed more a simple "hey I don't understand that" would have gotten you more information...
 
Yes, my apologies for the previous post. I often have trouble assessing the proficiency level of posters, and in this case I thought I was being clear when I was not.

Please, if I give any instructions you don't understand and you need further clarification, don't hesitate to ask. There's no shame in starting off and not knowing how to delete a tag, everyone has been there at one time or another.
 
There might be a workaround that will fool things, if we are clever.

Almost everything in HL takes place in a series of Phases and Priorities within those phases. One of the things which do not take place in those orders are pre-requisite scripts, which all run after everything else has happened. Fortunately for us, the "No spellcasting for dead gods" thing is an eval rule, not a pre-req script. Don't sweat the details, but the important thing is that eval rules take place in phases and priorities with everything else. So, if we know the timing of that eval rule, we can delete the Dead Gods tag from the hero, wait for the eval rule to happen, and then add the Dead Gods tag back in time for your pre-requisite to check for it.

Let me look into some timing stuff for you and I'll come back to this.
 
A Disclaimer: This is kinda hacky, and I don't recommend doing this as a rule. If we ever shift the phase or priority of the eval rule, it might break the following workaround.

It looks like the eval rule runs in the Validation Phase, at Priority 20000. So, make your eval script which deletes the tag (the one ShadowChemosh helped you with) happen shortly before that. Say Validation 19900.

Now try adding a second eval that runs shortly after the eval rule, say at Validation 20100. You should have a handle on deleting tags from the example above, and assigning them works much the same. It uses the "assign" command, like so:

Code:
~ Add dead god tag to the hero
perform hero.assign[DeityCat.DeadGod]

Give that a try, and hopefully that'll get things working. I haven't really messed around or tested the above, but the theory is sound, I think.
 
You Lone Wolf guys need to learn how to actually answer questions as opposed to dismissing them.

But wanted to address what you said here as I have to say its 100% not true. Aaron and Mathias work very hard to answer questions here and in the bug reports. If sometimes they are short with an answer its not them being rude but being very busy. LW is a very small company and they do allot each and every day.

I just wanted to reiterate what Shadow said here.

In just mostly lurking on the boards and soaking up the knowledge of the program to be found here I'm continually amazed by the info shared and the speed in which a reply is given to questions by the LW staff. Aaron and Mathias are constantly monitoring the forums and on several occasions I've seen a very detailed response to a challenging question from them sometimes in under 10 minutes, even under 5 minutes in some cases, from the timestamp of the initial post.

I'm not sure about the makeup of the hierarchy of Lone Wolf but I get the feeling that when Colen or Rob chime in you know you've gotten the attention of the higher ups of the company as well.

These guys are all about helping out their costumers, and for that I tip my hat to you sirs!

Oh, and don't want to forget about Liz either! :)

So, again, please cut the guys a little slack... it could be worse, they could have not answered at all.

And if that ever happens, just sic Shadow on them to smack 'em across the head with his Core Rule Book. (I hear he does that sort of thing...):D
 
The one-two punch in the eval scripts worked perfectly.

The feat works as described in the book.

Good job, guys.
 
Got another feat with an odd thing.

Craven from Champions of Ruin.
You get to add your character level to Sneak Attack damage.
The feat has a couple requirements and gives a penalty to saves versus fear, but I got those done using other feats with similar effects for the basis.

Is there a way to script it to have the flat character level damage bonus show up with the Sneak Attack dice in the Specials tab ala "Sneak Attack +xd6+y?"
 
Is there a way to script it to have the flat character level damage bonus show up with the Sneak Attack dice in the Specials tab ala "Sneak Attack +xd6+y?"
So if you do a "New Copy" against the Sneak Attack Class Ability you can view the scripts. We see that the script at Render/10000 it sets the livename:
Code:
field[livename].text = "Sneak Attack +" & field[abValue].value & "d6"

So with this idea we can modify the livename again after Render/10000 to add your additional Plus Level damage:
Render/10100
Code:
~ If this feat has the disable tag, get out now!
doneif (tagis[Helper.FtDisable] <> 0)
~ If the Sneak Attack class special is not live than get out now!
doneif (hero.childlives[cSneakAtt] <> 1)

~ Calculate the characters total level using the level macro
field[abValue].value += #totallevelcount[]

~ We need to append level damage to sneak attack class special LiveName.
hero.child[cSneakAtt].field[livename].text &= "+" & field[abValue].value
The above script would go on to your feat at Render/10100 and will only run if its not disabled and the Sneak Attack class ability is actually present. Then in example at level 1 the livename of the ability is "Sneak Attack +1d6" so we simply add to that name making it "Sneak Attack +1d6+1".
 
Back
Top