Jump to content

Quite a few problems with a new mod I'm making


dissentrix

Recommended Posts

Hey there, I'm completely new to XCOM 2 modding. The people at Reddit have been somewhat helpful, but not that much, so I thought I'd post my problems here.

I'm trying to make a mod that adds a "glowing eye" effect when soldiers are being mind-controlled (there are several issues here, so bear with me). I made a "glowing eye" effect that is contained in an archetype, in a .upk file. The glowing eye is, in fact, an upper face prop. So far, so good. I tried getting it into the game as a customization option, and it works, the eye pops up in "upper face props" and replaces the actual eyes.

 

The problems started when I attempted to mod the effects of Mindspin, the Sectoid ability that includes (among other things) mind-control. Granted, I'm a complete newbie at scripting (I've never programmed anything to save my life, and I don't know Unreal Script). So, for a long time, I was grasping at straws in the dark trying to figure out what the weird code and symbols meant.

 

Finally, through A LOT of trial-and-error, and double-checking other mods, as well as the appropriate classes, I came up with this :

 

 

class X2Effect_ApplyMindControl extends X2Effect_DeclareMindControl;


simulated protected function OnEffectAdded(const out EffectAppliedData ApplyEffectParameters, XComGameState_BaseObject kNewTargetState, XComGameState NewGameState, XComGameState_Effect NewEffectState)
{
local XComGameState_Unit MindControlledUnit;
local X2BodyPartTemplateManager MindControlManager;
local X2BodyPartTemplate MindControlEyes;
local TAppearance kAppearance;

super.OnEffectAdded(ApplyEffectParameters, kNewTargetState, NewGameState, NewEffectState);

MindControlledUnit = XComGameState_Unit(kNewTargetState)
MindControlManager = class'X2BodyPartTemplateManager'.static.GetBodyPartTemplateManager();
MindControlEyes = MindControlManager.FindUberTemplate("FacePropsUpper", 'BetterMC1');

MindControlledUnit.kAppearance.nmFacePropUpper = MindControlEyes.DataName;

continue;

}

 

Now, keep in mind, I'm still not sure what any of this means. I know about class declaration, and function overwriting, but that's about it. The idea here is for the MC eyes to be found by the Body Part Manager, and then applied to the mind-controlled unit. Problem is, it doesn't recognize the actual "applying" command.

 

But there's a second problem, that has pretty much stopped me right in my tracks. I've been using the default ModBuddy debugger up until about three days ago, when I read about an Unreal Debugger that can use breakpoints and everything. I painstakingly set it up (in order to actually understand how things work a bit better), but now, for some reason, the modded soldiers in my character pool (that use custom props) have started completely bugging out. Upon loading Tactical Quick Launch, I get lambasted by Redscreen errors saying something about "archetype needs to be fixed in DefaultContent.ini", and then only the soldiers' heads and rifles appear, without the armor, hair, or any other modded stuff. The Character Pool screen doesn't even work while debugging, and just crashes the game.

And, this was after I got an issue (which you can read about [url]https://www.reddit.com/r/xcom2mods/comments/6s98r4/noseekfreeloading_not_working_anymore[/url] here) where the Debugger wouldn't even launch.

I've tried reinstalling the game, deleting the XCOM2 folder in "My Games" and verifying integrity, unsubscribing from mods and only resubscribing after I've redownloaded the game. Disabling the mods does nothing, as the characters are from "Anarchy's Children" DLC (so, pretty much Firaxis Default).

My mod list is the following (keep in mind most of them actually do work together in the "normal" [aka non-debugging] game) :

Uniforms Manager (this one actually prevents the game from loading up, even in "normal" mode, so I've disabled it for now.)

Super Masks
Heroes Pack
Combined Piercings
Spart's ResistanceBashes
Overwatch - Mercy Voice Pack
Lady Mechanika Squadmate
Vindictus Female Hairstyles
Saber's Hairstyle
Section 9 Customization Pack #1
Add Part Names
ME3 Thessia Update
Samara Voice Pack
Aria T'Loak Voice Pack
Wear Armour on Avenger
More Clothes Options (and other stuffs)
Character Pool VIPs
Starcraft II Nova Squadmate
Starcraft2 Voice Mod Part 1
More Hair Colors
More Eye Colors
More Skin Colors
SW Alien Voice Pack
SW Alien Head Pack 01 : Twi'Leks
Overwatch Tracer Squadmate
Overwatch - Tracer Voice Pack
SW Alien Head Pack 02 : Zabrak
SW Alien Head Pack Extra : Base Heads
Liara T'Soni Voice Pack
ME3 Liara Squadmate
Miranda Lawson Voice Pack
ME3 Miranda Squadmate
Starcraft2 Voice Mod Part2
Starcraft II Kerrigan Squadmate
Hero Pool V2

 

 

So, after all that, I've got three questions (rated by priority) :

 

1) How would you go about changing assets after soldiers are mind-controlled ?

2) What the hell's causing the soldiers to be invisible in the Debugger/Tactical Quick Launch ?

3) If it IS a mod compatibility error, how could I solve it without uninstalling everything (if that's even possible at this point) ?

 

Literally any help would be greatly appreciated.

Edited by dissentrix
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...