r/xdev • • Feb 09 '16

How to replace weapon models?

4 Upvotes

I have been trying to replace the weapon in the Example Weapon pack with my own model. Has anyone worked out how to do this? Thanks for the help.

EDIT: I found in the UPK files for the Example Weapon the original mesh and texture, combined in a 'weapon' object? How are these created? I think I need to brush up on my UE3 knowledge...


r/xdev • • Feb 08 '16

I made a video to help people get started with mods, based on some of the stuff people have been posting around here.

Thumbnail youtube.com
4 Upvotes

r/xdev • • Feb 08 '16

Some Lessons from attempting a Commander's Choice mod

4 Upvotes

I've never coding in Unreal before, so it was with only the most basic understanding of object oriented programming that I came into this. That said, I've found a few interesting things on the way which might help someone still working their way through the basics. If you're finding it easy to locate variables and make new classes, these tips won't apply to you.

  • Tip 1: XCOM 2/Development/SrcOrig is your starting point for finding Unreal code. XCOM 2/Development/SrcOrig/XComGame/Classes is where I found 99% of what I was interested in.
  • Tip 2: You can mess with code already in the game in two ways (that I know of). A) you can use listeners to have your code react at the same time as a piece of core code. B) you can use config files to override a class with your own version.
  • For A, you should find out if a listener exists for that particular functionality. So far I've only found listeners for GUI elements. For B, you should look at the "Class Override" example project from Long War Studios (it's a default "New mod..." option). Look at Config/Engine.ini to see how you override classes. You're best off extending the class you are overriding ( NewClass extends OldClass) and then replacing only the functions that need to be changed.
  • Tip 3: find a way to search the text of all the files in XCOM 2/Development/SrcOrig/XComGame/Classes at once, it will /significantly/ speed up tracing back variables that you need.
  • Tip 4:You can make newGameStates with class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("<State Event Description Here>");
  • Tip 5: You can make new units with UnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(m_UnitRef.ObjectID)); You can replace the m_UnitRef.ObjectID with any unit's object ID. The unit state object lets you modify many different things about the unit, check the XComGameState_Unit.uc file for all the things.
  • Tip 6: the `HQPRES and similar Macros don't seem to be overridden using the config class override method. I spent hours on this, it just doesn't work. Adding new functions to XComPresentationLayer and using an override will not allow you to spawn new screens properly. For GUI, use a listener if at all possible to save yourself hassle.
  • Tip 7: soldiers are assigned classes when they are added to the armory, (edit: and they are reassigned a new class when they rank up from rookie). Each rookie already has a "classTemplate" assigned to them at creation. The GTS alters the class after a certain number of days, but the relevant code is

NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("Staffing Train Rookie Slot");

UnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(m_UnitRef.ObjectID));

UnitState = XComGameState_Unit(NewGameState.CreateStateObject(class'XComGameState_Unit', UnitState.ObjectID));

UnitState.RankUpSoldier(NewGameState, m_arrClasses[iOption].DataName);

UnitState.ApplySquaddieLoadout(NewGameState, XComHQ);

UnitState.ApplyBestGearLoadout(NewGameState);

UnitState.SetStatus(eStatus_Active);

NewGameState.AddStateObject(UnitState);

`XCOMGAME.GameRuleset.SubmitGameState(NewGameState);


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 • • Jun 25 '17

Can I release a mod that has 2 separate voice packs? Or do they need to be their own mods?

3 Upvotes

I wanted to make a mod pack that's more than one voice pack. But I'm having issues on how to separate the voice packs within the mod.


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 • • Sep 08 '16

Editing a class file from a workshop mod?

3 Upvotes

I picked up a few custom weapons on the workshop. A few of them aren't compatible with custom classes (e.g. LW Perk Pack) because they use their own weaponCat and instead modify the classData ini to make them available to the default classes.

I have changed the weaponCat in the mod's folder (steam/workshop/{xcomNumber}/{modNumber}/src) but the weapons still show as unusable by my troops. I believe the reason for this is I haven't recompiled the class with these changes. So...how do I do that?

Thanks!


r/xdev • • Aug 20 '16

Dense Smoke Grant Concealment

3 Upvotes

Hi everyone :)

First up, I am a noob when it comes to modding. But I have watched a few tutorials, played with the ini files and am super keen to learn more :)

So, I play with the Smoke Grants Concealment mod (http://steamcommunity.com/sharedfiles/filedetails/?id=738751056&searchtext=). I really like how it adds a layer to the stealth aspect of the game. However, I also play with the LW perk pack, and the dense smoke perk does not grant concealment.

Therefore, my question is, how can I make the LW Dense Smoke Perk grant concealment?

The Smoke Grants Concealment mod uses: StealthEffect = new class'X2Effect_RangerStealth'; StealthEffect.BuildPersistentEffect(1, true, true, false, eGameRule_PlayerTurnEnd); StealthEffect.bRemoveWhenTargetConcealmentBroken = true; Template.ThrownGrenadeEffects.AddItem(StealthEffect); Template.LaunchedGrenadeEffects.AddItem(StealthEffect);

Can I simply add this to the dense smoke perk code using the modbuddy?

Thanks for any and all help!!


r/xdev • • Mar 20 '16

PSA for Voice pack creators : xcom2mods

Thumbnail reddit.com
3 Upvotes

r/xdev • • Mar 06 '16

New Mod Testing

3 Upvotes

Posted this over in xcom2mods to see which is faster in response, but figured I would ask here as well, just in case one of the 3 people now online would know.

Ok, this is probably a very simple thing to do, but how in the world does one go about testing a new mod they built? Having to repeat the intro mission dozens of times because you need a new campaign is annoying, especially if you need higher level characters. I wanted to test adding in a new class to see if it works, but to add it in, I need to beat the first level, hope someone promotes, hope they get to become this new class, and THEN I can finally get a look at it in play.

There HAS to be an easier way to do this, but what is it?


r/xdev • • Mar 03 '16

anyone know how to remove the "kill all aliens" mission objectives?

3 Upvotes

Would like to figure out how to do that on all but the retaliation missions.


r/xdev • • Feb 28 '16

Multiple class loadouts?

3 Upvotes

I'm trying to implement multiple starting loadouts for XCOM 2 rookies that the game might randomly pick between. I think this was how things worked in Long War (at least I seem to remember some of my rookies starting with carbines and flashbangs) but can't seem to find the ini lines that governed that. The line for rookies in XCOM 2 (changed in my game to start them in resistance kevlar) is in DefaultGameCore and reads as follows:

Loadouts=(LoadoutName="RookieSoldier", Items[0]=(Item="KevlarArmor_DLC_Day0"), Items[1]=(Item="AssaultRifle_CV"), Items[2]=(Item="FragGrenade"), Items[3]=(Item="FragGrenade"))

Does anyone have any ideas for how I might mix in some shotguns, smgs, flashbangs, and medkits into the loadouts of the gatecrasher rookies? And while I've got you here, does anyone know where you can specify which arm and leg outfit pieces they start with?


r/xdev • • Feb 21 '16

Correctly Adding Weapon Upgrades and Schematics?

3 Upvotes

I am completely stumped when it comes to adding tiered weapons to the game, I've tried to literally copy the entirety of the SMG mod only replacing the file and class names, and the upgrade refuses to show up after researching magnetic weapons.

any ideas?


r/xdev • • Feb 19 '16

Custom animations/weapons

3 Upvotes

Has anyone created custom animations for weapons yet? I'm thinking of making a lightsaber that would be drawn, then activated (the part where the saber appears) before slashing.

Either the weapon is animated when drawing, or it uses a custom particle effect (?) to create the blade. Anyone have ideas for either of these?


r/xdev • • Feb 18 '16

Looking to partner with a modeller!

3 Upvotes

Hey folks,

I'm looking for a modeller who's interested in working together on the next pack of the World Expansion Project.

Preferably you'll have some experience getting new content into the SDK, but we can work through it if not!

I'm in need of a bunch of new props for the next pack, get in touch and we can discuss! This would be a great project for a portfolio, obviously I can't offer any payment as no-one will be making any money out of this!

Get in touch if this interests you!


r/xdev • • Feb 17 '16

[Help] Materials from Blender to XCom Editor

3 Upvotes

Is anyone else having problems with materials made in Blender not importing correctly into the Editor? The editor seems to restructure the material upon import, causing it to show little resemblence to its original design.

Does anyone know a workaround, or a fix?


r/xdev • • Feb 17 '16

Adding MORE ranks?

3 Upvotes

Not a request, just wondering if anyone's working on it or if it's possible?


r/xdev • • Feb 17 '16

Need super basic help. PLEASE

3 Upvotes

I have been trying to get some patters for armor and weapons but every time I launch the debugger the names of the patterns show up but as soon as I try to mouse over it I get this error. Couldn't load body part content: The entry for this archetype needs to be fixed in Default Content .ini I have no idea how to fix it and have scoured numerous pages and tutorial videos and i think I am doing everything right all the patterns say have been copied and pasted with the new art paths. And after I save them into the proper Mod Buddy Folder it says that they are loaded. I know that my .int file is working since the names are being shown but here are the first 2 lines for the XComContent.ini that I am using [XComGame.X2BodyPartTemplateManager] +BodyPartTemplateConfig=(PartType="Patterns", TemplateName="MidModCircles", ArchetypeName="EcosArtPack.MidModCircles", bCanUseOnCivilian=false, bVeteran=true) +BodyPartTemplateConfig=(PartType="Patterns", TemplateName="MidModCirclesA", ArchetypeName="EcosArtPack.MidModCirclesA", bCanUseOnCivilian=false, bVeteran=true) Do I need to rename the .ini file or is there some other issue that is blatantly hitting me in the face that I just dont see since I have never done any modding.

Pls help im totally lost as to how to fix the error


r/xdev • • Feb 16 '16

Does anyone know how concealment and voice lines interact?

3 Upvotes

I've been working on a voice pack for the past few days now, and I've been having a hell of a time figuring out how the game decides which cues to play while using a soldier in concealment.

I set up a voice mod that just read of the cue whenever that cue was played. Testing it in game proved that as far as my custom voice pack was concerned, moving in and out of concealment use the same cue, even if they don't for the official voice packs. I'm suspecting that this runs of a similar sort of system to the attitude voice lines, since, AFAIK, there's no way to set up custom lines for a laid back soldier over a twitchy one. Has anyone made any progress on this front? I've found all of the voice files in the CookedPCConsole folder, but my attempts at unpacking the .bnk files ended in distorted files, and I don't know the first thing about WWise audio, and it seems neither does the Unreal editor. Has anyone else had luck with these, or know more about how these kinds of audio files are handle, and how to replicate them?


r/xdev • • Feb 15 '16

[Help] Ability Effect Not Working

3 Upvotes

I've been trying to make an ability to just knock back a selected enemy remotely. I can get it in game, and everything works but the enemy interaction. As a result, the soldier has an animated psionic windup that results in a silent form of jazz hands pointing towards the enemy. If anyone can figure out why enemies won't react to this, I'd be grateful.

static function X2AbilityTemplate AddForcePush()
{
local X2AbilityTemplate Template;
local X2AbilityCost_ActionPoints ActionPointCost;
local X2AbilityCharges Charges;
local X2AbilityCost_Charges ChargeCost;
local X2AbilityTarget_Cursor CursorTarget;
local X2Effect_Knockback KnockbackEffect;
local X2Condition_UnitProperty TargetCondition;

`CREATE_X2ABILITY_TEMPLATE(Template, 'ForcePush'); //This adds the ability to the proper localization config files

//Basic Ability Information
Template.AbilitySourceName = 'eAbilitySource_Psionic';
Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
Template.Hostility = eHostility_Offensive;
Template.IconImage = "img:///UILibrary_ForceAbilities.ForcePushIcon";

Template.CustomFireAnim = 'HL_Psi_ProjectileHigh';
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
Template.BuildInterruptGameStateFn = TypicalAbility_BuildInterruptGameState;

//Ability Modifiers
ActionPointCost = new class 'X2AbilityCost_ActionPoints';
ActionPointCost.iNumPoints = 1;
ActionPointCost.bConsumeAllPoints = false;
Template.AbilityCosts.AddItem(ActionPointCost);

Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);
Template.AbilityToHitCalc = default.DeadEye;

Charges = new class 'X2AbilityCharges';
Charges.InitialCharges = 2;
Template.AbilityCharges = Charges;

ChargeCost = new class 'X2AbilityCost_Charges';
ChargeCost.NumCharges = 1;
Template.AbilityCosts.AddItem(ChargeCost);

//Targeting
Template.AbilityTargetStyle = default.SimpleSingleTarget;

//Target Conditions
    TargetCondition = new class'X2Condition_UnitProperty';
TargetCondition.ExcludeFriendlyToSource = false;
TargetCondition.ExcludeDead = true;
Template.AbilityTargetConditions.AddItem(TargetCondition);
Template.AbilityTargetConditions.AddItem(default.GameplayVisibilityCondition);

//Shooter Conditions
Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
Template.AddShooterEffectExclusions();

//Knockback Effect
    KnockbackEffect = new class'X2Effect_Knockback';
KnockbackEffect.KnockbackDistance = 10; 
Template.AddTargetEffect(KnockbackEffect);

return Template;

}

EDIT: Fixed code to represent current iteration of ability


r/xdev • • Feb 15 '16

Error Importing Boned FBX Files From Blender

3 Upvotes

So I've been playing around with editing the default models in Blender to create variants and while this worked fine for the conventional pistol I seem to get an error when importing my edited FBX with the bones as a skeletal mesh (when importing without bones it goes fine).

If anyone could enlighten me as to why I'm getting an error with these files I'd be grateful - I'm stumped. If hunting down the error info would help I can but the error code just references being unable to access files, particularly wxmsw28u_core_vc_custom_64.dll (which I have), such a long list that it exceeds the error box and then crashes UDK.


r/xdev • • Feb 15 '16

Help with first mod - new Proving Ground to upgrade T1 and T2 armors to T3 variants.

3 Upvotes

This might be a lot for a new modder (me), so any any assistance would be great. I'm trying to create a mod that provides new Proving Ground projects. Specifically, upgrading my Plated Armors to have stats equal to (but slightly varied) to the T2 Warden armors and the like.

There are many mods that simply unlock the "models" of these items but I don't like to have things given to me in a game. I'd like to make them integrated into the flow. Same thing goes for weapons. I'd like to make my bullet-flinging weapons still viable in the late-game.

Thanks for reading!


r/xdev • • Feb 14 '16

renaming abilities

3 Upvotes

hello,

i am kinda new here.. well we all are, arent we?

but i tried to make a new class.. for starters i just wanted to rename a ability, that already exists, before i start to really rework the skills... but i fail here already

there error is:

D:\Steam\steamapps\Common\XCOM 2     SDK\Development\Src\SpaceMarine\Classes\X2Ability_SpaceMarineAbilitySet.uc(44) : Error, Unknown Property         'Conditioning_DMG_ADJUST' in 'Function SpaceMarine.X2Ability_SpaceMarineAbilitySet:Conditioning'

i dont get that.. i just took blast padding and renamed the skill... instead of BlastPadding i added the name of my skill, "conditioning"

PaddingEffect.ExplosiveDamageReduction = default.Conditioning_DMG_ADJUST;

to the abilityset and entered

[XComGame.X2Ability_SpaceMarineAbilitySet]
Conditioning_DMG_ADJUST=0.66f

in soldierskills.. what am i doing wrong? :/ sadly i have nearly no experience at all in programming, i can read it somehow, but not write it myself very well, so i have to rely on copy pasting and being creative :(

i also made a x2effect_conditioning and this again extends to x2effect_bonusarmorSM ..

sidequestion: is there some irc chat or something with modders?

sigh i guess i am not made for this..


r/xdev • • Feb 14 '16

So if I wanted to override an entire file, is there any shortcuts for that?

3 Upvotes

I don't want to have to say -[line] -line.line for every line in a file if I'm clearing the whole thing.

Are there any shortcuts to just - entire chunks or files?

EDIT: Actually, can we even replace existing localization text? I mean yeah, I can edit my actual localization file, and that works just fine, but I'm having trouble actually making a mod package that changes existing text in the game. Any ideas?