• 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

help with Archetype

I have an archetype I want to add to hl. I watched the video tutorial on how to set it up. I am having a problem adding class specials. The ones I have added to the class special tab do not show up for use in the archetype class special abilities list. I am sure I am just missing a step. Any help would be great.

Thanks.

Ron
 
Once created, the class specials need to be bootstrapped to the Archtype and have their level set. Did you do that part?
 
Also, did you save the class specials or push Test Now? Test Now actually puts them into the system for testing which makes them show up in the list where you bootstrap them.
 
It looks like one of the variables I was trying to use in the expression was incorrect. What I am trying to do is set a class special that will add one spell for each level that is available. so a 5th level wizard would have 1 1st 1 2nd and 1 3rd level extra spell.
 
I had an error in my script, so when I did test now it failed on the attribute. What I am trying to do is add a wizards archetype. I have a few items for Class Special I am trying to add. For example, I want to add a spell for each level of spell the wizard can cast. I found an attribute that shows a maxsplev, but I am not sure how I can create the eval script for this.

Thanks,

Ron
 
I did the test now and it showed I have several errors in my eval scripts. I tried to post this next part as my alt, but it is waiting for a moderator to approve.

What I am trying to do with this particular eval script is to add 1 spell for each level of spell I can cast. I was trying to cobble a script from one found in the shadowcaster archetype, but that obviously was not correct. How should my script have been phrased.
 
Whenever you get an error message and have questions on it, you should right click and copy it so that you can paste it here. That goes a LONG way in others helping you.

Also, if you can paste the code you have, and the full text description of the ability you are working on, that is another thing that will be a huge help in pointing you in the right direction.

Can't really work with "I have a problem, how do I fix it?"
 
field[abValue2].value = hero.child[cHelpWiz].field[cMaxSpLev].value
field[abValue3].value = field[abValue2].value
field[abValue4].value = 0


field[abValue4].value = field[abValue3].value + field[abValue4].value
field[abValue3].value = field[abValue3].value - 1
Doneif (field[abValue3].value =0)
 
I am not certain how this can be written to add one spell per spell level available. This uses the shadowcaster idea, but counts up the spell levels and that is all. I just don't understand the way of writing scripts yet. Any thoughts?
 
You mention you are trying to use the Shadowcaster IDEA, but that is a class (that I am not familiar with) that has several abilities. Since I doubt you are trying to make one ability do EVERYTHING that the class does, I need to know which PIECE of the CLASS you are trying to work on. (Again, pasting the description text of the ability is your best bet to get ideas.)

For now, let's look at the code you provided.

field[abValue2].value = hero.child[cHelpWiz].field[cMaxSpLev].value
field[abValue3].value = field[abValue2].value
field[abValue4].value = 0


field[abValue4].value = field[abValue3].value + field[abValue4].value
field[abValue3].value = field[abValue3].value - 1
Doneif (field[abValue3].value =0)

Is this from 2 different Eval Scripts? I have no clue what you are trying to do with the code you posted since you didn't say what you are trying to figure out, and didn't use comments to describe what it is supposed to be doing.

For now, I am going to dissect what you have provided, without making any changes to the code. (~ denotes a Comment to explain what the code is doing)

Code:
~So we want our abValue2 to equal the highest level spell we can cast
field[abValue2].value = hero.child[cHelpWiz].field[cMaxSpLev].value

This is the first time that we know you are working on an ability for a wizard. Have not mentioned that before. This one seems to be ok.

Code:
field[abValue3].value = field[abValue2].value

We already defined that abValue2 should be the highest level spell we can cast. Why do we need abValue3 to be the same number?

Code:
field[abValue4].value = 0

abValue1-4 defaults to 0 unless you define something other than that number. Why do we need a code to do exactly what the default is?

Code:
field[abValue4].value = field[abValue3].value + field[abValue4].value

So we are trying to define a value for our field[abValue4] in this line. (Didn't we just redundantly set it to 0 on the line above it?) So we want to start defining it by looking at the value in field[abValue3] (same value as in abValue2), but doesn't the next line also re-define abValue3? Then, we want to add the value of field[abValue4]....the same value that we are trying define with this code....that has not be defined yet. See the problem with this line????

Code:
field[abValue3].value = field[abValue3].value - 1

So this value was defined 3 lines above, but we want to re-define it again? What are you trying to do by defining it twice?

So what is happening here is this.....
Line 1 - Set a value.....good.
Line 2 - redundantly set that value to another field.
Line 3 - Redundant unnecessary line.
Line 4 - Trying to use a value that does not exist. (or lets just say that we use line 3 to get a 0. So now, we have abValue4 = abValue3 + 0 = abValue3 = abValue2. So now you have abValue2 - 4 with the exact same value)
Line 5 - Take Line 3 and subtract from it.
Line 6 - Doesn't exist. We set 3 fields with the same value, and did nothing with that value.

Now....what would happen if line 1 was not there?

abValue3 = 3
Line 4 - Trying to use a value that does not exist. a = 3+a. For argument sake, let's say it becomes 3a.
Line 5 - 3-1 = 2

So the next time this script runs (Scripts run every time you click something on the character)

abValue3 = 2 (We subtracted 1 from it at the end f the last run)
Line 4 now becomes a = 2 + 3A......5A for arguments sake though not mathematically correct.
Line 5 - 2-1 = 1

and so on and so on. Each time you change something on the character, abValue4 would increase by value of abValue3. So every time you changed something, this value would change. It would not stay constant. (Adjusting hps, skill points, equiping/unequiping a weapon/armor/item/ability would cause the script to run again. It is an endless loop.

This is why I need the description of the ability to know what you are trying to do.
 
I am not certain how this can be written to add one spell per spell level available.

If this is all that you are trying to do, your best bet would be to go to the Adjust tab, and add the Other Adjustment for Spells Known or Spells cast per day for each of the levels you need. Depending on which one you need.
 
And FYI....don't feel bad. When I was starting out I wrote some pretty bad code. ShadowChemosh used to break it down for me at each level like I did for you, and eventually I got better. (Though I still write some douses sometimes.)
 
And FYI....don't feel bad. When I was starting out I wrote some pretty bad code. ShadowChemosh used to break it down for me at each level like I did for you, and eventually I got better. (Though I still write some douses sometimes.)

Yep, me too.
It's a steep learning curve and it still befuddles those of us that have been using the editor for a considerable time.
 
A more advanced way to handle this would be with a for loop that counts up the spell's memorized array, and adds 1 if the currently considered row is not 0

No assurance on this code, hasn't been tested, just off the top of my head.

Code:
      perform hero.childfound[cHelpWiz].setfocus
      
      doneif (state.isfocus = 0)
      
      for i = 0 to focus.field[cMaxSpLev].value
        if (focus.field[cMemMax].arrayvalue[i] <> 0) then
          focus.field[cMemMax].arrayvalue[i] += 1
          endif
        next
 
Back
Top