Hey! Listen! Toolboxing For A Cause 2.0 a /tg/Station13 Charity Tournament Will begin Saturday the 12th at 1pm PST / 4pm EST / 8pm GMT at the Event Hall. ^{(You've donated r-right?)}

for i in range(25,101,5): #i = the units tested, from 25 to 100 in steps of 5 avgProdList = [] #fills up with the test values for production changes, and potency changes go below avgPotList = [] for j in range(50): #run each one 50 times, idunno a = splash(i) avgProdList.append(a[0]) avgPotList.append(a[1]) if len(avgProdList) > 1 and len(avgPotList) > 1: #conditional to avoid div by 0, calculates the average of each, prints em avgProd = sum(avgProdList)/len(avgProdList) avgPot = sum(avgPotList)/len(avgPotList) print(i,"u: prod change = ",avgProd," | pot change = ",avgPot) else: pass

which in short just tests every 5u interval a bunch of times and prints the avg effect on production and potency, but what I found gets really weird around the 100u mark

import random import math #for floor, can't remember if you need it

def splash(salt): #calculates one addition of a given amount of saltpetre

rng = random.randrange(0,100) #we want rng < 100 to be a 100% chance, rng < 1 to be a 1% chance etc if rng < salt%100: rng = 1 else: rng = 0

prod_adj = (-math.floor(salt/100)-rng) #this is what was giving your weird result pot_adj = round(salt*0.5)

return (prod_adj, pot_adj)

for i in range(25,101,5): #i = the units tested, from 25 to 100 in steps of 5 avgProdList = [] #fills up with the test values for production changes, and potency changes go below avgPotList = [] for j in range(5000): #gotta get that SAMPLE SIZE a = splash(i) avgProdList.append(a[0]) avgPotList.append(a[1]) if len(avgProdList) > 1 and len(avgPotList) > 1: #conditional to avoid div by 0, calculates the average of each, prints em avgProd = sum(avgProdList)/len(avgProdList) avgPot = sum(avgPotList)/len(avgPotList) print(i,"u: prod change = ",avgProd," | pot change = ",avgPot) else: pass

by RobustAndRun » Tue Jan 29, 2019 1:34 pm
#472896

Alright update, tested it in game and found that 99u is indeed the best way to reduce production time, with 100u not doing anything outside of potency. Will make a new maffs function for this soon.

Update: I like the function y = round(-0.1 - 0.04x + 0.0005 x^2) (y = prod change, x = saltp amount.) Might add a prob into this for some RNG goodness.

This means that dumping gigantic amounts of saltpetre (above 50u at once, which is currently the ideal) will increase potency but have diminishing returns or even cause damage (90u+) to production speed. This partially mirrors the effect of potassium nitrate irl, as a plant with an excessive amount of potassium ions in its soil/internal chemistry will have difficulty absorbing other nutrients such as nitrogen and magnesium.