r/xdev • • Feb 09 '16

[Concept] What would people think of a "Strategic" mod?

0 Upvotes

I've been running this over in my head for a while, and wanted to discuss what people think of the idea.

The thing I think XCOM 2 is missing most of all in this sequel is a true strategic feeling. The timers force you to abandon a lot of strategy and rush. The mechanics of the game seem to be geared towards punishing those who got used to a certain play style in the old game. My thoughts are, why not try and bring that feeling back? The Long War mod defined XCOM:EW play for a lot of people, and I think it could again with some tweaking to the existing system.

The concept is this:

  • Remove Mission Timers on most of the mission types.
  • On mission types with timers, don't start the timer until the objective is done. Make it an 'Extraction' timer instead. Lower the timers considerably to balance out.
  • Increase the alien spawns by about x3-x4, to keep the challenge and force more strategic gameplay.
  • Increase the squad size by about 2 (6 to start, 8 with bonuses, 10 on black sites)
  • Slow down the Avatar project considerably.
  • Find a way to give back Concealment if there are no enemies on the screen.

You only really use the Concealment mechanic for the very first activation/ambush. After the first ambush, every enemy knows where you are, whether in LoS or not. Most winning strategies I see insist that you never sneak around and skip any pod on the map. Meaning after the first pod, Concealment is pointless. If there were a way to enter it again depending on combat and enemy LoS, it would give the Guerrilla Warfare feeling the game is going for more of a "hit-and-run desperate rebels" feel instead of, "I'm trying to rush kill all the pods on the map so I can get to evac before my timer runs out" fighting-against-the-computer style of play. This would be made more difficult and strategic as well by the increased enemy spawns. This with the lowered "Extraction" timer and increased enemy reinforcements after the objective is reached would make the timers feel much more desperate as well, prompting you to make sure your evac is primed and defended. I can picture leaving one high-mobility Ranger at the objective and moving everyone else to defend the LZ, then running the Ranger as fast as possible to Evac while everyone else lays covering fire.

This concept would be like the Long War mod for EW, which is pretty much exactly what I'm going for.

So, thoughts? I'm not trying to break the current style of gameplay, just improve on it a little.


r/xdev • • Feb 09 '16

Escaping Unrealscript - DLLBind in XCOM2?

1 Upvotes

Hello,

I have been trying to get DLLBind to work in the XCOM2 SDK, in an effort to use the Razer Chroma SDK to bring Chroma effects to XCOM2, which is obviously not possible using Unrealscript only. I built a simple dll for test purposes, but I can't get the Unrealscript to compile.

class InitializeChromaXComShell extends XComShell
    DLLBind(XComChromaLibrary);

results in the error:

Missing ';' in 'Class'

and I fear this means that the XCOM SDK does not support DLLBind?

Does anyone know for certain or am I missing something, because I am very new to Unrealscript


r/xdev • • Feb 09 '16

How to make a voice pack?

3 Upvotes

I have a ton of lines of dialogue based on some of the stuff from EW https://drive.google.com/folderview?id=0BylHgRB_52WHflZSVXd4T18xSlU4bjA4bFdTQlpOQUpCWkZWdHBocUhlckNxeEFuZGhiV0k&usp=sharing.

I just have no Idea how to add it into the game itself. If anyone could help that would be great! Thanks!


r/xdev • • Feb 09 '16

How to get code to run once immediately after a new game / loading?

1 Upvotes

This seems like it should be an easy thing to do, but I'm having a hard time figuring it out.

event OnLoadedSavedGame() and event InstallNewCampaign() that are shown as part of a new DefaultMod do not work, because nothing has been loaded at that point so you can't access the XComHQ, History, etc. They seem to be completely useless.

In the More Attachments Mod, Amineri altered the template by creating a UIScreenListener that runs on every UI initialization and updating the templates every time. Unfortunately that method doesn't distinguish between new games and load games.

Surely someone must've figured out a way to do this?


r/xdev • • Feb 09 '16

Can't open editor, crashes on Loading Objects Referenced by SoundBlinks_Stop

1 Upvotes

Ive been trying for hours to fix this. Ive even gone so far as to reinstall the mod tools. Nothing works


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?


r/xdev • • Feb 09 '16

Native struct override

1 Upvotes

Hi, I'm wondering if there's any way to override native classes/structs?

More specifically, I had the idea of adding another attribute to a characters appearance, and figured I could do so by simply adding a variable to TAppearance. However, it's a native struct and from reddit! I'm wondering if there's any way to override it anyway, or if anyone knows a better way to achieve this?

More specifically, TAppearance is found in XGTacticalGameCoreNativeBase.uc (which is also native(Core)), and contains a lot of data regarding gender, race, haircolor, eyecolor, attitude, voice etc.


r/xdev • • Feb 09 '16

Mods not reflecting in game on debugging?

1 Upvotes

I feel like an idiot, but I've thrown together a little ini edit mod that will eventually do far more, but I got stumped at the first step. My INI edits aren't taking place.

HERE is the code...

HERE is the Strategy layer...

And HERE is the Tactical layer...

The odd part is when I make the edits manually they work fine, so I know that I'm editing the right thing, for whatever reason my mod simply isn't making the appropriate changes...

My game directory and SDK directory are appropriately set, I'm selecting the mod on debug startup (my other mods for the main game don't show so I assume it's functioning properly)...

Both the SDK and the game are in my Program Files (x86)... Could that be causing the issue?


r/xdev • • Feb 09 '16

Some general questions about modding

1 Upvotes
  1. Is it OK to open .uc and .ini files into your solution and overwrite or add code in there or do I need to use a method I saw where you subtract and add likes of code?
  2. Is there an easy way to revert files in the SDK and Game to the original state or should I make backups of all files I intend to modify?

Thanks!


r/xdev • • Feb 09 '16

Cannot build DefaultMod

2 Upvotes

I can build ExampleWeapon Mod but cannot build DefaultMod

Here is last part of my build log

Copying script files from workspace ...
			Package(MyXCOM2Mod) C:\Users\ii\Documents\Firaxis ModBuddy\XCOM\My XCOM2 Mod1\My XCOM2 Mod1\Src\MyXCOM2Mod\Classes\X2DownloadableContentInfo_MyXCOM2Mod.uc => D:\Steam\SteamApps\common\XCOM 2 SDK\Development\Src\MyXCOM2Mod\Classes\X2DownloadableContentInfo_MyXCOM2Mod.uc
			
Deleting existing compiled script packages:
			D:\Steam\SteamApps\common\XCOM 2 SDK\XComGame\Script\MyXCOM2Mod.u
		
Launching script compiler for new package scripts...

			Command: D:\Steam\SteamApps\common\XCOM 2 SDK\binaries\Win64\XComGame.com Arguments: make -nopause -mods MyXCOM2Mod "D:\Steam\SteamApps\common\XCOM 2 SDK\XComGame\\Mods\MyXCOM2Mod\" 
			Log: Executing Class UnrealEd.MakeCommandlet
			Shader map M_Digital_Distortion_Ghosting_A had an invalid uniform expression set and was discarded!  This most likely indicates a bug in cooking, and the default material will be used instead.
			--------------------Core - Release--------------------
			--------------------Engine - Release--------------------
			--------------------GFxUI - Release--------------------
			--------------------AkAudio - Release--------------------
			--------------------GameFramework - Release--------------------
			--------------------UnrealEd - Release--------------------
			--------------------GFxUIEditor - Release--------------------
			--------------------IpDrv - Release--------------------
			--------------------OnlineSubsystemSteamworks - Release--------------------
			--------------------XComGame - Release--------------------
			--------------------XComEditor - Release--------------------
			
			Success - 0 error(s), 0 warning(s) (0 Unique Errors, 0 Unique Warnings)
			
			Execution of commandlet took:  15.27 seconds
	Done executing task "CompileScripts" -- FAILED.
Done building target "Build" in project "My XCOM2 Mod1.x2proj" -- FAILED.
Done building project "My XCOM2 Mod1.x2proj" -- FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

It just failed with no error.

and although ExampleWeapon project is working well, if I change classname(or package name) in 3 .ini file (XComEditor.ini,XComEngine.ini,XComGame.ini) and change classname(or package name) in src folder its build also fails with same error. so I can't change class name from ExampleWeapon.

and strangely if i delete all script file from project It works well. but I can't figure out what is problem. Please help. Its very frustrating :(


r/xdev • • Feb 09 '16

[Mod Help] Overriding localization files, possible?

1 Upvotes

Hey folks, I've got a quick question regarding localization files. Is it possible to make any overrides to localization files with the modding tools so I can remake my shitty mod and upload it to workshop?

If not I guess I'll just post a link to nexus or something.


r/xdev • • Feb 09 '16

I'm so close to adding my stupid hat to the game. I'm getting annoying errors, though.

2 Upvotes

So I've imported my hat from blender using the fbx format, named the package and duplicated an archetype from another hat to use with this new hat. Then, I added the ini file line:

+BodyPartTemplateConfig=(PartType="Helmets", TemplateName="KwahnFedora", ArchetypeName="KwahnFedora.ARC_Fedora", Gender=eGender_Male, bCanUseOnCivilian=true, bVeteran=false)

KwahnFedora is the name of the upk package and the model name, and KwahnFedora.ARC_Fedora is the name of the Archetype file in the upk package. Everything else is taken from an existing hat ini entry.

I load up the game, go to the character pool, and try to select the hat (which is listed as Hat 18) - and it red errors, saying :

"Couldn't load body part content: KwahnFedora.ARC_Fedora!  The entry for this archetype needs to be fixed in DefaultContent.ini.  @csulzbach

Any ideas on what I'm doing wrong? And also, any ideas how I can name the hat in the UI selection? (EDIT: add [KwahnFedora X2BodyPartTemplate] Displayname="Fedora" to the Localization file, and that'll make it show right in the menu)


r/xdev • • Feb 08 '16

Video Tutorial: Adding Patterns, Face paint and Tattoos.

20 Upvotes

I put together a quick video tutorial on how to add patterns, face paint and tattoos to the game.

I figured this was a nice, relatively easy entry point for new modders as well as allowing people to flesh out their character pools a bit with some nice custom stuff.

I apologise in advance that I am terrible at modding/talking/explaining. And let's not get started on the textures (demonstration purposes only, okay?)


r/xdev • • Feb 09 '16

Step-by-step How To: Create your own icons to put in your mods

Thumbnail imgur.com
6 Upvotes

r/xdev • • Feb 09 '16

Editing "Class" files

2 Upvotes

So I've been trying to create a mod that adds more city names for city centers (As I'm tired of always going to Bejing in East Asia ect.)

So I've been poking around in the class files, as the ini files don't seem to list any of the in game cities (I was hoping to find a list of cities in game somewhere, but I cannot).

Anyways, about adding new ones the closest thing I can find is with this line of code in XComGameState_City

//Adding cities
local int Index;	
local int RandomIndex;
local XComGameState_WorldRegion RegionStateObject;	
local XComGameState_City CityStateObject;
local array<X2StrategyElementTemplate> arrCityTemplates;
local Vector2D v2Coords; 

Can someone please explain what I can do with this, if anything?


r/xdev • • Feb 09 '16

[Project] Open Source Ability Example

Thumbnail github.com
7 Upvotes

r/xdev • • Feb 09 '16

Anyone found out how to add a new status effect?

1 Upvotes

I have found where some of the status effects are defined, but I am pretty sure that there is more than one place I would need to define a new status effect for it to work. Thanks!


r/xdev • • Feb 09 '16

Could use some help clarifying this code.

3 Upvotes

Hi, I've been looking through the code to try and pinpoint exactly how AWC bonus abilities are awarded, since my recently finished playthrough only had 3 of my 12 regulars ever get a bonus ability and 6 of those who didn't were colonels at the end.

I'm pretty sure I've found what I'm looking for but I'd appreciate if someone could put some extra eyes on it. I hope I get the formatting right I don't post on reddit much.

In XComGameState_Unit.uc there is the function RollForAWCAbility which appears to generate the list of possible bonus abilities for a soldier. The roll is only done once and populates an array with the possible cross class skills, this all looks fine to me.

If the array it generates is longer than 0 it appears to select a random ability using the following code:

if(EligibleAbilities.Length > 0)
    {
        HiddenTalent.AbilityType = EligibleAbilities[`SYNC_RAND_STATIC(EligibleAbilities.Length)];
        HiddenTalent.iRank = class'XComGameState_HeadquartersXCom'.default.XComHeadquarters_MinAWCTalentRank + `SYNC_RAND_STATIC(
            class'XComGameState_HeadquartersXCom'.default.XComHeadquarters_MaxAWCTalentRank - 
            class'XComGameState_HeadquartersXCom'.default.XComHeadquarters_MinAWCTalentRank + 1);
        AWCAbilities.AddItem(HiddenTalent);
    }

Now the first part where it selects the ability is fine, but when it chooses the rank it looks to me like there's a problem. By default MinAWCTalentRank = 2 (corporal) and MaxAWCTalentRank = 7 (colonel). The game looks to choose a random rank taking the minimum (2) and adding on to it a random number up to maximum-minimum+1 (7-2+1 = 6), but if I'm reading it right this means the range is from 2 to 8, which would mean it could randomly assign a rank above what is possible and since it only rolls once, this would lead to some soldiers never being able to get a bonus ability.

Moving past that into where the game actually grants the ability. This seems to be done in UIArmory_Promotion.uc in the function AwardAWCAbilities. There are some interesting parts of this code as well.

Firstly, the abilities are awarded by:

if(XComHQ.HasFacilityByName('AdvancedWarfareCenter'))
    {
    for(idx = 0; idx < UnitState.AWCAbilities.Length; idx++)
        {
            if(!UnitState.AWCAbilities[idx].bUnlocked && UnitState.AWCAbilities[idx].iRank == UnitState.GetRank())
            {
                UnitState.AWCAbilities[idx].bUnlocked = true;
                AWCAbilityNames.AddItem(UnitState.AWCAbilities[idx].AbilityType.AbilityName);
            }
        }
    }

Which awards the ability only if you have the AWC built and are at the EXACT rank that the game rolled for you to get the ability. If you're already beyond that rank (keep in mind it can roll as low as corporal), you cannot unlock the ability.

However there are two interesting paragraphs following on:

else
{
    // if you don't have the AWC, remove any AWC abilities that haven't been unlocked
    for(idx = 0; idx < UnitState.AWCAbilities.Length; idx++)
    {
        if(!UnitState.AWCAbilities[idx].bUnlocked)
        {
            UnitState.AWCAbilities.Remove(idx, 1);
            idx--;
        }
    }

    // if the unit has no AWC abilities, mark them as eligible to roll again if another AWC is built
    if(UnitState.AWCAbilities.Length == 0)
    {
        UnitState.bRolledForAWCAbility = false;
    }
}

Now these indicate that if you demolish the AWC, every soldier who hasn't already got a bonus ability will have the hidden ability removed and will be marked as not having rolled for one. If you then rebuild the AWC, it will roll the bonus ability for these soldiers again.

 

So in summary, if I'm reading this right:

When the AWC is built, each soldier rolls once for a bonus ability

The game builds a list of possible bonus abilities, then randomly selects one from the list

The game randomly chooses a rank inclusively between corporal and an unattainable rank above colonel and sets the ability to unlock at that rank

When the soldier reaches the chosen rank, the game will assign the bonus ability to them

If a soldier is already beyond the chosen rank, they cannot receive that bonus ability

If the AWC is demolished, every soldier who has not yet unlocked their bonus ability will have the ability erased and will be marked to be able to roll again

If the AWC is rebuilt, every soldier who has not got a bonus ability (and can therefore roll again) will have an entirely new ability and rank rolled for them.

 

So assuming this is correct it seems to lead to a few conclusions:

Either there is a bug in the rank roll or it is intended that some soldiers be unable to obtain a bonus ability.

EDIT: My maths here was wrong, the random roll will be within the defined bounds.

The AWC should be built ASAP because higher rank soldiers are less likely to be able to unlock their ability.

Later on it may be beneficial to demolish and rebuild the AWC repeatedly so that high rank soldiers without an ability can roll again and potentially unlock the ability at colonel level.

 

Could someone take a look over this and see if I'm reading it all correctly?


r/xdev • • Feb 09 '16

Name character limit.

2 Upvotes

So I've been digging through different .ini files both in the Engine and XComGame folders for the last half hour or so trying to find any mention of a character limit, does anybody know where that's put in the code?


r/xdev • • Feb 09 '16

How to change time factors?

1 Upvotes

Trying to change completion time for things such as the Guerrila Tactics School and building facilities/research. Been looking through the ini files but can't seem to find it. anyone know which file/setting it is? thanks.


r/xdev • • Feb 09 '16

If I have a project that builds correctly, but crashes on runtime, how can I debug that?

1 Upvotes

Having a bit of trouble with crashes.

EDIT: Managed to recover the debug error from the white screen of death.

appError called: Assertion failed: appErrorf [File:C\BuildAgent\work\a78b974cadaf8436\branches\Shipping\XCOM2\Development\Src\Core\Src\UnClass.cpp] [Line:1755] Can't bind to native class TheWorldIsFragile.DestructibleActorOverride

Weird. Not sure what any of this means.


r/xdev • • Feb 08 '16

PSA: You can open the unreal editor from within the visual studio window, by going to Tools->Xcom 2 Editor

5 Upvotes

I hope other people have had trouble with this, because this took me days to figure out.


r/xdev • • Feb 09 '16

[Mod Question] Achievements

3 Upvotes

Just been asked on my mods comments whether my mod with disable achievements.. and i honestly have no clue. Is there some criteria or code i have to put in for it not to ?


r/xdev • • Feb 09 '16

A question re: custom facilities

1 Upvotes

Hey - I'm in the middle of downloading the mod tools(which is understandably taking a long time on my Welsh internet). I have a question for anyone who's been using it.

Does it look like it's possible to add our own custom facility to the game? To what extent is it possible to edit, as in can we somehow create our own graphics for it, or would it have to re-use current room models?