Undefined function: getAC (help, please)

Framework(s) for D&D 4e, including Veggiesama's.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Post Reply
MHolman
Cave Troll
Posts: 26
Joined: Tue Sep 28, 2010 5:46 pm

Undefined function: getAC (help, please)

Post by MHolman »

ADDENDUM: The PC vs. PC attack works in Veg's Prebuild Campaign. Error manifests when in a personally built campaign OR a blank campaign with Veg's campaign properties loaded.

I have successfully converted my PC token to Veg23 format.

I am trying to implement the "Attacks Compared to PC Defenses" and "Attacks Compared to NPC Defenses". Both of them are "1" on the Veg tokens.

With my PC against an NPC, I can attack an NPC and everything works fine, including the "hit/miss" notation.

Same attack, PC vs. PC: "Undefined function: getAC" error message.

NPC vs. PC: "Undefined function: getAC"

It appears that the issue is getting a PC's defenses. I'm sure I'm doing something wrong. Thanks.

User avatar
Veggiesama
Dragon
Posts: 619
Joined: Wed Aug 29, 2007 1:18 am

Re: Undefined function: getAC (help, please)

Post by Veggiesama »

After you import the new Lib:Veg token, save the campaign, restart MapTool, and reload the campaign. I think the library token's onCampaignLoad macro (which is where getAC() is defined) isn't getting a chance to execute unless you run onCampaignLoad yourself or reload the campaign.

If that fixes it, I'll update the install instructions. Oops!
My D&D 4e Campaign FrameworkMy Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.

MHolman
Cave Troll
Posts: 26
Joined: Tue Sep 28, 2010 5:46 pm

Re: Undefined function: getAC (help, please)

Post by MHolman »

Veg,

You are my hero sandwich. Worked like a charm. Thank you. It is fixed. I cannot tell you how impressed/amazed/in love I am with this new framework. Now to convince my DM that it will be REALLY easy to update...we're already using 2.15 sooo...here is to hoping!

User avatar
Veggiesama
Dragon
Posts: 619
Joined: Wed Aug 29, 2007 1:18 am

Re: Undefined function: getAC (help, please)

Post by Veggiesama »

I might not be as delicious as a sandwich, but thanks for the compliment anyway! =P

Also, this made me realize that the getAC(), etc. functions did not work on NPCs, so a fix is coming, anyway.
My D&D 4e Campaign FrameworkMy Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.

MHolman
Cave Troll
Posts: 26
Joined: Tue Sep 28, 2010 5:46 pm

Re: Undefined function: getAC (help, please)

Post by MHolman »

While you're thinking about fixes...what about a button to designate a power as a Daily Item (and therefore remove one from the pool, similar to removing a Surge). This could be really useful for people who make macros for their Daily Item Powers but (like me) forget to click "use a daily item power".

Aren't I just full of ideas?

User avatar
Veggiesama
Dragon
Posts: 619
Joined: Wed Aug 29, 2007 1:18 am

Re: Undefined function: getAC (help, please)

Post by Veggiesama »

As a matter of fact, I had that very idea, but it was late and I felt lazy.

But this works just as good: put [R: spendDailyItem()] in the Custom Code section of the power to get what you want.
My D&D 4e Campaign FrameworkMy Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.

Post Reply

Return to “D&D 4e Frameworks”