1. Better compress the zounds of variables at the start into dictionaries. They are cool.
Code:
Dictionary<string, int> factionRelations = new Dict... {{"Sarleon", 0}, {"Empire", 0}...};
Dict... attributes = new Dict... {{"STR", 6}, {"AGI", 5}...};
Dict... skills = ...;
It will free up some space and, more importantly,
2. Allow for/foreach looping in reset function(and anywhere you would need it).
Without dicts:
Code:
powerStrike = 0;
powerDraw = 0;
ironflesh = 0;...for 20+ lines
With dicts:
Code:
foreach (var keyValuePair in skills) {
keyValuePair.Value = 0;
}
And then set only ones that aren't zeroed from the start.
3. Finish fixing Reason4Adventure. Some of the effects are adulthood-choice-independent, so you moved them in a separate method, which is good. Now call it once (before or after the dependent stat boosts), not inside every "if".
So you end up having like 5 calls to the method in the code where only one will suffice.
4. Currently, methods change stats together with updating the GUI. This calls for separation, in my opinion. Since stats are only updated on pushing the button, just create another method which just updates all values to the GUI, called on button click. It could be like:
Code:
public void onClick(...) {
ProcessGenderBox();
ProcessFatherBox();
...
ProcessReason4AdventureBox();
UpdateValues();
}
Why do that? Firstly, it cleans up the methods which are actually changing stats, they are no longer clogged with StatValue.Text = StatInt.ToString(). Secondly, if two boxes changed the same stat, you will update it once, not twice(not that it hurts performance much, I'm being too nitpicky there
). Thirdly, it looks better. Finally, it is easier to de-bug.