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

Looking for a Simple Calculator to use to lessen the load on a war game I run.

Hello! I am trying to run a War game (Fire Emblem, specifically). I have made my own system and I have determined the amount of math required per combat is too intensive to do by hand. I need to calculate 7 statistics; 3 pairs and 1 contest. And I would need it to compare two tokens and their preset stats to calculate the final 7. I would need to be able to preset Tokens with 8 stats for the Calculator. And I would need 2 Toggles for Triangle advantage and Magic vs Physical damage For example, Say I have a Unit attack a Foe, the Calculator would need to compare:  Units Att vs Foe Def/Res Foe Att vs Units Def/Res Units Hit vs Foe Avoid Foe Hit vs Units Avoid Unit Crit vs Foe Luck Foe Crit vs Unit Luck Unit AS vs Foe AS I am not experienced in coding, So I have honestly no idea how much work this would take. I'm not currently asking for it to be made for me, just an estimate for how much work/the cost to pay someone to make it.
You might take a look at the Scriptcards API.  It probably has the logic for doing what you are looking for.  Do you have a spreadsheet or documentation laying out the calculations you are wanting to automate?
1623563559
GiGs
Pro
Sheet Author
API Scripter
You can probably do this with a standard macro - macros can perform calculations. But it's hard to help without details. You'd need to list all the calculations, with the rll20 attributes they need to access. Note that if you can get the stats of a selected token with @{selected|STAT-NAME} and the stats from a token you don't control with @{target|STAT-NAME} (just replace the STAT-NAME part with the actual name of the stat you want. If you can supply the full details of each calculation you want to perform, and the readout you'd want it to give, we can tell you whether a macro or series of macros will do the job, and maybe write it for you. If you want to hire someone, you'll need to give them this information anyway, so posting it here will help you.
1623594337

Edited 1623595444
I went to bed a couple of hours before either of you responded, my bad.  @Will M. "Do you have a spreadsheet or documentation laying out the calculations you are wanting to automate?" Yes, I do, But I know it's too much to ask for someone to automate it based on the excel spreadsheet I have, so I am willing to just put in the effort and preload them into each token individually.  @GiGs "If you can supply the full details of each calculation you want to perform, and the readout you'd want it to give, we can tell you whether a macro or series of macros will do the job, and maybe write it for you." It's not really complicated, just cumbersome to do by hand for every fight. It is most just subtraction. the more complicated one is AS Att - Def/Res (IE; 11 Att - 5 Def/Res = 6 Damage) Hit - Avoid (IE; 100 Hit - 30 Avoid = 70% Hit Chance) Crit - Luck (IE; 24 Crit - 5 Lck = 19% Critical Chance) IF U.AS  ≥  F.AS+4, Unit Doubles. IF U.AS+4  ≤  F.AS, Foe Doubles, If neither exceeds each other, neither foe nor Unit Double. how that works in practice is (9AS vs 5AS = Unit Doubles, 5AS vs 9AS Foe Doubles, and 5AS vs 5 AS neither double) Then, the 2 toggles I mentioned play a Roll in this math. The Physical vs Magic Damage toggle effects which defensive stat the calculation needs to use, Defense for Physical and Resistance for Magical respectively. And the Triangle Advantage toggle means that 1 weapon is effective against another (think pokemon types kind of,) and increases your damage and hit chance while decreasing theirs.
1623595643
GiGs
Pro
Sheet Author
API Scripter
Roll20 macros cant do conditionals (like U.AS  ≥  F.AS+4, something doubles).
Ah, Oh well. It's simple enough to do by hand anyhow. I can do that manually fight per fight.
1623605254

Edited 1623605292
It has dawned on me that I may have posted this in the wrong forum. I probably should've posted this in the API forum instead of the character sheet forum. Thats my fault for not reading enough.
1623605786
GiGs
Pro
Sheet Author
API Scripter
Are you able to use API scripts? That requires a Pro level subscription. You could do your calculations with an API script. Though as I said earlier, you'd need to post very precise information. If you don't have a Pro subscription, the Specific Use Questions forum would be the proper one.
I still think you should look at ScriptCards API, but it will require a Pro account.  It handles dice rolling, calcs, loops, conditionals, and targeting tokens and much more.  
1623608086

Edited 1623608097
Ah, I forgot to mention that I'm setting this up with a friend who has a pro subscription. I mentioned how I wish I could automate the math and he told me to go see if there was a Character Sheet or API that I could use for it, and he would set it up.
1623649934
GiGs
Pro
Sheet Author
API Scripter
Then ScriptCards is the tool for you!