Krazyguy75 Posted September 18, 2013 Share Posted September 18, 2013 (edited) I have a couple questions about the stats: Is negative damage treated as healing or as Does damage have an effect on the AI? (EX, if an enemy does 0 damage, will it still shoot?) Does Aim have an effect on any psionics (I think psi lance is affected, correct me if I'm wrong, but other than that..?) Y/N: Aim affects AI chance to take a shot? Y/N: Does eCP_Poisonous affect ranged weapons? Also, does damage effect drone repair? Edited September 18, 2013 by Krazyguy75 Link to comment Share on other sites More sharing options...
Amineri Posted September 18, 2013 Share Posted September 18, 2013 I don't think negative damage would act as healing. The function that rolls up damage in XGTacticalGameCore puts a lower bound of 1 damage per attack. Without this the pistol with its base 1 damage +/- 1 would sometimes deal 0 damage. Most Psionics only use the Will stat of both the attacker/defender in an opposed roll instead of aim. Not sure about psi lance off the top of my head. Aim definitely affects AI chance to take a shot. The Shot gets a priority based on the chance to hit. The AI randomizes weighted by priority to determine which action to take. Not sure if eCP_Poisonous affects ranged weapons, but probably not. CP means character property. Thin Men have it but the LPR shots don't deal poison damage. Drone repair, like healing of soldiers, is done via a separate set of code from damage (it's not just negative damage). The easiest function to use if adding any sort of healing is the XGUnit.HealBy function, which should work on any unit type. It only works for positive parameter values. Link to comment Share on other sites More sharing options...
Krazyguy75 Posted September 18, 2013 Author Share Posted September 18, 2013 Thank you for your answers and in return, let me explain something: For the drone part, I just wanted to see if I could increase the healing a drone does per shot. Would there be an easy way to make it based off damage (EX damage -2)? Also, what does eCP_poisonous do for thin men? It can't be plague or death explosions, cause chryssalids don't have those and they share the property? Link to comment Share on other sites More sharing options...
Amineri Posted September 19, 2013 Share Posted September 19, 2013 Unfortunately the value you want is defined as a constant in XGTacticalGameCoreNativeBase : const DRONE_REPAIR_HP = 3; Constants are replaced at compile/link time, so you actually have to find all the places that the number is used and replace it there. In this case I think this value is set in native code, so we're pretty much out of luck. --------- As to the poison ... the only Character Property I see relating to poison is: eCP_PoisonImmunity This is what makes them immune to poison (i.e. if they run through a poison cloud they don't get poisoned, unlike the other aliens). I think originally that Firaxis was considering giving poison abilities/weapons to XCOM, but they ended up removing it. In case you want to know, the eCP_PoisonImmunity (amongst other things, such as having a medikit or titan armor) is checked in XGUnit : simulated function bool IsImmuneToPoison() Link to comment Share on other sites More sharing options...
Krazyguy75 Posted September 19, 2013 Author Share Posted September 19, 2013 (edited) Are you saying you don't see eCP_Poisonous, or that it isn't used in the code? EDIT: Also, what does eCP_DeathExplosion do. Edited September 19, 2013 by Krazyguy75 Link to comment Share on other sites More sharing options...
Amineri Posted September 19, 2013 Share Posted September 19, 2013 I'm sorry, I'm totally not sure what I was thinking ~_~. The way I search for uses of character properties is to do a search of CharacterHasProperty in XComGame.upk. The character property eCP_Poisonous shows up here: function bool IsPoisonous(class<DamageType> DamageType) { if(XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.CharacterHasProperty(GetCharacter().m_kChar.iType, 11)) { if(DamageType == class'XComDamageType_Melee') { return true; } } return false; } Basically it looks like only melee units (or units dealing melee damage, which is currently the same thing in XCOM) can deal poison damage. Is basically used in XGUnit.OnTakeDamage : if((kDamageDealer != none) && kDamageDealer.IsPoisonous(DamageType)) { RollForPoison(kDamageDealer); } Melee poison appears to be hardcoded to a 50% chance to take effect : function RollForPoison(XGUnit kDamageDealer) { local float fRandVal; fRandVal = class'XComEngine'.static.SyncFRand((string(Name) @ string(GetStateName())) @ string(GetFuncName())); if(fRandVal < 0.50) { SetPoisoned(false); } --------------- DeathExplosion ... well... does as advertised... unit's explode like a grenade on death. function DeathExplosion() { local XGUnit kUnit; kUnit = XGUnit(GetGameUnit()); if((kUnit.GetCharacter().m_kChar.iType == 17) || XComGameReplicationInfo(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kGameCore.CharacterHasProperty(kUnit.GetCharacter().m_kChar.iType, 12)) { XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kGlamMgr.OnHighFocus(kUnit.Location); XComTacticalGRI(class'Engine'.static.GetCurrentWorldInfo().GRI).m_kBattle.m_kGlamMgr.TrySpecificGlamCamAtLocation(14, true); m_bDeathExploded = true; Explode(kUnit); } //return; } This is in XComAlienPawn. The Explode function creates a new explosion projectile. It sets damage and radius based on character type. The current list seems to be : Drones, Cyberdiscs, Ethereals and Sectopods. Link to comment Share on other sites More sharing options...
Krazyguy75 Posted September 20, 2013 Author Share Posted September 20, 2013 Do you happen to know what causes the Thin Man Poison explosion? Link to comment Share on other sites More sharing options...
Amineri Posted September 20, 2013 Share Posted September 20, 2013 Do you happen to know what causes the Thin Man Poison explosion? I think technically the Thin Man doesn't explode, he creates a volume effect, in the same way that smoke grenades do (just the effects are different). But I'm not sure where that's coded up, unfortunately. Link to comment Share on other sites More sharing options...
Recommended Posts