Senior Member
Join Date: Sep 2017
Posts: 600
|
I recently acquired a magical weapon that can transform into a number of weapons (or a +1 shield). It provides a +1d6 to all damage rolls done with whatever it transforms into, as well as the ability to cast a spell.
Currently I have a version based on the +1 weapons, which adds the 1d6 and the cantrip to a chosen base weapon. Pretty easy, but it requires me to add each version to my character manually and switch them out. Is there any way I can make this one single item, with a drop-down or other way to choose what form it's currently taking? I know the shield option probably complicates that even more, so I'd settle for just the weapon version then a separate shield one. Does anyone know of an existing item I can look at to base mine on? I've just barely scratched the surface of bootstrapping and scripting, but I'm willing to learn. |
#1 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Do what I did. Create a copy of a +1 weapon and add the abilities you require. Change any weapon selection restrictions to what weapons you want to allow. Then just what weapon form you want at the time.
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#2 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Can you switch what weapon form it is on the fly? Or do you need to re-add the weapon each time you change form? The latter is what I'm already doing.
|
#3 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Try adding a +1 weapon to your character. When you do so, it asks you to select a weapon. You can change it any time you want by selecting the edit icon on the weapon itself.
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#4 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Ah I got it. Didn't even think to try the edit button. Thanks!
|
#5 |
Senior Member
Join Date: May 2016
Posts: 608
|
You can also look at the Rod of Lordly Might.
The base object is a Magic Weapon (so go to the Equipment -> Weapon, Magic tab and do a New (Copy) there). You can see how they overwrite the gear type to Rod so it shows up in rods and you can see how they use conditionals on the bootstraps for the Gizmo. It's really confusing to look at though. |
#6 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Thanks for the heads up. I checked it out and it is definitely the direction I'd like to go. But as far as I can tell, there's some extra scripting somewhere else that gets it to work. I can't find anywhere to input new names for the different forms, even within the gizmo. I could conceivably change the bootstrapped items, but they'd still be labelled as the "Button" forms.
It looks like there's some script elsewhere that (1) names the drop-down options, (2) provides some descriptive text for the non-weapon options, and (3) sets a modifier 0-6 that the gizmo responds to. If I can get at that script, I could probably get this to work. Is there a way to open, explore, and replicate a section of the SRD file? I assume that's where this is. |
#7 |
Senior Member
Join Date: May 2016
Posts: 608
|
When you do a New (Copy) of an SRD item it brings over all the attached scripts with it. If there's something hidden from the editor it will usually show up in the .user file you're saving as where you could look at it with a text editor.
In the case of the Rod of Lordly Might the hidden bit seems to be: Code:
<arrayval field="usrArray" index="0" value="Normal form (mace)"/> <arrayval field="usrArray" index="1" value="Button 1 (flame tongue)"/> <arrayval field="usrArray" index="2" value="Button 2 (battleaxe)"/> <arrayval field="usrArray" index="3" value="Button 3 (spear)"/> <arrayval field="usrArray" index="4" value="Button 4 (pole)"/> <arrayval field="usrArray" index="5" value="Button 5 (ram)"/> <arrayval field="usrArray" index="6" value="Button 6 (direction)"/> i.e. if Button 2 is chosen it shows: Rod of Lordly Might (Button 2 (battleaxe)) So, you could change your array values to simply be whatever text you want to see appended to the base item. You can't change what the entire name shown on the weapons tab is completely though. You can manipulate what it might look like in a printout, but the livename is often used in the tab display and that cannot be touched. |
#8 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
Quote:
Next up is figuring out the shield. Straight bootstrapping it creates timing issues on the evals, and even when I work those out I can't get the shield to apply its AC bonus when that form is selected. But I'm going to try rewriting the eval to just apply an AC bonus instead of bootstrapping the shield itself. Either way, this is awesome! Thanks for the help, gents. |
|
#9 |
|
|