Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 24th, 2012, 04:03 PM
I've been trying to automatically add a magic weapon. After a small migraine I gave up with trying to code a custom item, and decided to just make a magic weapon to bootstrap.

There's an eval script for magic weapons at First/100 that limits when bootstrap conditions can occur. So I have tried setting the condition to First/100, First(user)/100 and first/99. On any of these, I get no error messages (which is good), but when the source is equipped, the weapons do not appear (which is bad). I've found that if I go into the editor and say [Test Now] on a weapon, it magically appears, but I can't go through and do that every time I want to use this.

So far I've tried conditions of:
Classes.Fighter >= 5

count:Classes.Fighter >= 5

#levelcount[Fighter] >= 5

if (#levelcount[Fighter] >=5) then
@valid = 1
endif

At this point I'm starting to wonder if it is even possible to use bootstrap conditions with magic weapons.
Nightfox is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old May 24th, 2012, 04:34 PM
count:Classes.Fighter >= 5 is the correct one, but that can't be used until after First/200.
Mathias is online now   #2 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 24th, 2012, 05:05 PM
Well, that would be why I always had trouble with conditions at First/100. But is there a way of getting around the earliest rule/script(First/100) on magic weapons?
Nightfox is offline   #3 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 24th, 2012, 08:26 PM
If I had more information on what exactly you are trying to do, I might be able to give a few pointers. I have alot of experience with bootstraps and their limitations, including finding workarounds. I can't say whether I can help you with yours or not until I know what it is you are actually doing. I might even be able to help with the coding of the custom item you gave up on.
Kendall-DM is offline   #4 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 24th, 2012, 09:38 PM
I'm working on a prestige class. One of the class features is to sacrifice spell power to generate weapons of mystic energy. These are the equivalent of a long sword, spear, and short bow. The weapons start as +1 but gain an additional +1 every couple levels. There is of course more lemony goodness about adding enhancements, but the first part is where the problem is. My first work with Hero Lab was creating a soulknife and if it wasn't for Aaron and Mathis, I probably wouldn't have stuck around. One of the many problems with that class was that the weapons that were boot strapped wouldn't scale with the character, and the user couldn't custom build a weapon of the appropriate ability without editing. Of course, the editing was what sold HL to me, so I guess it worked out.

For this project I started off thinking I'd just link to the normal weapons with eval scripts that would convert the mundane Long sword into a custom magic item (as though the user had worked in the weapon's tab) but after a couple of hours with no progress I looked for alternatives.

Solution, create a magic weapon base, in this case a Long Sword, Spear and Short Bow. Add a special called xEKEnhBon. Add eval script to weapons to add hero.child[xEKEnhBon].field[Value].value as an enhancement bonus to the wBonus fields of the weapons in question. Add a class special to bootstrap to both, which adds to the [Value].value field of xEKEnhBon (since there are magic items that can boost this bonus I figured it would be easier to have a separate special).

*Presto* as the character progresses, their weapon automatically upgrades with them.

Everything works together except the bootstrap. I can add the weapons individually, and they'll scale correctly, but the class doesn't get the ability to generate the weapons until 3rd level. Bootstrap with out a condition and they get the weapons at 1st.

<breaking out the danish earmuffs>
Help me Kendall-DM, your my only hope.
Nightfox is offline   #5 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 25th, 2012, 09:27 AM
Ok, I looked over the soulknife in the Psionics Handbook and I think I understand your dilemma. You want the enhancement adding bootstrap to kick in at 3rd level (actually, I think you mean 4th level). So, I think there is an easy solution for this, a workaround that will get you the same effect.

First, I think what you want to do is to change the wBonEnhance field rather than the wBonus field. It's a little off topic, but I just thought I'd point that out.

Second, don't try to change the level that the bootstrap kicks in, instead just re-code the script that changes the xEKEnhBon value field so that from the levels that there are no enhancements to the weapon, it adds 0 instead of an actual number. Now, if it is indeed every 4 levels you get the bonuses, it would go something like this (a bit of psuedocode where I'm not sure how you are doing the actual code).

Post-Levels/10000
Code:
var bonus as number
bonus = round(#levelcount[Soulknife] / 4, 0 , -1)
hero.child[xEKEnhBon].field[Value].value += bonus
By removing the condition on the bootstrap, you don't affect anything. Thereafter, while you get the bootstrap effect at 1st level, it will only add 0 for levels 1-3, +1 for levels 4-7, +2 for levels 8-11, etc. Does that help?

Last edited by Kendall-DM; May 25th, 2012 at 09:29 AM.
Kendall-DM is offline   #6 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 25th, 2012, 11:26 AM
Last year when I was fighting with the soulknife, I was still learning to manipulate tags and fields and such so I just added new base weapon copies of the mindblade weapons that were "magic only". I've been thinking that if I can get this other class to work, I might go back and use what i learn on my soulknife fix, but it still misses one of the problems. Let's see, on the soulknife you get the shortsword at first, but you don't get the other blades till.... 5th? Therefore, a 1-4th level character should not have them showing up on their weapons list. This is where the condition would come in.

The coding is almost exactly what I have. I'm going to use this as proof that I've learned

I forgot about wBonEnhance, thanks. I'll switch that over and test it next.

for the prestige gish class I'm working on,
lvls 1-2: burn spells to improve physical weapons and armor, reduce ACP
lvl 3: generate +1 eldritch weapons with abilities based on spells burned to generate them
lvl 5, 7 & 9 the automatic bonus on the weapons increase by +1
lvl 4: can burn spells to add an extra special ability to the weapons
lvl 6: imbed spell in weapons which is delivered on next successful attack.
lvl 7: move action to imbed spell (regardless of spell's casting time)
lvl 8: can hold the spell charged blade and choose when to discharge
lvl 10: eldritch blades can hold 2 spells at once. they can be released separately or together.

since the actual abilities of the weapons can change from encounter to encounter it doesn't make sense to create so many different ones. On the other hand, the base weapon bonuses scale quite evenly with the class so that seemed like the place to start.

As indicated, I am still learning, but is there a way to hide, disable or delete a bootstrapped Thing other then with the bootstrap condition? For items and weapons, would reducing the quantity to 0 cause them not to show on print outs?
Nightfox is offline   #7 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 25th, 2012, 12:31 PM
If you include the "call CalcValue" in your script, it will cause anything with a 0 in its Value field to become inactive. That's one way of doing it.

And yes, there is a way to turn off the bootstrap, or rather, to keep it from appearing on your Specials list (and to keep the script from being produced). At the top of each script, you can place (I'm working from memory):

Code:
doneif (tagis[Helper.SpcDisable] <> 0)
What this will do, is if you assign the Helper.SpcDisable tag in your script to the appropriate pick (the relevant bootstrap), it will not run your script. You can also remove the specials display tag to remove it from the special list:

Code:
perform hero.child[xxx].delete[Helper.ShowSpec]
This will remove it from the specials list. Now the problem becomes the boostrap. If a bootstrapped ability also has a bootstrap on it, as it appears yours does, then you have to deactivate it as a condition. As a programmer myself, it took me months to understand the complicated nature of how bootstraps work with conditions and timing properly. As a first attempt at coding, it is a daunting task, because there is a lot of things going on in HL that you don't see that affects how bootstraps work. I avoid having to use conditions on bootstraps until it is the only option.

Looking at what you want your prestige class to do, you have alot of disparate abilities, and my suggestion is to make different ones. It gets very difficult to make disparate abilities to work hand in hand as one ability (it can be done, but is it work the head trauma?). Much of what you are doing will just be descriptive text and won't actually have to make changes in HL, so removing the Helper.ShowSpec is the way to go on those.

Listen, I've been doing HL long enough that I've got a handle on most of the ins and outs of the program. There are some things that still baffle me though, and it is just because they won't allow me to look at the guts of the program. I'd love to tinker with HL, but that's not going to happen. I've accepted that some things (and they are few) can't be done in HL. Most of the time, I get what I want out of HL, even if it is less than what I expected (live states, ergh). But I digress.

I'll give you an example of something I did recently. I had figured out a way to add racial spell-like abilities as spells to my monsters. I do it by bootstrapping the spells to a Special called spell-like abilities, then I bootstrap the spell-like abilities Special to the monster (the dreaded bootstrap on a bootstrap). Now, I was doing the Titan like this, when I noticed that a Titan gets additional spells based on whether they are Good/Neutral or Evil. The first condition I set up was to look for the Alignment.xxx tag, but I could place anything in my bootstrap condition before First/2500 when the Alignment.xxx tag isn't seen by HL until First/10001. Essentially, I couldn't discover the alignment until after I needed the condition set, which wouldn't allow any of the additional spells to show up. So, I had to think it through, and come up with an alternate way of approaching the problem. What I know is, there is a place where the alignment is stored (and things get a little complicated here, so bear with me) before the hero is assigned a tag. This was in something called component.Alignment, which allowed me to iterate through the thing with that component and look for the appropriate Alignment.xxx tag that was actually found there (before being assigned to the hero). This all occurred before First/2500, so I was then safe to use it. Unfortunately, I can't script an interation in the condition, so I had to script it in spell-like abilities Special (again before First/2500) to do that and set the spell-like abilities Special's Value field so that I could access it through the conditions on a bootstrap using the fieldval:Value check. That is how I got that to work. Painful as a process, but it takes some digging to find a way.

My suggestion to you, as a beginner, is to make thorough use of the debugging tools. You can access this through the main HL screen (make sure you have something loaded up with the relevant thing you want to look at) under Develop->Floating Info Windows->Show...

You can also access some things directly by right-clicking its info button (the gray and white question mark next to it) and selecting one of those. There you can see all the Tags and Fields on a thing, as well as the Timing (Tasks) which tell you, abstractly in some cases, what is occurring at each timing phase, and whether you need to make a change before or after it to get the results you want.

I hope this is some help to you. Don't be discouraged! Feel free to ask for help from me anytime, if I know or don't know, I will usually respond in a prompt manner. The more specific you are (including your code) the more likely I can help.
Kendall-DM is offline   #8 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 25th, 2012, 03:37 PM
I did not know that call CalcValue would stop the script if it had a 0 value. See, learning something new every day.

Does the tag Helper.SpcDisable actually disable the Thing in some way or is it just a tag for the script to look for? I've added the tag to a couple items, but so far I haven't notices much effect except in scripts with the doneif.

As far as the bootstraps go, I am not a programer. I've done a little here and there, but I prefer to think I'm a problem solver. What do I need to do & How can I do it. My scripts are not elegant, but I can usually get it to do what I want - it just may take me 20 lines to do what you have done in 5. One of the games I'm playing in, the DM gives us some boon every month (a minor template, a small addition to a class, skill or feature etc) which I've learned to love as it challenges me to try different things with the HL Editor. As it is, I've got a dozen minor templates and class variants just for that campaign. On the games I run, I have added 2 races, 3 base classes, 3 prestige classes and a number of feats, skills and specials. I use specials like other people use vowels . I have most of this prestige class done (unless I get ambitious and try to implement more) except giving access to the Eldritch weapons at the appropriate time. If I have to, I'll just leave them as red (prereq). The rest of it works, those just show up early.

Now 2 questions, how/where did you find that component.? for the alignment. If there's one for classes, and if it occurs before First/100, I might still be able to pull this off. won't know until I try.

second, when you were adding the spell like abilities to those Titans, are they just being added as in-play charges, or are they showing up in the spells tab? I ask because the most recent boon was a casting/manifesting ability, and I have been wanting to add a couple of feats that do similar. I should probably start a new thread for this topic.
Nightfox is offline   #9 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 25th, 2012, 04:07 PM
Quote:
Originally Posted by Nightfox View Post
Does the tag Helper.SpcDisable actually disable the Thing in some way or is it just a tag for the script to look for? I've added the tag to a couple items, but so far I haven't notices much effect except in scripts with the doneif.
It will turn it gray on the Specials tab (I think), but it won't remove them from the list. To remove them, you would have to delete the Helper.ShowSpec tag. As for the Helper.SpcDisable, other than graying out the entries in Specials, it also helps for stopping scripts, as you noticed. It's not a magical tag that gets rid of Specials, it's more of a flag to indicate that the Special is no longer in use.

Quote:
Originally Posted by Nightfox View Post
Now 2 questions, how/where did you find that component.? for the alignment. If there's one for classes, and if it occurs before First/100, I might still be able to pull this off. won't know until I try.
Again, that's a tricky one. I had to dig in and find it. On a hero, there is no Alignment thing that can be found in the debugger, but there is one for the chosen alignment (the one you chose when you make the character). For the Titan, I had a chaotic good alignment chosen, I went to the debugger and selected that alignment in the list, which brought up the thing that represented that alignment called aChaoGood. I looked at that thing's tags, which showed it was part of component.Alignment and also carried the Alignment.Chaotic and Alignment.Good tags. That's how I found it, just digging through the picks in the debugger.

Quote:
Originally Posted by Nightfox View Post
second, when you were adding the spell like abilities to those Titans, are they just being added as in-play charges, or are they showing up in the spells tab? I ask because the most recent boon was a casting/manifesting ability, and I have been wanting to add a couple of feats that do similar. I should probably start a new thread for this topic.
I've tricked HL into doing it so that it appears on the Spells tab. It's a crazy idea, and it took a ton of work, but it was worth it. Anyhow, I created a Spell-Like Ability Special in the Editor (I have to make a new one for each creature with spell-like abilities). What I did then, is script my spell-like ability at Pre-Levels/10000:

Code:
doneif (hero.tagis[Hero.Caster] <> 0)

~ We need to have a caster level for spell-like abilities.
perform hero.assign[Hero.Caster]
The trick here is, you have to make a spell that is racial. So what I did is copy a Sorcerer spell (or other if Sorcerer isn't available) that is the same spell and recreate it as a racial spell. For example, take Detect Magic, copy it from the Sorcerer, rename it sRaceDtMag. Then I go the the tags and delete the sClass.Sorcerer tag (or whatever class). Add the following script to your new spell, I chose Post-Attributes (Users)/5000.

Code:
~ Livename the spell-like ability.   
if (field[sCastLeft].value = 99) then
  field[livename].text = field[name].text & " (at will)"
else
  field[livename].text = field[name].text & " (" & field[sCastLeft].value & "/day)"
endif

~ Check against daily castings.
field[sCastLeft].value -= field[sCastCount].value
Now go and bootstrap the spell to your spell-like ability Special you made. After you bootstrap it, click on the Field button and add the sCastLeft field, then the number of times per day it can be cast. If you chose 99 as the number, it will be "at will".

Now those racial spells are reusable (you only have to make one version for a racial spell and it works with all spell-like abilities you create). Occasionally you will come across a few that are once per week, or something similar, so I have to add extra else statements to the spell to cover the special cases. That's how I did it. Involved, but so worth it in the end.
Kendall-DM is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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