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: // function to turn a string value into an integer, or return 0 if cant be coerced into an integer. const int = ( value , error = 0 ) => parseInt ( value ) || error ; // Check requirements for all Talents and Specializations on ( 'change:level change:accuracy change:communication change:constitution change:dexterity change:fighting change:intelligence change:perception change:strength change:willpower change:focus_acrobatics change:focus_research change:focus_driving change:focus_piloting change:focus_crafting change:focus_expression change:focus_deception change:focus_empathy change:focus_self_discipline change:focus_persuasion change:focus_security change:focus_technology change:focus_hearing change:focus_intuition change:focus_searching change:focus_seeing change:focus_smelling change:focus_survival change:focus_tasting change:focus_touching change:focus_tracking change:focus_rifles change:focus_performing change:focus_sleight_of_hand change:focus_stealth' , ( info ) => { getAttrs ([ 'level' , 'accuracy' , 'communication' , 'constitution' , 'dexterity' , 'fighting' , 'intelligence' , 'perception' , 'strength' , 'willpower' , 'focus_acrobatics' , 'focus_research' , 'focus_driving' , 'focus_piloting' , 'focus_crafting' , 'focus_expression' , 'focus_deception' , 'focus_empathy' , 'focus_self_discipline' , 'focus_persuasion' , 'focus_security' , 'focus_technology' , 'focus_hearing' , 'focus_intuition' , 'focus_searching' , 'focus_seeing' , 'focus_smelling' , 'focus_survival' , 'focus_tasting' , 'focus_touching' , 'focus_tracking' , 'focus_rifles' , 'focus_performing' , 'focus_sleight_of_hand' , 'focus_stealth' ], ( values ) => { const output = {}; if ( int ( values . level ) >= 11 ) { output [ 'improved_focus' ] = 1 ; } else { output [ 'improved_focus' ] = 0 ; } if ( int ( values . dexterity ) >= 2 && int ( values . focus_acrobatics ) > 0 ) { output [ 'enable_talent_agility' ] = 1 ; } else { output [ 'enable_talent_agility' ] = 0 ; } if ( int ( values . dexterity ) >= 2 ) { output [ 'enable_talent_burglary' ] = 1 ; output [ 'enable_talent_dual_weapon' ] = 1 ; output [ 'enable_talent_quick_reflexes' ] = 1 ; output [ 'enable_talent_scouting' ] = 1 ; } else { output [ 'enable_talent_burglary' ] = 0 ; output [ 'enable_talent_dual_weapon' ] = 0 ; output [ 'enable_talent_quick_reflexes' ] = 0 ; output [ 'enable_talent_scouting' ] = 0 ; } if ( int ( values . fighting ) >= 2 ) { output [ 'enable_talent_overwhelm' ] = 1 ; } else { output [ 'enable_talent_overwhelm' ] = 0 ; } if ( int ( values . dexterity ) > 0 && ( int ( values . accuracy ) > 0 || int ( values . fighting ) > 0 )) { output [ 'enable_talent_pinpoint' ] = 1 ; } else { output [ 'enable_talent_pinpoint' ] = 0 ; } if ( int ( values . intelligence ) > 0 || int ( values . willpower ) > 0 ) { output [ 'enable_talent_improvisation' ] = 1 ; } else { output [ 'enable_talent_improvisation' ] = 0 ; } if ( int ( values . intelligence ) >= 2 ) { output [ 'enable_talent_knowitall' ] = 1 ; output [ 'enable_talent_knowledge' ] = 1 ; } else { output [ 'enable_talent_knowitall' ] = 0 ; output [ 'enable_talent_knowledge' ] = 0 ; } if ( int ( values . intelligence ) > 0 ) { output [ 'enable_talent_linguistics' ] = 1 ; output [ 'enable_talent_medic' ] = 1 ; } else { output [ 'enable_talent_linguistics' ] = 0 ; output [ 'enable_talent_medic' ] = 0 ; } if ( int ( values . perception ) >= 2 ) { output [ 'enable_talent_observation' ] = 1 ; output [ 'enable_talent_single_weapon' ] = 1 ; } else { output [ 'enable_talent_observation' ] = 0 ; output [ 'enable_talent_single_weapon' ] = 0 ; } if ( int ( values . perception ) > 0 && int ( values . willpower ) > 0 ) { output [ 'enable_talent_protector' ] = 1 ; } else { output [ 'enable_talent_protector' ] = 0 ; } if ( int ( values . dexterity ) > 0 && int ( values . perception ) > 0 ) { output [ 'enable_talent_tactical' ] = 1 ; } else { output [ 'enable_talent_tactical' ] = 0 ; } if ( int ( values . strength ) >= 3 && int ( values . fighting ) > 0 ) { output [ 'enable_talent_two_handed' ] = 1 ; } else { output [ 'enable_talent_two_handed' ] = 0 ; } if ( int ( values . communication ) > 0 && ( int ( values . focus_crafting ) > 0 || int ( values . focus_expression ) > 0 )) { output [ 'enable_talent_artistry' ] = 1 ; } else { output [ 'enable_talent_artistry' ] = 0 ; } if ( int ( values . communication ) > 0 && int ( values . constitution ) > 0 ) { output [ 'enable_talent_carousing' ] = 1 ; } else { output [ 'enable_talent_carousing' ] = 0 ; } if ( int ( values . communication ) > 0 ) { output [ 'enable_talent_contacts' ] = 1 ; output [ 'enable_talent_fringer' ] = 1 ; } else { output [ 'enable_talent_contacts' ] = 0 ; output [ 'enable_talent_fringer' ] = 0 ; } if ( int ( values . communication ) >= 2 ) { output [ 'enable_talent_command' ] = 1 ; output [ 'enable_talent_inspire' ] = 1 ; output [ 'enable_talent_intrigue' ] = 1 ; } else { output [ 'enable_talent_command' ] = 0 ; output [ 'enable_talent_inspire' ] = 0 ; output [ 'enable_talent_intrigue' ] = 0 ; } if ( int ( values . focus_driving ) > 0 || int ( values . focus_piloting ) > 0 ) { output [ 'enable_talent_pilot' ] = 1 ; } else { output [ 'enable_talent_pilot' ] = 0 ; } if ( int ( values . focus_persuasion ) > 0 ) { output [ 'enable_talent_oratory' ] = 1 ; } else { output [ 'enable_talent_oratory' ] = 0 ; } if ( int ( values . focus_security ) > 0 && int ( values . focus_technology ) > 0 ) { output [ 'enable_talent_hacking' ] = 1 ; } else { output [ 'enable_talent_hacking' ] = 0 ; } if ( int ( values . focus_rifles ) > 0 ) { output [ 'enable_talent_rifle' ] = 1 ; } else { output [ 'enable_talent_rifle' ] = 0 ; } if ( int ( values . focus_performing )) { output [ 'enable_talent_performance' ] = 1 ; } else { output [ 'enable_talent_performance' ] = 0 ; } // All specializations require level 4 or higher if ( int ( values . level ) >= 4 ) { if ( int ( values . intelligence ) >= 2 && int ( values . focus_research ) > 0 ) { output [ 'enable_spec_academic' ] = 1 ; } else { output [ 'enable_spec_academic' ] = 0 ; } if ( int ( values . dexterity ) >= 3 && int ( values . focus_piloting ) > 0 ) { output [ 'enable_spec_ace' ] = 1 ; } else { output [ 'enable_spec_ace' ] = 0 ; } if ( int ( values . perception ) >= 2 && int ( values . focus_empathy ) > 0 && int ( values . focus_deception ) > 0 ) { output [ 'enable_spec_agent' ] = 1 ; } else { output [ 'enable_spec_agent' ] = 0 ; } if ( int ( values . constitution ) >= 2 && int ( values . focus_self_discipline ) > 0 ) { output [ 'enable_spec_commando' ] = 1 ; } else { output [ 'enable_spec_commando' ] = 0 ; } if ( int ( values . communication ) >= 2 && int ( values . focus_persuasion ) > 0 ) { output [ 'enable_spec_executive' ] = 1 ; } else { output [ 'enable_spec_executive' ] = 0 ; } if ( int ( values . accuracy ) >= 2 && int ( values . dexterity ) >= 2 ) { output [ 'enable_spec_gunfighter' ] = 1 ; } else { output [ 'enable_spec_gunfighter' ] = 0 ; } if ( int ( values . intelligence ) >= 2 && int ( values . focus_technology ) > 0 ) { output [ 'enable_spec_hacker' ] = 1 ; } else { output [ 'enable_spec_hacker' ] = 0 ; } if ( int ( values . intelligence ) >= 2 && int ( values . perception ) >= 2 && ( int ( values . focus_empathy ) > 0 || int ( values . focus_hearing ) > 0 || int ( values . focus_intuition ) > 0 || int ( values . focus_searching ) > 0 || int ( values . focus_seeing ) > 0 || int ( values . focus_smelling ) > 0 || int ( values . focus_survival ) > 0 || int ( values . focus_tasting ) > 0 || int ( values . focus_touching ) > 0 || int ( values . focus_tracking ) > 0 )) { output [ 'enable_spec_investigator' ] = 1 ; } else { output [ 'enable_spec_investigator' ] = 0 ; } // Also needs a close combat talent, but that can be up to the GM so we won't codify it here if ( int ( values . fighting ) >= 2 ) { output [ 'enable_spec_martial_artist' ] = 1 ; } else { output [ 'enable_spec_martial_artist' ] = 0 ; } if ( int ( values . accuracy ) >= 3 && int ( values . focus_rifles ) > 0 ) { output [ 'enable_spec_sniper' ] = 1 ; } else { output [ 'enable_spec_sniper' ] = 0 ; } if ( int ( values . communication ) >= 2 && int ( values . perception ) >= 2 ) { output [ 'enable_spec_socialite' ] = 1 ; } else { output [ 'enable_spec_socialite' ] = 0 ; } if ( int ( values . communication ) >= 2 && int ( values . focus_performing ) > 0 ) { output [ 'enable_spec_star' ] = 1 ; } else { output [ 'enable_spec_star' ] = 0 ; } if ( int ( values . dexterity ) >= 2 && int ( values . focus_sleight_of_hand ) > 0 && int ( values . focus_stealth ) > 0 ) { output [ 'enable_spec_thief' ] = 1 ; } else { output [ 'enable_spec_thief' ] = 0 ; } } setAttrs ( output ); }); });