Amineri Posted May 22, 2013 Share Posted May 22, 2013 If anyone is interested, I happened across the spot where Sectoid MindMerge and GreaterMindMerge bonuses are applied. It is in XGAbilityTree.ApplyEffectsToTargets The relevant code is: case 29: if(Role == ROLE_Authority) { if((kTarget != none) && (kAbility.iType == 47) || kAbility.iType == 51) { kTarget.m_aInventoryStats[0] += XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1; kTarget.SetUnitHP(kTarget.GetUnitHP() + XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.1); } } break; The amount of max HP added is added to the m_aInventoryStats[0], and the healing effect (raising current HP) is the second line. The extraneous calls to the m_kGameCore can be removed to free up extra space to make dynamic calls to set the value, if needed. Link to comment Share on other sites More sharing options...
anUser Posted May 22, 2013 Share Posted May 22, 2013 Good!I've just got a crazy idea that may isn't that crazy in the end ... could it be done so that the extra given HP become permanent? I quite don't get what's that m_aInventoryStats[0], I assume it's some sort of temporal stuff, so if we increase the HP in this function we don't need to change the HP removed elsewhere, right? Could we attack unit stats instead? I'm wondering what'd be the gameplay effect, specially by the beginning and at impossible difficulty... take 'em fast or see 'em growing... Link to comment Share on other sites More sharing options...
Amineri Posted May 22, 2013 Author Share Posted May 22, 2013 The inventory stats are where the stats accumulated by inventory items (e.g. SCOPE, armor, Chitin Plating) are kept. This is how the game gets around adding extra HP to a unit and making it temporary (I think). I found it while tracing out some stuff relating to inventory stats (because the item inventory code works just a bit different in tactical than in strategy, which has been driving me nuts). Since the unit doesn't actually HAVE an inventory item that generates the increased HP, presumably somewhere (probably when the ability is ending) later the game recalculates the inventory stat boost to zero, which resets the alien's HP back to normal. So, hopefully you could increase the HP gain to 2 or 3 and not have to make another change to have it revert back to normal at the beginning of the next turn. Clearly the bonus to Crit is handled somewhere else ... I didn't see it there. You should be able to increase other stats as well. The entire inventory stat array (all 19 values) are added to the current stats, so increasing any of them should result in a temporary increase to that stat. I'm not sure why crit wasn't handled in this manner. If you have the generalized DR/Regen mod active, adding to m_aInventoryStat[4] would increase the unit's Damage Reduction, and adding to m_aInventoryStat[5] would grant the unit regen for 1 turn. Personally I think the Damage Reduction would be fitting and particularly brutal. Link to comment Share on other sites More sharing options...
anUser Posted May 22, 2013 Share Posted May 22, 2013 (edited) I'm sry I wasn't clear. I think the code I was looking for iskTarget.kChar.kCharacter.aStats[0] += 1;to make so HP isn't reverted when the effect ends. I like the idea of temporary boosts to DR and regen. Regeneration would act as a delayed extra HP, I think it could be very interesting as it forces the player to push a bit more and kill the aliens on that same turn or the next they'll have regained big health. And damage reduction clearly makes for an offensive move. I wonder if both regular and greater mind merge could be given to both regular and psi sectoids alike, and make them 2 different abilities, not just a better and a worse version of the same. If doable I vote for the one with bigger crit chance go with DR + small instant healing, and the other with huge regen at the end of turn. edit: I just assumed the regen mod would "regen" HP at the beginning of the turn, but I've got to admit I'm not aware of the latest version of that mod... Edited May 22, 2013 by anUser Link to comment Share on other sites More sharing options...
Amineri Posted May 22, 2013 Author Share Posted May 22, 2013 The regen mod simply calls: HealBy(aCurrentStats[5]) at the beginning of each unit's turn. Stat[5] is set via the ModifyStatsByDifficulty, which I modded to use the BalanceModsClassic entries to set (and upgrade) DR and Regen. Now that I think on it, I'm not sure whether the regen effect happens first or whether the end-of-mind-merge ends first. If Mind Merge ends and the regen stat is reset to default before the HealBy statement is called then there would be no regen effect. Link to comment Share on other sites More sharing options...
Recommended Posts