Skip to content

rio-codes/tfo-utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

tfo-utilities

Utilities for The Final Outpost

This will be a collection of utilities for the web game The Final Outpost, related to genetics and breeding. Currently I have only created a Punnett Square calculator function to determine the possible outcome of breeding hybrids that can be imported into Google Sheets.

Punnett Square Calculator

To Import into Google Apps Script

From within your Google Sheet, click the "Extensions" menu, then "Apps Script". Create a new project and call it "TFO Punnett Square Calculator". Then replace the text of Code.gs with the contents of the punnett_calculator.gs file in this repository by selecting all the code and copy-pasting it into Google Apps Script. Click "Deploy", then "New Deployment". Click the gear next to "Select Type" and select "Library". Give it a description, such as "TFO Punnett Square Calculator" and click "Deploy".

To Use in a Google Sheet

Inside a cell that you wish to contain the probability of a research goal, type =PUNNETT(, then select the cells with the genotype of each parent for your desired trait (for example "AabbCC" and "aaBbCc") followed by a cell containing your goal genotype. Separate the selected cells with commas and finish with a ). It should look something like =PUNNETT(K3,K5,K2) in the formula bar at the top. It will work with monohybrid, dihybrid, and trihybrid crosses and returns a probability as a decimal that the last value, your goal genotype, will be inherited. To format the cell as a percentage, select it and then click the "Format" menu, and select "Number" -> "Percent".

UPDATE: Please obtain the newest version of the code, it makes use of JsDoc and provides autocomplete when you start typing the function name with documentation like so:

image image

Example Usage

In my spreadsheet, I have a separate sheet for each breeding goal, with two important tables. One is the table listing each creature with all of their traits and my research goal at the top. Here is a screenshot from my Nokta Voko log: image

The second important table is the breeding predictions table. It has a row for each potential breeding pair and the results of a Punnett Square calculation for each trait. This is where you would use my PUNNETT utility function. Here is an example of my Nokta breeding table: image

You may choose to add a column that averages all the percentages to give you a general idea which pairs to breed to reach your goal, using the AVERAGE function. I don't have this column for my Noktas yet because none of my pairings are very viable for reaching my goal.

If you have feedback or questions you can contact me at rio.savvii@gmail.com.

About

Utilities for The Final Outpost

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published