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

Need help from The Aaron

1569597265
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
Why does this sheet worker work in this game:&nbsp; <a href="https://app.roll20.net/campaigns/details/4348330/gurps-testbed" rel="nofollow">https://app.roll20.net/campaigns/details/4348330/gurps-testbed</a> and not in this one:&nbsp; <a href="https://app.roll20.net/campaigns/details/5235386/sheet-test" rel="nofollow">https://app.roll20.net/campaigns/details/5235386/sheet-test</a> . // Update Lines on Melee on("sheet:opened change:repeating_melee remove:repeating_melee change:strength change:ambidextrous change:trained_by_master change:weapon_master change:badfoot change:meleegrappled change:shield_defense_bonus change:shieldccbt change:meleelgshieldpen change:targetpenalty change:distraction change:meleestrikeccbt change:meleewild change:evaluate change:meleecannotsee change:visionpenalty change:nightvision change:firing_size_mod change:temp_DX_mod change:skillRoll_mod", function () { console.log("********* Update Lines Melee *********"); TAS.repeating("melee") .attrs("strength", "ambidextrous", "trained_by_master", "weapon_master", "badfoot", "meleegrappled", "shield_defense_bonus", "shieldccbt", "shield_melee_penalty", "meleelgshieldpen", "targetpenalty", "distraction", "meleestrikeccbt", "meleewild", "evaluate", "meleecannotsee", "visionpenalty", "nightvision", "firing_size_mod", "temp_DX_mod", "skillRoll_mod" ) .fields("esl", "skill", "mmods", "minst", "stdeficit", "rapidstrike", "rsp", "dualweapon", "offhand", "wield", "deceptiveatk", "telegraph", "visionpenalty") .each(function (r, a) { if (r.I.minst &gt; a.I.strength) { r.D[0].stdeficit = a.I.strength - r.I.minst; } else { r.D[0].stdeficit = 0; } if (a.I.trained_by_master &gt; 0 || a.I.weapon_master &gt; 0) { r.D[0].rsp = r.I.rapidstrike / 2; } else { r.D[0].rsp = r.I.rapidstrike; } if (r.I.wield &lt; 1 &amp;&amp; a.I.ambidextrous &lt; 1) { r.D[0].offhand = -4; } else { r.D[0].offhand = 0; } if (a.I.visionpenalty &lt; -9) { r.D[0].visionpenalty = -10; } else { r.D[0].visionpenalty = Math.min(0, (a.F.visionpenalty + a.F.nightvision)); } a.D[0].shield_melee_penalty = a.F.shieldccbt * a.F.shield_defense_bonus; r.D[0].mmods = r.F.stdeficit + r.F.rsp + a.F.badfoot + a.F.meleegrappled + a.F.shield_melee_penalty + a.F.meleelgshieldpen + r.F.offhand + r.F.deceptiveatk + r.F.dualweapon + r.F.telegraph + a.F.targetpenalty + a.F.distraction + a.F.meleestrikeccbt + a.F.meleewild + a.F.evaluate + a.F.meleecannotsee + r.F.visionpenalty + a.F.firing_size_mod + a.F.temp_DX_mod + a.F.skillRoll_mod; r.D[0].esl = r.I.skill + r.F.mmods; }) .execute(); });
1569612958
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
What error do you get in the developer console? Is the entire sheet the same between the two games or is just the code snippet the same? At a guess, you might not have TAS included in the nonfunctioning game's sheet code.
1569614599
The Aaron
Roll20 Production Team
API Scripter
Also, what is the nature of the failure? Expected behavior vs observed behavior.&nbsp;
1569615573
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
What is happening is the attr_mmods is not being calculated on the sheet in one game but in another game with exact same sheet code it is working.
1569615647
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
@Scott C. Code is exactly the same between games.
1569616314
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
What output do you get in the developer console? do you see update lines melee console log? what about if you put logs in during the TAS functions to see if anything happens there?
1569616673
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
1569616727
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I changed the evaluate attribute
1569682992
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
Hey guy thanks for the input...I found an orphaned attr way up in my html. Somehow fat-fingered something and screwed everything up. Thanks all again.