Senior Member
Join Date: Dec 2011
Posts: 100
|
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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,214
|
count:Classes.Fighter >= 5 is the correct one, but that can't be used until after First/200.
|
#2 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
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?
|
#3 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#4 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
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. |
#5 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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 Last edited by Kendall-DM; May 25th, 2012 at 09:29 AM. |
#6 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
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? |
#7 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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) Code:
perform hero.child[xxx].delete[Helper.ShowSpec] 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. |
#8 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
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. |
#9 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
Quote:
Quote:
Code:
doneif (hero.tagis[Hero.Caster] <> 0) ~ We need to have a caster level for spell-like abilities. perform hero.assign[Hero.Caster] 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 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. |
|||
#10 |
|
|