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

The Expanse - Custom character sheet

When I first looked at the Roll20 for running The Expanse RPG, there was virtually no support for it. Later this year I found a custom sheet for The Expanse on Github it looked abandoned and I had some issues with it, so I made a bunch of modifications. Then I noticed that support for The Expanse was added to Roll20 and I stopped working on my custom sheet. With 2020 being what it is, I never got to try the official Expanse character sheets. I did that now and I was mildly disappointed. So, I picked up my work on the sheets and here's the result -&nbsp;<a href="https://github.com/BigWhale/TheExpanseRPG" rel="nofollow">https://github.com/BigWhale/TheExpanseRPG</a> This is my first character sheet and I barely familiarized mysel with Roll20 API, CSS &amp; HTML limitations and other quirks. What is supported and was carried on in my fork of the original sheet: Abilities and automatic die rolls for each ability Focuses for all the abilities and automatic rolls for them Talents &amp; Specializations bonuses are applied to all the rolls where necessary Requirements check for talents and specializations (e.g. you can't select Command if you Constitution is lower than 2) All the descriptions and requirements for talents and specializations are on the character sheets Relationship list for easier tracking Attack/weapon lists with damage rolls after you setup your attacks Automatic income rolls with bonuses applied Dedicated buttons for Initiative rolls and generic 1d6 - 3d6 rolls Really pretty chat output of the rolls with die breakdown and stunt point display When performing ability tests players select the difficulty for an automatic check Very basic and rudimentary support for space ships What's still missing, known bugs, quirks ... Talent, Specialization, and Focus boxes are sometimes really out of place, but because of the limitations of Roll20 this will be hard to fix, I'm still looking to find a solution and I'm open to suggestions When you first select a Talent/Spec/Focus, you have to click twice on it, as I understand this is because first click only adds an item to the Attributes &amp; Abilities and the second is then able to change the value of that item Talents and Abilities should probably be flipped in the sheet layout, abilities are used more frequently and they are on the left side on the printed sheets Perhaps some automation with the conditions, right now bonuses aren't applied automatically (when rolling accuracy for ranged attack, blindness is not accounted for) Breakdown of modifiers when displaying rolls, to have a list of all modifiers that were applied, not just a total And with all this a have a couple of questions, first is there a way to split character sheets to multiple files. Right now I'm editing an html file that has over 7000 lines. With the code folding things are manageable, but I'd prefer to split at least all the worker JavaScript stuff into a different file if possible. When writing 'getters and setters' for various traits and abilities, there are many many many on("clicked") calls. Could it be possible to get away with one call and add some parameters, because this looks rather silly? I haven't really researched this too much, if someone could point me in the right direction in the documentation I'd appreciate it.
1604740094
GiGs
Pro
Sheet Author
API Scripter
Regarding your first question: there's no way native to roll20 to split sheets into multiple files. If youre using the custom sandbox, you can use a html templating engine or other technique which allows you to work in separate files and then combines them, and then just load the single html they create into roll20. Which sounds a bit convoluted... Regarding your sheet worker question: yes, by using javascript techniques (not things specific to roll20). Check out my universal sheet workers &nbsp;page on the wiki for one approach. For example, you have a lot of code like this at the end of your script block: on("clicked:select_spec_thief", () =&gt; { getAttrs(['spec_thief'], (values) =&gt; { if (values.spec_thief) { setAttrs({spec_thief: 0}) } else { setAttrs({spec_thief: 1}) } }) }) The bit inside the getAttrs is the same in many workers, its just the attribute that changes. It looks like you have a sensible naming system (the name of the button is easily matched with the name of the attribute), so you can do this: const items = ['spec_thief', 'spec_star', 'spec_socialite', 'focus_touching', ]; items.forEach(item =&gt; {&nbsp;&nbsp;&nbsp;&nbsp; on(`clicked:select_${item}`, () =&gt; { getAttrs([item], (values) =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const output = {}; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output[item] = 1- (parseInt(values[item]) || 0); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setAttrs(output); }); }); }); Firstly create an array with all the attribute names, then create a forEach loop that creates all the click events. In each iteration of the forEach loop, item &nbsp;becomes the next attribute name, so you can use it to build one universal sheet worker. The ` ` type of quotes let you create a template literal, which is a neater way of combining strings and variables. Using the [ ] brackets around item&nbsp; forces it to be evaluated into the current attribute where you need it. when grabbing a numerical item from the character sheet (like your values) you should convert into a number (like i did with parseInt) so evaluating it works as expected. Otherwise javascript will try to guess how it should work and doesnt always get it right. Your if statement can be replaced with a toggle: since the checkbox can only have two values, 1 and 0, using 1 - value, means you just flip between those two values. Creating an output object variable to hold attribute names for setAttrs is a neat way of avoiding multiple setAttrs statements in your code - and you should absolutely avoid multiple setAttrs. Hope that helps!
1604740851
GiGs
Pro
Sheet Author
API Scripter
Your first sheet worker had a frankly horrifying number of separate setAttrs functions, so here's a version of that sheet worker thats a little bit optimised: //&nbsp;function&nbsp;to&nbsp;turn&nbsp;a&nbsp;string&nbsp;value&nbsp;into&nbsp;an&nbsp;integer,&nbsp;or&nbsp;return&nbsp;0&nbsp;if&nbsp;cant&nbsp;be&nbsp;coerced&nbsp;into&nbsp;an&nbsp;integer. const &nbsp; int &nbsp;=&nbsp;( value ,&nbsp; error &nbsp;=&nbsp; 0 )&nbsp; =&gt; &nbsp; parseInt ( value )&nbsp;||&nbsp; error ; //&nbsp;Check&nbsp;requirements&nbsp;for&nbsp;all&nbsp;Talents&nbsp;and&nbsp;Specializations on ( 'change:level&nbsp;change:accuracy&nbsp;change:communication&nbsp;change:constitution&nbsp;change:dexterity&nbsp;change:fighting&nbsp;change:intelligence&nbsp;change:perception&nbsp;change:strength&nbsp;change:willpower&nbsp;change:focus_acrobatics&nbsp;change:focus_research&nbsp;change:focus_driving&nbsp;change:focus_piloting&nbsp;change:focus_crafting&nbsp;change:focus_expression&nbsp;change:focus_deception&nbsp;change:focus_empathy&nbsp;change:focus_self_discipline&nbsp;change:focus_persuasion&nbsp;change:focus_security&nbsp;change:focus_technology&nbsp;change:focus_hearing&nbsp;change:focus_intuition&nbsp;change:focus_searching&nbsp;change:focus_seeing&nbsp;change:focus_smelling&nbsp;change:focus_survival&nbsp;change:focus_tasting&nbsp;change:focus_touching&nbsp;change:focus_tracking&nbsp;change:focus_rifles&nbsp;change:focus_performing&nbsp;change:focus_sleight_of_hand&nbsp;change:focus_stealth' ,&nbsp;( info )&nbsp; =&gt; &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp; getAttrs ([ 'level' ,&nbsp; 'accuracy' ,&nbsp; 'communication' ,&nbsp; 'constitution' ,&nbsp; 'dexterity' ,&nbsp; 'fighting' ,&nbsp; 'intelligence' ,&nbsp; 'perception' ,&nbsp; 'strength' ,&nbsp; 'willpower' ,&nbsp; 'focus_acrobatics' ,&nbsp; 'focus_research' ,&nbsp; 'focus_driving' ,&nbsp; 'focus_piloting' ,&nbsp; 'focus_crafting' ,&nbsp; 'focus_expression' ,&nbsp; 'focus_deception' ,&nbsp; 'focus_empathy' ,&nbsp; 'focus_self_discipline' ,&nbsp; 'focus_persuasion' ,&nbsp; 'focus_security' ,&nbsp; 'focus_technology' ,&nbsp; 'focus_hearing' ,&nbsp; 'focus_intuition' ,&nbsp; 'focus_searching' ,&nbsp; 'focus_seeing' ,&nbsp; 'focus_smelling' ,&nbsp; 'focus_survival' ,&nbsp; 'focus_tasting' ,&nbsp; 'focus_touching' ,&nbsp; 'focus_tracking' ,&nbsp; 'focus_rifles' ,&nbsp; 'focus_performing' ,&nbsp; 'focus_sleight_of_hand' ,&nbsp; 'focus_stealth' ],&nbsp;( values )&nbsp; =&gt; &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const &nbsp; output &nbsp;=&nbsp;{}; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . level )&nbsp;&gt;=&nbsp; 11 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'improved_focus' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'improved_focus' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . dexterity )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_acrobatics )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_agility' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_agility' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . dexterity )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_burglary' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_dual_weapon' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_quick_reflexes' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_scouting' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_burglary' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_dual_weapon' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_quick_reflexes' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_scouting' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . fighting )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_overwhelm' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_overwhelm' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . dexterity )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp;( int ( values . accuracy )&nbsp;&gt;&nbsp; 0 &nbsp;||&nbsp; int ( values . fighting )&nbsp;&gt;&nbsp; 0 ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_pinpoint' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_pinpoint' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . intelligence )&nbsp;&gt;&nbsp; 0 &nbsp;||&nbsp; int ( values . willpower )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_improvisation' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_improvisation' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . intelligence )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_knowitall' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_knowledge' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_knowitall' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_knowledge' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . intelligence )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_linguistics' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_medic' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_linguistics' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_medic' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . perception )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_observation' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_single_weapon' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_observation' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_single_weapon' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . perception )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp; int ( values . willpower )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_protector' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_protector' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . dexterity )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp; int ( values . perception )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_tactical' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_tactical' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . strength )&nbsp;&gt;=&nbsp; 3 &nbsp;&amp;&amp;&nbsp; int ( values . fighting )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_two_handed' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_two_handed' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp;( int ( values . focus_crafting )&nbsp;&gt;&nbsp; 0 &nbsp;||&nbsp; int ( values . focus_expression )&nbsp;&gt;&nbsp; 0 ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_artistry' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_artistry' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp; int ( values . constitution )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_carousing' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_carousing' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_contacts' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_fringer' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_contacts' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_fringer' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_command' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_inspire' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_intrigue' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_command' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_inspire' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_intrigue' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . focus_driving )&nbsp;&gt;&nbsp; 0 &nbsp;||&nbsp; int ( values . focus_piloting )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_pilot' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_pilot' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . focus_persuasion )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_oratory' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_oratory' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . focus_security )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp; int ( values . focus_technology )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_hacking' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_hacking' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . focus_rifles )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_rifle' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_rifle' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . focus_performing ))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_performance' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_talent_performance' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;All&nbsp;specializations&nbsp;require&nbsp;level&nbsp;4&nbsp;or&nbsp;higher &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . level )&nbsp;&gt;=&nbsp; 4 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . intelligence )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_research )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_academic' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_academic' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . dexterity )&nbsp;&gt;=&nbsp; 3 &nbsp;&amp;&amp;&nbsp; int ( values . focus_piloting )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_ace' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_ace' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . perception )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_empathy )&nbsp;&gt;&nbsp; 0 &nbsp;&amp;&amp;&nbsp; int ( values . focus_deception )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_agent' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_agent' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . constitution )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_self_discipline )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_commando' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_commando' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_persuasion )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_executive' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_executive' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . accuracy )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . dexterity )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_gunfighter' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_gunfighter' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . intelligence )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_technology )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_hacker' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_hacker' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . intelligence )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . perception )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp;( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_empathy )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_hearing )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_intuition )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_searching )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_seeing )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_smelling )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_survival )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_tasting )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_touching )&nbsp;&gt;&nbsp; 0 &nbsp;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int ( values . focus_tracking )&nbsp;&gt;&nbsp; 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;))&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_investigator' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_investigator' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;Also&nbsp;needs&nbsp;a&nbsp;close&nbsp;combat&nbsp;talent,&nbsp;but&nbsp;that&nbsp;can&nbsp;be&nbsp;up&nbsp;to&nbsp;the&nbsp;GM&nbsp;so&nbsp;we&nbsp;won't&nbsp;codify&nbsp;it&nbsp;here &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . fighting )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_martial_artist' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_martial_artist' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . accuracy )&nbsp;&gt;=&nbsp; 3 &nbsp;&amp;&amp;&nbsp; int ( values . focus_rifles )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_sniper' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_sniper' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . perception )&nbsp;&gt;=&nbsp; 2 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_socialite' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_socialite' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . communication )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_performing )&nbsp;&gt;&nbsp; 0 )&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_star' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_star' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if &nbsp;( int ( values . dexterity )&nbsp;&gt;=&nbsp; 2 &nbsp;&amp;&amp;&nbsp; int ( values . focus_sleight_of_hand )&nbsp;&gt; 0 &nbsp;&nbsp;&amp;&amp;&nbsp; int ( values . focus_stealth )&nbsp;&gt; 0 &nbsp;)&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_thief' ]&nbsp;=&nbsp; 1 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; else &nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output [ 'enable_spec_thief' ]&nbsp;=&nbsp; 0 ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setAttrs ( output ); &nbsp;&nbsp;&nbsp;&nbsp;}); });
Thanks for the insight! This clears up a lot of the things. :)&nbsp; At first I didn't bother with the JavaScript, because it really looked like spaghetti and I avoided it as long as I had to. Then after looking at it, I was quite surprised on how this was put together, but I wasn't sure if this is a limitation of Roll20 or is it something else. I'll just rewrite this part completely. Because, like you said all these buttons do the same thing and it's silly to do it the way it is done.
hi, we seem to have big issues on Torg character sheet last update, I don't know where to post this topic.&nbsp;
1604747561
GiGs
Pro
Sheet Author
API Scripter
David K. said: Thanks for the insight! This clears up a lot of the things. :)&nbsp; At first I didn't bother with the JavaScript, because it really looked like spaghetti and I avoided it as long as I had to. Then after looking at it, I was quite surprised on how this was put together, but I wasn't sure if this is a limitation of Roll20 or is it something else. I'll just rewrite this part completely. Because, like you said all these buttons do the same thing and it's silly to do it the way it is done. It's easy to be critical of the code on a lot of sheets (so, so easy...), especially the javascript sections usually, but remember that most sheets are made by volunteers who have never coded before. Honestly it's amazing there are so many sheets, which goes to show the passion that people can have for their games.&nbsp; That does means though that once you start learning a little yourself, most of the sheets stop being useful guides, and you have to look to other sources to find good ways to do things. The forums are great for that!
1604748389
GiGs
Pro
Sheet Author
API Scripter
Elias said: hi, we seem to have big issues on Torg character sheet last update, I don't know where to post this topic.&nbsp; I see you found the torg sheet thread :) I've answered you over there.
GiGs said: David K. said: Thanks for the insight! This clears up a lot of the things. :)&nbsp; At first I didn't bother with the JavaScript, because it really looked like spaghetti and I avoided it as long as I had to. Then after looking at it, I was quite surprised on how this was put together, but I wasn't sure if this is a limitation of Roll20 or is it something else. I'll just rewrite this part completely. Because, like you said all these buttons do the same thing and it's silly to do it the way it is done. It's easy to be critical of the code on a lot of sheets (so, so easy...), especially the javascript sections usually, but remember that most sheets are made by volunteers who have never coded before. Honestly it's amazing there are so many sheets, which goes to show the passion that people can have for their games.&nbsp; That does means though that once you start learning a little yourself, most of the sheets stop being useful guides, and you have to look to other sources to find good ways to do things. The forums are great for that! Oh, I agree. But I wasn't trying to be critical. I understand that a lot of the code is written by people that do this just because they love the game they play and want to help out. That's admirable. I'll probably rewrite most of this JS code, now that I know some things are not a limitation of the Roll20 engine. I also have to clean up the CSS, because I left a lot of old stuff in it.&nbsp; I have one more question. I've read somewhere that I shouldn't be messing with the DOM elements in JavaScript? I can't find this in the docs right now. That's understandable and it makes sense, altho it really limits things that could be done for UI/UX of the sheets. All the drop downs and item hiding right now is done with CSS, am I correctly assuming that this is because of the previously mentioned limitations? I can't use JS to hide/show elements or to change the display property of an element?
1604764382
GiGs
Pro
Sheet Author
API Scripter
David K. said: I have one more question. I've read somewhere that I shouldn't be messing with the DOM elements in JavaScript? I can't find this in the docs right now. That's understandable and it makes sense, altho it really limits things that could be done for UI/UX of the sheets. All the drop downs and item hiding right now is done with CSS, am I correctly assuming that this is because of the previously mentioned limitations? I can't use JS to hide/show elements or to change the display property of an element? You are correct on all points. You cant manipulate the DOM, and thats why everything is done with CSS, and it does indeed limit things that can be done with the UI.&nbsp;
1604769708
Andreas J.
Forum Champion
Sheet Author
Translator
BTW, The Expanse already exists as a sheet, integrated into the "AGE System" sheet. <a href="https://wiki.roll20.net/AGE_System" rel="nofollow">https://wiki.roll20.net/AGE_System</a>
ᐰndreas J. said: BTW, The Expanse already exists as a sheet, integrated into the "AGE System" sheet. <a href="https://wiki.roll20.net/AGE_System" rel="nofollow">https://wiki.roll20.net/AGE_System</a> Yes, I know that there's support for The Expanse. I found out about it after I already made a lot of changes to the original custom sheet. I think that the official sheet lacks a lot of functionalities and some things could be automated. :)
1604847380
Andreas J.
Forum Champion
Sheet Author
Translator
The AGE System sheet is not official, it's just the main sheet for all the similar AGE system games, which makes updating all of them at the same time easier. Anyone can contribute to the community sheets.
Question, using the Expanse character sheet: according to the Expanse RPG rules, when you level up to 4 (and each 4 levels thereafter), you can increase either Defense or Toughness. The character sheet doesn't seem to allow you to edit either of those qualities. Is there any way to change this? Or is there something that I'm missing?&nbsp;
1608549795
Andreas J.
Forum Champion
Sheet Author
Translator
Stewart K. said: Question, using the Expanse character sheet: according to the Expanse RPG rules, when you level up to 4 (and each 4 levels thereafter), you can increase either Defense or Toughness. The character sheet doesn't seem to allow you to edit either of those qualities. Is there any way to change this? Or is there something that I'm missing?&nbsp; Are you talking about the standalone The Expanse -sheet mentioned in this thread, or The Expanse sheet that is part of the general AGE System, character sheet? If it's the AGE System sheet, I'm sure it could be edited so that Defense/Toughness can be directly edited.
1612872802
Duncan R.
Pro
Sheet Author
Stewart K. said: Question, using the Expanse character sheet: according to the Expanse RPG rules, when you level up to 4 (and each 4 levels thereafter), you can increase either Defense or Toughness. The character sheet doesn't seem to allow you to edit either of those qualities. Is there any way to change this? Or is there something that I'm missing?&nbsp; I spotted that last night. I increase the level to 4 and then wondered how to increase Dex or Toughness. were you planning to merge your changes into the main AGE/Expanse character sheet or continue with your own? If the latter I may have a look at your one at some point.