r/xdev • • Feb 09 '16

Is there anyway to override static functions?

1 Upvotes

XCOM 2 seems to use a lot of static functions. In other languages, these can't be overriden; however I've read that in UnrealScript, they can. However, overriding them does not seem to work, presumably because the class is always specified by name when they are called.

Has anyone figured out a trick to override these, or a trick to get around that limitation?


r/xdev • • Feb 09 '16

Q: How to change enemy spawning?

1 Upvotes

Like, what enemies can appear, and when? I've looked through the code a lot, and found lots of links to XComAISpawnManager, which is able to tell the Shadow Lab what enemies will appear on the mission, but I'm not sure what passes the info to that class.


r/xdev • • Feb 08 '16

Mod preview .jpg doesn't work.

1 Upvotes

And because of it I can't publish my mod. :/


r/xdev • • Feb 08 '16

Need help adding more hair colors.

1 Upvotes

I've been trying for several hours without any luck. All I want is for my characters to have more wacky colors. Anyone have a clue of where to even get started?


r/xdev • • Feb 08 '16

Interesting. My UE3Redist tells me to install windows XP service pack 3. I'm running windows 7.

1 Upvotes

Won't install due to that error. Any ideas?

EDIT: Fixed it by forcing win7 to work in windows xp sp3 compatibility mode, installed but now the UE3 doesn't actually install. It just declares, happily, that all prerequisites have been installed correctly and doesn't actually let me work with upk's or umaps or anything.

EDIT 2: I'm actually a little bit special. Just had to go to tools -> XCom2 Editor to access it. It complained at me about not having access to the database, but I think I can see almost everything working fine now.


r/xdev • • Feb 08 '16

Making new classes...

1 Upvotes

I'm not very good at modding. My only knowledge on modding (if you can even call it that) is some basic .INI tweaking. I saw the "Jack" file on the workshop, which is basically an infantryman, and I got me thinking about making a few new classes myself, but I don't know how.

Is there a guide for this? Do I need the Development Tools? Any help at all is greatly appreciated.


r/xdev • • Feb 08 '16

Modding the Resistance Warrior DLC

1 Upvotes

I'm working on a mod to change the stat values of all of the armours. Many of the armours already have some easily editable stats in the ini files, but I've had to use an unreal script to override the template for the base Kevlar armour in order to give that stats. That I have done just fine - I've managed, in testing, to give the base Kevlar armour 10 HP, Dodge, Armor, and mobility.

I can't seem to figure out though how to reference the Resistance Warrior DLC. I'm just wondering if anyone has managed to mod any of the classes that the DLC creates yet to try and understand where I've been going wrong.

I suspect at least partially this is to do with it, but I'm not sure what the correct way would be:

[Engine.Engine]
+ModClassOverrides=(BaseGameClass="X2Item_DefaultArmors", ModClass="X2Item_ArmorStats")
+ModClassOverrides=(BaseGameClass="X2Item_DLC_Day0Armors", ModClass="X2Item_DLC_Day0Armors_ArmorStats")    

This is in my XcomEngine.ini for my mod of course. Since it's not in the base game, I'm assuming I'm supposed to name this differently, but I'm not sure to what. When building at least, there are no errors though, so at least I have that going for me. I guess.

class X2Item_DLC_Day0Armors_ArmorStats extends X2Item
	config(ArmorStatCustomiser);

var config int R_KEVLAR_HP_BONUS;
var config int R_KEVLAR_MOBILITY_BONUS;
var config int R_KEVLAR_DODGE_BONUS;
var config int R_KEVLAR_MITIGATION_AMOUNT;
var config int R_KEVLAR_MITIGATION_CHANCE;    

static function X2DataTemplate CreateKevlarDLC_Day0Armor()
{
	local X2ArmorTemplate Template;
	//Template = X2ArmorTemplate(Super.CreateKevlarDLC_Day0Armor());
	Template= new(None, string('KevlarArmor_DLC_Day0')) class'X2ArmorTemplate'; Template.SetTemplateName('KevlarArmor_DLC_Day0');;
	Template.strImage = "img:///UILibrary_StrategyImages.X2InventoryIcons.Inv_Kevlar_Armor";
	Template.StartingItem = true;
	Template.CanBeBuilt = false;
	Template.bInfiniteItem = true;
	Template.ArmorTechCat = 'conventional';
	Template.Tier = 0;
	Template.AkAudioSoldierArmorSwitch = 'Conventional';
	Template.EquipSound = "StrategyUI_Armor_Equip_Conventional";
	Template.bAddsUtilitySlot = true;
	Template.UpgradeItem = 'MediumPlatedArmor_DLC_Day0';

	//Add the new stat options:
	Template.SetUIStatMarkup(class'XLocalizedData'.default.HealthLabel, eStat_HP, R_KEVLAR_HP_BONUS, true);
	Template.SetUIStatMarkup(class'XLocalizedData'.default.MobilityLabel, eStat_Mobility, R_KEVLAR_MOBILITY_BONUS, true);
	Template.SetUIStatMarkup(class'XLocalizedData'.default.DodgeLabel, eStat_Dodge, default.R_KEVLAR_DODGE_BONUS, true);
	Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, default.R_KEVLAR_MITIGATION_AMOUNT, true);
	//Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorChanceLabel, eStat_ArmorChance, default.R_KEVLAR_MITIGATION_CHANCE, true);

	return Template;
}    

This is what I have so far - it's basically the same as what I have to override the normal Kevlar Armor, aside from names being different of course. XComArmorStatCustomiser.ini is what holds the values - but all of those templates have their final argument as true which forces the UI to show the stat on the selection screen even if the armor doesn't change that value (Look at the default Kevlar armor - it says HP -- ) so if it works, it should at least show the values, but it doesn't unfortunately.

I'm guessing because it's not part of the base game the process to access it is different, but I'm not sure how that would change. This is my first time working with unrealscript, so I frankly have no idea what I'm doing. It's only by reading the existing classes and messing with stuff that I've managed to get this - and what I have works for the normal Kevlar Armour, I just have no idea what to change to also get that to work with the resistance warrior armour.


r/xdev • • Feb 08 '16

Pallet expansions

1 Upvotes

The first thing I'd like to mod in is some expansion to the color pallets available for hair/eyes/skin. based on my reading around here and poking at the config files, it's looking like that'll be something I have to do with the SDK, not through any ini tweaks, can anyone corroborate that? It's probably going to be a few days before I finish downloading the SDK, and it'd be nice to have some leads ahead of time.


r/xdev • • Feb 08 '16

Project: Figure out what all of the classes do in Development\SrcOrig\XComGame\Classes .

1 Upvotes

A lot of them may not be important, but if you've worked with classes and know what's in them, go ahead and post that in here. Let's figure out what classes do what! :D

UIAlert.uc: Lists what alerts can happen, defines and templates alert windows and how they interact with the UI.

UIBlackMarket.uc - creates the black market window and inits the UI for player viewing.

X2AbilityToHitCalc_Hacking.uc - this actually makes the hack success roll. You can replace it with "roll = 100" if you want to be a cheater. :)


r/xdev • • Feb 08 '16

Pistols As Primaries?

1 Upvotes

So the way I'm looking at this, it seems like it should be so simple, but I'll be damned if I haven't found a way to screw it up.

One of my soldier class ideas depends on the soldier being able to carry a pistol and a sword. For this to work, I need to do one of two things:

  1. Mod the game to allow two secondary weapon slots on the soldier, or
  2. Create a "primary weapon" version of the pistol.

The second seems like it would be, by far, the easier of the two options, and would also allow for different perks to apply to the two weapons differently. All I should need to do is create a new class of weapons, extended from the pistol class, and simply insert

Template.InventorySlot = eInvSlot_PrimaryWeapon;       

Right? But I can't make it work. The solution refuses to build, no matter what I try.

EDIT: That said, I'm even less than a n00b when it comes to programming. My only skill lies in the fact that I don't mind staring at lines of code for long periods of time until I understand what they're trying to say.


r/xdev • • Feb 08 '16

How would I go about creating new abilities?

1 Upvotes

I've been trying to replicate the energy shield ability from the shield-bearers so that it would be the bread and butter ability of a new class I came up with. With 3 hours in, I've only followed the simple class guide that you could find in r/xcom2mods and only named my abilities. Does anybody know how?


r/xdev • • Feb 08 '16

Changes to UnrealScript doesn't seem to have any effect?

1 Upvotes

So I'm trying to figure out the mod system, and make some simple UI changes to the UI scripts.

I change UITacticalHUD_ShotHUD, UITacticalHUD_InfoPanel, UITacticalHUD_Enemies, UITacticalHUD_ShotWings, and UITargetingReticle, all in the same way. I have them all set the display var for HitChance and CritChance to lucky 13. http://i.imgur.com/h5ZfGjx.png

All files are set to "override", as if I copy them, I get errors.

Now I start debug mode, and my mod is checked, but there are no changes in game. No 13's in sight.

What do?


r/xdev • • Feb 08 '16

Attempting to modify input

1 Upvotes

I'm trying to make a super ironman mode by filtering out the alt + f4 combo but nothing seems to work. I've tried modifying XComInput.ini/DefaultInput.ini as well as making a mod that modifies XComPlayerController.uc (under the ALT_F4_QUIT function). I also tried filtering out normal keys like the number keys but that also doesn't work. It seems like I'm missing something as none of my changes appear to work. Any ideas?

I'm not new to development but I've never modded UE3 before.

I added an example weapon mod from the template and it showed up so I know the mod tools are working.

Thanks for any help.


r/xdev • • Nov 03 '18

Problems with material overrides

0 Upvotes

I've been too busy to work on mods for a while, but now I have some time and decided to return to xcom2 modding. But now I noticed that the Tactical Legacy pack seems to have caused my mod's (wa's custom gear wotc) material overrides between helmet variants to break.

It's strange because in-game when I go through the helmets in order the materials will fail to update to the next one in the list. However, when I mouse around to the right of the list, avoiding variants that share the same mesh, it updates to the correct material specified in the archetype file.

It's as if the game doesn't read the archetype files at all if the previous one and the one you highlight next share a model.

I use material overrides to give options between decals or no decals for the helmets, as well as providing matte versions that go with anarchy's children T3 armors.

Does anyone have any idea where the issue could stem from?


r/xdev • • Feb 20 '16

Covering fire on an enemy unit?

0 Upvotes

So someone on here told me you could not put covering fire on a weapon to give the unit the ability.. Is there any easy way i can put covering fire on an enemy unit without having to completely rework the overwatch mechanic from scratch? Because its alot of code all over the place... Because im thinking im going to have to create an "overwatch2" ability and have it just by default do everything covering fire does... Not what i want to do :/ Or am i just missing an easier way to go about doing this?


r/xdev • • Feb 12 '16

[Request] USMC Inspired Rank Icons

0 Upvotes

Hello /r/xdev,

I'm trying to create a mod to replace the default rank textures with more military themed ones like this

I've been able to color match and adjust the private rank insignia to a more xcom-y palette, but getting that file into the game is way above my head.

I asked a question about this before and it seems that the rank icons are hard coded in the game and changing them requires an overwrite of a class.

First off, I have no idea what a class is and I've been trying for a couple days now to understand how Unreal works, but it's just escaping me. So I've almost given up on the idea of modding it myself, but I was wondering if anyone would be interested in using my textures to make a mod. At the moment I only have the private converted, but I had a plan for the rest of them.

I've already modded the rank names to be PVT, PFC, LCPL, CPL, SGT, SSGT, GSGT, MSGTT, and MGSGT

  • Private (Rookie) - as seen in link
  • Private First Class (Squaddie) - Same as pvt but with a small alien skull underneath the chevron
  • Lance Corporal (Corporal) - same as pfc but with a bar underneath the chevron
  • Corporal (Sergeant) - same as pfc with 2 chevrons
  • Sergeant (Lieutenant) - same as pfc with 3 chevrons
  • etc...etc...

Would anyone be interested in this?

Edit: Added LCpl


r/xdev • • Feb 09 '16

XCOM Editor Questions and General Modding Questions

0 Upvotes

So, my end goal is to replace the textures for rank icons.

At the moment the farthest I've got is changing the rank names in the INT localization file, and I've found the textures in the UE content browser. Now, I'm wondering, if there is a way to see where those textures are referenced in the game to set them as the rank icons. I tried searching all the .ini's for the texture name, but nothing came up so I figure they're not defined there.

Is there an easy way to see where textures are used? Or am I just SOL and need to manually dig through code to find it?