Talk:Experience

From UFOpaedia
Revision as of 15:41, 14 March 2011 by Volutar (talk | contribs) (some function fixes)
Jump to navigation Jump to search

Just some thoughts I want to jot down before I forget them, based off a discussion I read on one of the forums:

  • Kills. Just to be clear, it needs to be emphasised that kills do not count towards stat increases. Was this mentioned or has it been mentioned elsewhere?
  • Similarly, kill attribution. When do you get the kill counter incremented. Grenades (thrown and unthrown), volatile battlescape element (i.e. gas tank), secondary explosion from cyberdisc, or volatile battlescape element set off by cyberdisc explosion. Probably by reactions and active attacks too. Don't remember if we ever quantified all the methods that'll increment the kill counter.

- NKF

Tested the secondary explosion from oil drums, found within my X-COM base hanger. Waited til that last snakeman soldier roamed around weaponlessly, and then smacked the barrel infront of him him. Boom, and Tatsuo Iwahara graduates to a squaddie after this base defense with 1 kills in 3 missions, via a unarmed snakeman using a barrel for cover. Can someone confirm my test?
Hmm, but is only just off one barrel exploding. I don't know if things change, if you say, line up barrels across the screen and fry the poor sectoid at the other end. --Vagabond 01:53, 15 March 2007 (PDT)
I'm not positive, but I think the rule is "whoever takes the action gets the kill", i.e., the last soldier to take any sort of action which results in an enemy death gets credited. I infer this from how Proximity Grenades work: credit for the kill goes to whoever sets off the grenade. I suspect this'll be borne out for "chain reaction" kills and the like. Alien-on-alien kills probably don't apply (Cyberdisc explosions probably do), and grenade kills are already known to go to the last soldier who threw it.--Ethereal Cereal 02:54, 15 March 2007 (PDT)


Might also want to double check that the guy credited with the kill is not the first soldier in the list just to make sure it's not like dropping a grenade. --Pi Masta 14:42, 15 March 2007 (PDT)

Hi folks, I've been off playing other games a long time (even caused a new wiki to be made for a game, plus of course contributed to many), but still love X-COM - and the many great folks on this wiki.

NKF, the fact that kills don't matter to Experience per se has been long cited at Firing_Accuracy#Improvement. The Experience page says to see each skill page, to see exactly how to trigger it. Apologies if you asked before I revised the pages - correlating History timestamps takes time. And also, apologies if it's now well understood. But if you or others would like to repeat it on Experience or elsewhere to hammer the point home, please do.

I, for one, don't remember too much being posted about attribution of secondary kills. It sounds like something to be explored. The exact same could be said for the Kill counter. I can't recall anything at all being said about any nuances of it. But then my memory is famously retarded. One interesting thing is that both UNITREF.DAT and SOLDIER.DAT have a two-byte field for it, so the programmers really pulled out the stops - they thought players might deliberately / well have a favorite soldier get hundreds of kills (>255).

Ethereal, don't forget the Prox Mine is an exception to the rule for every other weapon. In a sense, if you die from it, you get experience from dying, laugh. FWIW it was a real surprise, discovering how it worked. I wonder if the programmers screwed it up.

- MikeTheRed 20:57, 5 October 2007 (PDT)

I can confirm the programmers did screw up. The proxmines are treated as a special case, and contrary to grenades, the programmers forgot to set the current unit (i.e. the one that gets the credits) before generating the explosion. The fix I made in my patcher just sets the current unit (quantity2 field from obpos) and voila. Seb76 12:45, 7 August 2008 (PDT)

P.S. The details that some of us wikians are getting into these days, can sometimes can really benefit from savegame postings where the first person took the time and care to set everything up, and then test it. Please folks, don't hesitate to post zipped savegames you used for testing!


NKF, am I missing something, or where did Brunpal's comments finally wind up? I can't seem to find them not removed on any of the three pages. I am posting this here so he'll see it if he's tracking pages he posted to.

Brunpal, I made a start on your good question as the third part of Talk:Incendiary. I would have emailed you, but you aren't allowing email.

Good Xcomming, and thanks for your good question. As NKF said, no need to post in multiple places. It can be helpful to have a contact listed. :) - MikeTheRed 20:08, 1 August 2008 (PDT)

Brunpal's comments remain on Talk:Experience Training, MRT. Arrow Quivershaft 20:35, 1 August 2008 (PDT)
The discussion ended up on Talk:Experience_Training#Fire_and_Gaining_Experience. That page is the only spot my questions remain. Ya sorry about the multiple posts. All the pages had 8+ months since an update. I expected it would be months before someone would stumble onto one of the pages for a reply.--Brunpal 20:41, 1 August 2008 (PDT)



I dont see it mentioned but the cap for TU's was different in UFO 1.0. According to the 1.2 readme that patch set the 80 limit. --BladeFireLight 21:49, 13 January 2010 (EST)

It didn't have any caps as far as I remember. That's why a lot of players who were on 1.0 had soldiers crippled when their stats went past 255 and wrapped back around thanks to the high bits vanishing into the ether. -NKF 04:32, 14 January 2010 (EST)



This how stats improvements updated after mission end:

 function randmod(int a)
 {
   return Rand() % (a+1);
 }
 function StatImprove4(int exp_score)
 {
   if (exp_score<3) return 1;
   if (exp_score<6) return 2;
   if (exp_score<10) return 3;
   return 4;
 }
 function StatImproveRND(int exp_score)
 {
   int v=StatImprove4(exp_score);
   return v/2 + randmod(v);
 }

main calculations done after battle:

 if (UnitRef->PsiSkill_experience>0 ||
     UnitRef->Bravery_experience>0 ||
     UnitRef->FireAccuracy_experience>0 ||
     UnitRef->MeleeAccuracy_experience>0 ||
     UnitRef->Reactions_experience>0)
 {
   if (!Soldier->Rank) Soldier->Rank = 1;
   int v;
   v = 80 - Soldier->BaseTUs - Soldier->ImproveTUs;
   if (v > 0) Soldier->ImproveTUs += randmod(v/10 + 2);
   v = 60 - Soldier->BaseHPs - Soldier->ImproveHPs;
   if (v > 0) Soldier->ImproveHPs += randmod(v/10 + 2);
   v = 70 - Soldier->BaseStrength - Soldier->ImproveStrength;
   if (v > 0) Soldier->ImproveStrength += randmod(v/10 + 2);
   v = 100 - Soldier->BaseEnergy - Soldier->ImproveEnergy;
   if (v > 0) Soldier->ImproveEnergy += randmod(v/10 + 2);
 } 
 if ( Soldier->ImproveReactions + Soldier->BaseReactions < 100 )
   Soldier->ImproveReactions += StatImproveRND(UnitRef->Reactions_experience);
 if ( Soldier->ImproveFireAccuracy + Soldier->BaseFireAccuracy < 120 )
   Soldier->ImproveFireAccuracy += StatImproveRND(UnitRef->FireAccuracy_experience);
 if ( Soldier->ImproveMeleeAccuracy + Soldier->BaseMeleeAccuracy < 120 )
   Soldier->ImproveMeleeAccuracy += StatImproveRND(UnitRef->MeleeAccuracy_experience);
 if ( Soldier->ImproveThrowAccuracy + Soldier->BaseThrowAccuracy < 120 )
   Soldier->ImproveThrowAccuracy += StatImproveRND(UnitRef->ThrowAccuracy_experience);
 if ( Soldier->ImprovePsiSkill + Soldier->BasePsiSkill < 100 )
   Soldier->ImprovePsiSkill += StatImproveRND(UnitRef->PsiSkill_experience);
 if ( Soldier->BaseBravery - Soldier->ImproveBravery > 1 )
   if ( UnitRef->Bravery_experience>randmod(10) ) ++Soldier->ImproveBravery;
 if ( UnitRef->CurHPs < UnitRef->BaseHPs ) //wounded
 {
   int v = UnitRef->BaseHPs - UnitRef->CurHPs;
   Soldier->Wound_Recovery_Days = v / 2 + randmod(v);
 }

--Volutar 11:17, 13 March 2011 (EDT)

Each solder being in psi-training received some skill progress each month. The formula is:

 if (Soldier->InPsiLab)
 {
   if (Soldier->PsiSkill > 50)
     Soldier->PsiSkill_Monthly_Improve = randmod(2) + 1;
   else if (Soldier->PsiSkill > 16)
     Soldier->PsiSkill_Monthly_Improve = randmod(7) + 5;
   else
     Soldier->PsiSkill_Monthly_Improve = randmod(8) + 16;
   Soldier->PsiSkill += Soldier->PsiSkill_MonthImprove;
 }
 else
   Soldier->PsiSkill_Monthly_Improve = 0;

As we clearly see there is no cap for montly PsiSkill improvement. After reaching level of 100 (with missions or montly) this skill will continue to grow 1..3 each month. And it doesn't matter if soldier started training at month start or 1 minute before month end :).

--Volutar 11:23, 14 March 2011 (EDT)