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

Star Wars FFG (API Initiative Help Please)

For SW FFG using the API Character sheet, is it possible to populate the turn tracker w/ the character's name....instead of either showing only PC or NPC? My players have requested to use their own rolled initiative scores, instead of the normal PC "pool" as written in the rule book. So I need it to populate the turn tracker with <insert PC name> and I can only find a PC/NPC toggle on the sheet. I need it to behave just like DnD basically.  Is this possible with using an API? Or even a Macro?  Thanks in advance, Mike 
1612172453
Oosh
Sheet Author
API Scripter
I didn't think the tracker had any game-specific features, I'm assuming this API character sheet is messing about with it somehow. The tracker should just put the token's name on the list when you send it a roll with &{tracker}. What happens if you create a token, give it a name and send [[1d20 &{tracker}]] to chat with the token selected?
Yes that [[1d20 &{tracker}]] works as per normal. However, the initiative roll when rolling from the API character sheet is calling for a lookup to "npc-pc" from the script. This creates the NPC/PC toggle that's reported to the tracker (see script below). I tried using my rudimentary skills. but could not find a way to circumvent this? Any thoughts? TIA !eed @{PCNAME|npc-pc} characterID(@{PCNAME|character_id}) label(skill:Initiative Cool) skill(@{PCNAME|rankCool}|@{PCNAME|presence}) @{PCNAME|initiativeCoolDice} @{PCNAME|dicePool} 
1612218193
Oosh
Sheet Author
API Scripter
I guess your options are to either edit the script or just use your own macro to roll initiative. The second option is the easiest, but players will need to remember to use the macro and not the sheet. Here's an example, though I have no idea on Attribute or Template names for this game: &{template:default} {{name=@{selected|character_name}'s Initiative}} {{Roll=[[ @{selected|initiative_bonus} &{tracker}]]}} If you add this to Collections macros and share it with all players as a token action, they just need to roll initiative from there. If you want to be able to click from the sheet, the API script will need a bit of minor surgery - this isn't too difficult, but I'm not familiar with either the official rules or the one you're trying to switch to. If you can explain that to me, I can modify it for you.
Thank you very much Oosh. With your enlightenment I got the macro to work okay enough to be useful. Still have to do data entry to fix the initiatives scores, but it is waaaay better than what I had before. Yes I guess the API script itself needs to be altered as to have the sheet behave in the requested manner. There are 2 types of initiatives you roll in the game. If you are prepared for the combat you roll your COOL SKILL. However, if combat is unexpected then you roll your VIGILANCE SKILL instead. Not sure if this helps explain it enough? I just need for when they roll initiative from the character sheet that it adds the Character's Name to the Tracker . Not just to list the name PC for every player. Once it does that, I can't even change the names on the Tracker after the fact. Then I have to do all new ones using custom labels.   Thanks so much for all of your help.  
1612570089
Oosh
Sheet Author
API Scripter
Ok, see how you go with this . The best result is from having the token selected - then you'll get the token graphic & the name. So if you change the players' initiative macros to use @{selected} references, they'll only be able to roll initiative when they have their tokens selected, and you'll always get the desired output. If you supply the character_id to the script in your macro, it will grab the character name from the sheet if there is no token selected. In this case you don't get the graphic, and you'll also get the character name instead of the token name. This could be significant in the case of disguised NPC's and so forth. If it fails to find a name by either method it will default back to the "PC" / "NPC" the script usually uses. Otherwise... I didn't change anything else - it should function as it did before. Let me know if there are any problems.
Oosh: I just installed that new .JS file on a copy of my game. It works PERFECT! I cannot thank you enough for your help with this. Very very kind of you to take the time out to help me. Super appreciate it.    
1612653844
Oosh
Sheet Author
API Scripter
No worries, glad it worked! There's a lot going on in that script, and I definitely don't have time to go through it all so... glad I didn't break anything.