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

!Spawn question

So I've been working with Java for about 6 days now so bear with me (my party just fought some black bears), but I'm trying to use !Spawn and a rollable table to allow my changling player to actually change into their different common forms (have the specified side expand over the current one and I'll delete the old one from the page) I've got this part down !Spawn {{ --name|Nix --placement|stack --side|3 --order|toFront --mook|true --sheet|Nix --bar1|Nix --expand|20,50 but I'm wondering if there's a macro to delete a selected token? Right now I'm manually deleting it which isn't a problem, i'm just thinking that if it is possible it'd make my player's transition even more seamless.  bar 1 represents the alternate name they sometimes use in each common form, and looking at it I realize I don't need the --sheet| but I was having trouble keeping the links all working at first because I was putting --mook|yes instead of --mook|true and until I tried that I was trying to cover all the bases that could've been causing my issue,
For now I have added !bump to the bow so that the token I need to delete isn't visible to players So now each Ability looks like !Spawn {{ --name|Nix --placement|stack --side|2 --order|toFront --mook|true --sheet|Nix --bar1|Niserie --expand|20,50 !bump With a nifty Menu- /w gm &{template:default} {{title=Nix's Forms}} {{text_big= **Nix's Forms** [Nix](~Change-Form-3) | [Era](~Change-Form-1) | [Neserie](~Change-Form-2) }}
I wonder what Else this could be applied to...
1614866176
David M.
Pro
API Scripter
A couple things:  Glad you found a workaround and happy that you found a use case for my script that I hadn't though of, but you could also just use Token-mod to change the side since Nix is already a rollable table token.          ...unless the the animation part is the selling point, I suppose :) You did get me thinking, though. I could look into adding command(s) that would delete the source or target token, which could make for a cool Dimension Door / Teleport effect if you spawned yourself, or maybe a forced Polymorph. Maybe an optional shrinking animation option prior to deletion? I probably shouldn't promise too much, though ;) I'll have to think about it for a bit to see what potential unwanted side-effects any of this could produce. I have another pet project I'm working on so my attention is somewhat divided at the moment, but this sounds like fun. I don't think you need the --placement command. It won't hurt, but the default case when no offset is supplied should be to spawn the new token in the source token's square.  Same for the --sheet command, as you already mentioned. That is really only used when you want to automatically trigger an ability on a character sheet with the --ability command (with some caveats as described in the documentation). The default token's sheet is used by default, btw. --mook (and other boolean commands) will accept yes/no, 1/0, or true/false interchangeably I recently discovered that the script has been treating mooks incorrectly, which might be the source of your bar link problems ?. It currently removes the "represents" property instead of de-linking the bar values from the character sheet attributes. Oops. I'm going to be putting out v14 soon that will change --mook to the correct behavior. You may want to revisit if you want to include --mook for your application. 
1614866399
timmaugh
Forum Champion
API Scripter
potential unwanted side-effects Potential unwanted side-effects are tomorrow's worry. ... whereupon they will become "unforeseen feature adds", shortly before becoming central and permanent pillars of intended functionality. =D
1614867205
David M.
Pro
API Scripter
Ha!
David M. said: A couple things:  Glad you found a workaround and happy that you found a use case for my script that I hadn't though of, but you could also just use Token-mod to change the side since Nix is already a rollable table token.          ...unless the the animation part is the selling point, I suppose :) You did get me thinking, though. I could look into adding command(s) that would delete the source or target token, which could make for a cool Dimension Door / Teleport effect if you spawned yourself, or maybe a forced Polymorph. Maybe an optional shrinking animation option prior to deletion? I probably shouldn't promise too much, though ;) I'll have to think about it for a bit to see what potential unwanted side-effects any of this could produce. I have another pet project I'm working on so my attention is somewhat divided at the moment, but this sounds like fun. I don't think you need the --placement command. It won't hurt, but the default case when no offset is supplied should be to spawn the new token in the source token's square.  Same for the --sheet command, as you already mentioned. That is really only used when you want to automatically trigger an ability on a character sheet with the --ability command (with some caveats as described in the documentation). The default token's sheet is used by default, btw. --mook (and other boolean commands) will accept yes/no, 1/0, or true/false interchangeably I recently discovered that the script has been treating mooks incorrectly, which might be the source of your bar link problems ?. It currently removes the "represents" property instead of de-linking the bar values from the character sheet attributes. Oops. I'm going to be putting out v14 soon that will change --mook to the correct behavior. You may want to revisit if you want to include --mook for your application.  I could definitely see the utilization for teleportation/force polymorph, and yeah the animation option is a really nice touch I’ve also been pondering the workability with build an Echo Knight, using !Spawn to... well spawn the echo (grey color scheme side of the token perhaps) and then either !Tokenmod or!change-token-image with the player selecting both with the shift key and being able to change which is which through that
1614880717

Edited 1614881085
David M.
Pro
API Scripter
One of my players actually plays an Echo Knight now and uses Spawn to create the Echo and a scriptlet by The Aaron to perform the teleport position swap. We took his token image and did some color inversion/substitution in GIMP to create the Echo token. Since all attacks are actually made by the PC "through" the Echo, he just uses his existing character sheet and macros, etc. for the attacks. Since the Echo is more of a magical construct (like a Spiritual Weapon of sorts), we didn't have to mess with setting up stats for saves, etc. This post from the original Spawn thread details how to set up Manifest Echo with Spawn. The next post in the thread has a link to the token swapping script. We have the following ability set up as a token action on both the Echo Knight and the Echo's character sheets for the swap. !token-swap @{selected|token_id} @{target|Swap with|token_id}
David M. said: One of my players actually plays an Echo Knight now and uses Spawn to create the Echo and a scriptlet by The Aaron to perform the teleport position swap. We took his token image and did some color inversion/substitution in GIMP to create the Echo token. Since all attacks are actually made by the PC "through" the Echo, he just uses his existing character sheet and macros, etc. for the attacks. Since the Echo is more of a magical construct (like a Spiritual Weapon of sorts), we didn't have to mess with setting up stats for saves, etc. This post from the original Spawn thread details how to set up Manifest Echo with Spawn. The next post in the thread has a link to the token swapping script. We have the following ability set up as a token action on both the Echo Knight and the Echo's character sheets for the swap. !token-swap @{selected|token_id} @{target|Swap with|token_id} I haven't seen !token-swap before, that will definitely make things a little simpler, thanks for yet another tool in the box, and as always, thank The Aaron lol.  
1614959717

Edited 1614959833
David M.
Pro
API Scripter
Version 14 is available for manual install. See thread . Corrected mooks and added the delete behavior, with optional animations.