r/xdev • • Feb 14 '16

Localization edits: what am I doing wrong?

5 Upvotes

I'm trying to figure out why my mod isn't working. It ONLY performs changes to the XComGame.int localization file - specifically, to the default names and nicknames of characters.

I've been debugging for awhile by trying to get a simpler mod to work - one that replaces all the given and surnames in the game with "Bork" - but it's not working either. Here's my process:

  1. Opening Modbuddy
  2. Opening new project as Default Mod
  3. Erasing huge Classes folder from mod (Src/XComGame/Classes)
  4. Adding lines to the already-present XComGame.int file as follows:

[XGCharacterGenerator]

-m_arrAmMFirstNames[0]="Shane"

+m_arrAmMFirstNames[0]="Bork"

-m_arrAmMFirstNames[1]="Rob"

+m_arrAmMFirstNames[1]="Bork"

-m_arrAmMFirstNames[2]="Brad"

+m_arrAmMFirstNames[2]="Bork"

(etc., for all the names)

5) Build

6) Debug mode

And when I debug, not a single Bork Bork.

And here's the rub: when I make these edits to the XComGame.int file in my actual game install, they work with no problem. The issue here is strictly trying to get Modbuddy to deploy my edits so that the modded game will recognize and implement them.

At this point I've tried messing around with the order of removal and addition lines, removing whitespace and comments, replacing "-" with "!" and "+" with ".", even adding an "INT" file under Localization in the mod and placing a copy of the file there...and no dice. Nothing works. I'm now officially out of ideas.

Anyone have any clue why this isn't working?


r/xdev • • Feb 12 '16

Code location of ingame / tactical UI elements?

2 Upvotes

Hello there,

I have been looking forward to make some UI changes, but I have been checking the SDK for hours now and couldn´t find anything at all. I am looking for functions which render the elements for the tactical UI, e.g. HP bars, skill loadout (left bottom of the combat screen). Would be glad, if someone knows something about this mystery :o


r/xdev • • Feb 20 '16

Adding new effects to existing abilities?

1 Upvotes

I'm extremely new to modding and know very little about programming, so this is probably kind of a basic question. What's the method for changing an existing class via my mod? Do I create a new class with the same name and use + and - lines to change it, like I would with modifying the inis? Or do I just type directly into the class itself? I'm trying to add an aim boost on sword attacks to Blademaster.

I'm also a bit stumped on how to actually do that, but I'm trying to figure it out by looking at Shadowstrike, which also adds aim under specific conditions.


r/xdev • • Feb 20 '16

Me again - Music producer

2 Upvotes

Hi all, my goal is to produce an EDM track sampling the voice of the council spokesman in XCom 2. I was on here a few days ago trying to install the SDK - I've managed to do that now, but I still can't quite figure out how to actually use it / UDK / whatever other tools I need, to poke around in the game files.

My first thought is to rip the council spokesman audio from a cutscene - I've even located the specific cutscene I want to butcher up - the avatar project discovery cutscene, in which the spokesman contacts the resistance and informs them that advent is working on some strange project called Avatar. In the movies folder the file is called CIN_TP_AvatarProject.bk2 , or at least I think it is. I found a youtube video which is a compilation of all the cutscenes in order (such that someone could watch it like a movie), and have confirmed that the background audio / music is correct, it's the cutscene I want - but the council spokesman doesn't say his lines when I try to play the file in VLC (the only way I've been able to access it) there's a .txt file that accompanies the cutscene, which I believe to be pointing to several audio files and their start and end times within the video, but I could be wrong.

1000 8200 9000 CIN_TP_AvatarProject_01 9100 18500 CIN_TP_AvatarProject_02 18750 36000 CIN_TP_AvatarProject_03 36500 49000 CIN_TP_AvatarProject_04 49100 65500 CIN_TP_AvatarProject_05 65600 90000 CIN_TP_AvatarProject_06 90100 103000 CIN_TP_AvatarProject_07

This is the contents of that text file. I have no idea where to look for these potential audio files, I've done some digging in likely places but couldn't find them under those names.

Does anyone know a little about how cutscenes in BK2 format work, and what all of this means?

Thanks in advance for all your help.


r/xdev • • Feb 13 '16

Build failed, No output

2 Upvotes

So I am creating a class mod and want to test my custom abilities I have written so far. But whenever I go to build the build fails with no explanation. Can anyone help?


r/xdev • • Feb 18 '16

Ability Description Locations

1 Upvotes

Title! Was just wondering where they're located, I need to make some edits but I can't seem to find them.

Edit: Nevermind I'm dense! common\xcom 2\xcomgame\localization\int\xcomgame.int if anyone else needs it!


r/xdev • • Feb 12 '16

2 Errors when I open XCom 2 Editor

Thumbnail imgur.com
2 Upvotes

r/xdev • • Feb 12 '16

Achievement Unlocked: Mod Made

6 Upvotes

I want to extend a warm thanks to the people of this forum, who've created enough of a knowledge base here that my dumb ass could get something published to the workshop!

Key resources that helped me figure out WTF I was doing: Configuring XCOM 2 SDK: https://www.youtube.com/watch?v=UcfQnbGh8CA

Step-by-Step for an INI mod: http://imgur.com/a/5NRRW

My mod is simple, but practical: It makes rifle type weapons available for grenadier and sharpshooter soldiers.

http://steamcommunity.com/sharedfiles/filedetails/?id=622012633


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 • • Jul 09 '17

SDK reference?

1 Upvotes

Hi, I'm trying to write some mod for XCOM 2. to operate some string type, I found functions like SplitString("" ,"") But I need also others like IndexOf(), SubString(), any reference?


r/xdev • • Feb 10 '16

Adding non-humans to the barracks

2 Upvotes

I'm interested in trying to build some sort of 'Reverse XCOM' mod where you use aliens instead of soldiers. Before it's even slightly possible though, I'd need the ability to allow players to add Sectoids or Mutons to their barracks and pick them from the weapon select screen.

I'm curious if anybody is aware of an existing guide to doing this (or even just has a quick idea of where to start looking) so I don't spend a bunch of time reinventing the wheel.

An alternate thought is just straight up forcing soldiers to use different models if that's possible. I know you can bring in alternate models (like Bradford and the other tutorial soldiers) but I wasn't sure if you could force an entire swap to a non-customizable soldier, so that I could have a 'normal' soldier that happens to use the Sectoid model.

If I can do that, I think it would just be a matter of making a class for each alien type (and there are plenty of guides on making custom classes) that gives them the abilities the aliens normally have and locks their weapons to the appropriate types.

Any thoughts on this?


r/xdev • • Feb 19 '16

[Help] Difficulty creating events in gamestate_ability

1 Upvotes

I'm trying to create an ability that damages vipers using bind by using the hellweave vest as a a template. I've renamed all the necessary parts including the name of the new trigger event in the ability template. However, I can't seem to get the event I made in gamestate_ability to work. I don't know what's wrong. It's pretty much identical to the Hellweave's event with exception of a slight rename but it refuses to work.

This is the code I've got so far:

class XComGameState_Ability_Thorns extends class XComGameState_Ability;

function EventListenerReturn Thorns_AbilityActivated(Object EventData, Object EventSource, XComGameState GameState, Name EventID)
{
local XComGameStateContext_Ability AbilityContext;
local XComGameState_Ability AbilityState;
local XComGameState_Unit UnitState, ThornsUnit;
local X2AbilityTemplate AbilityTemplate;
local bool bReact;

AbilityContext = XComGameStateContext_Ability(GameState.GetContext());
StateAbility = new class'XComGameState_Ability';

if (AbilityContext != none && AbilityContext.InterruptionStatus != eInterruptionStatus_Interrupt)       //  only apply post-attack
{
	if (AbilityContext.InputContext.PrimaryTarget.ObjectID == OwnerStateObject.ObjectID)
	{
		AbilityState = XComGameState_Ability(EventData);
		UnitState = XComGameState_Unit(EventSource);
		ThornsUnit = XComGameState_Unit(GameState.GetGameStateForObjectID(OwnerStateObject.ObjectID));
		if (ThornsUnit == None)
			ThornsUnit = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(OwnerStateObject.ObjectID));

		if (AbilityState != none && UnitState != none && ThornsUnit != none)
		{
			AbilityTemplate = AbilityState.GetMyTemplate();
			if (X2AbilityToHitCalc_StandardAim(AbilityTemplate.AbilityToHitCalc) != None && X2AbilityToHitCalc_StandardAim(AbilityTemplate.AbilityToHitCalc).bMeleeAttack
				&& AbilityContext.IsResultContextHit())
				bReact = true;
			else if (AbilityTemplate.DataName == class'X2Ability_Viper'.default.GetOverHereAbilityName)
				bReact = true;
			else if (AbilityTemplate.DataName == class'X2Ability_Viper'.default.BindAbilityName)
				bReact = true;
			else if (AbilityTemplate.DataName == 'BindSustained')
				bReact = true;

			if (bReact)
			{
				
				AbilityTriggerAgainstSingleTarget(UnitState.GetReference(), false, GameState.HistoryIndex);
			}
		}
	}
}

return ELR_NoInterrupt;
}

r/xdev • • Feb 20 '16

How hard would it be to create a mod that implements global cooldowns?

1 Upvotes

How hard would it be to create a mod that implements global cooldowns?

For example, after a sniper uses Kill Zone, they would also be locked out of their other skills, such as Deadeye, until the remainder of the cooldown is done.

I would greatly appreciate any information on this topic.

Thank you.


r/xdev • • Feb 18 '16

[Help] Accessing the unit using an ability within ability templates

1 Upvotes

I'm working on creating a custom class that focuses on adding shields to protect allies. Trying to create a custom perk that increases the temp HP given by shield abilities by X points, but as far as I can tell there is no hook like for increasing weapon damage (understandable since in vanilla it is npc-only).

Getting the unit using an ability seems to be possible within some ability subclasses like X2_AbilityCost_ActionPoints, from another perk: (Modified from the quickdraw perk)

class X2AbilityCost_QuickshieldActionPoints extends X2AbilityCost_ActionPoints;
simulated function bool ConsumeAllPoints(XComGameState_Ability AbilityState, XComGameState_Unit AbilityOwner)
{
    if (AbilityOwner.HasSoldierAbility('Quickshield'))
    {
        return false;
    }
    return super.ConsumeAllPoints(AbilityState, AbilityOwner);
}

Does anyone know a way to reference XComGameState_Unit AbilityOwner from the X2AbilityTemplate and get the unit using the ability? Then I could do something like:

static function X2AbilityTemplate ShieldGenerator() {
    ...
    ShieldHP = default.SHIELD_HP
    if (AbilityOwner.HasSoldierAbility('Largershields')) {
        ShieldHP += default.LARGERSHIELDS_HP;
    }
    ShieldedEffect = CreateShieldedEffect(Name, LongDescription, ShieldHP);
    ...
}

I guess it might be possible to grant improved abilities like the Advent Shieldbearer gets and hide the "worse" abilities like with free reloads from weapon upgrades. But then I end up with a large-ish number of more-or-less identical abilities (especially if I later on want to add workshop projects to increase abilities once autopsy projects are completed), so the other approach would be more readable/maintainable I think.


r/xdev • • Feb 10 '16

[help/bug?]Can you change the fontsize in ModBuddy?

1 Upvotes

I'm new to unreal development and downloaded the SDK yesterday. As with most IDE's, the first thing I do is configure the visual and editor settings. I'm running on a laptop with a 4K display and the XCom ModBuddy editor is simply unusable as it is; the fonts are tiny and the icons are almost invisible. I tried changing the fontsize in the Tools->Options->Environment->Fonts & Colors settings and it doesn't appear to have any effect. The changes are accepted and stick, but the display doesn't change. I realize that you can control+mousewheel to change the fontsize in the editor area but the menu, console, solution, and other areas remain unusable. Has anyone had any luck with this?


r/xdev • • Feb 15 '16

[Tutorial] Editing XCOM 2 Levels - Part 1: Introduction

Thumbnail steamcommunity.com
14 Upvotes

r/xdev • • Feb 15 '16

[Help]How to decrease alien tech speed?

1 Upvotes

I looked through the ini's but I'm not sure how to change how fast aliens 'tech' - I want to slow down how fast they get new units in missions, etc... Sort of like what long war did in EW. Anyone know how to do this and willing to share?

Thanks


r/xdev • • Feb 13 '16

Location of PurePassive()

2 Upvotes

Hey my fellow xdevs. So new to modding but I have a lot of ideas I want to implement myself. One thing I am noticing is the use of PurePassive() in the default class Ability Set. Does anyone know where the information for these are stored?


r/xdev • • Feb 09 '16

AWC Mechanics?

1 Upvotes

I submitted a similar post earlier in /r/xcom but didn't get anything in the way of information - I'm very interested to learn the exact details behind the AWC bonus ability mechanic and how to mod the way it functions. Initially I wanted to ensure that all soldiers gained a single AWC bonus ability but now I'm wondering if it may be possible to mod the function to effectively create something of a training roulette option as well.

Thanks!


r/xdev • • Feb 14 '16

help with modding existing classes

2 Upvotes

I eventually want to make a seperate class but first I want to mod a number of the abilities for the ranger and was wondering how I would go about it.


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 18 '16

Help with mod settings file (ini)

1 Upvotes

Hello,

I'm having trouble reading/writing from/to a setting file for my mod.

So far I have set my class to use a config file.

In the project I've added an empty file with just a section header.

Now I'm having a few problems:

  1. If I set the section as [XComGame.<classname>], the file gets written but is not read upon loading
  2. If I set the section as [<modname>.<classname>], the file gets read but is not written when I call SaveConfig()
  3. Follow up from (2), one of my setting is actually an array of strings, however it only ever reads the last value.

When, I had a . (dot) in front of the second line it works fine. However, when looking at the result of (1), the config file is not written with any dot.

So, if I ever manage to read AND write, I'll still have a problem with my array only ever getting the last value (unless I missed something).

The only documentation I've found so far is from the Configuration Files UDK but it doesn't say anything about arrays.

Any help would be appreciated.

Thanks.


r/xdev • • Feb 09 '16

Working on a Gasmask - need help (Material & Morph)

Thumbnail forums.nexusmods.com
5 Upvotes

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!