Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Adding Summon Monster Template Required (http://forums.wolflair.com/showthread.php?t=58776)

Jamz July 16th, 2017 05:55 AM

Adding Summon Monster Template Required
 
Hi, I'm creating portfolios of Summoned Monsters. For Summon Minor Monster, none of the animals are showing the "Template Required" (after Configure Hero, checking the summoned monster thing).

So, following the instructions here, it needs the Hero.NeedSumTem right?: http://forums.wolflair.com/showthrea...ero.NeedSumTem

So instead of editing all the animals, I instead created an Adjustment to add it. It seemed to work BUT it doesn't flag as a validation error. :( It shows the "Add Required Summoned Creature Template" as red but no other validation errors (and I need it in the Validation Report so it shows in the XML for further processing down the road...)

Do I have it in the wrong spot? Where should it go instead of First?


First (Priority 100)
Code:

      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
 
      ~ make us summoned
      perform hero.assign[Hero.NeedSumTem]


Aaron July 16th, 2017 12:41 PM

In the configure hero, have you selected the summoned creature source? It's in the "Classes to Show" section, near the bottom of the source list.

Jamz July 19th, 2017 04:45 PM

Yes. Which gives you all that summon monster stuff.

But there is a "Checkbox" that denotes "This is a summon monster and should apply a template".

Basically, it's the difference between Summon Minor Monster & Summon Minor Ally for a Bat. One requires Celestrial/Fiendish template, the other doesn't.

The Hero.NeedSumTem simply drives this "Checkbox". From what I can tell, you bake this tag in for "most" creatures but not all.

Jamz July 21st, 2017 03:48 PM

Shameless bump for help...

Aaron July 21st, 2017 04:58 PM

Well, if I understand what you're saying, the "add a template" text is red, but the validation warning isn't appearing, and for some reason that's a problem for you. Here is the XML for the relevant validation error:

Code:


    <evalrule
      index="2"
      phase="Validation"
      priority="10000"
      message="You must apply a template to this summoned monster!"
      summary="Summoned Monster template required!"><![CDATA[
      ~the rest only applies if we're NOT the race of a fused Eidolon - the
      ~real race is the one in the hero container, and it applies these effects
      validif (container.ishero = 0)

      ~ This is not important if the hero is not a summoned creature
      validif (hero.tagis[Hero.Summoned] = 0)

      ~ We only need to check this if we are a race which sometimes requires
      ~ a summon template, all others are automatically valid.
      validif (tagis[Hero.NeedSumTem] = 0)

      ~ Even if we are a summoned creature and could require a template, we won't
      ~ actually require one unless the user checks the "Template Required?"
      ~ checkbox to indicate for this spell the template is needed.
      validif (herofield[tSumTempRq].value = 0)

      ~ Finally, if all the other tests are passed, then we need to check that
      ~ a valid template has been added to the hero, as indicated by a hero tag.
      validif (hero.tagis[Hero.HasSumTem] <> 0)
      ]]></evalrule>

Your adjustment isn't in a container, it is on the hero so the first validif shouldn't be satisfied.

You said you checked the Summoned Creature source in the config, and I believe that applies the Hero.Summoned tag. So that shouldn't trip the 2nd validif

Your adjustment is applying Hero.NeedSumTem, so that should be fine for the 3rd.

I'm guessing the fourth, which checks that herofield, is probably where you're going wrong. Did you check the box for the hero?

Jamz July 22nd, 2017 06:25 AM

1 Attachment(s)
It looks like all the tags & fields are there? Everything works except for the Validation Report.

Also, here's a link to the portfolio if needed.

Attached image is what I have (with my custom adjust above turned on).

Aaron July 22nd, 2017 09:20 AM

Ah, I think I have it. Look at the context of the 3rd validif

Jamz July 22nd, 2017 09:41 PM

Hrm. If I'm reading that right, doesn't that say it's valid if tag Hero.NeedSumTem doesn't exist? (which it does?)

validif (tagis[Hero.NeedSumTem] = 0)


Or I'm just missing it completely...

Aaron July 23rd, 2017 05:42 AM

The context from a coding perspective. The other validifs are transitioning from the initial context to the hero, and then checking for a particular tag. The 3rd validif never transitions, so it is checking for the tag on the initial context. This is an evalrule on the race component, so the initial context is the pick it is running on, which is the race. So, what else does your adjustment need to do?

Jamz July 23rd, 2017 06:52 AM

That's it, the adjust ONLY adds the checkbox so validation report show that a template is required and has not been selected.

Does it need to go somewhere else other than First or...?

(The above code is the adjustment in it's entirety)


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

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