Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Choosing a weapon based on an author's choice of sheet design.

With 4e D&D the sheet refers to various weapons as weapon-1-name and weapon-1-num-dice and weapon-1-dice, for example. So, within a Roll Template one is forced to use code like the following ... &{template:default} {{name=MBA}} {{target=?{Enemy}, Str v AC}} {{Weapon= ?{Weapon} }} {{Modifiers=?{Modifiers}}} {{R=[[1d20+@{Strength-Mod}+@{halflevel}+@{weapon- ?{Weapon} -enh}+@{weapon- ?{Weapon} -attack-feat}+@{weapon- ?{Weapon} -attack-misc}+@{weapon- ?{Weapon} -attack-class}+@{weapon- ?{Weapon} -prof}+?{Modifiers}]] D [[@{Weapon- ?{Weapon} -num-dice}d@{weapon- ?{Weapon} -dice}+@{Strength-Mod}+@{weapon- ?{Weapon} -enh}+@{weapon- ?{Weapon} -damage-feat}+@{weapon- ?{Weapon} -damage-feat}+@{weapon- ?{Weapon} -damage-misc}]] C [[@{Weapon- ?{Weapon} -num-dice}d@{weapon- ?{Weapon} -dice}]] F [[1d3]]}} but this does not work.  The ?{Weapon) input is a more useful method of letting the player change weapons on the fly AND simultaneously use the character sheet as intended to the most depth.  But how do I build the variable name when it has a variable in it? If a mod would like to test with this you can use my campaign VT-World and the character journal entry for Yume, the ability is MBA. Here I repeat the macro without bolding, if needed: &{template:default} {{name=MBA}} {{target=?{Enemy}, Str v AC}} {{Weapon=?{Weapon}}} {{Modifiers=?{Modifiers}}} {{R=[[1d20+@{Strength-Mod}+@{halflevel}+@{weapon-?{Weapon}-enh}+@{weapon-?{Weapon}-attack-feat}+@{weapon-?{Weapon}-attack-misc}+@{weapon-?{Weapon}-attack-class}+@{weapon-?{Weapon}-prof}+?{Modifiers}]] D [[@{Weapon-?{Weapon}-num-dice}d@{weapon-?{Weapon}-dice}+@{Strength-Mod}+@{weapon-?{Weapon}-enh}+@{weapon-?{Weapon}-damage-feat}+@{weapon-?{Weapon}-damage-feat}+@{weapon-?{Weapon}-damage-misc}]] C [[@{Weapon-?{Weapon}-num-dice}d@{weapon-?{Weapon}-dice}]] F [[1d3]]}}
I also tried this without really knowing what the sheet calls the array.  The variables on the sheet are exported sort-of piecemeal apparently to the attributes list for the journal entry. &{template:default} {{name=MBA}} {{target=?{Enemy}, Str v AC}} {{Weapon=?{Weapon}}} {{WeaponName=[[Weapon[?{Weapon}].name]]}} The above was tried only to see if I could get the weapon name to come out right implying I had properly referenced the array.  I am just unsure what the proper macro or template syntax is, if any for such a retrieval.
1440622198

Edited 1440633217
series0 said: but this does not work. This is an " order of operations " issue; Attributes are parsed before roll queries are executed. You could look into using HTML entities and nesting any number of roll templates within a roll query. I threw together a similar macro for the D&D 5e Shaped Character Sheet.
1440648464
Lithl
Pro
Sheet Author
API Scripter
series0 said: I also tried this without really knowing what the sheet calls the array.  The variables on the sheet are exported sort-of piecemeal apparently to the attributes list for the journal entry. &{template:default} {{name=MBA}} {{target=?{Enemy}, Str v AC}} {{Weapon=?{Weapon}}} {{WeaponName=[[Weapon[?{Weapon}].name]]}} The above was tried only to see if I could get the weapon name to come out right implying I had properly referenced the array.  I am just unsure what the proper macro or template syntax is, if any for such a retrieval. There is no "array". No such thing exists in the character sheets system. The closest you'll get is with repeating sections, which a) is implemented as dynamic (hidden) separate attributes, and b) isn't used by the 4e sheet for weapons.
I see Silvyre, TY.   That is quite extensive and detailed.  Some great ideas there. Brian, TY as well.  If I am understanding you, you are saying there is no array, ok, but you offer no solution while using the sheet in the manner I asked for.  I am taking that to mean that although a list of weapons is indeed on the sheet their data structure is not complex but instead just a set of rote variables as attributes which of course I already have access to.  Without some means of iterating that list in a macro or template, then, there is no means to write a single macro that switches easily between weapons.  Hopefully that is an accurate interpretation of your answer. This inclines me to craft tokens for holdable items and then make each token's character sheet weapon 1 attribute set the only active set.  A perhaps not so radical solution as then visually the player has typically 2 more tokens (one for the item held in each hand).   I notice as well that implements are not handled either.  True they can be glommed in as weapons, but the alignment of concepts is getting pretty far off. Anyway, thanks again.
1440672145

Edited 1440672161
Lithl
Pro
Sheet Author
API Scripter
series0 said: Brian, TY as well.  If I am understanding you, you are saying there is no array, ok, but you offer no solution while using the sheet in the manner I asked for.  I am taking that to mean that although a list of weapons is indeed on the sheet their data structure is not complex but instead just a set of rote variables as attributes which of course I already have access to.  Without some means of iterating that list in a macro or template, then, there is no means to write a single macro that switches easily between weapons.  Hopefully that is an accurate interpretation of your answer. Correct. Silvyre mentioned nesting roll templates within a roll query, which ought to work and is really your only option for the selection you're looking for. Unfortunately, it creates nigh-unreadable macros. series0 said: I notice as well that implements are not handled either.  True they can be glommed in as weapons, but the alignment of concepts is getting pretty far off. There is little mechanical distinction in 4e between weapons and implements (with the line further blurred by weapliments). Implements don't have proficiency bonuses (this deficiency is offset by most implement powers targeting NADs while most weapon powers target AC, and most monsters have higher AC than NADs) or weapon dice (implement powers define their damage dice on a per-power basis), and that's about it.
TY again.