PDA

View Full Version : What is Valid?


Culhwch
March 17th, 2007, 10:11 PM
I'm working on some more feats and was wondering what a valid value for result is in the following code?


result = hero.child[wUnarmed].assign[Helper.DamageUp]


I seem to always be getting 0, but the damage isn't going up.

Thanks.

Culhwch
March 17th, 2007, 10:16 PM
Sorry for the double post; my internet connection hiccupped on me. :(

rob
March 17th, 2007, 11:45 PM
At 11:11 PM 3/17/2007, you wrote:
I'm working on some more feats and was wondering what a valid value for result is in the following code?

result = hero.child[wUnarmed].assign[Helper.DamageUp]

I seem to always be getting 0, but the damage isn't going up.
The above statement will locate the pick with the id "wUnarmed" that exists within the hero. It will then assign the tag "Helper.DamageUp" to that pick. The value of "result" will ALWAYS be zero.

What exactly are you trying to accomplish? Are you trying to assign the tag? If so, then the above statement should be doing it's job. You can verify this using the debugging mechanism to view the tags assigned to the pick at run-time.

If the tag is being assigned correctly, but the behavior you want is not occurring, then the problem is likely to be an issue of timing. Everything is processed by order of phase and priority. If the script in which the tag gets assigned is evaluation AFTER the script that checks for the presence of the tag to apply an adjustment, the adjustment will never occur. You can use the debugging mechanism to view the overall task list and verify when everything is being processed.

Hope this helps,
Rob

Culhwch
March 18th, 2007, 07:03 AM
I'm trying to up the monk unarmed damage without also upping the AC bonus. I got the feat working by changing the cExtraLev value in the monk helper, but as I didn't want AC going up, I thought I'd try something else.

As you say it may be a timing thing; I currently have timing set at UserPostLev. How do I use the debugging mechanism? I have the debug menu item checked, but I never see anything pop up.

Thanks.

Jeff

rob
March 24th, 2007, 11:27 PM
At 08:03 AM 3/18/2007, you wrote:
As you say it may be a timing thing; I currently have timing set at UserPostLev. How do I use the debugging mechanism? I have the debug menu item checked, but I never see anything pop up.
All of the debugging options take the form of separate windows in which you can display a variety of different details about the hero being manipulated. You'll find them under the View menu. You'll find a summary of these tools in the "Custom Material" chapter of the User Manual. Go to the section entitled "Debugging Aids".

Looking at the docs, it appears that two of the items aren't described. So I'll cover those here....

The first is the "Show Selection List". This option displays a list of all the things that have been added to the current hero being edited. As things are added and deleted, this list is updated accordingly.

The other is the "Show Debug Output". This option opens up a window that provides trace output while your scripts are running. The way that you send output to this window is by using the "debug" statement within your script. The format of the "debug" statement is shown below:

*** debug string-expression

Since the string expression can be any expression that can resolve to a string, you can write complex output messages if you really want to. For example, the following statement is perfectly legal, assuming that "stringval" and "numberval" are valid variables.

*** debug "Label: string=" & stringval & " - number=" & numberval

If the above statement were used in a script that gets evaluated by the engine, the debug output window would contain the corresponding output for every evaluation pass processed by the engine. So the output window might look something like:

*** Label: string=fred - number=42
*** Label: string=ginger - number=13

Hope this helps,
Rob

Colen
March 27th, 2007, 01:37 PM
At 09:03 AM 3/18/2007, you wrote:
>I'm trying to up the monk unarmed damage without also upping the AC
>bonus. I got the feat working by changing the cExtraLev value in the
>monk helper, but as I didn't want AC going up, I thought I'd try
>something else.



Your method of assigning the DamageUp tag should be working fine. If
you change the phase it runs in to "UserPreLv" it should work fine.


Hope this helps,




--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/

Culhwch
March 27th, 2007, 08:53 PM
At 09:03 AM 3/18/2007, you wrote:
>I'm trying to up the monk unarmed damage without also upping the AC
>bonus. I got the feat working by changing the cExtraLev value in the
>monk helper, but as I didn't want AC going up, I thought I'd try
>something else.



Your method of assigning the DamageUp tag should be working fine. If
you change the phase it runs in to "UserPreLv" it should work fine.


Hope this helps,




--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/

I'll revisit the feat again when I get all the cleric domains I want added; thanks for getting that in the last update!

I got around the issue by adding to cExtraLev during the PreLevel phase and then subtracting in the PostAttr phase. Doing that didn't recalculate the unarmed damage, so it stayed where I wanted, but it also kept the AC at the original value. I haven't done a whole lot of testing with it, so I don't know if it will work with every combination, but it currently works for my purposes.

Colen
March 29th, 2007, 10:54 AM
At 09:53 PM 3/27/2007, you wrote:
>I'll revisit the feat again when I get all the cleric domains I want
>added; thanks for getting that in the last update!
>
>I got around the issue by adding to cExtraLev during the PreLevel
>phase and then subtracting in the PostAttr phase. Doing that didn't
>recalculate the unarmed damage, so it stayed where I wanted, but it
>also kept the AC at the original value. I haven't done a whole lot
>of testing with it, so I don't know if it will work with every
>combination, but it currently works for my purposes.


That might work, but it also might have odd side-effects. If it works
for you that's great, but I'd recommend making the change I suggested
so you don't encounter any bizarre problems in the future. :)



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/