Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[DMgenie] Current Character Object

8 views
Skip to first unread message

pasto...@sbcglobal.net

unread,
Aug 8, 2016, 11:11:30 AM8/8/16
to
Maybe I'm a bit dense, but I can't figure out how to refer to the
currently active character from the special code of a feat. ?In the
"special" code, cr.name refers to the name of the character with the
feat, who may or may not be the currently active character when
"Conditions Effect Calc" is selected. ?How do I determine the name
of the currently active character?

noretoc

unread,
Aug 8, 2016, 11:17:31 AM8/8/16
to
Well, there are some issues here. The big one is that the special code in a
feat only runs when that feat's owner is selected. So if there is code there
it is not going to do anything when you are on other characters. Pulling in
creatures if you don't know their name is tough too. There really is no way to
know which creature is selected. There is a creature selected script trigger,
and you can use that to save a variable, but the question is where would you
save it. I assume this is meant to work for different creatures so the
references would have to be relative... And if you set the variable there is
no "unselect" trigger, so no way to delete the variable, thought I supposed
you could save the new selected creature over it. This one is tough.

What exactly are you trying to do? Is it a feat or spell or something else,
maybe there is another way to approach it.


noretoc

unread,
Aug 8, 2016, 11:20:36 AM8/8/16
to
I think there might be an easier way to do this. It will sound a
little backwards but it will be less work on the system.
In the dodge feat, in the use script.
Choose a creature from the current group, and set the name in a
customvariable on CR (The creature with the dodge feat).

Then in the attack script, set the last attacked creature to
targetCR. Check Target CR to see if it has the dodge feat. If so,
check the variable that has the name of the dodge opponent and
compare it to cr.name.
if true use lastdamage.ac=lastdamage.ac-1 (do same for crit AC).
Pop a note that says opponent has dodge feat and get +1 ac. You are
effectively decreasing the AC hit instead of added to the target AC
for that one attack, but you get the same result. You also don;t
have to worry about any special scripts running all the time. This
will only be called when attacking and the opponent has the dodge
feat. Then only when there is a name m atch. This keeps your
processing time down.

If you like this idea and need help with the actual script, let me
know, I can put it together as I use the same script for the defence
bonus for paladin smite ability for pathifinder. (you choose a
target and your AC increases vs that target)

pasto...@sbcglobal.net

unread,
Aug 8, 2016, 11:23:42 AM8/8/16
to
0 new messages