Jump to content

remove 6th soldier automatically psionic


Emilin

Recommended Posts

it seems kinda cheap to me. so i wanna get rid of it and play the game without it.

 

i found this info about the psionic chance

 

 

Here you go.

function bool RollForGift(XGStrategySoldier kSoldier)
{
local int iChance, iTraineeWill, iGiftedSix, iSoldier, iTraineeRank;

local array<XGStrategySoldier> arrCandidates;

arrCandidates = BARRACKS().m_arrSoldiers;
arrCandidates.Sort(SortPsiCandidates);
iSoldier = 0;
while if(iSoldier < Min(6, arrCandidates.Length))
{
if(arrCandidates[iSoldier].HasPsiGift())
{
++ iGiftedSix;
}
++ iSoldier;
}
iSoldier = 0;
while if(iSoldier < m_arrTraining.Length)
{
if(m_arrTraining[iSoldier].bPsiGift && arrCandidates.Find(m_arrTraining[iSoldier].kSoldier) != -1 && arrCandidates.Find(m_arrTraining[iSoldier].kSoldier) < 6)
{
++ iGiftedSix;
}
++ iSoldier;
}
iTraineeWill = kSoldier.m_kChar.aStats[7];
if(IsOptionEnabled(11))
{
iChance = int(float(iTraineeWill) / class'XGTacticalGameCore'.default.SW_RARE_PSI);
iChance /= float(1 + BARRACKS().GetNumPsiSoldiers());
}
else
{
iChance = int(float(iTraineeWill) / class'XGTacticalGameCore'.default.PSI_GIFT_CHANCE); // basic formula
iTraineeRank = arrCandidates.Find(kSoldier);
if(iTraineeRank >= 0 && iTraineeRank < 6)
{
iChance += Max(0, 75 - iTraineeRank * 20 - iGiftedSix * 40);
}
}
return Roll(iChance);
}Roll is true if random number from 100 is less than iChance:
function bool Roll(int iChance)
{
return Rand(100) < iChance;
}Looking at the math, the best odds fot getting PSI gift has Major and Colonel, because only basic formula applies to them. Other ranks count with 75 - iTraineeRank * 20 - iGiftedSix * 40.

Good news is you can set PSI_GIFT_CHANCE in DefaultGameCore.ini http://forums.nexusmods.com/public/style_emoticons/dark/smile.gif Soldier's will is divided by default value of 4 nerfing the chance. Setting it to 1 improves the situation. It can be set to 0.01f for 100% chance. Tested with 12 soldiers and all got the gift.

Use Modpatcher, but copy your up to date DefaultGameCore.ini to DefaultGameCore.mod and set PSI_GIFT_CHANCE=0.01f

 

i found a setting in one of the ini files called "PSI_TEST_LIMIT=5" that no one seems to know what does, it SEEMS like it'd be the failsafe. if i set that to 255, would that stop me from getting auto-psioniced?

Link to comment
Share on other sites

You do realize if is generally felt that you can't win the vanilla game without at least one psionic soldier?

 

But to answer your question: no one has ever suggested trying that on the forum. So you can cover new ground. However, I suspect "PSI_TEST_LIMIT=" refers to the number of soldiers you can qualify for a bonus as "psionic". (See UFOpedia entry on PSILabs.) As PSI_GIFT_CHANCE is in the DGC.INI and used as a divisor, increasing that is more likely to give the soldier effectively a zero chance.

 

-Dubious-

Link to comment
Share on other sites

You do realize if is generally felt that you can't win the vanilla game without at least one psionic soldier?

 

But to answer your question: no one has ever suggested trying that on the forum. So you can cover new ground. However, I suspect "PSI_TEST_LIMIT=" refers to the number of soldiers you can qualify for a bonus as "psionic". (See UFOpedia entry on PSILabs.) As PSI_GIFT_CHANCE is in the DGC.INI and used as a divisor, increasing that is more likely to give the soldier effectively a zero chance.

 

-Dubious-

That is what i meant to change. I don't want to change the chance for a soldier to be psionic, i want to make it so that the 6th soldier is NOT automatically psionic.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...