Statistics:Posted by Dougansf — Thu Aug 24, 2017 6:45 pm
CODE:
jason@jason-HP-Pavilion:~/projects/r20EDMacro$ python ability2.py Talent Name: Melee WeaponsAttribute: DEXTalentName: MeleeWeaponsTargeted Ability: [Y/n] y
CODE:
import sysBASE = "&{template:default}{{name=@{selected|token_name}: Attack}}-t-{{Step: [[8 - @{selected|bar2} + ?{Mis Mod|0} ]] Karma: ?{Karma #|0} Result [[ [[{1e3, 8}<[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]] - 11, 0}kh1 % 11]] + floor([[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]] - 11, 0}kh1]] / 11)]]d20! + [[{2, 4, 5, 6, 7}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]] + {1, 3}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] + {1e3, 3}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]] - 11, 0}kh1 % 11]] * 2]]d[[{{([[8 - @{selected|bar2} + ?{Mis Mod|0} ]] - 1) * 2, 4}kh1, {12} }kl1]]! + [[{1e3, 8}<[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] * (1 - {3, 6, 10}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]] + {1, 4, 8}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]])]]d[[10 - {4, 5, 8, 9}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]] * 4]]! + [[{1e3, 8}<[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] * ({0, 5, 7, 9}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 1}kh1 % 11]] + 2 * {6, 10}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]])]]d8! - [[{1, 2}=[[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] * (3 - [[{[[8 - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]])]] + ?{Karma #}d6! ]]}}"def query_yes_no(question, default="yes"): """Ask a yes/no question via raw_input() and return their answer. "question" is a string that is presented to the user. "default" is the presumed answer if the user just hits <Enter>. It must be "yes" (the default), "no" or None (meaning an answer is required of the user). The "answer" return value is True for "yes" or False for "no". """ valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False} if default is None: prompt = " [y/n] " elif default == "yes": prompt = " [Y/n] " elif default == "no": prompt = " [y/N] " else: raise ValueError("invalid default answer: '%s'" % default) while True: sys.stdout.write(question + prompt) choice = raw_input().lower() if default is not None and choice == '': return valid[default] elif choice in valid: return valid[choice] else: sys.stdout.write("Please respond with 'yes' or 'no' " "(or 'y' or 'n').\n")def main(): talent = raw_input("Talent Name: ") attr = raw_input("Attribute: ") rank = raw_input("TalentName: ") #step = raw_input("Effective Step: ") target = query_yes_no("Targeted Ability: ") if target: target_replace = "{{Target: @{target|token_name}}}" else: target_replace = "" print BASE.replace( '8 ', '@{selected|' + str(attr) + '} + @{selected|' + str(rank) + '} ' ).replace( 'Attack', talent ).replace( '-t-', target_replace )if __name__ == '__main__': main()
Statistics:Posted by Jason — Thu Aug 24, 2017 1:43 pm
Thanks for sharing that.
Let me know if you figure that out. The best I've heard of is to give the spell effect a slot on the Turn Tracker.Jason wrote: ↑Thu Aug 24, 2017 11:52 amStrain and karma usage has to be manually tracked. There is a few things that makes me consider the 'top' level - the api script access so I could automate some of this. What would be really nice would be the ability to auto decrease buff/debuff counter duration at the end of turns.
Statistics:Posted by Dougansf — Thu Aug 24, 2017 1:24 pm
&{template:default}{{name=@{selected|token_name}: Melee Weapons}}{{Target: @{target|token_name}}}{{Step: [[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]] Karma: ?{Karma #|0} Result [[ [[{1e3, 8}<[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]] - 11, 0}kh1 % 11]] + floor([[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]] - 11, 0}kh1]] / 11)]]d20! + [[{2, 4, 5, 6, 7}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]] + {1, 3}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] + {1e3, 3}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]] - 11, 0}kh1 % 11]] * 2]]d[[{{([[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]] - 1) * 2, 4}kh1, {12} }kl1]]! + [[{1e3, 8}<[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] * (1 - {3, 6, 10}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]] + {1, 4, 8}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]])]]d[[10 - {4, 5, 8, 9}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]] * 4]]! + [[{1e3, 8}<[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] * ({0, 5, 7, 9}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 1}kh1 % 11]] + 2 * {6, 10}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1 % 11]])]]d8! - [[{1, 2}=[[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]] * (3 - [[{[[@{selected|DEX} + @{selected|MeleeWeapons} - @{selected|bar2} + ?{Mis Mod|0} ]], 0}kh1]])]] + ?{Karma #}d6! ]]}}
Statistics:Posted by Jason — Thu Aug 24, 2017 11:52 am
Statistics:Posted by Dougansf — Thu Aug 24, 2017 2:36 am
Statistics:Posted by Jason — Wed Aug 23, 2017 12:14 pm
Somebody could have been in suspended animation in any of those places for centuries. Ether in a magical trap or ... Well you need to think of why somebody went to the trouble of putting them into suspended animation but it is OK to release them now. Also, the player would need to be OK with being a character out of time. Runvars' tomb has been sealed since before the scourge was even predicted. Character would have no knowledge of centuries of history.
Statistics:Posted by ChrisDDickey — Wed Aug 23, 2017 6:42 am
This is good. I could definitely use this as something. Would just need to think about why they didn't see him in the pool.The sleeping beauty idea is also workable. Somebody from the last party was told by the Oracle that the way to cure his incurable disease was to immerse himself in the pool and sleep until the next person took a drought from the pool. Or maybe he was told he would sleep until X days after the next person took a drought if you need that to explain why he did not wake up until now.
Statistics:Posted by Jason — Tue Aug 22, 2017 11:39 am
Statistics:Posted by ChrisDDickey — Tue Aug 22, 2017 9:33 am
Statistics:Posted by Jason — Mon Aug 21, 2017 8:48 pm
Statistics:Posted by Slimcreeper — Mon Aug 21, 2017 10:29 am