Enjoy the mod as it is by far does the best job at adding Not Created Equally to the game, and generally cuts down on how many mods I need running. I did however want to tweak some of the Not Created Equally settings to my own preferences and had some questions if you are available to answer them.
1) All the editing would be done in the XCcomLW_Toolbox.ini correct?
2) My understanding of this is that each line of .NUM_STAT_SWAPS=# is one dice being rolled, and the # is the highest number it can roll, so by default it rolls 5 dice with a maximum roll of 4.
3) Is the minimum role for a dice 1 or 0, and are we able to change the minimum roll of the dice?
4) For the +STAT_SWAPS lines, the weight=#.#f variable determines the likely hood of that stat swap being chosen, with lower being less likely and higher being more likely, correct?
5) Are there any limitations on what the #.#f can be? For example can it only scale in .5 increments, or can it generally be any number?
6) If I wanted to remove a stat, for example hacking, from being effected by Not Created Equally, would I simply add a ; to the beginning of any lines which have hacking in the stat up or stat down?
7) In the event I wanted to try and add other stats to this list (armor, crit, ect.) I would have to make a +STAT_SWAPS line for it, using whatever the games ini.files named that stat right? For example, if I was to add armor to the list of stats a character can get, but the games ini files instead referred to armor as eStat_absorbtion, then that's what I would use in the StatUp and StatDown lines correct?
8) In the even that the +STAT_SWAPS picked caused the final sum of a stat to exceed the min or max cap, would those be rerolled, or do they just have no effect?
9) If there is not +STAT_CAPS line for a stat, will the stat still work, but with no stop point on how high or low it can be?
Questions on tweaking the "Not Created Equally" for LW Toolbox
Re: Questions on tweaking the "Not Created Equally" for LW Toolbox
Glad you are enjoying it, I'll try and address your questions below.Toosdey wrote:Enjoy the mod as it is by far does the best job at adding Not Created Equally to the game, and generally cuts down on how many mods I need running. I did however want to tweak some of the Not Created Equally settings to my own preferences and had some questions if you are available to answer them.
Yes, sans the type "XCcom" .Toosdey wrote: 1) All the editing would be done in the XCcomLW_Toolbox.ini correct?
This is correct. The reason for the leading . before the NUM_STAT_SWAPS has to do with how Unreal does its config merging. The + is a "add new line if key and value don't match". Since I'm adding 5 identical lines, that doesn't work. The . is "add the new line even if key and value match".Toosdey wrote: 2) My understanding of this is that each line of .NUM_STAT_SWAPS=# is one dice being rolled, and the # is the highest number it can roll, so by default it rolls 5 dice with a maximum roll of 4.
The minimum is a 1, like a real-world die. The code is Total += 1 + `SYNC_RAND(StatRoll);Toosdey wrote: 3) Is the minimum role for a dice 1 or 0, and are we able to change the minimum roll of the dice?
So a 4 is drawn from {1, 2, 3, 4}
That is correct. The weight is the relative likelihood of the swap being selected. The weights for all valid swaps are summed, then a random float in the range from 0 to that sum is generated, and the bin it falls into is the swap selected.Toosdey wrote: 4) For the +STAT_SWAPS lines, the weight=#.#f variable determines the likely hood of that stat swap being chosen, with lower being less likely and higher being more likely, correct?
The weight is a float, so the only limitation is 32 bit floating point precision, which is about 7 significant decimal digits.Toosdey wrote: 5) Are there any limitations on what the #.#f can be? For example can it only scale in .5 increments, or can it generally be any number?
Yes, as the unreal documentation says, starting with a ; acts like a comment marker, although it isn't.Toosdey wrote: 6) If I wanted to remove a stat, for example hacking, from being effected by Not Created Equally, would I simply add a ; to the beginning of any lines which have hacking in the stat up or stat down?
Yes, you should use the game's internal enum for stats.Toosdey wrote: 7) In the event I wanted to try and add other stats to this list (armor, crit, ect.) I would have to make a +STAT_SWAPS line for it, using whatever the games ini.files named that stat right? For example, if I was to add armor to the list of stats a character can get, but the games ini files instead referred to armor as eStat_absorbtion, then that's what I would use in the StatUp and StatDown lines correct?
Code: Select all
enum ECharStatType
{
eStat_Invalid,
eStat_UtilityItems,
eStat_HP,
eStat_Offense,
eStat_Defense,
eStat_Mobility,
eStat_Will,
eStat_Hacking, // Used in calculating chance of success for hacking attempts.
eStat_SightRadius,
eStat_FlightFuel,
eStat_AlertLevel,
eStat_BackpackSize,
eStat_Dodge,
eStat_ArmorChance, // DEPRECATED - armor will always be used regardless of this value
eStat_ArmorMitigation,
eStat_ArmorPiercing,
eStat_PsiOffense,
eStat_HackDefense, // Units use this when defending against hacking attempts.
eStat_DetectionRadius, // The radius at which this unit will detect other concealed units. Overall Detection Range =
eStat_DetectionModifier, // The modifier this unit will apply to the range at which other units can detect this unit. Detector.DetectionRadius * (1.0 - Detectee.DetectionModifier)
eStat_CritChance,
eStat_Strength,
eStat_SeeMovement,
eStat_HearingRadius,
eStat_CombatSims,
eStat_FlankingCritChance,
eStat_ShieldHP,
eStat_Job,
eStat_FlankingAimBonus,
};
The min and max cap are checked at each iteration that a swap is being selected. If an swap is selected that exceeds the cap is selected, that swap is discarded and another one chosen until a valid one is found (or the max number of attempts is madeToosdey wrote: 8) In the even that the +STAT_SWAPS picked caused the final sum of a stat to exceed the min or max cap, would those be rerolled, or do they just have no effect?
And I allowed for a lot of iterations, so it should always find one of it's possible. Just prevents hanging in the case of nothing being valid at all :
Code: Select all
do {
Swap = SelectRandomStatSwap(TotalWeight);
} until (IsValidSwap(Swap, Unit) || (++iterations > 1000));
Correct. If no cap is defined, then there is no limit to how high or low it can go.Toosdey wrote: 9) If there is not +STAT_CAPS line for a stat, will the stat still work, but with no stop point on how high or low it can be?
------------------------------
As a couple of further notes ...
-- All swaps are intrinsically symmetric. So even though they are named StatUp and StatDown, it's 50/50 as to which is chosen to go up or down.
-- You can make "unbalanced" swaps by having a StatUp be some non-zero value, and StatDown by 0. This would result in some soldier just being better or worse than others. Since it's 50/50, though on average they would be the same.
Re: Questions on tweaking the "Not Created Equally" for LW Toolbox
Thanks a ton for the reply! The extras at then end and the depth of answers actually answered the extra questions i was coming to add. I really appreciate the effort you guys put in to explaining how to tweak the mods!