roll20apiscripts's People
Forkers
coalpoweredpuppet cogspace calebdinsmore kmontag42 blueflyingbear andargor shadopanther gwav dedurrett dmsguild201 derammo meteox kmarq sillvva daniel-i-am joker500 random-stack-random-day buttje elmaro palikhov trazztonic nmccurley thebadbishop dqfan2012 dreamnite dragonicninja laraa911 superslacker87 kevinbrandon kilter68 thomasmckay jothar73 lostnode phoenomenom yuri-fanatic quincoces alexsledge gludington boron434 megamos elcool0r 4ydx viniciusm-m rmiroballi noviny conormc98 dan-esquivel andruc radicalrebop niax-soulstrum jedirock t3chsh0ck enbrander sean-stanley deanboz bader57 jam1123 kjbro tripseight bovard greenvictorious gmnorman spuuun aevums alteredfuture rdmslight willjschmitt phillipchengh iantorye elidimoon adramir4 chissler jacksonhunter danwolanski theoctonaut villain1nglasses fsteve89 sizeablerainbow themarquee jericho27 pieterhelsen myers-jacobandrew epknothead dhayre nomadicbits melvinloosroll20apiscripts's Issues
[LazyCalendar] MonthAdvance breaks when moving past the 12th month
Likely related to issue #58.
When attempting to use !cal month-set, as established in the message pop-up by moving from month 13 to month 14, an overflow appears if attempting to switch to another month, where it iterates 34, the number of days in each month in the day column. Setting the day to a different value does nothing and instead adds NaN to the day column. Setting or advancing the or day simply adds "34," the number of months in a day to the calendar, or "1" to the current day.
As an issue that occurred prior to the month overflow, when attempting to use !cal month-set to move past the 13th and 14th month, Roll20 API would crash with this following error.
RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at setCurrentDoM (apiscript.js:7753:30)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
at setCurrentDoM (apiscript.js:7761:13)
[LazyExperience] Doesn't seem to work with certain markers?
Hi there,
-
When I mark a token as dead it does not trigger the question in chat to add the xp. I have checked that the config is correct (i.e. dead marker selected and characters are active). [UPDATE: it seems to work with some tokens but not others. E.g. if I drag a Giant Wasp token in from the 5e compendium it works but if I drag in a Skeleton from the same compendium it doesn't work.]
-
Also, although I have set the config to update character sheets and also set the instant update option, it does not update the character sheets if I manually add to the session xp and then end the session, just outputs it to the chat.
Problem 1 is higher priority for me โ would be amazing if dead tokens add to the session xp!
[BeyondImporter] Firebase.update failed: First argument contains undefined in property 'current'
this crash creates a strange async callstack inside Roll20, with no symbols from our code. One thing that causes this crash is incorrect import logic that sets attributes based on Beyond input data without any verification. In one case, the name of a proficiency was undefined in the Beyond JSON and therefore the corresponding repeating attribute was set to undefined also, causing this crash from setAttrs (async crash.)
A workaround is to scan all attributes for null or undefined and changing their values to empty string before writing. This way, incomplete import won't crash.
Is this open source?
Have you thought about adding an open source license to your scripts?
https://help.github.com/en/articles/licensing-a-repository
I'd love to be able reuse your D&D Beyond importer code on another open source project called Improved Initiative. And perhaps any new work and bug fixes can benefit both projects?
Let me know what you think. Improved Initiative is MIT licensed, so it can't make use of your code unless you have a compatible license.
[BeyondImporter] Slow performance
The last run took about 1 minute to run, whereas before it would take a few seconds. Some changes seem to have slowed down the script considerably.
[BeyondImporter] HP Discrepancy
I have a Sorcerer 5/Warlock 2, Draconic Bloodline, 18 Con. in D&D Beyond, using fixed calculations, he has 65 HP. The import indicates 67 HP.
[LazyCalendar] Any month added beyond 12 months shows NaN for calendar date
For my fantasy calendar, I have a 14-month calendar with 34 days. For months that proceed beyond the 13th month, however, all the calendar dates possible show up as NaN. No error messages pop up for this occurrence; There is no indication of an error in the Roll20 script.
Background description is missing
Shaped 17.0.5, import 0.0.4, json at https://pastebin.com/ynsz0VDk
Background name comes in ("Haunted One"), but Background Description / Text is missing. Could go into Backstory section of sheet.
[BeyondImporter] Spells with multiple damage types upcast increase only one type
[BeyondImporter_5eOGL] Hit points not importing properly
When importing hit points, the script looks for and sets "hp"; the proper attribute name is "HP" due to case sensitivity.
[Lazy Experience] - Feature Request
[BeyondImporter] Great Weapon Fighting damage re-roll is applied to light crossbow
[BeyondImporter] API sandbox fails after sheet deletion
Frequently, when I delete characters during testing, the Sandbox will get suspended because of "possible infinite loop".
I don't have any detailed information yet, but want to start a conversation.
[BeyondImporter] Restrictions shown in spell attack macros
I propose to show the Beyond "restriction" string (if not null or empty string) in the "description" of generated spell Attack macros. This will help with many cases like damage that is only applicable to certain choices of spell features, target restrictions or immunities, and having to choose one damage type rather than getting all of them
[StatusInfo] 6 suggested new statuses
suggestions for new conditions in the default config:
dead, exhausted, falling, squeezing, stable, concentrating.
reaction, bonus action - tokens to be placed if player/npc has used reaction/bonus action
absolutely fantastic script BTW.
Also a quick note to include the text for the 'following macro' as a suggested token action macro
!condition add ?{Condition:|Blinded|Charmed|Deafened|Frightened|Grappled|Incapacitated|Inspiration|Invisibility|Paralyzed|Petrified|Poisoned|Prone|Restrained|Stunned|Unconscious}
and
!condition remove ?{Condition:|Blinded|Charmed|Deafened|Frightened|Grappled|Incapacitated|Inspiration|Invisibility|Paralyzed|Petrified|Poisoned|Prone|Restrained|Stunned|Unconscious}
or
!condition ?{add/remove:|Add|Remove} ?{Condition:|Blinded|Charmed|Deafened|Frightened|Grappled|Incapacitated|Inspiration|Invisibility|Paralyzed|Petrified|Poisoned|Prone|Restrained|Stunned|Unconscious}
[CombatTracker/StatusInfo] Adding conditions via CT doesn't call SI info boxes
Using CT to add conditions (either through the favorites menu or !ct add) will add the condition to CT properly, but won't call the StatusInfo box related to the condition.
[InspirationTracker] Dragging a token that does not represent a character causes an error
When dragging a token that doesn't have "represents" property set to the game board the API console outputs an error - invalid parameter (empty) for getAttrByName(). This is caused by function handleAddToken:
handleAddToken = (obj) => {
setStatusmarker(obj, (getAttrByName(obj.get('represents'), 'inspiration', 'current') === 'on'));
},
There is no validation against undefined or empty "represents". Simplest fix:
handleAddToken = (obj) => {
if (typeof obj.get('represents') != 'undefined' && obj.get('represents').length > 0) {
setStatusmarker(obj, (getAttrByName(obj.get('represents'), 'inspiration', 'current') === 'on'));
}
},
Subclass features missing
Shaped 17.0.5, Import 0.0.4, json at https://pastebin.com/ynsz0VDk
Class Features for barb came in, but subclass features (Ancestral Guardian) are missing. There should be Primal Path, Ancestral Proctectors.
[BeyondImporter Shaped] Edge Case Issues w/ Resolutions
Issue found when no damage.* was found. This can be recreated by adding a net as a weapon the resulting weapons object is
damage: null
lines 176,177
attack_damage_dice: weapon.definition.damage.diceCount,
attack_damage_die: 'd' + weapon.definition.damage.diceValue,
change to
attack_damage_dice: (weapon.definition.damage) ? weapon.definition.damage.diceCount : 0,
attack_damage_die: (weapon.definition.damage) ? 'd' + weapon.definition.damage.diceValue : 0,
Also in the scenario of someone using "blood hunter" or one of the other classes not available in auto_traits you are using:
lines 506,507
if(auto_traits[c.class.name.toLowerCase()].includes(trait.definition.name) || auto_traits.general.includes(trait.definition.name)) return;
The issue here is that if someone is importing "blood hunter" or one of the other classes auto_traits[c.class.name.toLowerCase()] will result in a typeof undefined which doesn't have includes() as an option. This is generating an error in the API the fix is something like this.
change to
if(auto_traits[c.class.name.toLowerCase()]){
if(auto_traits[c.class.name.toLowerCase()].includes(trait.definition.name)) return;
}
if(auto_traits.general.includes(trait.definition.name)) return;
[CombatTracker] Script crashes when adding custom marker token
I used "!ct config" to change the marker img and now whenever I roll initiative, the API Sandbox completely crashes.
I then restarted the sandbox and changed the url to nothing, but now no marker shows at all.
I tried a few different images, but it always crashes.
Here's the error:
TypeError: Cannot read property 'get' of undefined
TypeError: Cannot read property 'get' of undefined
at turnorder.forEach.turn (apiscript.js:4334:34)
at Array.forEach (native)
at checkMarkerturn (apiscript.js:4333:19)
at getOrCreateMarker (apiscript.js:4299:19)
at doTurnorderChange (apiscript.js:3989:24)
at handleTurnorderChange (apiscript.js:3815:13)
at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:65:16)
at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:70:8)
at TrackedObj.set (/home/node/d20-api-server/api.js:1020:14)
at updateLocalCache (/home/node/d20-api-server/api.js:1318:18)
[BeyondImporter] Spell attack bonus missing proficiency
I imported the spell "Guiding Bolt" and the attack bonus was set to +3 (WIS) instead of +3 (WIS) +5 (PROF)
[CombatTracker] 'Next' marker still appears while disabled in config
When the CT config has the next marker disabled, it works as intended when beginning combat and moving the turn order to the next turn, but it overlooks one corner case. The next marker still shows up when the next upcoming token in the turn order moves before it's their turn.
[BeyondImporter] Upcast of spell with no dice
The "Aid" spell has no damage dice, it just uses a flat 5 HP "heal." When upcast, it multiplies the number of upcast dice times "null" instead of times the flat amount.
The spell from the Compendium is set to just generate the spell description instead of the attack.
Combat Tracker: Feature Request - Option to whisper all turn announcements to the GM
I'd really not like to send every turn announcement to the players and fill up their chat. Is it possible to add a config to whisper turn announcements to GM?
Background Feature missing
Shaped 17.0.5, import 0.0.4, json at https://pastebin.com/ynsz0VDk
Background Feature is missing, in this case "Heart of Darkness". Maybe bring in as a Trait?
[BeyondImporter] second class in multiclass sometimes set to default of 'Barbarian' instead of actual value
I have observed this on development branch using JSON for Fedrik, and also a user reported it on the thread in Roll20 Forum.
HP not accurate
Shaped5e 17.0.5, Importer 0.0.4. Json at https://pastebin.com/ynsz0VDk
HP should be 41, imports as 43
[BeyondImporter] Custom Background with Missing Background Feature causes Error
[BeyondImporter] Alert is not increasing Initiative
The Alert feat is not giving +5 to Initiative
[Concentration] API script error when attempting to roll a check
Using version0.1.16, imported by copy/pasting from raw github page into a new script, restarting API sandbox. This script worked correctly once for a PC sheet token. It autorolled the check just fine, and all was well. When I went to re-test by casting a spell, it correctly tracks and updates the spells and concentration, but this time it didn't roll when I clicked to check the roll. Switching to autoroll had the same issue. Restarted the API and reloaded and encountered the same issue. Deleted the script, re-imported, and restarted the API and still no success. Disabling other API scripts, reloading the API, and then attempting to use it also did not resolve the issue. Deleting the manually created script and importing the script using the roll20 toolbox resulted in the same issue.
The Roll20 Scipt API console reports the following error:
For reference, the error message generated was: Could not determine result type of: [{"type":"M","expr":1},{"type":"C","text":"d20cf<-1cs>-1+10"}]
undefined
It seems to refer to line# 260 in the sendChat() function.
roll = (represents, DC, con_save_mod, name, target, advantage) => {
sendChat(script_name, '[[1d20cf<'+(DC-con_save_mod-1)+'cs>'+(DC-con_save_mod-1)+'+'+con_save_mod+']]', results => {
let title = 'Concentration Save <br> <b style="font-size: 10pt; color: gray;">'+name+'</b>',
advantageRollResult;
[BeyondImporter] Flame Strike spell only imports one damage type
this spell does two types of damage, and only one is imported and attached to the attack
API Console Crash
[BeyondImporter] Thrown Weapons Support
weapons with property "Thrown" need to either get two separate attacks (one for melee and one for ranged) or need to be considered ranged weapons
Right now, Dueling bonus damage is applied because the weapon is not ranged but the attack has range on it. I believe that they are considered a melee weapon and therefore receive Dueling bonus etc. when used in melee? Beyond only creates the ranged attack, by the way.
Racial Traits missing
Shaped 17.0.5, Import 0.0.4, json at https://pastebin.com/ynsz0VDk
Racial Traits are missing entirely. There should be four: Natural Athlete, Stone's Endurance, Powerful Build, Mountain Born
Saving Throw Modifier missing
Shaped 17.0.5, Import 0.0.4, json at https://pastebin.com/ynsz0VDk
This has a modifier, advantage on dex saving throws ((against effects that you can see while not blinded, deafened, or incapacitated)
Should likely import under "modifiers"
Skill proficiency missing
Shaped 17.0.5, Import 0.0.4, json at https://pastebin.com/ynsz0VDk
Should have proficiency in Animal Handling, Athletics, Intimidation, Religion, Survival.
Animal Handling proficiency is missing.
[CombatTracker] Ties for highest init rolls are skipped in first round
Steps to replicate:
- in Turn Order Config:
- set Auto Roll Ini. to true
- set Auto Sort to true
- select tokens for combat
- start combat either via menu or via
!ct start
- if there are multiple tokens that tie for highest roll, it skips all but the last:
- e.g if token A, B, C, and D roll 18, 18, 18, 15 respectively, it will automatically mark as done A and B in the first round, moving on to C and D.
- subsequent rounds progress normally
[BeyondImporter] Great Weapon Fighting is imported as generic Fighting Style
TypeError: type.indexOf is not a function
Since last night I get the following error whenever I try to use combattracker via initiative. It then disables all my other scripts. Issue persists when it's the only API running as well.
TypeError: type.indexOf is not a function
TypeError: type.indexOf is not a function
at spawnFx (/home/node/d20-api-server/api.js:2847:11)
at spawnFxBetweenPoints (/home/node/d20-api-server/api.js:2986:3)
at doFX (apiscript.js:8830:9)
at doTurnorderChange (apiscript.js:8823:9)
at handleTurnorderChange (apiscript.js:8623:13)
at eval (eval at (/home/node/d20-api-server/api.js:154:1), :65:16)
at Object.publish (eval at (/home/node/d20-api-server/api.js:154:1), :70:8)
at TrackedObj.set (/home/node/d20-api-server/api.js:1023:14)
at updateLocalCache (/home/node/d20-api-server/api.js:1321:18)
at /home/node/d20-api-server/api.js:1611:7
[BeyondImporter] Attuned items not being added to AC
Bracers of defense and Ring of Protection, in this case. For the latter, the bonus to saves is calculated.
[BeyondImporter Shaped] AC on Unarmored Defense does not use Con mod
Shaped 17.0.5, Import 0.0.4, json at https://pastebin.com/ynsz0VDk
"Unarmored Defense" imports but AC is shown as 10. Did import correctly as AC + Dex + Con and sheet calculates correctly after Modifiers are selected once more.
Likely did not trigger sheetworker responsible for AC calc in import. May need Kryx to fix this one.
[CombatTracker] Conditions - Multiple Set
No token was selected when I clicked on Frightened inside of CT. The attached screenshot shows 5 non-selected tokens getting frightened. Could there be a dialog box that pops up telling the end-user to select a token before setting a condition?
Please let me know if you need clarification...or if it is working as programmed. Thanks!
I've attached a screen shot... it was the bottom right Goblins turn, fyi.
[BeyondImporter Shaped] Skill and Savings proficiencies show up in text field
Shaped 17.0.5, import 0.0.4, json at https://pastebin.com/ynsz0VDk
This might be by design, in which case "wontfix". Skill and savings throw proficiencies show up in the text field as well as under savings throws and skills.
Example:
Shields, Simple Weapons, Martial Weapons, Light Armor, Medium Armor, Strength Saving Throws, Constitution Saving Throws, Intimidation, Animal Handling, Athletics, Religion, Survival
Arguably, this might be shortened to:
Shields, Simple Weapons, Martial Weapons, Light Armor, Medium Armor
Maybe make it a configurable option? I do hasten to add this is truly minor, I'm running out of other things to point out.
[BeyondImporter] Bad JSON input should catch
display an error and return instead of crashing the sandbox on the unhandled exception from JSON parser
[BeyondImporter Shaped] Skills not in alphabetical order
Shaped 17.0.5, Import 0.0.4, json at https://pastebin.com/ynsz0VDk
Skills are sorted "proficient first" instead of in alphabetical order. This is arguably useful, though it's not Shaped default behavior. If deliberate, close as wontfix; if not deliberate, consider having a toggle in config for current behavior and alphabetized import?
[BeyondImporter] Items that are not equipped provide modifiers
for example, a Berserker Axe that is not equipped or attuned still provides hit point bonus because all modifiers are scanned
a fix for this exists, pull request is waiting for approval on the major changes in #18
[BeyondImporter] Kensei weapons are unimplemented
from forum user Envaris:
Monk Kensei weps should use higher of dex or strength I think no? So Kensei Longsword if Monk's dex is higher (which is normally would be) should be used upon import.
https://app.roll20.net/forum/post/6248700/script-beta-beyondimporter-import-dndbeyond-character-sheets/?pageforid=7052391#post-7052391
Note to implementers:
I just finished reading the code. The kensei part is unimplemented. It does use DEX over STR for monk weapons that it recognizes. However, a Longsword (kensei weapon) on a D&D Beyond character is not marked as 'isMonkWeapon' and that is all the current importer checks. For kensei weapons to work correctly as 'finesse' or 'monk' weapons, we have to check modifiers.class with
"type": "monk-weapon",
"subType": "longsword",
where 'longsword' would be the short name of the current weapon's type (WARNING: lower case in modifier, capitalized in weapon type.)
NOTE: (it is also present with 'type': 'kensei' but 'monk-weapon' seems more appropriate in case there will be other ways to gain additional monk weapons)
[BeyondImporter] custom attacks break after import with overwrite
according to this user, custom attacks created by hand break after re-importing the character, suggesting we have a major flaw in how we do overwrite, in terms of keeping identifiers consistent?
from forum user Envaris:
Custom attacks should be ignored by the override toggle which they sorta are. I found what happened is that the details are correct. However, when clicked it does nothing. I had to into the custom attack in Roll20 edit something small, then re-edit back and it worked.
[BeyondImporter] Stone of Good Luck (Luck Stone) does not increase skills
after import, the item modifier for saving throws is present, but the one for ability checks is missing (works in the version from the compendium)
[BeyondImporter] Attack Spells show as Spellcards
Attack Spells (Eldritch Blast, Fireball, etc) import showing "Output: Attack", but show spell card output until the spell is edited and toggled to "Output: Spellcard" and back to "Attack".
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.