Hi Black.k.9, I'm guessing this is to adapt it for a custom sheet? Unfortunately I can't point to one section of code and say "here's the lines you need". The Starfinder Official sheet's calculations are extremely integrated with one another. The powerhouse of the integration though is the applyBuffs function which uses information stored in the attributeObjs or npcAttributeObjs objects to determine what gets added, subtracted, divided, multiplied, etc. Additionally the sheetworker uses several functions to figure out what buffs, penalties, and conditions to apply to the character. I don't know that I'd recommend pulling out code from the Starfinder (or by extension the Pathfinder playtest) sheet because everything is so integrated. What are you trying to accomplish in your sheet, and maybe we can figure out either how to adapt the Starfinder sheetworkers in toto, or how to write something more purpose built for you.