• 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

Data Files Authoring questions

At 09:19 PM 11/24/2007, you wrote:
Thanks for pointing this out. I made a slightly modified version of the Cleric by duplicating the SRD version and making the changes necessary, but the default class panel that was generated didn't have a domain entry. I managed to "hack" one together by copying the panel & layout stuff from the srd cleric file, then modifying a few key things. Hopefully it will stay functional for awhile longer? Oh well, if it changes then it changes
icon_smile.gif
I didn't mean to have you think you shouldn't change anything. It was intended as a warning so that undocumented functionality doesn't start getting used extensively. If something like this gets broken in a future update, fixing it ought to be pretty quick and painless, unless it's something you've manually tweaked in numerous places. So just be prudent in how often you muck with undocumented mechanisms and you should be fine.
 
Thanks - I've been keeping those to a minimum, using the editor as much as possible. This brings up a couple questions though:

1) I mentioned that the default class panel after I copied the Cleric didn't have anything in it for domains. Is there something else I was supposed to do, but missed?

2) I noticed the "hidden" element only seems to work when it's at the bottom of a datafile. If there are things defined after the "hidden" element, it throws an error. Is this one of those mechanisms that is still evolving?

3) Not a question, just wanted to add that I'm very impressed with HL and how responsive you guys are!
 
At 05:23 AM 11/25/2007, you wrote:
Thanks - I've been keeping those to a minimum, using the editor as much as possible.
Then you should be fine. :-)

1) I mentioned that the default class panel after I copied the Cleric didn't have anything in it for domains. Is there something else I was supposed to do, but missed?
This one needs Colen's input. You've ventured beyond the limits of my knowledge about the inner workings of the d20 files.

2) I noticed the "hidden" element only seems to work when it's at the bottom of a datafile. If there are things defined after the "hidden" element, it throws an error. Is this one of those mechanisms that is still evolving?
The data files are XML files. XML files are structured and sequenced. If the contents in a data files don't match that structure and/or sequence, they are invalid, so you'll get an error message.

In general, it's ill-advised to put "hidden" elements into files with other material. I strongly recommend they be placed in a separate file from material being modified with the Editor. For example, you might have a data file named "hidden.dat" that you modify manually, while all other files are modified via the Editor.

3) Not a question, just wanted to add that I'm very impressed with HL and how responsive you guys are!
Thanks!
 
Lawful_g wrote:

> I have another question. I'm entering the Mystic class, which is a
> spontaneous divine spellcaster that uses the same spell list as the
> cleric but only gets one domain. Similarly to the sorceror they can only
> know a limited number of spells of each level. I'm having trouble
> dealing with the domain.
>
> I don't know how to make it show up on the panel. I copied the Cleric
> class, but I didn't see any bootstrapped abilities that were for the
> domains. Looking through the Eval Rules and scripts I couldn't find
> anything referencing domains either. I even recopied the cleric class
> without any changes other than the name and on the panel for this new
> class the section for domain and deity were absent...
>
> So, how do I add a single domain selection for the Mystic cass?
>
> A second issue, for after that one is solved. The Mystic gains the
> domain spells of his domain as bonus spells known, so for example, at
> 1st level he knows 5 0th level spells, 2 1st level spells, and the 1st
> level spell for the domain he has chosen. How do I make the domain the
> mystic selects add a certain spell as a bonus spell to his spells known?
> I understand that I will have to use the "Replaces ID" box and re enter
> values for all the domains in the PHB, which is going to be a chore. I'm
> asking about the coding aspect here.
>
> I'll definitely have more questions over the long weekend, when I can
> have hero lab open and be visiting this forum simultaneously. I haven't
> had Internet at home for the last week or so, but it's supposed to be
> turned on tomorrow. I never realize how much I rely on the net for
> everything from study to entertainment to business until it is stripped
> from me.


Hmm... the domains you have are going to be really different from the
normal domains, because you'll need to bootstrap the spells that you
know. So it probably makes sense to define them differently - as Custom
Abilities.

Give the Mystic 1 custom ability at all levels, and add one Mystic
custom ability for each domain that bootstraps the appropriate spell.
That way you don't have to worry about making the Mystic domains
overwrite the existing ones.

After that, I think everything else should be pretty simple.


Actually adding domains to custom classes currently isn't implemented
yet. The cleric was the very first class we added to Hero Lab, back when
we were showing off the first demos 18 months ago, and we didn't have
time to go back and rework it when we added custom abilities to classes.
At some point, cleric domains will probably change a bit, and become
just like custom abilities.


Hope this helps,

--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
 
Here are another two questions.

I am adding a feat called Shield Focus, which boosts the shield bonus you get from weilding a shield by 1. How would I script "If you have a shield equiped, add +1 shield bonus"? There is also a similar feat called Heavy Armor Optimization, which only works with Heavy Armors, obviously, and I am not sure how to specify the type of Armor.

A second issue, I am trying to make a custom staff (The Blue Crystal Staff of Mishakal) but I can't figure it out. I copied other staffs and they have bootstraps to things called Charges, one for each spell they cast. I can't find how to make custom charges to bootstrap to my new staff. I seem to remember there being a "charges" tab in the editor a few updates ago, but I don't see it anymore. Is there currently a way to make charges and therefore staffs at this time?
 
I believe the tags Hero.EquipShld tells you a shield is equipped, and Hero.HeavyArmor tells you heavy armor is equipped.

As for the charges, the only way I can see adding new ones is to edit the dat files by hand. If you take a look at srd_charges.dat you can see how the default ones are defined.
 
Thank's I'll give those tags a try for the feats.

As for the charges, I'm not comfortable editing such things by hand, so I'll just have to ask Rob and Colen to add charges back into the editor next release.
 
huntercc said:
As for the charges, the only way I can see adding new ones is to edit the dat files by hand. If you take a look at srd_charges.dat you can see how the default ones are defined.

Charges are handled by field[hTotal]. Here's the script to one ability I wrote:

Code:
var result as number
var x as number

~ usable Wisdom bonus times per day
x = hero.child[aWIS].field[aModBonus].value
~ minimum 1
if (x <= 0) then
 x = 1
endif

~ set charges
field[hTotal].value = x

~ show in charges tab
result = assign[Helper.ShowCharge]

I presume, given this, that if you're mucking with the Charges of something that is not your current Thing, you can do it by finding the Thing, and then setting its field[hTotal].value.

[edit]And if I go and read what you're /actually/ trying to do ... here's how I'd handle it. I'd create Specials for each of the spells it can cast (if there's a separate pool), and link those in as bootstraps. Make sure that there's the (Blue Crystal Staff) as the source, and everything should be clear.[/edit]

Laz
 
This Shield Focus feat is still kicking me arse. I can't seem to get the tag recognition right. here is what I have so far, what am I doing wrong?

Phase: Final Priority: 10000 Index: 1
var bonus as number
if (#hasfeat[fShieldFoc] + #hasfeat[fGrShieldF] = 1) then
bonus = 1
elseif (#hasfeat[fShieldFoc] + #hasfeat[fGrShieldF] = 2) then
bonus = 2
endif
if (tagcount[Hero.EquipShld] = 1) then
~ Add a +1 Shield Bonus to our armor class
hero.child[ArmorClass].field[tACFlat].value = hero.child[ArmorClass].field[tACFlat].value + bonus

hero.child[ArmorClass].field[tAC].value = hero.child[ArmorClass].field[tAC].value + bonus
endif



If I remove the "if (tagcount[Hero.EquipShld] = 1) then" and the endif at the end, the bonus is applied even when a shield is equipped, but when I add that line the bonus is never shown, whether a shield is equipped or not. I tried a different tack as well, placing before the "var bonus as number"

~ If we're not equipping a shield, just get out now
if (tagis[Hero.EquipShld] = 0) then
done
endif

and again, the bonus never shows....
 
try hero.tagis[Hero.EquipShld]. Assuming that Hero.EquipShld is the correct tag, of course (I don't know, haven't taken a look at that section yet)

Laz
 
Colen said:
Lawful_g wrote:
>
>
> Also, I set up each custom ability of my class to be only available to
> certain alignments by setting a pre-requisite... However in the window
> to select the abilities all are available, not just the ones that the
> character's prerequisites qualify him for. If you select an ability that
> you don't qualify for there is a validation error, but is there a way to
> gray out the abilities you don't qualify for or otherwise make some sort
> of warning? I notice the Loremaster secrets have req warning messages...
> can't figure that out for my own ability though.


Oops - that's a bug. I'll get that fixed for the next update.


Thanks,

--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development

Has this been fixed in 1.3? I was juct going through my old class and I noticed the pre-requisite messages are still not showing. The reason I stumbled upon this is because I am trying to code an ability called Magic of Hunger. It allows a wizard to memorize one extra spell of any level they can cast, but on any day they do so they take 1 point of temporary Con damage.

What I was thinking of doind, although I am not sure it is possible, is set up some sort of script in the custom ability that says "ignore the first validation error coming from the selection of too many spells on the wizard panel." and then "If the validation error is being ignored, apply -1 temporary damage to Con". Is there any way to script the ignoring of a validation error from a specific source? if not, how do you suggest I impletment the ability?
 
What phase are you doing it in? I've found that it's very finicky to when it goes: I suspect if you try it in the Final phase, you'll see the bonus adding in. Hm. I see you've already got it going in the Final ... perhaps the tag isn't correct?

Laz
 
One option you could use is to take a look at the xml files for something that has "while shield is equipped" checked.

Also, mind if I muck about with your script a bit? Here's something that's more efficient:

Code:
var bonus as number

bonus = #hasfeat[fShieldFoc] + #hasfeat[fGrShieldF] ~ is a 1 if one of them, 2 if both

~ NOTE: this is going to add the number of Shield Focus feats in.  This is non-SRD stuff :p

if (hero.tagis[Hero.EquipShld] <> 0) then
 hero.child[ArmorClass].field[tACShield].value += bonus
endif

The above works for me.

Laz
 
Thanks Lazarus, by all reason that should work. I just tried it out myself but it is not working exactly correctly.

When I enable debugging and click View - Show Selection Fields - Armor Class it breaks down the different sources of AC change, and it shows when I equiq a heavy shield the Shield bonus as +3, but the normal AC and Flat footed AC still only recieve +2. Very wierd. I added 2 extra lines

hero.child[ArmorClass].field[tAC].value += bonus
hero.child[ArmorClass].field[tACFlat].value += bonus

and now it works. Thanks for all your help, you know it's always the little things that mess me up.
 
Is there a way to multiply in this programing language? Like say I wanted to double a creatures base land speed when adding a template, how would I code that?
 
Here's a script I got to work for 1/2 movement:

Timing: Final/10000
~Spd/2
hero.child[Speed].field[tSpeedMod].value = hero.child[Speed].field[tSpeedMod].value/2
 
To double the movement just use:

hero.child[Speed].field[tSpeedMod].value = hero.child[Speed].field[tSpeedMod].value*2
 
Thanks for the help with the Speed doubling, now I know multiplication is * and division is /. I ended up doing it differently though, the script I used is
~ Double our Base speed
hero.child[Speed].field[tSpeedMod].value = hero.child[Speed].field[tSpeed].value

Which doesn't seem like it should work to me, because in the help files it says tSpeedMod is the final modified speed for the hero... but actually it seems to be the final modifier that is added to the base speed.
 
Now another question, how do you replace one tag with another? I am adding an ability that negates encumberance, and the script I am trying is :

var result as number
if (hero.tagis[Encumbered.Medium] = 0) then
result = hero.assign[Encumbered.Light]
elseif (hero.tagis[Encumbered.Heavy] = 0) then
result = hero.assign[Encumbered.Light]

My hero is still showing medium encumberance, and his Dex bonus to AC is reduced. I think the problem is that although the Light encumberance tag is being assigned, the Medium or heavy tags are still there and overriding it.... I am aware of the hero.assign command, but is there an opposite to this that removes the tag? I tried "hero.disable" and "hero.remove" though neither worked.

An alternate method may be to fiddle with the encumberance table and set the Light encumberance for the hero to some insanely high weight, or if there is a way to override the max Dex bonus to AC due to encumberance that is also peachy. Again, don't know how to do either of these things.
 
Back
Top