Page 1 of 2

Long War 2 Console Commands

Posted: Wed Jan 25, 2017 1:16 am
by deaconivory
When used by players these are "cheat codes" plain and simple, using them will forever cast you into the hellish pit of cheaters, but may just help you learn the game a bit as well. Nothing is guaranteed and don't ask for help with these, whatever Faustian pact you've created for yourself means that you and Google can work it out on your own. Read each command closely as you type it into the console and it will provide enough information as to what data it is looking for.

I'm not helping you.

Long War 2 console commands (there are some missing for sure):


LWAddRebel true WorldRegion
LWAdvanceActivity XCOM Activity WorldRegion number
LWdebugpodjobs (this displays the status of enemy pods on the map)
LWDumpActivityLog
LWDumpAIJobNames
LWDumpAIJobs
LWdumpregioninfo
LWForceActivityDetection
LWForceActivityDetection Enemy Activity WorldRegion (see blelow)
LWForceAWCRerolls
LWForceMission (see below)
LWForceRecruitRoll
LWGiveAWCDefenseAbility Soldier Name
LWGiveAWCOffenseAbility Soldier Name
LWGiveAWCPistolAbility Soldier Name
LWLevelUpRebel Soldier Name
LWprinthistory
LWSetAlertLevel Number
LWSetAutoResolveEnabled
LWSetEvacCounter Number
LWForceEvac
LWSetForceLevel Number
LWSetVigilanceLevel Number
LWSpawnActivity Enemy Activity WorldRegion (see below)
LWToggleShowFaceless
LWValidatePendingDarkEvents

A few "Vanilla" XCOM2 Commands that are also useful:
X2DebugMap
AiDebugAi
x2debugvisibility
AddItem AssaultRifle_CG (Adds a coil gun . . . you know, for science)
killallais (Kills all of the AI controlled units on the map, including VIPs and Rebels, so be careful with this one)
Skipai (this pauses the AI and the aliens will not take another turn, if you save and reload it resets this)
killclosestunittocursor (be careful this can kill XCOM and VIPs too)
Togglefow (won't reveal enemy units)
RestartLevel; This is basically Bronzeman as I understand it (which means it may be completely wrong)
TTC; "Toggle To Cursor" - selected unit
TATC; "Toggle All To Cursor" - all XCOM units
RemoveFortressDoom Number - removes this many Avatar timer pips
HealAllSoldiers
LevelUpBarracks
SetStrategyFacilitiesUnlockAll
SetStratagyFacilitiesInstantBuild
SetStratagyFacilitiesFree

You need to have at least 1 of these resources in your inventory for the command to work properly:
GiveResource alienalloys number
GiveResource EleriumCore number
GiveResource EleriumDust number
GiveResource Intel number
GiveResource Supplies number
GiveEngineer number
GiveScientist number

Regions:
WorldRegion_EastNA
WorldRegion_WestNA
WorldRegion_SouthNA
WorldRegion_NorthSA
WorldRegion_SouthSA
WorldRegion_WestEU
WorldRegion_EastEU
WorldRegion_NorthAF
WorldRegion_EastAF
WorldRegion_SouthAF
WorldRegion_EastAS
WorldRegion_WestAS
WorldRegion_NorthAS
WorldRegion_SouthAS
WorldRegion_NorthOC
WorldRegion_SouthOC

Some of the XCOM Activity:
RecoverItem_LW
RecoverItemADV_LW
RecoverItemTrain_LW
RecoverItemVehicle_LW
RecoverFlightDevice_LW
HackWorkstation_LW
HackWorkstationADV_LW
HackWorkstationTrain_LW
SupplyLineRaidATT_LW
SupplyLineRaidTrain_LW
SupplyLineRaidConvoy_LW
DestroyRelay_LW
ProtectDevice_LW
ExtractVIP_LW
RescueVIP_LW
RescueVIPVehicle_LW
NeutralizeTarget_LW
NeutralizeTargetVehicle_LW
SecureUFO_LW
SabotageAlienFacility_LW
SabotageAdventMonument_LW
Terror_LW
AvengerDefense_LW
AssaultAlienBase_LW
Jailbreak_LW
Defend_LW
Rendezvous_LW
IntelRaid_LW

Some of the Enemy Activity (Yes there are SPOILERS below):

If you don't want spoilers don't read below

Seriously, stop now . . .

ProtectRegion
Counterinsurgency
ReinforceActivity
COINResearch
COINOps
BuildResearchFacility
RegionalAvatarResearch
GlobalAvatarResearch
ScheduledOffworldReinforcements
EmergencyOffworldReinforcements
SuperEmergencyOffworldReinforcements
Repression
Invasion
AvengerHunt
Propaganda
ProtectResearch
ProtectData
TroopManeuvers
HighValuePrisoner
PoliticalPrisoners
Logistics
CloneDeployment
DebugMission
Rendezvous
IntelRaid
Defend

Re: Long War 2 Console Commands

Posted: Fri Jan 27, 2017 10:58 pm
by Goumindong
Worth noting that the "givescientist" and "giveengineer" commands only spawn one engineer or scientist. The "number" is the "quality" of the engineer from 1 to 10. Not sure what the baseline quality is but you will get one if you enter the text with no modifier. If you enter "10" your scientist/engineer will be much more effective at their tasks

Re: Long War 2 Console Commands

Posted: Tue Jan 31, 2017 8:52 pm
by kenyfpowers
Thanks for this. Is there a way to "Force" the Nest Mission? I'm midway through August and still haven't gotten the mission yet (and I have the hunter weapons already). Or is there a way to check the current forcelevel?

Re: Long War 2 Console Commands

Posted: Sun Feb 05, 2017 7:07 pm
by themefund
does the LWLevelUpRebel Soldier Name work on any soldier? I've had a few times where my soldiers have been promoted to a vanilla class because I have the "UseMyClass" Mod installed and didn't properly reset all the classes in my CharPool to the new LW classes. I didn't catch the error until after I'd ranked them to LCPL and noticed the third tree was missing.

In vanilla there is no way to give a soldier an extra rank (AFAIK) even through console commands. You can change their classes, but they are set back to squaddie, which is a bummer.

Re: Long War 2 Console Commands

Posted: Tue Feb 07, 2017 7:02 pm
by RXTXK
I'm considering jumping into the pit.
Can anyone help me with how the force level is calibrated.

I understand it drives (but not exclusively) enemy types and am thinking about setting it back to 'just about to see archon levels'.
Should this be 5,50,500? what is the typical numeric range and does it increase approximately linearly over time or geometrically?

Also do I risk putting the game into an inconsistent state by winding it backwards?

Re: Long War 2 Console Commands

Posted: Tue Feb 07, 2017 9:11 pm
by Biasface
(sorry for stupid question)
How does one go about enabling the dev console in the first place?

Re: Long War 2 Console Commands

Posted: Tue Feb 07, 2017 10:39 pm
by nmkaplan
Biasface wrote:(sorry for stupid question)
How does one go about enabling the dev console in the first place?
Go to steam Library. Right click XCom2, click "properties". Click "set launch properties".

Type "-allowconsole" (no quotes, but include the dash) in the box and click "ok"

While running the game, press the tilde key (~). It's usually at the upper left of the keyboard above the tab key and/or to the left of the 1 key. This brings up the console. Press the tilde key again to clear it.

Re: Long War 2 Console Commands

Posted: Thu Feb 09, 2017 10:08 am
by cerebrawl
themefund wrote:does the LWLevelUpRebel Soldier Name work on any soldier? I've had a few times where my soldiers have been promoted to a vanilla class because I have the "UseMyClass" Mod installed and didn't properly reset all the classes in my CharPool to the new LW classes. I didn't catch the error until after I'd ranked them to LCPL and noticed the third tree was missing.

In vanilla there is no way to give a soldier an extra rank (AFAIK) even through console commands. You can change their classes, but they are set back to squaddie, which is a bummer.
I think it's for the haven rabble rebels, not soldiers. A targetable rank up command would be nice.


I have another command request: a targetable AWC reroll. This has a number of applications for fixing soldiers after changes to AWC tables changes and/or class perk changes, as well as things like Commander's choice(indeed, it would let the mod use it to auto-fix AWC rolls).

Re: Long War 2 Console Commands

Posted: Sun Feb 12, 2017 7:50 pm
by HighlanderBR
Any of these commands can change the advent strength in a region?
EDIT: Just tested, LWSetAlertLevel Number does (need to use the region code)

Re: Long War 2 Console Commands

Posted: Mon Feb 13, 2017 4:40 pm
by themefund
cerebrawl wrote:I think it's for the haven rabble rebels, not soldiers. A targetable rank up command would be nice.

I have another command request: a targetable AWC reroll. This has a number of applications for fixing soldiers after changes to AWC tables changes and/or class perk changes, as well as things like Commander's choice(indeed, it would let the mod use it to auto-fix AWC rolls).
Just found this from Grimy: https://steamcommunity.com/sharedfiles/ ... =693790751

He has a levelupsoldier command, and I've commented for a rerollAWC for individuals as well. Perhas that's the best solution we've got for now?

Re: Long War 2 Console Commands

Posted: Tue Feb 14, 2017 4:20 pm
by Sevireth
Is there a way to change the console's position from covering the top two thirds of the screen, to single line on the bottom I have seen on other players' screens? Taking screenshots and TTCing stuck units is quite tricky without that

Re: Long War 2 Console Commands

Posted: Tue Feb 14, 2017 6:41 pm
by TheCiroth
Hit the \ key to have it be one line.

Re: Long War 2 Console Commands

Posted: Thu Feb 16, 2017 9:01 am
by cerebrawl
themefund wrote:
cerebrawl wrote:I think it's for the haven rabble rebels, not soldiers. A targetable rank up command would be nice.

I have another command request: a targetable AWC reroll. This has a number of applications for fixing soldiers after changes to AWC tables changes and/or class perk changes, as well as things like Commander's choice(indeed, it would let the mod use it to auto-fix AWC rolls).
Just found this from Grimy: https://steamcommunity.com/sharedfiles/ ... =693790751

He has a levelupsoldier command, and I've commented for a rerollAWC for individuals as well. Perhas that's the best solution we've got for now?
He made an individual AWC reroll command too.

http://steamcommunity.com/sharedfiles/f ... earchtext=

Re: Long War 2 Console Commands

Posted: Sat Feb 18, 2017 5:13 am
by Mongor123
Does anyone know the console command for adding suppressors into your inventory :)
Suppressors replace the repeaters in LW2, so they use the same template names as repeaters: "FreeKillUpgrade_Bsc", "FreeKillUpgrade_Adv", "FreeKillUpgrade_Sup". So "AddItem <name> <amount>" should work.

Re: Long War 2 Console Commands

Posted: Sun Feb 19, 2017 5:20 pm
by vrork
Can i get some help please? I am trying to make a character a Psionic and its not working. The character doesnt change class.

Re: Long War 2 Console Commands

Posted: Mon Feb 20, 2017 8:54 am
by Jacke
Any idea how to input Unicode characters into the console?

I'm trying to adjust soldier "Zuzanna Kozłowska" and finding no way to enter a "Latin Small Letter L With Stroke", the 4th character of her last name.

Re: Long War 2 Console Commands

Posted: Wed Feb 22, 2017 4:45 pm
by seananigans
Jacke wrote:Any idea how to input Unicode characters into the console?

I'm trying to adjust soldier "Zuzanna Kozłowska" and finding no way to enter a "Latin Small Letter L With Stroke", the 4th character of her last name.
Rename her first via vanilla customization options?

Re: Long War 2 Console Commands

Posted: Wed Feb 22, 2017 6:50 pm
by Jacke
seananigans wrote:
Jacke wrote:Any idea how to input Unicode characters into the console?

I'm trying to adjust soldier "Zuzanna Kozłowska" and finding no way to enter a "Latin Small Letter L With Stroke", the 4th character of her last name.
Rename her first via vanilla customization options?
Wow, that worked! Thanks!

And to boot, the UI to change the first name, last name, and nickname does take Unicode characters via this method.

https://en.wikipedia.org/wiki/Unicode_i ... ft_Windows

So I can change the name to remove the 'ł', adjust the soldier, then change her name back.

Of course, this would have been simpler if the console command UI just took Unicode characters.

Re: Long War 2 Console Commands

Posted: Mon Mar 06, 2017 12:38 pm
by gassrex
GiveResource codex brain?
any command for codex brain?

Re: Long War 2 Console Commands

Posted: Tue Mar 07, 2017 7:36 pm
by deaconivory
gassrex wrote:GiveResource codex brain?
any command for codex brain?
Not 100% sure if this will work but I see:

GiveTech BlacksiteData
GiveTech CodexBrainPt1
GiveTech CodexBrainPt2

I am not at my computer so I can't tell if GiveItem CodexBrain works or not.

Re: Long War 2 Console Commands

Posted: Sat Mar 11, 2017 2:42 am
by Rave42063
Hello,

How can I get soldier ID's?

The "displaysoldierclass - 1" command dumps everything in the console but it truncated after a few hundred lines and I can't see all my soldiers.

Is there a better way, or maybe a way to dump the output I tk a text file? Or even change the max lines of output in the console?

Re: Long War 2 Console Commands

Posted: Sun Mar 12, 2017 9:11 am
by DanNHG
Hello

I try to Force a Mission to Sabotage one Alien Facility and for that i try command : LW_ForceActivity SabotageAlienFacility WorldRegion West_AS,because the Avatarproject gain a point from a facility right there....but nothing happend...any tips? :?

Re: Long War 2 Console Commands

Posted: Wed Mar 22, 2017 6:34 pm
by pacotaco
Is there a command to spawn an extraction point? I am on ironman in a bugged Nest mission (already killed the VK) and I can't escape.

Re: Long War 2 Console Commands

Posted: Wed Mar 22, 2017 6:48 pm
by LordYanaek
did you try LWForceEvac
From the name it looks like it should force evacuation out of the mission, but i would still make a backup of my saves in your situation :geek:

Re: Long War 2 Console Commands

Posted: Wed Mar 22, 2017 9:36 pm
by pacotaco
I found a command endmission xcomwins[ubool]

or something like that. I didn't read I just typed i in as is and I guess the default state is false because it called the mission a loss. Doesn't matter, I had already killed the VK earlier I guess it will just make the spokesman a little peeved. Before that I tried placing a VK to see if killing it again would work but it kept dropping inert sprites. So then I played around a bit and spawned a couple mutons and yadda yadda yadda I'm back baby.