Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Custom Edge/Broken Earth problem (http://forums.wolflair.com/showthread.php?t=60297)

Paragon March 3rd, 2018 09:59 PM

Custom Edge/Broken Earth problem
 
I'm not sure what the problem is here, but something I've got in the Broken Earth file isn't working quite right.

There is a racial "ability" for Simians called "Less Educated" which blocks access to some skills, bootstraps Illiterate and such. I have an Edge called "Educated Simian" which is supposed to be going back and deleting that ability. When taking it the Illiterate is going away, but the Less Educated "ability" is still showing, and its still blocking the skills.

This is the Edge:

Code:

<thing id="edgEducSim" name="Educated Simian" description="A Simian with this Edge is not Illiterate nor limited in the skills they may take." compset="Edge" summary="An educated Simian">
    <fieldval field="shortname" value="Educ Simian"/>
    <usesource source="BrEarth"/>
    <tag group="EdgeType" tag="Background"/>
    <tag group="MinRank" tag="0"/>
    <tag group="User" tag="EducSim"/>
    <eval phase="Initialize" priority="7500">doneif (field[abilActive].value = 0)
perform hero.delete[User.LessEdu]</eval>
    <pickreq thing="racSimian"/>
    </thing>

And just in case knowing about the racial ability is needed, this is it:

Code:

thing id="rpLessEdu" name="Less Educated" description="Simian communities are superstitious of ‚€œmodern‚€Ě or ‚€œfuturistic‚€Ě technology, and traditionally don‚€™t teach technology to their young. Simians begin with the Illiterate Hindrance, and cannot take the following skills at  the  time  of  character  creation:  Driving,  Lockpicking, Knowledge  (Computers,  Electronics,  Science,  and  the like), Piloting, Repair. Simians, can buy this off with two character creation points, or as an Advance." compset="RacialProp" summary="Technology averse">
    <fieldval field="raceCstVal" value="-2"/>
    <usesource source="BrEarth"/>
    <tag group="DomainTerm" tag="Race" name="Race" abbrev="Race"/>
    <tag group="User" tag="LessEdu" name="LessEdu" abbrev="LessEdu"/>
    <bootstrap thing="hinIllit">
      <containerreq phase="Initialize" priority="8000">hero#User.LessEdu</containerreq>
      </bootstrap>
    </thing>

Any idea why this isn't working right? Something timing-wise, or...? I'm particularly puzzled about it working for removing the Illiterate, but still showing and functioning to block skills; I'd have thought it'd either fail at both or succeed at both.

TCArknight March 4th, 2018 04:09 PM

What’s the timing on the tag used to block the skills?

Also, do you really need the doneif statement on the Educated Simian?

Paragon March 4th, 2018 09:48 PM

Quote:

Originally Posted by TCArknight (Post 263836)
What’s the timing on the tag used to block the skills?

Its not. I did replace and precludes of new versions of the skills for the setting, and it has pick-reqs that look for the Racial Property's id.


Quote:

Also, do you really need the doneif statement on the Educated Simian?
Couldn't tell you. Like most of my eval scripts its likely a kitbash from some other code I found in the code thread or something someone suggested. I only understand about 75% of what's going on in that line of code anyway; I likely just substituted in the ID into code I found elsewhere. I have some general knowledge of coding, but its about 35 years old and ended at Fortran.

CapedCrusader March 5th, 2018 05:19 AM

Don't use Replace.
Never use Replace.
Did I mention not to use Replace?
It replaces it everywhere, not just in the current Setting. It's not meant to be used in Setting files. Use Precludes.

Paragon March 5th, 2018 10:16 AM

Sorry, I used "replace" in the non term-of-art way; I do use Preclude. What I meant was that I have custom versions of the relevant skills that do a pick-req for rpLessEdu.

Paragon March 5th, 2018 10:20 AM

So, that said, anyone got any ideas? I'd have thought "Initialize" would be early enough, but was I wrong?

CapedCrusader March 5th, 2018 09:12 PM

Well, one thing I find confusing is the containerreq on the racial property checking for a tag that is applied by the racial property. You might want to use !hero#User.EducSim instead.

The doneif is for Edges that can be turned on and off by external means. You likely don't need it for this.

As far as the Skills still being blocked, you are using a pickreq on the rpLessEdu. Simply removing the tag won't stop this from happening. Try using a Expr-req that checks for the User.LessEdu tag being there instead. (hero.tagis[User.LessEdu] = 0)

Paragon March 6th, 2018 01:16 PM

Ah. I'll see what I can do with that, and while I'm at it, I'll remove the doneif. I'd assumed that bit of code was removing the rpLessEdu entirely, which I'm guessing from your response is not the case. I usually don't default to expr-reqs because as I indicated, I'm not always as clear on the syntax, so I only go there when there's no nother way.

Paragon March 13th, 2018 02:20 PM

Well, that was pretty painless; it didn't like the parentheses, but other than that it was simple. Thanks CC.


All times are GMT -8. The time now is 04:04 PM.

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