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

How to use another sheet's attributes

November 27 (4 years ago)

Heya, I'm setting up a Steel Defender sheet. I would like to dynamically use my character's Proficiency Bonus. I know I can reference character sheets attributes in chats like this:

@{character name|attribute name} - so eg: @{Name|pb} would be proficiency bonus.

When I put this into the NPC sheet though, it doesn't produce anything. The reference doesn't work. How do I get this to work? Is it possible?

November 27 (4 years ago)
Kraynic
Pro
Sheet Author

I'm not familiar with that sheet, but often a sheet will use different attributes for npc than it will for pc.  You might want to right click on the entry field and inspect element to get the correct attribute.  Or check the attributes and abilities tab to see what shows up there (for anything that isn't part of a repeating section).

November 27 (4 years ago)

Edited November 27 (4 years ago)
vÍnce
Pro
Sheet Author

I don't think sharing attributes values between sheets will necessarily work for all fields since some sheet attributes need to do calculations using other on-sheet attributes, either using html calcs and/or sheetworkers.


As a quick test, I was able to use Bob's HP @{bob|hp} on Sue's sheet, but only in non-calculating fields/attributes.  Example; I could enter "@{bob|hp}" on Sue's sheet in something like the @{weight} field and see Bob's HP if I used a macro that called Sue's "@{Sue|weight}", but I could not use it on Sue's @{hp-mod} field which was used to determine Sue's HP.  It was probably recognized as a string of characters and not resolved to a number value which it needed to calculate Sue's hp.


In conclusion, while the other sheet's attribute value can resolve in chat, one sheet can not resolve another sheet's value to finish it's sheet calculations.

November 27 (4 years ago)

Ahh, okay. So it'll be impossible to set up Steel Defender using another sheet's attributes. Indeed, I was playing with the saving throws section with the PB stuff.

Thank you for the help.

November 28 (4 years ago)

Edited November 28 (4 years ago)
vÍnce
Pro
Sheet Author

All that said; there may be a way to use an API script like chatsettr to read one sheets attribute and write the value on another... 

I'll have a look into that later.  My wife wants the X-mas boxes brought down.  Ugh

November 28 (4 years ago)

I've poked around with chatsetattr but I don't think that'll help out here. The game's GM isn't a PRO user and can't add API to the game.

November 28 (4 years ago)
vÍnce
Pro
Sheet Author


Cee said:

I've poked around with chatsetattr but I don't think that'll help out here. The game's GM isn't a PRO user and can't add API to the game.

I see.  I saw your Pro tag and assumed...

In case anyone wants to go down the proverbial rabbit hole, I think this post might help with using the chatsetattr script to manipulate attributes between sheets: ChatSetAttr Evaluate Syntax Help

Cheers



November 28 (4 years ago)

Completely understandable. :) But no, in truth, I was wanting to help my party member's Artificer (it's not even my Steel Defender lol, I'm just the most Roll20 knowledgeable).

That certainly looks interesting and I might poke around with it in my games I DM - but for this particular case, I'll let them know there's nothing that can be done.

November 28 (4 years ago)

Edited November 28 (4 years ago)
Oosh
Sheet Author
API Scripter

If you uncheck the "NPC" box, you can enter the Artificer's pb into the global skill, save, attack and damage fields on the PC sheet. You'd just need to enter its attacks into the Attacks & Spellcasting section since they don't transfer over from the repeating_npcaction section.

November 29 (4 years ago)

Will have to mess with it and see if the man wants to run it as a character sheet. Thank you for the tip.