Jump to content

Ghostlines

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Ghostlines

  1. I take it this just isn't for cosmetics. If it is, there is an Invisible Psi Amps mod that should do the trick. Otherwise, that may be tricky. It IS possible to use other secondary weapons for psi abilities, and the mechanics can work fine, but the side effects can be surprising. I tried testing this with a pistol, cast Inspiration on an ally, and my operative shoots him in the head, giving him an additional action point. I think the animations are bound to the weapons, but I'm sure there are others here who have better knowledge of this.
  2. The use cases for this involve creating custom abilities, and attempting to create archetypes for those abilities by copying and modifying existing archetypes for similar abilities. The common pitfall is having the custom ability mechanics work perfectly (possibly including windup/chargeup animation), but missing the ability animation and projectile. Redscreens may also show, but not in all cases (possibly referencing inability to perform ff_fire, or that a unit didn't receive expected projectile hit). As for me, I'm at my wit's end, and none of my specific threads for help are being answered, so I thought I'd cry out for a tutorial, since anyone working with custom abilities will likely be encountering the same problems. There's too much that I and others do not know or fully grasp about how archetypes, animations, and custom abilities are associated, and how to adequately troubleshoot issues when they aren't working well together. While I've personally gotten some archetypes/animations to work with custom abilities (such as a custom stasis power, and a custom energy shield power), many of the other psi power animations/archetypes (Soulfire, Insanity, Fuse) refuse to animate for me. Seeking wisdom from the gurus here. Help us out?
  3. This is for a psi feedback ability, a reaction triggered after being fired at by a hostile psionic power. I have the reaction ability working, I can see the damage taking place, what's missing is the power animation. I originally wanted to use the Psi Fuse animation, but that one is more complicated in several ways, so I'm backing off to something which should be simpler. Unfortunately, this still isn't working for me, and I know there are modders here who are more experienced working with animations and archetypes who may know enough of what's going on under the hood to help out. Also, any pointers on how to better debug animation/archetype issues like this are more than appreciated. Here's the code for the reaction shot ability: // pulse attack after ego fortress is attacked by a psi power static function X2AbilityTemplate PsiFeedbackPulse() { local X2AbilityTemplate Template; local X2AbilityCost_ReserveActionPoints ReserveActionPointCost; local X2Condition_UnitProperty ShooterCondition; local X2AbilityTarget_Single SingleTarget; local X2AbilityTrigger_Event Trigger; local X2Effect_Knockback KnockbackEffect; local X2Condition_Visibility TargetVisibilityCondition; local array<name> SkipExclusions; local X2Effect_ApplyWeaponDamage WeaponDamageEffect; `CREATE_X2ABILITY_TEMPLATE(Template, 'PsiFeedbackPulse'); Template.bShowPostActivation = TRUE; Template.bDontDisplayInAbilitySummary = true; ReserveActionPointCost = new class'X2AbilityCost_ReserveActionPoints'; ReserveActionPointCost.iNumPoints = 1; ReserveActionPointCost.AllowedTypes.AddItem(default.PSI_FEEDBACK_ACTION_POINT); Template.AbilityCosts.AddItem(ReserveActionPointCost); Template.AbilityToHitCalc = default.DeadEye; // always hits Template.AbilityTargetConditions.AddItem(default.LivingHostileUnitDisallowMindControlProperty); TargetVisibilityCondition = new class'X2Condition_Visibility'; TargetVisibilityCondition.bRequireGameplayVisible = false; TargetVisibilityCondition.bRequireBasicVisibility = false; TargetVisibilityCondition.bDisablePeeksOnMovement = false; Template.AbilityTargetConditions.AddItem(TargetVisibilityCondition); Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty); ShooterCondition = new class'X2Condition_UnitProperty'; ShooterCondition.ExcludeConcealed = false; Template.AbilityShooterConditions.AddItem(ShooterCondition); SkipExclusions.AddItem(class'X2AbilityTemplateManager'.default.DisorientedName); Template.AddShooterEffectExclusions(SkipExclusions); SingleTarget = new class'X2AbilityTarget_Single'; SingleTarget.OnlyIncludeTargetsInsideWeaponRange = false; Template.AbilityTargetStyle = SingleTarget; //Trigger on movement - interrupt the move Trigger = new class'X2AbilityTrigger_Event'; Trigger.EventObserverClass = class'X2TacticalGameRuleset_MovementObserver'; Trigger.MethodName = 'InterruptGameState'; Template.AbilityTriggers.AddItem(Trigger); Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_NeverShow; Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.OVERWATCH_PRIORITY; Template.bDisplayInUITooltip = false; Template.bDisplayInUITacticalText = false; Template.DisplayTargetHitChance = false; // playing with these fields Template.bSkipFireAction = false; Template.bShowActivation = true; //Template.bSkipExitCoverWhenFiring = true; //Template.ActionFireClass = class'X2Action_Fire_IgniteFuse'; // from when I was trying to get fuse animation to work Template.CustomFireAnim = 'HL_Psi_MindControl'; Template.AbilitySourceName = 'eAbilitySource_Psionic'; Template.CinescriptCameraType = "Psionic_FireAtUnit"; Template.BuildNewGameStateFn = TypicalAbility_BuildGameState; Template.BuildVisualizationFn = TypicalAbility_BuildVisualization; WeaponDamageEffect = new class'X2Effect_ApplyWeaponDamage'; WeaponDamageEffect.bIgnoreBaseDamage = true; WeaponDamageEffect.DamageTag = 'Soulfire'; WeaponDamageEffect.bBypassShields = true; Template.AddTargetEffect(WeaponDamageEffect); KnockbackEffect = new class'X2Effect_Knockback'; KnockbackEffect.KnockbackDistance = 2; KnockbackEffect.bUseTargetLocation = true; Template.AddTargetEffect(KnockbackEffect); return Template; }In the XCom 2 Editor, I also copied over Perk_Psi_Insanity_Common and renamed it for my ability, setting the associated ability to PsiFeedbackPulse. I also noticed the perk specific weapon was WP_Sectoid_Mindspin", which seemed wrong and didn't work. I changed this to WP_Insanity, which seems like the right weapon to reference (and yes this asset does exist). When the reaction ability triggers, the unit correctly does the begin precast animation with the amplifier, but hangs when the insanity animation. Redscreen shows: Perk content for PsiFeedbackPulse: None did not receive expected projectile impact. Thanks in advance for any solutions or pointers!
  4. I'm working on a Wild Talent custom psionic class and would like some feedback on the proposed abilities. The concept for this class is a soldier unlocking and growing into their latent psionic talents. They won't get higher tier psi abilities (void rift, null lance, solace), but they will have interesting ability choices per tier, along with abilities forged in the crucible of combat. The lack of higher tier psi abilities also keeps psi operatives as viable choices, as this is not meant to be a replacement class, but a supplement. While this class will originally be in the forced deck and trainable from the GTS, I'm setting numInDeck to 2 to make them rarer. Later, I plan to release a separate mod for using RNG to test rookies for latent psionic abilities, which will be the primary means of training to this class, letting me remove it from the forced deck and GTS training. Rather than breaking up abilities by two themed ability trees, I'm going by a pairing theme, where the two ability choices each level are (mostly) similar in some respect or area: Wild Talent Squaddie: InsanityCorporal: Schism vs FuseSergeant: Sustain vs FortressLieutenant: Stasis vs Stasis ShieldingCaptain: Blurred Step vs Combat CelerityMajor: Eyebite vs MindfireColonel: Precognitive Counter vs Psi Feedback Stasis Shielding - Standalone Stasis Shield ability, and +4 shields for 2 turns after stasis wears off. Blurred Step - (Shadowstep) A combination of blanking out your image in your enemy's mind while moving, and using bluescreen nanofiber, you can move without attracting the enemy's attention and avoid reaction fire. Combat Celerity - (Implacable) Psionically enhances movement and reaction after a kill. Eyebite - Soulfire, with a 6 turn cooldown. If you kill an enemy with this, gain stealth. Mindfire - Soulfire + SoulSteal effect Precognitive Counter - Preemptively counterfire with your weapon each time you are directly attacked. PSI Feedback - Send a pulse of psionic energy back at enemies after each time you are attacked. Does guaranteed damage. Ineffective on robotics. I'm hoping to use the Fuse or Insanity shot effect here, hopefully without doing the cast animation with the psiamp. The custom abilities at Major and Colonel tiers are under the most scrutiny right now, especially the Colonel counter abilities. Single reaction per turn seemed a little low powered given they're at the highest tier. Also, without psi rift or null lance, I wanted something with a bit more meat. Soldiers with Precognitive Counter may run into ammo issues, and psi feedback will happen post-attack and only works on organics, so that helps balance these somewhat. Still, playtesting will be necessary here. Thanks in advance for feedback and suggestions!
  5. When making custom abilities that use custom animations (like psi abilities, or the shieldbearer shields) there are archetype files governing the animation and timing that can only be edited through the XCOM 2 Editor (see the Tools menu from Modbuddy). You'll need to find the archetype for the power you're copying, copy that into a new package for your mod, edit the archetype so that it's associated with YOUR custom ability (in your case, Instability), save the package, and ensure you add the package to your mod in Modbuddy (and declare the package in the right file, I'll find that and paste that here later). That all said...I have had problems myself with the fuse animation in particular that I haven't encountered in other situations (stasis and shieldbearer effect work fine). Your case might be easier though, since you're attempting to replicate the power completely.
  6. So, I'm working on a custom reaction ability, Psi Feedback. It's meant to trigger when the unit with the ability is directly attacked by a hostile psionic ability, and can happen once per turn. It's meant to do guaranteed psionic damage (using Soulfire damage right now), and I want it to use the psi_fuse perk archetype/animation Here's what I have working: * Triggering when attacked by a hostile psionic ability * Applying Soulfire psionic damage when triggered There are two pieces that just aren't working yet, and thus this call for help: 1. My copied psi_fuse perk (now associated with my Psi_Feedback_Pulse triggered ability) never shows. I can set the custom fire animation fine, they do the psionic windup with the amplifier, but the fuse animation never triggers. I've been able to get custom perks to show fine in the past (a custom energy shield effect), but there's something new in play here thwarting me that I don't understand. 2. Once I can get 1 working, I want to have the (copied Fuse) perk animation to happen without the windup cast animation. The idea of this power is that it isn't "fired" by the soldier, the feedback pulse just happens. I'd like to know what the approach is for separating the custom fuse animation from the psi amplifier firing animation. Too tired to post code right now, so I'll get to that tomorrow. In the meantime, hoping there are a few veterans here who have worked with the fuse perk, or happen to know how to divorce the ability animation from the firing animation.
  7. You may want to check the filesystem to see if the file/folders are present or not. ModBuddy may have just lost it project-wise, even if it's really in the filesystem. I think you can do a File > Open > File in Modbuddy to re-add files and folders back into Modbuddy.
  8. The thing that's happening here, I think is the following : 1) Your src files are stored in your project folder 2) The build script copies your src files to the XCOM 2 SDK / Development folder, where they have to be to be compiled by UDK. 3) The build errors end up pointing to the copies in said Development folder, so if you make changes to them, they are in the wrong place 4) When you hit build again, the src files in Development are deleted and overwritten with what is in the project That makes sense. I just wish the editor was intelligent enough to reconcile and jump to the line in the file in your current solution. I'm scratching my head thinking of any use they would have doing it the current way.
  9. There are some rather jaw-dropping bugs in the software. The duplicates thing sounds like a headache, glad I haven't encountered it yet. The thing that's driving me nuts is when you have a build error, and double-click a line to jump to it, any changes I make to that file are forgotten. It's like it opens up some parallel-dimension version of that file and then promptly forgets about it.
  10. In programming, a class is like a blueprint. It is the definition of a conceptual thing, including data associated with the class, functions that can be invoked on the class, and usually there are class hierarchies...a class can inherit/extend from another class, meaning it is the same as its parent class, but defines additional stuff (data and functions) that differentiates it. Everything in the XComGame/Classes folder is a class. You can see that the idea of a class is very important, and a core part of this language (and many others too). A class is different than an instance of a class (also known as an instance object, and you're working with an instance every time you see "new class'ClassName'" being used). This is similar to how a blueprint on how to build a house, what is included in a house, and what you can do with a house, is different than an actual house built in accordance with the blueprint. While a class declares data associated with it (vars and such), you don't set those on the class itself. Similar to how a house blueprint might say that the garage is designed to have room for two cars, but when adding the cars, you don't add them to the blueprint, that's nonsense, you drive them into the garage in the actual house (the instance). Another example. Car is a class. It defines itself by saying that a Car is a Vehicle (its parent class) has a number of doors, a number of wheels, an engine, windows, locks, a steering wheel, and so on. But you can't drive a Car class...because a class is a concept of a thing, not an actual thing. What you need is an instance of a Car. So you create a new Car to get your instance. You set the things that make it up, or their number (creating an Engine instance, Tire instances, Doors, etc and attaching them), and when all is constructed, you have a Car instance, a thing that can be entered, driven, parked, washed, bought, or sold (according to functions defined on a Car, and outside code that can do things with Car instances). When key classes, especially XCOM game classes that you do not own (like X2AbilityTemplate) are showing errors like what you encountered, that's a major red flag. For one, you shouldn't be modifying the XCOMGame classes directly. That's a recipe for all kinds of trouble. I'm not sure if this is an error that can come up when attempting to override a class (pretty sure this language has the ability to completely override and replace classes, not just extend them), but if you are doing any overriding like that (as opposed to extending), you may want to try undoing those changes and seeing if that fixes the error.
  11. Good suggestion. Screenlistener usage seems to be a great injection mechanism. Still working to understand how that works in full, but it looks to be a powerful item in the modder' toolkit.
  12. Reddit user Rumrunner711 answered my call for help on the reddit counterpart thread (https://www.reddit.com/r/xcom2mods/comments/46xpmb/firing_animations_not_playing_with_custom/). I thought it only fair to make sure the solution made it here too. Before they chimed in, I had no idea the XCom 2 Editor even existed, animations and anything graphical were just in a handwavy netherzone that I didn't need to know about. It is a clunky thing to use, though, and I've encountered my share of errors.
  13. Which mod are you referring to? Unless they've overridden UIChooseClass (which you'd probably have to do), they would be playing by the same rules as everyone else, where a positive numInForcedDeck is the only way for the class to be GTS trainable.
  14. Finally got an answer elsewhere. This is a fairly tricky thing. Many animations are bound to certain abilities or effects in Archetypes. You'll need to use the XCOM 2 Editor (launchable from the Tools menu in modbuddy) to do any kind of meaningful interaction with the resources here. There are a LOT of assets present. One thing that tripped me up is the packages section was completely squished and hidden from view. Had to resize several of the elements above it to see the content. You'll need to create a custom package (in the content folder of your solution) for any changes you want to make (this only gets created when you copy assets into a custom package (which may not exist yet). (Later, you'll need to add the package to your solution in one of the ini files) The search filter is your friend. You can specify the type as archetypes to narrow things down. When examining an archetype file, at the top will be dropdowns for associated ability and effect. Just choose the ones you want to associate with, and ensure you've saved, and you're likely good to go. Still having a rocky time getting the changes I want working. Basically creating a standalone stasis shield ability that also adds a purple shield (like the shieldbearer). Got it ALMOST working. The original stasis effect isn't appearing (it was working earlier), and although the purple shield is working when I target others, it doesn't appear when I cast it on myself. The search continues....
  15. Answered on your reddit thread, copying and pasting my answer here: Notice the Shredder effect is added as a target effect. Check out X2Effect_Shredder. Notice it extends X2Effect_ApplyWeaponDamage, so it does everything its super class does, plus whatever else is in the class. If you read the code for the only new function here, GetBonusEffectDamageValue(), you'll notice the bonus damage only gets applied when the soldier has the Shredder ability. So while it may seem a little weird, the intent was for the standard shot damage (which happens as expected, since the shredder effect IS an ApplyWeaponDamage effect) to automatically include shredder bonus damage, if the soldier had that ability. Secondary weapons aren't using this, so no secondary weapons can benefit from the shredder bonus damage.
  16. I've been playing around with custom abilities, and encountered something that has me stumped. I did a copy-and-paste of the Soulfire function, only renaming the name of the generated template (and yes I'm loading the template correctly, and the custom ability is associated with my custom class correctly). In the Tactics debugger, the mechanics for this custom Soulfire (WildSoulfire) work fine. The pre-cast with the amplifier works, damage is registered, the unit dies if it takes enough damage, all of that is fine. But the actual fire animation AFTER the pre-cast animation, the purple projectile launch and the purple explosion on hit, doesn't happen. The soldier's animation, palm out to fire the thing, is happening, but the projectile and explosion are gone. Likewise with a custom Stasis power (my attempt to have a standalone Stasis Shield with actual shielding like the ADVENT shieldbearer units). The mechanics work as expected, but the actual blue stasis effect animation doesn't happen. I'm seeking help from those with more experience in this area to explain what's going on here, if certain animations are coded somewhere to only work with certain explicit abilities (template names), and how to work around whatever is going on so these animations work as expected. Thanks in advance!
  17. I've been attempting the exact same thing here. The thing that you're missing right now is that the ability to activate from the effect (your renamed overwatch shot, and in the future your own custom shots or abilities) must be available to the soldier in question. It's not enough that the ability exists and is a part of the game. The ability must either be known by the soldier through ability training or similar, or available through items or weapons they have equipped. OverwatchShot, for example, is an ability added to pretty much all weapons in the game, so it's always available. So to make your CustomOverwatchShot work, you would need to add this ability to your soldier somehow, either by adding the ability to weapons or to your soldier. In my case, my custom ability was for a new custom soldier class. I was able to modify my XcomClassData ini to add my CustomOverwatchShot to the ability tree at Squaddie rank (I think you can add as many as you want here, and only the last one will appear as the main squaddie ability on the abilities screen). Give that a try and good luck.
×
×
  • Create New...