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] Companion Following

Hi all, I was partaking in a Pathfinder session on Roll20 the other day, and we have a couple of players with Companions (like wolves, stags etc). Some of the players were getting a bit frustrated with having to keep moving their character and then moving the companion whilst out of combat. The DM was also not particularly keen on having to move them around for them, either. So I've put together a simple script that allows multiple players to have companions assigned to them, and these companions will then follow the characters around (behind them). This can be toggled on and off by the character so the companion will stop following if told to. I've put the script on GitHub  here and was hoping that some of you could give it a test for me and give me a bit of feedback before I consider continuing to improve it and make it public! The setup is as follows: Script characterList array is an array of arrays. Enter a new array as follows: ["Character Name", "Companion Name", Squares (integer), Following (true/false)] Don't forget to comma separate these after the closing square bracket, unless it's the last in the list! Character Name - The name of the character Companion Name - The name of the Companion (this must  be a token for this to work, currently!) Squares  - How many squares behind the character the companion will follow Following - Whether the companion will be following automatically when the scene loads Commands Players can toggle their companion following on or off by using the following commands: !follow  - Will start to follow on the character's next movement !unfollow  - Will no longer follow when the character moves At this point, the players can only successfully use these commands when they are talking in the chat as the character  (the drop-down at the bottom of the chat) Please let me know if this script is at all useful for anyone! And if anyone has any ideas on how to improve it, please feel free to share! Thanks alot! Jamie
This sound really useful! I will give it a run and see how it works. Thanks.
1467501412
Kevin the Barbarian
Pro
Sheet Author
API Scripter
I'll be trying this next week. Sounds useful!
Thanks guys! Please let me know if it does help out, and let me know how you'd think it can be improved! I have a few ideas such as: - GM can toggle All/Specific companions on/off - Players can choose whether the companion follows them from behind, the left, the right or in front - Characters can have multiple companions follow at one time If I get enough demand for some extra features, I'll be sure to work on it! :)
James, This is a fantastic idea! I will be testing it on my Stellar Winds game because my GURPS game has like 30 crew members of the ship and some are companions to other players. This is an excellent tool I am looking foward too using! 
1467557729

Edited 1467557931
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Interesting script. In some ways it is similar to my Marching Order script ( <a href="https://github.com/Roll20/roll20-api-scripts/tree/master/MarchingOrder" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/tree/master/MarchingOrder</a> ). Mine works off selecting tokens from the VTT instead of putting them into an array in the script's code. For the best user experience, it's best to have an interface that doesn't require the users to modify the source code, especially considering that most end-users aren't coders.
Very interested in both scripts but before trying either of them I have a few questions; Does the follower(s) follow the exact same path (same grid units), or do they shadow the same movements but don't necessarily step on the same grid squares as the leader? If the latter, how would the script handle a follower trying to pass a DL wall with restricted movement? Will it get stuck? Is a hex grid supported?
1467563850

Edited 1467563969
Mikey - I haven't tested it yet using a whole bunch of characters and companions; only with about 3 or 4 of each and it seemed to work ok. Let me know if it handles that many players well or not! Stephen &nbsp;- I wasn't aware of that script as I hadn't looked around to see if it already existed. I just sorta went out on a whim and threw it together in my spare time! I'll take a look at it and see how they're similar when I get a chance! As I say, this is just a first draft for now and I didn't have loads of time to add as much to it as I wanted. Just wanted to see if it would be useful in the first place and take it from there. I was thinking about allowing the gm to add characters and campaigns to it mid-game, but thought that surely they would have to keep doing that every time they started a new session? I thought hard-coding it would mean they only need to change it once and it'll stay there. Thanks for the tip though! All feedback is welcome, so that'll be something I look into! Doug - Mine will just keep moving the companion to a particular square behind the character based on their current position and rotation. I am&nbsp;unsure about the other script as I haven't had a chance to look at it yet! With DL walls, at this point the follower does just end up ignoring the impassable walls and will go straight through them. Being able to handle those is something I am considering looking at very soon. I wrote this using a square grid, but I can certainly look at adding hex grid support. At this point it's just a little throw-together, but that's some mighty fine suggestions to look at! If anyone has any other questions or feedback, please fire away! Cheers, Jamie