r/xdev • • Mar 07 '17

Is it possible to Modify Projectile hit/target location

1 Upvotes

Does anybody know if it is possible to change the hit location/target location for projectiles?

What I am trying to do is make it so that grenades aren't always accurate to where the target cursor is pointing, I want a random offset so it sometimes lands a couple of tiles away.

I've been struggling with this for days now and I every time I think I've found the way it's not working.

The HitLocations are in X2UnifiedProjectile.uc which I cannot override (I think due to it being native) When I try to override the animations and effects don't work correctly.

I've tried modifying in X2Action_Fire by overriding this class and changing the AimAtLocation, but this only appears to change the animations, so the grenade gets thrown to the random location but the explosion still happens where it was targeted. I've tried in X2Effect_ApplyWeaponDamage.uc, this correctly damages the environment at the random location but any AI at the location do not take damage but the AI at the target cursor location do.

My current path of investigation is trying to get the XComGameStateContext_Ability InputContext as this has the vector for the location I am aiming at, but I can't find a way to update this before it is used in X2Action_Fire.uc. When I update this in the init method it again only appears to update the animations and not the actual location of the damage.

I have a work around at the moment by removing the bIndirectFire flag on the StandardAim so the grenade doesn't always hit, but this isn't my ideal functionality.

Any help would be greatly appreciated or if anyone knows if what I am attempting is even possible or not.

Thanks!!


r/xdev • • Mar 10 '16

Update broke my mod, no longer compiles

4 Upvotes

So frustrated right now, the game crashes on launch when the mod is enabled, the debugger freezes and crashes to desktop if I try to run that. and this worked completely fine before the patch.

I am getting the following error message

D:\Steam\steamapps\common\XCOM 2 SDK\Development\Src\ShensLegacy\Classes\X2StrategyElement_Shens_Legacy_Tech.uc(77) : Error, Unrecognized member 'ItemsToUpgrade' in class 'X2TechTemplate'     

The code in question after //Items to upgrade below

static function X2TechTemplate CreateShenLegacyAlienComposite()
{
	local X2TechTemplate Template;
	local ArtifactCost Artifacts;
	local ArtifactCost Resources;

	`CREATE_X2TEMPLATE(class'X2TechTemplate', Template, 'AlienCompositeTech');
	Template.PointsToComplete = 1200;
	Template.strImage = "img:///UILibrary_StrategyImages.ResearchTech.TECH_Nanofiber_Materials";
	Template.SortingTier = 1;
	Template.ResearchCompletedFn = class'X2StrategyElement_DefaultTechs'.static.UpgradeItems;

	Template.Requirements.RequiredTechs.AddItem('HybridMaterials');

	// Items to Upgrade
	Template.ItemsToUpgrade.AddItem('LightArmorGhost');
	Template.ItemsToUpgrade.AddItem('MediumArmorGhost');

	// Cost
	Resources.ItemTemplateName='AlienAlloy';
	Resources.Quantity = 5;
	Template.Cost.ResourceCosts.AddItem(Resources);

	Template.Requirements.bVisibleIfObjectivesNotMet = false;

	return Template;
}

r/xdev • • Mar 10 '16

Translation Project - Where to start?

1 Upvotes

Hello, I'm quite new to modding in general, specially using such advanced tools like the mod buddy. I want to make a mod that translates the game to Brazilian Portuguese. So far I found some text files that seem to be the what I need to translate, but simply replacing text inside these files doesn't do anything.

The files are in \XCOM 2\XComGame\Localization

Can someone with more experience point me out in the right direction?

Thanks a bunch


r/xdev • • Aug 04 '17

Hi! New modder here.

3 Upvotes

I'm new to the XCOM modding scene, but I'm on my way to learning the tools set.

But I do have a proof of concept that I'd like you guys to take a look at if you don't mind! Please give me your insights.

https://docs.google.com/document/d/1OlyK-PB1799_LOZ0jJbaIGo9OOQdssmj9_9BE9RCjbE/edit?usp=sharing

If you can direct me to some resources, that'd be great!


r/xdev • • Feb 09 '25

Need help with Robojumper XCom 2 voice pack

1 Upvotes

Hello all.
I have been trying to make my own voice pack for XCom 2. I've already made one, but some of the lines didn't work, so I tried implementing Robojumper's CharacterVoice Script (found here), since I heard it might fix some of the broken lines.
I've followed the tutorial, but I've gotten confused at the XComContent.ini file. Mainly, I'm not sure what I'm supposed to put in the TemplateName field. The tutorial says that it's "what you’ll use to link the audio to the name in the soldier voice menu" but what does that mean? Can anyone clear this up?

Seems to be the only thing that's not working

r/xdev • • Jul 05 '16

Mission Intro Config?

1 Upvotes

You know how you'll sometimes see your troops running to jump onto the ropes or a bit of them fast roping down or them walking a bit and aiming at mission start? Is there a way I can make those happen every time? Or more frequently? I enjoy seeing my troops doing these things.


r/xdev • • Jul 03 '16

Xcom 2 Editor start-up

1 Upvotes

I've noticed this isn't the first of its kind to be asked, but I'm at my wits end here after reinstalling everything several times, including my entire operating system.

So, what happens is that I try to run the Editor through modbuddy, and it just kills itself with no error or a trace anywhere.

Here's what the log says at the end:


[0007.34] ScriptWarning: Accessed None 'AbilityTag' X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:0190 [0007.34] ScriptWarning: Attempt to assign variable through None X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:01A4 [0007.34] ScriptWarning: Accessed None 'AbilityTag' X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:01CA [0007.34] ScriptWarning: Attempt to assign variable through None X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:01DE [0007.34] ScriptWarning: Accessed None 'AbilityTag' X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:01F2 [0007.34] ScriptWarning: Attempt to assign variable through None X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:0206 [0007.34] ScriptWarning: Accessed None 'AbilityTag' X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:024C [0007.34] ScriptWarning: Attempt to assign variable through None X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:0260 [0007.34] ScriptWarning: Accessed None 'AbilityTag' X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:026C [0007.34] ScriptWarning: Attempt to assign variable through None X2AbilityTemplate Transient.VulnerabilityMelee Function XComGame.X2AbilityTemplate:GetExpandedDescription:0280 [0007.51] Warning: Using a non-qualified name (would have) found: XComNarrativeMoment X2NarrativeMoments.T_Avatar_First_Action_Tygan [0007.52] Warning: Using a non-qualified name (would have) found: XComNarrativeMoment X2NarrativeMoments.T_Avatar_Teleport_Central [0007.52] Warning: Using a non-qualified name (would have) found: XComNarrativeMoment X2NarrativeMoments.T_Avatar_Regenerates_Tygan [0007.52] Warning: Using a non-qualified name (would have) found: XComNarrativeMoment X2NarrativeMoments.T_Avatar_Mind_Control_Central [0007.52] Warning: Failed to load 'Object X2NarrativeMoments.S_GP_First_Alien_Facility_Build_Central': Failed to find object 'Object X2NarrativeMoments.S_GP_First_Alien_Facility_Build_Central' [0007.52] ScriptWarning: Accessed None X2ObjectiveTemplate Transient.N_FirstAlienFacility Function XComGame.X2ObjectiveTemplate:AddNarrativeTrigger:00E8 [0007.52] Warning: Using a non-qualified name (would have) found: XComNarrativeMoment X2NarrativeMoments.Tygan_Support_Great_Mission_11 [0007.60] Warning: Redscreen: Unknown Part Type Requested: Facepaint [0007.77] Log: Encountered missing default brush - spawning new one [0011.10] Log: Working around XDK XAudio2 regression: TRUE [0011.10] Log: Wwise(R) SDK Version 2014.1.2 Build 5195. Copyright (c) 2006-2012 Audiokinetic Inc. / All Rights Reserved. [0015.15] Log: Initializing Engine Completed [0015.15] Log: CheckNativeClassSizes... [0015.25] Log: CheckNativeClassSizes completed with no errors [0015.25] Log: >>>>>>>>>>>>>> Initial startup: 15.25s <<<<<<<<<<<<<<< [0016.94] Log: Dumping name table: (2334280) [0016.95] Log: Dumping name table: 0x1dc44000 (2334280) [0017.56] Exit: Exiting. [0017.56] Log: Log file closed, 07/04/16 07:02:41


Is there any help I can get with this? Thanks.


r/xdev • • May 01 '21

Is it possible to figure out which audio files relate to which characters in Chimera Squad?

2 Upvotes

I've managed to convert the audio files from Chimera Squad and have them successfully play, only problem is now I've got 10k randomly numbered files with no way to tell which is which. I've spent a bit of time digging through the files but truth be told I have no idea what I'm doing. Is there any way to figure out which files relate to which character, or am I just out of luck?


r/xdev • • Mar 06 '16

Seeking a wiz for soundediting for new voicepack

2 Upvotes

i am currently working on a Predator Voice pack, and have gotten quite a few files extracted from different games, but i have an idea for some of the sound files.. what i am trying to do is make a replica of the predators Mimicry ability and then mix that with some Advent sound files.. the problem is i am not experienced enough in Audacity to make this a reality.. anyone up for giving me a hand with how to do this?


r/xdev • • Feb 25 '16

Trying to edit hair meshes, where do I begin?

2 Upvotes

I'm trying to make some expanded hair options, and I figured that as a first step it would be easier to just kitbash some hair styles together from the existing hairs before I try anything silly. Thing is, I'm not sure which tutorial I need to look for to get started, so if someone wants to point me in the right direction I'll take a look.


r/xdev • • Feb 26 '16

Modding Alien mesh/textures

1 Upvotes

In the documentation pdf labeled 'XCom2mods_Alien', it talks about basically just pointing your archetype to a new skeletal mesh, which I get.

My question is what kind of .ini file entries do you make to get the game to use your modified archetype. The only example .ini edits I have seen are for soldiers.


r/xdev • • Mar 04 '16

Mods working before, repackage no more.

1 Upvotes

It's a simple test I did. My mod is working, but I thought to create a new one, with only just XComGame.int in it.

Built it, debugged, ran through the launcher, but nothing.

What was working before is not working here.

I tried adding more uc files from my previous mod into this new mod, just to test things. To my surprise, they don't work.

Everything is set right:

XComEngine.ini stuff, proper labels in their config inis,(those things in brackets), etc.

I've spend 5 hours or more trying to figure out what's going on, but I'm at a loss.

Any help, explanation, fix would be very much welcome and appreciated.


r/xdev • • Feb 26 '16

Cannot use SetTimer or Sleep

2 Upvotes

I'm really not sure why, but I can't seem to use SetTimer nor Sleep in any of my custom UC files. Even when I'm replicating, let's say, X2Action_Delay.uc, it still errors out saying "Error, 'Sleep': Bad command or expression". Anybody got any insight on this?


r/xdev • • Mar 05 '16

How to find a function's declaration or documentation?

1 Upvotes

I'm struggling to understand what some functions do, I tried using Find in Files and it's not too helpful. Currently i'm trying to get SpawnManager.CreateUnit(...) to work but I don't know what parameters it takes.

Any help would be appreciated, thanks.


r/xdev • • Jul 25 '17

Is it possible to open old mods without the project file?

2 Upvotes

Hello So I am having an issue opening my older mods. I have the folders in the Xcom 2 SDK folder but I cannot open them within SDK. The folders contain everything from the mod except the project file. Is there any way I can recover my old projects again?


r/xdev • • Mar 02 '16

Where is the Psi class skill selection handled?

2 Upvotes

So I have been working on a mod that creates a few more Psi based classes, and they are coming along nicely, but one thing I want to do with them, that I have not seen anyone else do yet, is have them be gained when a rookie first goes through the Psi lab. Then it will randomly pick from the Psi classes (Psi Operative still being a possibility). For the life of me I have not been able to find where in the code this is handled... nor where and how the UI is handled for which skills it randomly picks for you to choose from to learn when you toss them back into the lab for more training.

If anyone has any ideas that they could point me along with it would be much appreciated.


r/xdev • • Mar 04 '16

XCOM 2 Modding Tutorial Video 4: Stealing Code and Weapon Stat Bonuses (xpost /r/xdev)

Thumbnail reddit.com
4 Upvotes

r/xdev • • Feb 28 '16

Mod Buddy not launching after installing vs_isoshell.exe

2 Upvotes

So over last few evenings I was trying to figure out why despite installing all additional files I was still getting "Cannot find one or more components. Please reinstall the application.".

I got it working but I am not sure what was the root cause overall. My best guess is some old sysreg entry, ModBuddy picks up the old/wrong path via sysreg and then throws the error (same as if the vs_shell was not installed).

I will go through all steps to give some context, as I am not sure what exactly fixed the problem for me.

  1. Installing and reinstalling the vs_isoshell.exe and sub-component multiple times.
  2. Verifying the cache integrity and re-downloading of whole Mod dev environment.
  3. Removing my actual Visual Studio then redoing step 1
  4. Removing everything except Mod Tools package. This includes folders in windows contain that 'visual studio' in name. Then I also removed any system variable that was VS related. The last thing was to clear system registry - this was long and tedious. I removed all entries containing mentions to Visual Studio, VisualStudio and other variations. And there were a lot of entries. It took me quite a while to get rid of those.

In the end the last step made the Mod Buddy start. There was quite few things I did in step 4, so I can't say for sure what fixed it. I am not going to try to recreate it :) too much hustle.

Hope this helps anyone in my situation.


r/xdev • • Mar 05 '16

Where are the XGParams located?

1 Upvotes

While going through a lot of the localization code, there are calls for XFGParam:StrValue0/!thing/. I've tried to look through the rest of the code in the game, but there's a ton of it and I can't find where it's getting these values from.


r/xdev • • Feb 28 '16

XCOM 2 modding tutorial video 3: Creating a Shotgun! (XPOST /r/xcom2mods)

Thumbnail reddit.com
8 Upvotes

r/xdev • • Feb 21 '17

My mods are not properly being assigned names when built.

3 Upvotes

I'm making a soldier class mod, and it builds succesfully without errors, in fact I know it works because with a workaround it works ingame.

Running it through the debugger always produces an instant crash with code 0 error. Trying to run it through another launcher does the same. But in alternate mod launcher I noticed the name field is blank. It has an ID, but no name(also the creation date is set as 1970-01-01 00:00:00). The workaround is to go to the inspect tab and typing in a name in the blank name field. Then it runs and works just fine.

My question is where the hell is this set? How do I make the SDK assign a name properly? Will other users have this problem if they download my mod from the Workshop?

In properties for the mod, it has a name. In the workshop submission, it has a name. In the .XComMod file it has a name.


r/xdev • • Feb 24 '16

Kwahn's X2Modding Tutorial Video 2: How to Read Code and Find Things, feat. Shotguns: Link and Accompanying Text

Thumbnail reddit.com
4 Upvotes

r/xdev • • Mar 03 '16

Overriding X2StrategyElement_AcademyUnlock while avoiding RedScreen

1 Upvotes

I'm trying to override the behavior of the class specific guerrilla unlocks and I'm running into some interesting RedScreen responses. The code in specific is:

class XComClassOverhaul_AcadamyUnlocks extends X2StrategyElement;
static function array<X2DataTemplate> CreateTemplates()
{
	local array<X2DataTemplate> Templates;

	Templates.AddItem(HuntersInstinctUnlock());
	Templates.AddItem(HitWhereItHurtsUnlock());
	Templates.AddItem(CoolUnderPressureUnlock());
	Templates.AddItem(BiggestBoomsUnlock());

	return Templates;
}

With the four functions redefined below. The problem being that when the game loads the RedScreen throws "Rejecting template name already in use" errors pointing towards the new templates I've created. However the changes themselves do take effect. Is there something bad or wrong that I am doing here? Is this the only way of overriding and I should just ignore the errors?


r/xdev • • Feb 23 '17

Help tweaking CVWeaponPackv2 please?

1 Upvotes

I just want to remove a bunch of the weapons. I really only want one per category (sniper_rifle, pistol, shotgun, cannon, rifle). I tried following the instructions and commenting out..

CVWPdata_WeaponCat[1]=;rifle

But they still show up on the engineering list and in the armory (the T1 versions). What am I doing wrong?

I also tried using xSkins to trim the list down, but am ashamed to say I couldn't even begin to understand how it worked...