davidlallen Posted March 26, 2016 Share Posted March 26, 2016 For playable advent, I am now working on improving chryssalids. It was easy to make burrowing and slashing work. For cocooning, I would like some help tracing out how this works for enemy cocoons. I am told it works in multiplayer as well. When my chryssalids kill enemy advent, or dropunit'd enemy civilians, the bodies immediately vanish. But no cocoon ever appears. I have started extending parts of X2Effect_ParthenogenicPoison.uc, but I am not able to follow what should happen. Can anybody help, perhaps by taking a look at my code? The modbuddy zip of my project is here: http://jendaveallen/com/Temp/PlayableAdvent0325.zip File PA_Characters.uc, function PA_Chrys is the character template. Ability PA_ChryssalidSlash is slightly modified from the base game, so that the unit cannot attack friendly units. I extended X2Effect_ParthenogenicPoison as PA_ParthenoEffect.uc, in order to add logging. There is a check for *human* pawn which I have removed. But, all my log statements are hit, and still no cocoon appears. When the mod is active, a proving ground project will be added for each alien type. I have setup the ini file in this build so all the aliens take zero time and resources to produce. If anybody can suggest how the sequence of events is supposed to happen to get the cocoon, and why it doesn't work for friendly chryssalids, I would greatly appreciate it. I also want the hatched chryssalids to be friendly, which *might* just work. For "extra credit :-) I am also stuck figuring out why the friendly chryssalid doesn't overwatch when in a burrow. If you watch carefully, enemy burrowed chryssalids get an overwatch type attack when your soldiers move past. Friendly chryssalids don't. They just sit there in the burrow and watch the enemy stroll casually by. (This is easiest to test by burrowing a chryssalid in front of another soldier, and then dropunit'ing a stunlancer a little further away. They will charge the visible soldier, and run right over top of the burrowed chryssalid. Link to comment Share on other sites More sharing options...
swinka6666 Posted March 26, 2016 Share Posted March 26, 2016 (edited) You must enter a post. Edited April 27, 2016 by swinka6666 Link to comment Share on other sites More sharing options...
swinka6666 Posted March 26, 2016 Share Posted March 26, 2016 (edited) You must enter a post. Edited April 27, 2016 by swinka6666 Link to comment Share on other sites More sharing options...
Lucubration Posted March 26, 2016 Share Posted March 26, 2016 (edited) The little bugger just burrowed into the lift and messed up the hydraulics! Regarding the borrowed attack part, I'd suggest the first thing to look at would be this condition on the Chryssalid's standard UnburrowedSawEnemyAbility: // Only triggers from player controlled units moving in range UnitPropertyCondition = new class'X2Condition_UnitProperty'; UnitPropertyCondition.IsPlayerControlled = false; Template.AbilityShooterConditions.AddItem(UnitPropertyCondition); ... // Only triggers from player controlled units moving in range UnitPropertyCondition = new class'X2Condition_UnitProperty'; UnitPropertyCondition.IsPlayerControlled = true; Template.AbilityMultiTargetConditions.AddItem(UnitPropertyCondition); I'd speculate that the Unburrow and the BurrowedAttack abilities have to run in tandem to get the Chryssalid to properly do its reaction fire-like ability against nearby units. If he never unburrows, he'll probably never attack. Edited March 26, 2016 by Lucubration Link to comment Share on other sites More sharing options...
swinka6666 Posted March 26, 2016 Share Posted March 26, 2016 (edited) You must enter a post. Edited April 27, 2016 by swinka6666 Link to comment Share on other sites More sharing options...
swinka6666 Posted March 26, 2016 Share Posted March 26, 2016 (edited) You must enter a post. Edited April 27, 2016 by swinka6666 Link to comment Share on other sites More sharing options...
davidlallen Posted March 26, 2016 Author Share Posted March 26, 2016 Thanks for all the investigations. I highly doubt that tactical quick launch will work for these characters. There is a lot of setup that happens in PA_ChrysTech.uc, which happens when the unit is created via proving ground. If you attempt to dropunit one, then nothing is setup properly. I apologize, I guess for breaking your unreal. I need to track down why the proving ground unit is not working, and I was not able to learn that from your posts yet. I appreciate the ongoing investigation. The reason that I copied ChryssalidSlash into PA_ChryssalidSlash has to do with targeting. When any unit is selected, there is a row of target icons above the button bar. When I simply used the base game function, then the target icons included friendly civilians, and also *itself*. I feel it is impolite for playable chryssalids to attack friendly civilians, so I changed ExcludeFriendlyToSource to be true. As far as I know this is the only difference, but I don't see how that can lead to problems of the unit vanishing. I will see what happens for me when I try again the basic ChryssalidSlash, and I will try the suggestions from lucubration for unburrow/overwatch. In the cases where your cocoon works, does the hatched chryssalid come up friendly or enemy? If we can make it friendly, that will be helpful. But then, we will need to test what happens on evac. In some other mods, adding friendly units causes a problem in certain missions where the game doesn't consider the tactical engagement "over" because some friendly units are still on the map. Link to comment Share on other sites More sharing options...
swinka6666 Posted March 26, 2016 Share Posted March 26, 2016 (edited) You must enter a post. Edited April 27, 2016 by swinka6666 Link to comment Share on other sites More sharing options...
davidlallen Posted March 26, 2016 Author Share Posted March 26, 2016 I confirm that I can "dropunit chryssalid 0" to make a friendly chryssalid; it can make cocoons; and the hatched chryssalids are friendly. I'll try stepping backwards on my playable chryssalid. But, with the dropunit one, if you look at the targeting icons, you see this (with no mod active): http://i.imgur.com/euImAoA.png The targets include a friendly civilian and *myself*. That is, tabbing till the rainbow img is selected jumps the target unit to the chryssalid itself, which is weird. This is the reason I changed the ExcludeFriendlySources value in my copy. Link to comment Share on other sites More sharing options...
swinka6666 Posted March 26, 2016 Share Posted March 26, 2016 (edited) You must enter a post. Edited April 27, 2016 by swinka6666 Link to comment Share on other sites More sharing options...
Recommended Posts