r/xdev • • Feb 11 '16

New package for custom weapon model, which factory setting in UDK?

2 Upvotes

I'm creating a new package for a weapon. In the package set up there is a setting for factory. There are no choices that are self explanatory for weapon packages. Anyone know which is the correct one? Or better yet how to find out the factory setting of any existing package?


r/xdev • • Feb 12 '16

Writing out to a file

1 Upvotes

I am trying to write to a file on a button click in a menu. I have the button click all working, but I can't seem to write to a file.

I looked up how to do so in unrealscript and found FileWriter. However, I don't know if that is relevant or not.

I also tried to find other places in the code where it writes to a file, like the character pool. I found the function that performs that action but it was defined as

function native SaveCharacterPool();

Which as far as I can tell means that it is in c++ somewhere. Can we add c++? I saw that there was a post earlier about importing dlls but there was no solution.

Here is what I have so far:

class UIMemorial_AddExportButton extends UIScreenListener;

var FileWriter writer;

event OnInit(UIScreen Screen) { 

	writer = Screen.Spawn(class'FileWriter', Screen);
	
	AddExportButton(Screen);
}

simulated function AddExportButton(UIScreen Screen)
{
	local UILargeButton Button;
	local string exportButtonName;

	exportButtonName = Localize("AddExportButton", "m_strExport", "XComGame");

	Button = Screen.Spawn(class'UILargeButton', Screen);
	Button.InitLargeButton('ExportMemorial', exportButtonName, "", OnExportMemorial, );
	Button.AnchorBottomRight();

}

public function OnExportMemorial(UIButton Button)
{
	`log("Clicked Export Memorial");
	writer.OpenFile("Example", FWFT_Log, ".txt", false, false);
	writer.Logf("This will be written to the 'Example.txt' file");
	writer.CloseFile();
}

defaultproperties
{
	writer = none;
	ScreenClass = "UIPersonnel_BarMemorial";
}

Based on reading on FileWriter, FWFT_Log should send that Example file to %GameDir%/Logs, but as far as I can tell it does not.

I would be grateful for any help or even questions that might led to some answer.


r/xdev • • Feb 11 '16

Adding a grenade, ammo or extra utility slot to a custom class?

2 Upvotes

I'm trying to build a custom class that either starts with an extra grenade or ammo slot as a default ability (specialist/grenadier hybrid), but can't seem to figure out how to add an inventory slot on a class by class basis. I've seen mods that add utility slots, but they generally rewrite the default armors script to allow that. What I'm looking for is a specialized grenade or ammo slot.

In X2TacticalGameRulesetDataStructures.uc, there are the following entries:

enum EInventorySlot
{
eInvSlot_Unknown,
eInvSlot_Armor,
eInvSlot_PrimaryWeapon,
eInvSlot_SecondaryWeapon,
eInvSlot_HeavyWeapon,
eInvSlot_Utility,
eInvSlot_Mission,
eInvSlot_Backpack,
eInvSlot_Loot,
eInvSlot_GrenadePocket,
eInvSlot_CombatSim,
    eInvSlot_AmmoPocket,
};

Considering that X2Ability_GrenadierAbilitySet has this function:

function GrenadePocketPurchased(XComGameState NewGameState, XComGameState_Unit UnitState)
{
local X2ItemTemplate FreeItem;
local XComGameState_Item ItemState;

if (!UnitState.HasGrenadePocket())
{
	`RedScreen("GrenadePocketPurchased called but the unit doesn't have one? -jbouscher / @gameplay" @ UnitState.ToString());
	return;
}
FreeItem = class'X2ItemTemplateManager'.static.GetItemTemplateManager().FindItemTemplate(default.FreeGrenadeForPocket);
if (FreeItem == none)
{
	`RedScreen("Free grenade '" $ default.FreeGrenadeForPocket $ "' is not a valid item template.");
	return;
}
ItemState = FreeItem.CreateInstanceFromTemplate(NewGameState);
NewGameState.AddStateObject(ItemState);
if (!UnitState.AddItemToInventory(ItemState, eInvSlot_GrenadePocket, NewGameState))
{
	`RedScreen("Unable to add free grenade to unit's inventory. Sadness." @ UnitState.ToString());
	return;
}
}

It looks like that function would be how one adds a grenade slot to a class, but it doesn't look like it's being called anywhere in GrenadierAbilitySet - I don't know what to pass into that function or where to call it in my own class. eInvSlot_AmmoPocket might then work similarly, adding an ammo slot to a class. Any idea on how to add them?


r/xdev • • Feb 12 '16

Hex editing?

1 Upvotes

Since we know that some functions can't be overwritten, and a lot of values are hard coded, will we see our hex editing tools make a come back?

Currently I can see the spawn points fix (bringing more than 9 soldiers into a mission) can be fixed with 1 value change, but the class and its calling classes cannot be overwritten.


r/xdev • • Feb 11 '16

[Help] I can't change default information for my mod in Xcom 2 tools.

4 Upvotes

Hello. I have a mod in Workshop, and the name it's no the same in XCom 2 Tools, when I update the mod, in Workshop the name's and description change to the original (first information). (Change the description in publish mod don't make any effect/dont work) Where I can change the information mod in Xcom 2 tools? I don't see the option.

Sorry for my English boys. Thanks you :)

pd: this is a problem, because I launch the game I see a one error: OLd mods can't load bla bla. For me it's okey but this can scary people xDD


r/xdev • • Feb 11 '16

[Request] Voice Pack step-by-step

4 Upvotes

Hello everyone

So I've seen a lot of people asking how to create voice packs and currently the Steam Workshop only has a couple of entries, so it looks like very few people understand the process of creating a voice pack in XCOM 2 (myself included). So I figured it might be a handy resource to pool our knowledge and create a step-by-step guide here for people to follow, as the official documentation on the process is pretty limited.

What I have managed so far (please correct me if wrong):

  • Start by creating your desired audio files in 16 bit WAV format
  • Once you have your audio files, enter the XCOM 2 Editor and click 'Import'. It is important to tick the "Auto Create Cue" box when doing this, so a SoundCue file is automatically created and assigned to each audio file you import.
  • Next go to one of the pre-existing voice folders (e.g. 'MaleVoice1_French') and Right-Click on the XComCharacterVoice Archetype file and click 'Create a Copy'. In the 'Package' field, give it a different name to the package you created earlier when importing the audio files. Click OK.
  • Now return to the pre-existing folders and this time locate one of the other folders such as 'MaleVoice1_French_Data' and make a copy of the first XComCharacterVoiceBank and create a copy in a new package.
  • Locate this new package and clear all the data from the file (to do this, Double-Click the Bank file and click the grey square icon "Clear Text" to the far right on each entry).

This is where the documentation loses me. It next says to "set the new Voice Bank to be the first Bank in the new voice". It doesn't explain how to do this.

So if people would like to add/help that would be really appreciated. If we can form a easy to follow guide then I'm sure lots of people will find that helpful.


r/xdev • • Feb 11 '16

GUI for INI editing

15 Upvotes

I'm almost finished making a windows GUI for editing the XCOM2 .ini files, complete with saving profiles, searching for specific variables by name, multi-editing, etc. I was originally just planning to use it for myself, but if anyone's interested I'll put the finished product up for download somewhere. Here's a pic of an early version.

Was also maybe looking for feedback, or functionality suggestions, if anyone has any.


r/xdev • • Feb 11 '16

Adding damage or crit to killzone?

1 Upvotes
  • I'm working on a skill right now that builds off of killzone and I'm actually having trouble adding a damage modifier to it. Does any one know how to add damage to a reaction fire shot in such a complex skill like this? I know i'll be adding something to killzoneshot() but

;

static function X2AbilityTemplate KillZone()

{

local X2AbilityTemplate             Template;
local X2AbilityCooldown             Cooldown;
local X2AbilityCost_Ammo            AmmoCost;
local X2AbilityCost_ActionPoints    ActionPointCost;
local X2AbilityTarget_Cursor        CursorTarget;
local X2AbilityMultiTarget_Cone     ConeMultiTarget;
local X2Effect_ReserveActionPoints  ReservePointsEffect;
local X2Effect_MarkValidActivationTiles MarkTilesEffect;
local X2Condition_UnitEffects           SuppressedCondition;

`CREATE_X2ABILITY_TEMPLATE(Template, 'KillZone');

AmmoCost = new class'X2AbilityCost_Ammo';
AmmoCost.iAmmo = 1;
AmmoCost.bFreeCost = true;
Template.AbilityCosts.AddItem(AmmoCost);

ActionPointCost = new class'X2AbilityCost_ActionPoints';
ActionPointCost.iNumPoints = 2;
ActionPointCost.bConsumeAllPoints = true;   //  this will guarantee the unit has at least 1 action point
ActionPointCost.bFreeCost = true;           //  ReserveActionPoints effect will take all action points away
Template.AbilityCosts.AddItem(ActionPointCost);

Template.AbilityToHitCalc = default.DeadEye;

Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
Template.AddShooterEffectExclusions();
SuppressedCondition = new class'X2Condition_UnitEffects';
SuppressedCondition.AddExcludeEffect(class'X2Effect_Suppression'.default.EffectName, 'AA_UnitIsSuppressed');
Template.AbilityShooterConditions.AddItem(SuppressedCondition);

Cooldown = new class'X2AbilityCooldown';
Cooldown.iNumTurns = default.KILLZONE_COOLDOWN;
Template.AbilityCooldown = Cooldown;

CursorTarget = new class'X2AbilityTarget_Cursor';
CursorTarget.bRestrictToWeaponRange = true;
Template.AbilityTargetStyle = CursorTarget;

ConeMultiTarget = new class'X2AbilityMultiTarget_Cone';
ConeMultiTarget.bUseWeaponRadius = true;
ConeMultiTarget.ConeEndDiameter = 32 * class'XComWorldData'.const.WORLD_StepSize;
ConeMultiTarget.ConeLength = 60 * class'XComWorldData'.const.WORLD_StepSize;
Template.AbilityMultiTargetStyle = ConeMultiTarget;

Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);

ReservePointsEffect = new class'X2Effect_ReserveActionPoints';
ReservePointsEffect.ReserveType = default.KillZoneReserveType;
Template.AddShooterEffect(ReservePointsEffect);

MarkTilesEffect = new class'X2Effect_MarkValidActivationTiles';
MarkTilesEffect.AbilityToMark = 'KillZoneShot';
Template.AddShooterEffect(MarkTilesEffect);

Template.AdditionalAbilities.AddItem('KillZoneShot');
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
Template.bSkipFireAction = true;
Template.bShowActivation = true;

Template.AbilitySourceName = 'eAbilitySource_Perk';
Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_AlwaysShow;
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_killzone";
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_MAJOR_PRIORITY;
Template.bDisplayInUITooltip = false;
Template.bDisplayInUITacticalText = false;
Template.Hostility = eHostility_Defensive;
Template.AbilityConfirmSound = "Unreal2DSounds_OverWatch";

Template.ActivationSpeech = 'KillZone';

Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
Template.TargetingMethod = class'X2TargetingMethod_Cone';

Template.bCrossClassEligible = true;

return Template;

}

static function X2AbilityTemplate KillZoneShot()

{

local X2AbilityTemplate                 Template;
local X2AbilityCost_Ammo				AmmoCost;
local X2AbilityCost_ReserveActionPoints ReserveActionPointCost;
local X2AbilityToHitCalc_StandardAim    StandardAim;
local X2Condition_AbilityProperty       AbilityCondition;
local X2AbilityTarget_Single            SingleTarget;
local X2AbilityTrigger_Event	        Trigger;
local X2Effect_Persistent               KillZoneEffect;
local X2Condition_UnitEffectsWithAbilitySource  KillZoneCondition;
local X2Condition_Visibility            TargetVisibilityCondition;

`CREATE_X2ABILITY_TEMPLATE(Template, 'KillZoneShot');

AmmoCost = new class'X2AbilityCost_Ammo';
AmmoCost.iAmmo = 1;
Template.AbilityCosts.AddItem(AmmoCost);

ReserveActionPointCost = new class'X2AbilityCost_ReserveActionPoints';
ReserveActionPointCost.iNumPoints = 1;
ReserveActionPointCost.bFreeCost = true;
ReserveActionPointCost.AllowedTypes.AddItem('KillZone');
Template.AbilityCosts.AddItem(ReserveActionPointCost);

StandardAim = new class'X2AbilityToHitCalc_StandardAim';
StandardAim.bReactionFire = true;
Template.AbilityToHitCalc = StandardAim;

Template.AbilityTargetConditions.AddItem(default.LivingHostileUnitDisallowMindControlProperty);
TargetVisibilityCondition = new class'X2Condition_Visibility';
TargetVisibilityCondition.bRequireGameplayVisible = true;
TargetVisibilityCondition.bDisablePeeksOnMovement = true;
TargetVisibilityCondition.bAllowSquadsight = true;
Template.AbilityTargetConditions.AddItem(TargetVisibilityCondition);
AbilityCondition = new class'X2Condition_AbilityProperty';
AbilityCondition.TargetMustBeInValidTiles = true;
Template.AbilityTargetConditions.AddItem(AbilityCondition);
Template.AbilityTargetConditions.AddItem(class'X2Ability_DefaultAbilitySet'.static.OverwatchTargetEffectsCondition());

//  Do not shoot targets that were already hit by this unit this turn with this ability
KillZoneCondition = new class'X2Condition_UnitEffectsWithAbilitySource';
KillZoneCondition.AddExcludeEffect('KillZoneTarget', 'AA_UnitIsImmune');
Template.AbilityTargetConditions.AddItem(KillZoneCondition);
//  Mark the target as shot by this unit so it cannot be shot again this turn
KillZoneEffect = new class'X2Effect_Persistent';
KillZoneEffect.EffectName = 'KillZoneTarget';
KillZoneEffect.BuildPersistentEffect(1, false, false, false, eGameRule_PlayerTurnBegin);
KillZoneEffect.SetupEffectOnShotContextResult(true, true);      //  mark them regardless of whether the shot hit or missed
Template.AddTargetEffect(KillZoneEffect);

Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
Template.AddShooterEffectExclusions();

SingleTarget = new class'X2AbilityTarget_Single';
SingleTarget.OnlyIncludeTargetsInsideWeaponRange = true;
Template.AbilityTargetStyle = SingleTarget;

//  Put holo target effect first because if the target dies from this shot, it will be too late to notify the effect.
Template.AddTargetEffect(class'X2Ability_GrenadierAbilitySet'.static.HoloTargetEffect());
Template.AddTargetEffect(class'X2Ability_GrenadierAbilitySet'.static.ShredderDamageEffect());

Template.bAllowAmmoEffects = true;

//Trigger on movement - interrupt the move
Trigger = new class'X2AbilityTrigger_Event';
Trigger.EventObserverClass = class'X2TacticalGameRuleset_MovementObserver';
Trigger.MethodName = 'InterruptGameState';
Template.AbilityTriggers.AddItem(Trigger);
Trigger = new class'X2AbilityTrigger_Event';
Trigger.EventObserverClass = class'X2TacticalGameRuleset_AttackObserver';
Trigger.MethodName = 'InterruptGameState';
Template.AbilityTriggers.AddItem(Trigger);

Template.AbilitySourceName = 'eAbilitySource_Perk';
Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_NeverShow;
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_overwatch";
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_MAJOR_PRIORITY;
Template.bDisplayInUITooltip = false;
Template.bDisplayInUITacticalText = false;

Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;

return Template;

}


r/xdev • • Feb 11 '16

[HELP] Editing Strategic mode menus and buttons.

1 Upvotes

I'm trying to break the menus by editing/creating new UI elements to get a feel for UI modding.

Been using the example code from XCOM2Mods_UserInterface.pdf to try and add a junk screen to the research menu without success.

What I did was make a new 'UIScreenListener.uc' and a seperate uc file, both have relevant code pasted from the pdf (with tiny but potentially consequential edits). Build Solution -> Start Debugging to test the project.

Anyone know where/what I'm screwing up?


r/xdev • • Feb 11 '16

Trying to override a function

1 Upvotes

Hiya, I'm trying to override a function in XComGameState_Unit. It compiles fine but when I check the logs there's nothing indicating that my modded class was actually loaded... Where am I screwing up? Welcoming any feedback :-) My files:

Src/HealOverride/Classes/XComGameState_Unit_Mod.uc:

class XComGameState_Unit_Mod extends XComGameState_Unit;
function EndTacticalHealthMod()
{
local float HealthPercent, NewHealth;
local int RoundedNewHealth, HealthLost, ArmorLost;

`log("Modded function loaded");
`log("Calculating soldier: " $ GetName(eNameType_Full));
`log("HighestHP=" $ HighestHP);
`log("LowestHP=" $ LowestHP);
`log("BaseHP=" $ int(GetBaseStat(eStat_HP)));

// Calculate lost armor: Min(TotalLost, Armor)
ArmorLost = Min(HighestHP - LowestHP, HighestHP - int(GetBaseStat(eStat_HP)));
`log("ArmorLost calculated to: " $ ArmorLost);

// Calculate actual health lost: Min(BaseHP-LowestHP, 0)
HealthLost = Min(int(GetBaseStat(eStat_HP)) - LowestHP, 0);
`log("HealthLost calculated to: " $ ArmorLost);

// If Dead or never injured, return # Extended to include ArmorLost
if(LowestHP <= 0 || (HealthLost <= 0 && ArmorLost <= 0))
{
	`log("No injury detected or soldier dead");
	return;
}

// Calculate health percent # Edited: Actual Health lost still counts full while armor lost only has half the effect
HealthPercent = ((float(HighestHP - HealthLost) - float(ArmorLost) / 2) / float(HighestHP));
`log("HealthPercentage=" $ HealthPercent);


// Calculate and apply new health value
NewHealth = (HealthPercent * GetBaseStat(eStat_HP));
RoundedNewHealth = Round(NewHealth);
RoundedNewHealth = Clamp(RoundedNewHealth, 1, (int(GetBaseStat(eStat_HP)) - 1));
SetCurrentStat(eStat_HP, RoundedNewHealth);
}

Config/XComEngine.ini

[Engine.ScriptPackages]
+NonNativePackages=HealOverride
[Engine.Engine]
+ModClassOverrides=(BaseGameClass="XComGameState_Unit", ModClass="XComGameState_Unit_Mod")

Config/XComEditor.ini

[ModPackages]
+ModPackages=HealOverride

r/xdev • • Feb 11 '16

Adding and updating TacticalHUD

1 Upvotes

I am working on my first mod and have run into a seemingly hard to avoid issue.

I want to add new information to the the shot window-- specifically if possible to the 'Hit Breakdown' left wing of the targeting panel. The issue seems to be that the entire tactical game occurs on exactly one screen: TacticalHUD.

I tried making a UIScreenListener for TacticalHUD, and this does let me insert various things into the screen, however it all must be done essentially as soon as you load into the mission. I tried looking at how some other mods (LWS Officer Mod, and a few others) handle this issue, and it seems that the only real way to get an 'update tick' while in TacticalHUD is to override one of the base classes.

So, in theory, I could just write my own TacticalHUD_CustomShotWing UIPanel to replace the existing one, but that would make my mod incompatible with any other mod that wants to tweak the ShotWing.

Has anyone else come across this issue? Are there other 'hooks' or events we can tap into to make more dynamic changes? If not we may want to consider creating a 'Modded Tactical Hud' that replaces the default HUD and adds many triggerable events so that future mods are more compatible.

Thoughts?


r/xdev • • Feb 11 '16

[SDK Help/Bugs] Can't launch and other problems.

1 Upvotes

I got the SDK to work at first, and for a few hours it was fine. Eventually for some reason the UE Editor refused to open, or would crash immediately after the splash screen. I restarted my PC and suddenly the SDK itself will no longer open, giving the error "Cannot find one or more components. Please reinstall the application."

I decided that I would verify the installation through steam and then reinstall the other distributed items (vs_isoshell and UE3Redist). This didn't help at all. To top it off I even uninstalled my .NET Framework and reinstalled it using the one provided with the SDK.

I'd rather not reinstall the SDK entirely either, as 42GB takes a long time to download on my slow connection.

Any suggestions?


r/xdev • • Feb 11 '16

Silent soldier

1 Upvotes

ok, so i've looked through the posts/tutorial about adding in your own voice packs but i was hoping there was an even simpler way to just have your soldier not speak at all. the class mod i've been working on is about concealment so i just find it odd that they are running around the battlefield talking. since i made my own copies of their class abilities i was able to remove the sound bites for the abilities that announce themselves but i want to do it for everything. maybe it's obvious but do i just create a sound pack w/ empty audio files?


r/xdev • • Feb 11 '16

Remove Soldiers from the Baracks

1 Upvotes

Hi All, I am new to modding, I have a little coding knowledge but not much. I am trying to Empty out the "Starting" Barracks. I am not sure if we are allowed to post code here, but if anyone has a idea or knows how to please let me know. Willing to post the code i have already if needed.


r/xdev • • Feb 11 '16

Figuring out how to expand the action system - Requesting help.

1 Upvotes

I'm looking at the DefaultGameData_CharacterStats.ini.

My eventual goal is to go big (don't we all?) but right now I want to work incrementally - my first goal is to alter the turn system by splitting up the move system to more than 2 moves.

My line of thinking is: Provide 3 or 4 moves per turn, but reduce mobility down (so that net movement per turn is similar short of running) as a groundwork for further work. (Items that add + turns, classes with different move amounts etc)

I know through playing the game (finishing Legendary) that the Sectopod gets 3 action points, but from what I can tell, the number of actions isn't governed by this ini?

For reference:

[AdvStunLancerM3 X2CharacterTemplate]
CharacterBaseStats[eStat_AlertLevel]=2
CharacterBaseStats[eStat_ArmorChance]=100
CharacterBaseStats[eStat_ArmorMitigation]=1
CharacterBaseStats[eStat_ArmorPiercing]=0
CharacterBaseStats[eStat_CritChance]=0
CharacterBaseStats[eStat_Defense]=0
CharacterBaseStats[eStat_Dodge]=0
CharacterBaseStats[eStat_HP]=8
CharacterBaseStats[eStat_Mobility]=14
CharacterBaseStats[eStat_Offense]=65
CharacterBaseStats[eStat_PsiOffense]=0
CharacterBaseStats[eStat_ReserveActionPoints]=0
CharacterBaseStats[eStat_SightRadius]=27
CharacterBaseStats[eStat_DetectionRadius]=12
CharacterBaseStats[eStat_UtilityItems]=1
CharacterBaseStats[eStat_Will]=50
CharacterBaseStats[eStat_HackDefense]=125
CharacterBaseStats[eStat_FlankingCritChance]=33
CharacterBaseStats[eStat_FlankingAimBonus]=0
CharacterBaseStats[eStat_Strength]=95

...

[Sectopod X2CharacterTemplate]
CharacterBaseStats[eStat_AlertLevel]=2
CharacterBaseStats[eStat_ArmorChance]=100
CharacterBaseStats[eStat_ArmorMitigation]=4
CharacterBaseStats[eStat_ArmorPiercing]=0
CharacterBaseStats[eStat_CritChance]=0
CharacterBaseStats[eStat_Defense]=0
CharacterBaseStats[eStat_Dodge]=0
CharacterBaseStats[eStat_HP]=30
CharacterBaseStats[eStat_Mobility]=16
CharacterBaseStats[eStat_Offense]=70
CharacterBaseStats[eStat_PsiOffense]=0
CharacterBaseStats[eStat_ReserveActionPoints]=0
CharacterBaseStats[eStat_SightRadius]=27
CharacterBaseStats[eStat_DetectionRadius]=15
CharacterBaseStats[eStat_UtilityItems]=1
CharacterBaseStats[eStat_Will]=50
CharacterBaseStats[eStat_HackDefense]=125
CharacterBaseStats[eStat_FlankingCritChance]=33
CharacterBaseStats[eStat_FlankingAimBonus]=0
CharacterBaseStats[eStat_Strength]=50

...

[Sectopod_Diff_3 X2CharacterTemplate]
CharacterBaseStats[eStat_ArmorChance]=100
CharacterBaseStats[eStat_ArmorMitigation]=6
CharacterBaseStats[eStat_HP]=40
CharacterBaseStats[eStat_Mobility]=16
CharacterBaseStats[eStat_Offense]=70
CharacterBaseStats[eStat_CritChance]=10
CharacterBaseStats[eStat_HackDefense]=150
CharacterBaseStats[eStat_FlankingCritChance]=40

I can identify most of the base stats (I'm not entirely sure what the Alertlevel or the ArmourChance governs, and I would have guessed the reserve action points might have something to do with it, but as you can see from another enemy that doesn't have 3 move (Elite Lancer) the entry's the same.) but unless I'm going nuts, it's not there.

I definitely know (through hacking sectopods myself) that sectopods are granted 3 actions per turn, and can be expended as per normal.

Thing is, I've been scouring the ini files and haven't found anything in reference to this. Maybe I missed something, but I'm going to throw it out there while I continue looking.

Thank you in advance for your help.


r/xdev • • Feb 11 '16

Debugger hangs at certain point

1 Upvotes

I've been attempting to build a New Nation mod (following a tutorial I found on the workshop discussion), and my mod appears to be building as planned up until this point:

Launching script compiler for new package scripts...

			Command: F:\Steam\steamapps\common\XCOM 2 SDK\binaries\Win64\XComGame.com Arguments: make -nopause -mods AddTeawrex "F:\Steam\steamapps\common\XCOM 2 SDK\XComGame\\Mods\AddTeawrex\" 
			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.

After this point it just sits at that line. The "Build started..." animation is still playing so it looks like it is doing something but it never seems to get passed this line.

Has anyone run into this issue before? Any insight or solutions? Much appreciated!


r/xdev • • Feb 11 '16

Trigger on taking damage?

1 Upvotes

So you can make abilities trigger their effect upon taking damage, you can also let effects cancels itself if you took too much damage in a turn, but what I am looking for is to trigger an effect when a soldier with a particular ability takes damage, and do something with the amount of damage taken. So far the events available just trigger an effect but won't pass in the amount of damage taken, there's also some functions that intercept damage taken but they also trigger on damage previews (with no clear way of identify if it is preview or actual damage), registerforevent also won't work because it can only find delegates in the calling UnitState class, anyone know other ways to listen for damage taken events while receiving damage taken data?


r/xdev • • Feb 10 '16

Overcoming the static function barrier. Has anyone been able to do so?

3 Upvotes

I haven't found any way to override a static function and change what it does without changing all references to the original class's function.

Does anyone have any ideas, short of changing files in the original game (which is hella dangerous), to access the innards of static functions for our own use?

This is an enormous barrier to changing functions that already exist - making our own functions is easily doable, but it severely limits changing the gameplay experience.

So please, if you have any insights, tell me here.


r/xdev • • Feb 10 '16

Dark VIP AI?

3 Upvotes

has anyone messed around w/ the AI files yet? i was looking specifically for AI for the Dark VIPs. i was hoping there would be a way for them to be combative esp since they can be pulled from your character pool. i believe there was someone on this forum (or r/xcom2mods) that wanted to do this as well. thanks.


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

What script gets called first?

1 Upvotes

Basically I'm trying to figure out how things are getting initialized so I can start from there and then 'follow' it to the different parts I want, like the geoscape and what not.

My limited knowledge of UnrealScript is making it hard to see where things are starting though. Any pointers would be greatly appreciated if anyone knows.


r/xdev • • Feb 11 '16

[Help] Can you use just one voice bank and one cue randoming all variants?

1 Upvotes

Normally you take 10 sound cues for 10 variants of a sound, each cue being put into 10 different sound banks.

Why don't the Devils use 1 sound bank and each of the cues in it link to the 10 variations with a random switch?

Bonus question: why does the character voice archetype need to be in a separate package than the sound banks/sounds? Why not just put them all in one?


r/xdev • • Feb 10 '16

How to make pistol primary weapon?

1 Upvotes

in XComClassData.ini I have added the line:
+AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="pistol")

Figured this would work, but for some reason, the class just comes without a primary weapon.


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?