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

[Thinking About] Bump in Script... for GMs.

1427307034
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
GM layer ____________________________________ [Bad Guy Token] _____ <--All set up with bad guy token actions.. and "Bump" token action. Token Layer _____ [Vince's Character] _______ [Transparent Token] ___ <--Position linked to its Bad Guy Token with "Bump" token action. Whenever we are ready to attack Vince's Character, we select the [Transparent Token] (we can do this because while as the GM and on the token layer, we can see the Bad Guy token on the GM layer, trying to click that will result in the [Transparent Token] being selected and giving us the "Bump" token action.) bump() will: move the [Transparent Token] to the GM layer and the [Bad Guy Token] to the Token Layer. Bonus: You will be deselected and reselecting the [Bad Guy Token] will result in update Token Actions.... "Bump" again if killed. OR.... you could do the same thing only have the [Bad Guy Token] on the token layer and "bump" in a [loot pile] that is player controlled with token actions for looting.
1427309804
The Aaron
Pro
API Scripter
Clever!
Agreed! I could get some serious use out of a script like this...
1427312976
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
It also would allow you to adjust the position of tokens without switching layers... like the invisible assassin.
This would really be cool! I'm guessing a simple API command to pair a token on the GM layer with a transparent counterpart?
That is a very clever idea! My players have become savvy enough to deduct when there is a hidden enemy based on my delays as I switch layer, move the hidden token, and switch back. This would help alleviate that since I wouldn't have to switch layers.
1427317831
The Aaron
Pro
API Scripter
Trigshot said: This would really be cool! I'm guessing a simple API command to pair a token on the GM layer with a transparent counterpart? Actually, it would be easy enough to add tokens for anything on the GM layer and skip the pairing step entirely.
1427332398

Edited 1427332426
i wish i was a Scriptomancer too, this... this is worth doing... this i would use... this i would hammer Steven K. and the R man with...("is it ready yet? is it ready yet? is it ready yet?")'s for implimentation directly into R20.
1427333316

Edited 1427333686
The Aaron said: Trigshot said: This would really be cool! I'm guessing a simple API command to pair a token on the GM layer with a transparent counterpart? Actually, it would be easy enough to add tokens for anything on the GM layer and skip the pairing step entirely. I like this idea, so long as there was a command to run to link a token based on its location and current state, mostly because I use the GM layer for notes that I don't want players to see. A quick api command to create a linked transparent token on the token layer would be awesome. and also have the same command, when used on a token on the token layer, shift the token to the GM layer and replace it with the transparent linked token with the click of a macro. same thing back again actually, to bring the token back to the token layer. so basically one command should ideally do one of three things, depending on the state of the selected token on the map: set an item already on the GM layer to be linked, and create said linked token on the token layer; send a token on the token layer to the gm layer and replace it with a linked token; and to remove the linked token and pull the original token back down to the token layer... Did I miss anything? edit: I think I did. 'bumping' multiple tokens at the same time. select an entire assassin hand and have it drop down on unsuspecting PC's with one click. Would mean adding a few catches to make sure the selected tokens are linked with something on the GM layer first. that way the GM can just box-select over a room, and drop all the selected tokens down, and not worry about having non-linked tokens messing with the script just because they're selected as well.
I'm assuming this would also have support for moving the transparent token? When one moves, the linked one also moves on the other layer? Matching rotation would be cool too. Whoever made the API would also have to account for having multiple tokens at once... probably some generated ID to pair them. (I know only basics about API scripts, not really sure how difficult something like this is)
1427333900
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I suggest a differnt approach.... Its a bad idea... it will never work... no one could code this. I wont believe this is possible until I see it for myself on Gist.
not that difficult actually. even I could almost write this, though it would take me five times as long as someone who can actually code, and theirs wouldn't break the api nearly as often as my attempts seem to. and good call. matching rotation is actually a good idea, though it does add a layer of complexity (I think it would be possible though, i'm just trying to imagine if the handles for rotation would difficult to catch under another token the same size on the GM layer. I don't THINK it will, but you never know. I hope it can be done easily though)
Ha! It was your idea! I'm just doing what I do and making things as complicated as possible for the scripter so that people at the other end (like me!) can be as lazy as possible in implementing the scripts with as little chance for error as possible :P
1427334215

Edited 1427334272
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Nope... not happening. As far as I am concerned the idea is in fantasy land and I am in Missouri. Someone is going to have to show me. :)
God, I wish I could. I'd love to be able to put together something like this. Maybe one of the other scriptomancers out there could cobble something together. the bare bones of this script won't even be that large, with a nice elegant code.
1427335451
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
If only someone around here wrote elegant code and maybe read at least one book by Douglas Crockford... maybe it could be done..... but sadly no one around here like that.
1427336920
Gen Kitty
Forum Champion
*falls over laughing her ass off* You guys :>
1427338099
The Aaron
Pro
API Scripter
Fine. I took off the next two days from work... =D I'll see about writing it in the morning. (I'd do it now, but I'm lying in bed and the wife won't let me go get my laptop!)
1427340110
Gen Kitty
Forum Champion
Maybe your GroupInit Script is near the top of your todo list? *big blue eyes*
God i feel like such an ass :P
1427351680
vÍnce
Pro
Sheet Author
Stephen S. said: Whenever we are ready to attack Vince's Character, we select the [Transparent Token] (we can do this because while as the GM and on the token layer, we can see the Bad Guy token on the GM layer, trying to click that will result in the [Transparent Token] being selected and giving us the "Bump" token action.) This is borderline harassment...
we don't KNOW its your character Vince. It could be... uhhh, that other Vince... you know... the one that... wait, is that my phone ringing...?
1427378754
vÍnce
Pro
Sheet Author
Michael H. said: we don't KNOW its your character Vince. It could be... uhhh, that other Vince... you know... the one that... wait, is that my phone ringing...? Must be my lawyer calling. :-) OK. Now we're all eagerly awaiting "The" Aaron's scriptomancy skills...
1427381090
The Aaron
Pro
API Scripter
Ok, starting now. =D BTW, I had already taken off today and tomorrow to work on some things like this, so no worries Michael. Just couldn't pass up that straight line... (and GenKitty.. GroupInit is one of the other things I'm going to try and look at... =D)
1427384534
Ziechael
Forum Champion
Sheet Author
API Scripter
The Aaron said: Ok, starting now. =D BTW, I had already taken off today and tomorrow to work on some things like this, so no worries Michael. Just couldn't pass up that straight line... (and GenKitty.. GroupInit is one of the other things I'm going to try and look at... =D) And recovery policy on the ammo script? And a charMod script to accompany your tokenMod? On topic: Could this script be used as a trigger to change a token's layer... specifically a transparent token that when 'collided' with would prompt the gm layered token to be moved to the token layer?
1427394955
The Aaron
Pro
API Scripter
Ziechael said: And recovery policy on the ammo script? And a charMod script to accompany your tokenMod? Give an inch.... =D On topic: Could this script be used as a trigger to change a token's layer... specifically a transparent token that when 'collided' with would prompt the gm layered token to be moved to the token layer? That's a bit of feature creep, but it could be done. I think I'll put it off till the next version... This version is already creeping a bit... =D (but I think you'll all be pleased with the results... =D)
Aaron, if you do this, I'll pledge my first born to you. I'll pledge my brother's first born. Hell, I'll even throw in my parents' first born as well.
1427397035

Edited 1427397074
The Aaron
Pro
API Scripter
HAHAHA! Thanks for the offer, but with 7 kids, I've got enough mouths to feed!! =D I'm done with functionality, just working on edge cases and interface now (don't want any disparaging remarks from the GenKitty sector! =D).
1427405293
The Aaron
Pro
API Scripter
Ok. Done. =D Bump v0.2 ( Yes, I already pushed up a bugfix... =D ) Commands : !bump-slave -- This sets up the invisible Slave Token. By default, the Slave Token is created on whatever layer the selected Master Token is not on. So, if your Master Token is on the GM Layer, it will make the Slave Token on the Objects Layer and vice versa. You can specify --push when you run this command and if the Master Token is on the Objects Layer, it will push it up to the GM Layer and create the Slave Token on the Objects Layer. (see AutoPush below) !bump -- swap the Master Token and Slave Token. You can run this with either selected. It will apply the operation to all selected tokens that are part of a Bump Master/Slave pair. !bump-config -- An interface to setting the configuration options for Bump. More on those in a bit... Features: Slave Token Aura -- The created Slave Token is invisible to the players, but also serves a useful purpose of reminding you which tokens support Bump and where they are. Created slave tokens have an aura visible to the GM only. They have one color when Master Token is visible to players (defaults to green) and another when the Master Token is invisible to players (defaults to purple). Mirrored Operations -- Moving, Rotating, Scaling, Flipping, Renaming, Tinting, and Last Move are all mirrored between Master and Slave! Mirrored Bubbles -- Whatever you have the Master Bars set to, the Slave Bars mirror. Change one, it changes the other. Got some invisible monsters in an AoE? No problem. This includes Bars that are linked to a character sheet, which brings me to... Mirrored Represents -- Need to do a save or make a skill check? Slave Tokens have the same Represents as their Master, so they have the same Token Action bar and shift double clicking brings up the character sheet! GenKitty Config System -- The help screen includes a list of all settings and their current state at the bottom along with an API Button for changing them. No more typing out tedious commands to set options, in fact they prompt you for the setting with the current value as the default. You can also specify !bump-config directly to get just the config options. AutoPush -- If you always want Master Tokens to be pushed up from the Objects Layer to the GM Layer, just set this option. Git: <a href="https://github.com/shdwjk/Roll20API/blob/master/Bu" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Bu</a>... Let me know if I missed anything! =D
Mind Blown.....
1427406613
The Aaron
Pro
API Scripter
Turns out this is pretty similar to the Twins script I wrote a while back. :) Originally I was mirroring status markers as well, but they would show to players, so I removed that. I'll probably add it back with some mechanics around pushing them from the slave up to the master and clearing the slave. Another though I had was doing a swap in the init order if a slave was added, but I'll wait on that for another project I've got going... I was going to add !bump as a token action, but I wanted to do the represents thing. Bring on the suggestions!!
1427407134
Wes
Sheet Author
This is perfectely awesome!!
1427407281
Gen Kitty
Forum Champion
*turns ten shades of red * You named your config system after me?! I don't know whether to be pleased or embarassed :&gt;
1427408266
The Aaron
Pro
API Scripter
Guess that depends on how you like it! :)
I don't know why, but I cannot figure out the applications for this script :( Like, what would I use it for (I am drawing a blank, and I get excited when the Aaron posts scripts, so its frustrating to be excited but sure what excited for)
1427419382
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
It would allow you slide tokens around on the GM layer unnoticed by the players and without switch layers. Or... you could place a trap (pit trap) on the GM layer and quickly put in place by clicking the "Bump" button, this would cause... player "V's" character to fall to his death.
1427420808
The Aaron
Pro
API Scripter
It doesn't really provide anything more than is already available in Roll20, but it does provide a bunch of convenience. If you've ever found yourself rapidly flipping back and forth between the token layer and the gm layer, you would likely find this script useful.
Dude... you are epic.
1427430520
The Aaron
Pro
API Scripter
=D Thanks!
1427430770
vÍnce
Pro
Sheet Author
Stephen S. said: It would allow you slide tokens around on the GM layer unnoticed by the players and without switch layers. Or... you could place a trap (pit trap) on the GM layer and quickly put in place by clicking the "Bump" button, this would cause... player "V's" character to fall to his death. Really?
1427431266
vÍnce
Pro
Sheet Author
This would work great for invisible foes, traps, surprise round, teleporting, tentacles rising up from murky waters, and more...
Aaron, you sir, are amazing! This is perfect! I'm totally using this for my campaigns now!
1427434513
The Aaron
Pro
API Scripter
I haven't tried it, but you should be able to do this to a player token and they would have control to move it though they would only be able to see the slave aura (and currently couldn't bump themselves). But if you had a group that needed the players to move their characters about without the other players seeing them, it would help with thst.
1427434542
The Aaron
Pro
API Scripter
My pleasure! :)
1427434745

Edited 1430932370
The Aaron
Pro
API Scripter
Oh, I forgot to mention that moving either the master or slave token to the other layer functions like a manual !bump and the script will move the other one for you. Also, you can unpair by deleting the slave. Deleting the master token will clause the slave token to be deleted.
Hmmmm... I can't get the --help to work. I can get it to slave a token on the GM layer, and I can even get it to bump from layer to layer... but I cannot do anything else, including the !bump-config, or anything --help related. I'm too tired right now to try and figure out what I am screwing up... is this anything someone else is experiencing?
1427497741
The Aaron
Pro
API Scripter
If you want to invite me, I'll jump in and take a look...
Doneyens like Funyons.
And I feel like a royal ass about this now... Word to the wise people: when a script that is suppose to whisper to you, isn't doing so -- it's most likely due to a person being in your campaign with the same name.
I just have to say this is one of the most useful scripts I've used yet. I'm in the middle of makin a huge underground fortress map and I keep finding uses for this! From traps to lights to hidden enemies! Aaron, you sir have my deepest gratitude. Thank you!
1427660147
The Aaron
Pro
API Scripter
You are most welcome! :)