Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   How to make an Adjustment that can choose from Current Armor? (http://forums.wolflair.com/showthread.php?t=65176)

draco963 December 7th, 2020 02:01 PM

How to make an Adjustment that can choose from Current Armor?
 
Hi everyone. I'm trying to make an Adjustment that can select from the hero's current armour. The Adjustments already include an Armor of Legacy option, and when examing it as a copy, it's already set up to use the Show Menu called "Current Armor." But, that list always shows "-No Selection-" on the hero.

I figure something is wrong with that "Show Menu" option, but I cannot figure out what, nor where those Show Menu options are programmed. So, I'm kinda stuck.

Can anyone point me in the right direction?

draco963 December 7th, 2020 02:19 PM

Ya, when checking the Field Hoistories for the Armor and Weapon of Legacy adjustments, the field "pCandExpr" for WoL shows "component.BaseWep & !Helper.Static". But the same filed on the AoL adjustments shows "FALSE".

I think something's wrong with the ShowMenu choice "Current Armor", but I don't know how ot fix that...

Sendric December 8th, 2020 11:32 AM

Quote:

Originally Posted by draco963 (Post 292243)
Ya, when checking the Field Hoistories for the Armor and Weapon of Legacy adjustments, the field "pCandExpr" for WoL shows "component.BaseWep & !Helper.Static". But the same filed on the AoL adjustments shows "FALSE".

I think something's wrong with the ShowMenu choice "Current Armor", but I don't know how ot fix that...

Hmm....looks like a core bug issue. Try adding this script to the adjustment:

Pre-Levels/10001
Code:

field[pCandExpr].text = "component.BaseArmor & !Helper.Static"

draco963 December 8th, 2020 02:29 PM

Thanks Sendric. I actually figured something out at around 4am:

The existing adjustments for Legacy checks use the bootstrapped feats to run the expression "component.BaseWep & User.Legacy". So, if I make duplicates of the Legacy adjustment, one for Armour and one for Wondrous items, and then duplicates of the associated feats, one set running "component.BaseArmor & User.Legacy" and one set running "component.BaseWonder & User.Legacy", everything seems to work correctly.

New problem I've run into: the count is now all messed up. Each bootstrapped feat in the adjustment has the following condition attached:
Code:

fieldval:pIsOn<>0 & fieldval:pAdjust>=1
(and >=2 and >=3 for the succesive feats). Now, in the original adjustment, that works properly, adding on the appropriate feats to the hero when the adjustment count is 1, 2, or 3 respectively.

However, in mine, things have gone wonky; the Least feat only shows when the count is zero, and then disappears. Lesser kicks in a 3 instead of 2, and Greater isn't showing at all.

Just sat down to keep hammering at this. Ideas and pointers more than welcome. Thanks Sendric! You always save my ass when I get stuck in this stuff...

draco963 December 8th, 2020 03:02 PM

More info: from mucking about, I've discovered that the bootstrapped feats pop up if I force a different armour/weapon/item selection. It seems that just increasing the increment of the adjustement doesn't trigger adding the new feat. I don't know if there's a way to "fix" that, or if it's a limitation of the software.

Sendric December 9th, 2020 07:27 AM

Quote:

Originally Posted by draco963 (Post 292271)
More info: from mucking about, I've discovered that the bootstrapped feats pop up if I force a different armour/weapon/item selection. It seems that just increasing the increment of the adjustement doesn't trigger adding the new feat. I don't know if there's a way to "fix" that, or if it's a limitation of the software.

Could be a timing issue. At what time are you running the bootstrap condition? I would compare that to when the pAdjust value is being set.

I can't say I've ever tried to bootstrap things to an adjustment like this. Out of curiosity, may I ask what it is you're trying to do?

draco963 December 9th, 2020 08:50 AM

A couple of years ago, I started trying to make Weapons of Legacy in HeroLab. Chemosh, I think, helped me get started, and I've been using the way he did things ever since. The d20 package includes what very basic work got sorted at that point, and that's where the adjustment came from.

My programming skills are very limited (like, I have to experiment today to see if =+1 is a valid argument), so I just rolled with how he progrmmed it. I still don't really understand what bootstrapping is, I just kind of... use it.

So, WoL are items whose bonuses grow as the hero levels up. The way it's structurally set up, the item gains abilities based on both the hero's level and whether they've attained a certain feat (the feat is gained through storyline actions). So, you've got a magic dagger, it does fancy stuff. If the hero (for lack of a better description) "bonds" with it, the dagger does even fancier stuff, and gets cooler as the hero levels up. Up to a point (level 11); after that, the dagger stops getting fancier, unless the hero "improves" their bond to the item. Once that second-level bond is achieved, the weapon starts getting fancier again, as the hero levels up. This process repeats at level 17.

So, I'm programming in custom Weapons (and Armours and Items) of Legacy (I know, I know, OP af, it's the campaign), and trying now to get the Items to structurally function the same as the Weapons. That is, get the adjustment working, get the Items/Armours relying on the feat attainment instead of simply progressing up by hero level. And so I'm encountering this minor timing bug.

I think it might be better (simpler/effecient) to have the various abilities and bonuses attached to the weapons/items check if the relevant feat has been attained, but I also suspect that Chemosh set up this adjustment system because directly checking feats is unwieldy, or immpossible?

Anyways, that's what I'm at.

Sendric December 9th, 2020 11:41 AM

Quote:

Originally Posted by draco963 (Post 292276)
A couple of years ago, I started trying to make Weapons of Legacy in HeroLab. Chemosh, I think, helped me get started, and I've been using the way he did things ever since. The d20 package includes what very basic work got sorted at that point, and that's where the adjustment came from.

My programming skills are very limited (like, I have to experiment today to see if =+1 is a valid argument), so I just rolled with how he progrmmed it. I still don't really understand what bootstrapping is, I just kind of... use it.

So, WoL are items whose bonuses grow as the hero levels up. The way it's structurally set up, the item gains abilities based on both the hero's level and whether they've attained a certain feat (the feat is gained through storyline actions). So, you've got a magic dagger, it does fancy stuff. If the hero (for lack of a better description) "bonds" with it, the dagger does even fancier stuff, and gets cooler as the hero levels up. Up to a point (level 11); after that, the dagger stops getting fancier, unless the hero "improves" their bond to the item. Once that second-level bond is achieved, the weapon starts getting fancier again, as the hero levels up. This process repeats at level 17.

So, I'm programming in custom Weapons (and Armours and Items) of Legacy (I know, I know, OP af, it's the campaign), and trying now to get the Items to structurally function the same as the Weapons. That is, get the adjustment working, get the Items/Armours relying on the feat attainment instead of simply progressing up by hero level. And so I'm encountering this minor timing bug.

I think it might be better (simpler/effecient) to have the various abilities and bonuses attached to the weapons/items check if the relevant feat has been attained, but I also suspect that Chemosh set up this adjustment system because directly checking feats is unwieldy, or immpossible?

Anyways, that's what I'm at.

Fair enough. To put it simply, bootstrapping is a tool used to add things to a character when something else is added. Like, say I want to add thing A, but in order to make thing A work, I need to also add things B and C so I bootstrap B and C to A so that when A is added, B and C come along for the ride. In this case, you're adding the additional element of "conditional" bootstrapping such that things B and C will only get added if certain qualifiers are met.

Anyway, if you need additional help, let me know. Might be easier for me to see the file with the work you've done in some cases.

draco963 December 9th, 2020 02:06 PM

1 Attachment(s)
OK, so, "bootstrapping" is just a fancy word for "including." :D

So, I could use some more help still please Sendric. I've included my .user file. In it you'll find an adjustment called "pRM_LgcyRitsWndr". How could I get the ShowMenu to be a list of the Magic Items the hero is wearing?

Also, evaluation scripts #'s 1 & 8 on the Wondrous item Assassin's Hands, the script I have in #8 refers to field[Value].value twice, meaning two different numbers. I doubt that script will work, but I can't figure out how to get the Rit value, set up in script #1, to use a different variable name than field[Value].value.

Thank you Sendric!

Sendric December 11th, 2020 04:18 AM

Quote:

Originally Posted by draco963 (Post 292280)
OK, so, "bootstrapping" is just a fancy word for "including." :D

So, I could use some more help still please Sendric. I've included my .user file. In it you'll find an adjustment called "pRM_LgcyRitsWndr". How could I get the ShowMenu to be a list of the Magic Items the hero is wearing?

Pre-Levels: 10001
Code:

field[pCandExpr].text = "component.BaseMagicI & !Helper.Static"
Quote:

Originally Posted by draco963 (Post 292280)
Also, evaluation scripts #'s 1 & 8 on the Wondrous item Assassin's Hands, the script I have in #8 refers to field[Value].value twice, meaning two different numbers. I doubt that script will work, but I can't figure out how to get the Rit value, set up in script #1, to use a different variable name than field[Value].value.

Thank you Sendric!

I don't understand this question. First of all, that's a lot of scripts. I suspect you could combine many of them.

Second, what do you mean by "different variable name than field[Value].value"? field[Value].value isn't a variable, it's a number. The variable is Rit. Variables are only used within the script they are created within. For example, script #8 knows nothing about the variable Rit in script #2.

Looking at script #8, I don't see where Rit is used to refer to two different numbers. Perhaps your confusion is using "Rit" in multiple scripts? It's ok to do that, but you can also change the name of the variable from script to script and get the same outcome.

If you need to have field[Value].value set to two different numbers at different times, I'd recommend using field[Value2].value as the second number, but I'm not sure that's what you're looking for.

Also, there seems to be some kind of timing issue. Never seen a pop up message like that before. I'll have to examine it some time.


All times are GMT -8. The time now is 07:08 AM.

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