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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Proper place for automation code?

Howdy all! (waves :-) I just joined Roll20 and already I love the place. ;-) I've created my own game system and would like to implement it on Roll20. I am a very proficient programmer, and have been looking at the API docs et al. My first questions are: 1) Where is the proper place to collect automation code around character sheets? As an example, if one of my players chooses one of ten options from a <select>, I'd like to automatically set other attributes. These options would then also influence rolls they can make and actions they can take. Do I extend the Character object, embed javascript into the html template, create a bunch of listener events, or is there already an automation interface for the new Character Sheets I haven't found yet? 2) On a related topic, I want to create new widgets for the main campaign view. The first is a Dashboard tied into attributes of the characters and monsters that gives the GM key info. The second is a much more sophisticated Initiative Line (which is actually the crux of my new system). How do I create a new persistent object for the campaign view? It looks like there is already a Table Item object... should I extend that? Thanks in advance for any help.
1401404257

Edited 1401404707
Lithl
Pro
Sheet Author
API Scripter
None of the above. Javascript cannot be contained within the character sheet; they are pure CSS and HTML. You could create an API script to be paired with your sheet, but that limits your sheet's use to campaigns whose owners are Mentors, and it won't let you reveal/hide or enable/disable features of the sheet. If you implement the selection as a radio button group, on the other hand, you could use the :checked property of the radio buttons to reveal/hide elements of the sheet which are siblings to the radio button, or descendants of a sibling to the radio button . ( sample ) There is no means to create new UI elements. You could potentially create an API script to update some items on a particular page, or on the GM layer, or on a particular character sheet (and in a couple weeks we should hopefully be able to have alternate configurations on a character sheet, so you could even have a special view for your setup). PS: You should turn up your graphics settings on City of Heroes. Looks so much better turned up. =P
Howdy Brian! Thanks for your prompt and informative reply. I'll create event listeners for the sheets. I don't have to hide or reveal portions, I simply want to encode rules for convenience. For example, if I choose a fighter-type talent, I increase HP by 4, but if I choose a mage one, I reduce it by 4, etc. Having DMed for 30 years and made thousands of characters... that convenience makes a difference. ;-) Hmmm... is there any way to get in touch with the Dev team to create the UI elements? I'd be happy to code it up and contribute it to their project. Not only that, I'm also pretty confident that the Dashboard will be awesomely useful enough to be a selling point, i.e. entice people to upgrade their subscription. Ahh... City of Heroes. It's a shame they closed it down. My avatar is Leprechauna... the Infinity Server scrapper that discovered the perma-unstoppable exploit. Did you have any toons in COH / COV?
1401460877
Lithl
Pro
Sheet Author
API Scripter
<a href="mailto:team@roll20.net" rel="nofollow">team@roll20.net</a> is the email to contact them, or posting in the Mentors forum. You could say I played City. ~_^ I went back and forth with another player for second-highest posts/day on the official forum, and I was a member of the Titan Network development team working on Mids' after Mids handed off the codebase. I've still got TonyV on my list of Skype contacts. =) I was also a member of the Repeat Offenders Network (I'm still a member of RO on Neverwinter, although we're much smaller there), and suffered heavily from thoroughly enjoyed altitis. My 50s, at least, were: Radiation Emission/Dark Blast Defender: Faithful Fans of Fallout. Members weren't allowed to have the Recall Friend prompt on, and AFK people became Fallout/Vengeance bait. Arachnos Widow (Fortunata): World Domination, Inc. Perma Mind Link and all of the Leadership toggles from both the Widow tree and the Leadership tertiary. =D (She sucked up Endurance like a pig, though) Thugs/Dark Miasma Mastermind: Malicious Multiplicity. I once went AFK for dinner in a Malta mission and came back to find that I'd apparently defeated three ambushes. Mastermind so OP. Ice Armor/Stone Melee Tanker: Think Tanks. Went from level 1 to 50 over the course of a single double XP weekend without powerleveling. I also had characters in Apostles of RO, Black Ice, Brain Damage, Bubbleicious, Death from Above, Don't Whiz on the Electric Fence, Fast and the Furious, Green Machine, Heretics of RO, Offensive Line, Perfect Storms, Pinball Wizards, Pressure Cookers, The Quick and the Dead, Repeat Offenders, and T.R.I.C.K., plus one character in my own SG (Invulnerability/Super Strength Tanker @ level 46) and one character in the SG for a Traps superteam (Assault Rifle/Traps Corruptor @ level 49). And that's not counting all the characters I deleted! There's apparently a group working on a private server for City, although I hear it's buggy. Then there's the Phoenix Project .
Heya Brian! Thanks again for the info. I'll post in the Mentors forum about the Dashboard. I'm sad about the loss of COH. I wasn't a big forum user, but I did have some awesome guides on there that I lost when they went belly up. I'm a mathematician by training and have done min/maxing and theorycrafting on a lot of games. Besides the perma-unstoppable exploit, I was able to prove that DM/Invul scrappers not only had the highest dps output of any toon (pre COV), it was also one of the most survivable because of the debuffs it could lay down. Hehe, there was a time when I was playing with a half dozen of my guildies in Section 9 and we got four group adds including two bosses and a bunch of lieutenants. The tank fell, the rest of the group wiped soon after... and I spent the next five minutes systematically defeating all the 80+ opponents solo, to the amazement of everyone else. Then I told them in chat "I didn't want to hurt your feelings... but the rest of you are really optional." ;-) Hehe, we also had a lot of fun with the Clone Corps. I discovered that the Radiation buffs stacked with each other unlimitedly. So we all rolled new toons that were clones of our mains, except that they were all different kinds of Radiation defenders. By Level 4 we all effectively had superspeed and could completely outclass L10 mobs. By Level 25 we were taking on L40 bosses and could keep up all our buffs continuously. We got a lot of shocked looks from people being in zones we had no right to be in. ;-) Damn. You shouldn't have got me reminiscing about COH... I might actually play one of the reboots and lose a month of my life that way. ;-P