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

Inventory

Hi, I'd like to start to create a macro for my players to show the elements of their inventory. The idea is to use the default template and divide it in sections: Weapons, armors, objects etc. Every section would contain the proper items. For every item then I'd like to make a macro with a little description to give a reference where my players could look at. I want to do something like this:  Every entry should be a clickable object that leads to a description. For descriptions I'd like to use a highly customizable template, possibly one that allow me to insert a little image. Any suggestion? Thanks for any help, I'd appreciate a lot every idea you would share.
1492961774
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
For the clicable objects, you're going to want to use  API command buttons . However, the macro syntax can't handle dynamically adjusting to the number of objects present, so you'd have to make custom macros for each player, and change them each time their inventory changed if you used just the base macro system. You're probably going to need a custom API script to accomplish this. What character sheet/system do you use/play? -Scott
1492961883
The Aaron
Pro
API Scripter
Are you planning to manually input these blocks of info? &nbsp;You could store each one as a macro and make the inventory a collection of buttons to trigger them: #desc-dagger &{template:default}{{name=Dagger}}{{=[x](<a href="https://vignette2.wikia.nocookie.net/runescape2/images/b/b0/Steel_dagger_detail.png/revision/latest?cb=20121201224504#.png)}}{{Properties=Finesse" rel="nofollow">https://vignette2.wikia.nocookie.net/runescape2/images/b/b0/Steel_dagger_detail.png/revision/latest?cb=20121201224504#.png)}}{{Properties=Finesse</a>, Light, Range, Thrown}}{{Range=20/60}}{{Weight=1}}{{Damage Type=Piercing}}{{Item Type=Melee Weapon}}{{Damage=1d4}} Inventory macro for someone with a dagger: &{template:default}{{name=Inventory}}{{Weapons=[Dagger](!&amp;#13;#desc-dagger)}} Looks like this: It's a bit of work to set up, but you'd only have to do each item once.
@Scott C 5e OGL @Aaron Yes that was my idea, but I sometimes have problems with text formatting when I put an image into a template. Anyaway the form you suggested is very clear and tidy. I tink I will adopt this one.
1492965387
The Aaron
Pro
API Scripter
Take special note of the image url. &nbsp;When an image doesn't end in .png or .jpg, you need to append #.png to the url to make the formatting pick it up as an image. <a href="https://vignette2.wikia.nocookie.net/runescape2/images/b/b0/Steel_dagger_detail.png/revision/latest?cb=20121201224504" rel="nofollow">https://vignette2.wikia.nocookie.net/runescape2/images/b/b0/Steel_dagger_detail.png/revision/latest?cb=20121201224504</a> #.png It doesn't matter what the image type is, you can always add #.png and it will do the right thing.
1492965783
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Also works with .gif
1492966904
The Aaron
Pro
API Scripter
Scott C. said: Also works with .gif Just to forestal confusion: also works to display .gif urls. &nbsp;(and .svg, and .bmp, etc.. pretty much anything the browser would natively support).