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

[Script] Auto Dead (Alpha)

1480911936

Edited 1482188818
**Latest Update** Version 0.2 -Added recursive tables and dice rolls -Loot can now be set by the GM notes on the character sheet of monsters. Format is as follows Loot Start {"Money":"[1t[loot-indiv-cr4]]]"} Loot End Or more complex Loot Start {"Money":"[[[[1d3]]t[loot-indiv-cr4]]]","Items":"[[1t[item-table]]] [[1d6]] Old Boots"} Loot End Auto Dead is a combat script used to monitor the life of your tokens and respond to deaths. It will auto bloody a token at half health as well as drop loot bags (limited in current version). It can also auto add experience to experience managers (such as EasyExperience). Defaults are set to be used with the Shaped character sheets.&nbsp; The script as well as usage can be found at&nbsp; <a href="https://github.com/xlilcasper/AutoDead" rel="nofollow">https://github.com/xlilcasper/AutoDead</a> . This is my first script for roll20 so any help on standarards or ideas to implement would be greatly welcomed. ***Change Log*** Version 0.1 Initial Release
1480916244
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Very cool
Love the idea of dropped lootbags. :D How do they work? Is the loot hardcoded or do we put it in ourselves?
Right now the loot is hard coded but allowing changeable loot is on my todo list. Just as soon as I figure out how to get roll20 to roll things in [[ ]] like [[1d6]]
1480947295
Jakob
Sheet Author
API Scripter
Brian C. said: Right now the loot is hard coded but allowing changeable loot is on my todo list. Just as soon as I figure out how to get roll20 to roll things in [[ ]] like [[1d6]] What do you need? Do you want your script to be able to roll inline rolls from some input and then use the result? If that's what you're going for, you might want to take a look at the callback option for sendChat.
1480950092
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Why not just allow players to define their own loot bags inside a monster token's GM Notes field. Having it be in JSON notation would allow the script to read it easily if you wanted to treat things like objects/arrays. Could also just have it be a text that is output to chat on a kill. JSON Method: { "coin":"[[1d6]]Platinum [[3d10]]Gold [[4d100]]Copper", "equipment":"[[1t[MagicWeaponPossible] ]] [[5t[GenericEquipment] ]]", "xp":"2700" } Text Method: Coin: [[1d6]]Platinum [[3d10]]Gold [[4d100]]Copper equipment: [[1t[MagicWeaponPossible] ]] [[5t[GenericEquipment] ]] XP 2700 Looking at this, the JSON method is probably the way to go. Also, if you don't mind a feature request, would you be willing to find a way to allow the script to interact with Recursive Tables ? That would make this really nice for rolling interconnected loot tables.
Yeah, I'll add Recursive tables to my todo list. It looks like what I had envisioned and then I'll work on the JSON method as a fallback.
Updated to V0.2 Added Recursive Tables and dice rolls. Allowed loot tables to be set by GM Notes of player charactor.
1482193420
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nice. Does it require Recursive Tables, or did you put RT functionality into the script?
I coded my own crappy version of RT :). It doesn't use the quantum roller which is something I'm looking into fixing.
1482195543
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you use randomInteger(), you are using quantum roll, just not through the chat parser. <a href="https://wiki.roll20.net/API:Utility_Functions#Random_Numbers" rel="nofollow">https://wiki.roll20.net/API:Utility_Functions#Random_Numbers</a>