public void StartHelping(Faction faction, RoadConstructionSite site, Pawn negotiator) { // Test success or failure of the negotiator, plus amount of help obtained (based on negotiation value & roll) var negotiationValue = negotiator.GetStatValue(StatDefOf.NegotiationAbility); _ = helpRequestFailChance / negotiationValue; var roll = Rand.Value; var amountOfHelp = helpBaseAmount * (1 + (negotiationValue * roll * 5)); //Log.Message(String.Format("[RotR] - Negotiation for road construction help : negotiation value = {0:0.00} , fail chance = {1:P} , roll = {2:0.00} , help = {3:0.00}", negotiationValue , failChance, roll , amountOfHelp)); // Calculate how long the faction needs to start helping var closestSettlement = site.ClosestSettlementOfFaction(faction); var tick = Find.TickManager.TicksGame + closestSettlement.distance; // Determine amount of help per tick var amountPerTick = Math.Max(Rand.Gaussian(helpPerTickMedian, helpPerTickVariance), helpPerTickMin); SetCurrentlyHelping(faction); site.InitiateFactionHelp(faction, tick, amountOfHelp, amountPerTick); }