Xenonauts 2

Xenonauts 2

Ei tarpeeksi arvosteluja
Modding Xenonauts 2
Tekijältä endersblade
Here I will save all of the file editing I have discovered, to help people mod the game. This guide assumes you are savvy enough to read .json jargon, or at the bare minimum, understand that editing "Hit Points" will, in fact, give you more hit points.

All files can be located in ~\Xenonauts2\Assets\Assets\xenonauts\template and then either strategy or groundcombat within your Steam folder.

I highly recommend using Notepad++ and the Json Viewer plugin to make the files easy to read and edit.

THIS IS A WORK IN PROGRESS. I am updating it constantly! If you want to know about any other mods/edits, please ask and I'll see what I can find!
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Strategic Layer - Buildings
Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\strategy\construction\building

In this folder you will find all of the files pertaining to building stats.

Example: Power usage

{ "_min": 0.0, "_val": 10.0, "_max": 10.0, "$type": "Xenonauts.Strategy.Components.PowerUsage" }
Within these files, you can change things like Storage space, Living space, Radar range, Heal rate from the medbay, etc.
Strategic Layer - Shop/Lab space
Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\strategy\construction\building:

Example: Increasing the amount of Scientists/Engineers that can be staffed in Labs/Workshops:
Open Workshop.json, advanced, and improved (you need to edit all three, else the upgrades will revert back to the default.) Search for "ManyLinkTemplates":

Below it, you will find 5 instances of this:
{ "$content": "xenonauts-:-Xenonauts.GameScreens.Strategy-::-construction/personnel_slot/workshop_slot.json", "$type": "Common.Content.AssetReference`1[[Artitas.Template, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]" },

You can copy and paste as many of these (remember to select the brackets!) as you want - each one will add one slot to the workshop. Something to keep in mind, the last entry of the original five needs a comma after the last bracket( like this }, )! The LAST entry you make, REMOVE the comma!

The same goes for Laboratory.json, though the line has "laboratory_slot.json" instead of "workshop_slot.json", so be careful when copy/pasting. Something to note: This will update the UI that shows on the base screen, but it will NOT update the tooltip when hovering over the building in the build menu. I haven't figured out where to update that yet.
Strategic Layer - Research Speed
Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\strategy\masters\projects
Both Engineering and Research contain files we are interested here.
Engineering folder: engineering_duration0.json engineering_duration0.5.json engineering_duration1.json engineering_duration2.json engineering_duration3.json engineering_duration4.json engineering_duration5.json engineering_duration6.json engineering_duration7.json engineering_duration8.json engineering_duration9.json and Research folder: research_duration0.json research_duration1.json research_duration2.json research_duration3.json research_duration4.json research_duration5.json research_duration6.json research_duration7.json research_duration8.json research_duration9.json

You will find the following section:
(this is from research_duration0.json) "_components": [ { "_min": 0.0, "_val": 0.0, "_max": 12000.0, "$type": "Xenonauts.Strategy.Components.ProgressPoints" },

Each of these files control the speed at which things are manufactured or researched, based off of what is on the "_max": line. This number contains the number of research/engineering points that are required for anything that is tagged with this duration file (more on this in a second). Obviously, larger numbers = longer time. I do not know the mathematical breakdown of the number, maybe someone else can explain it.

You can do one of two things here: Edit the "_max": in any/each file as you wish, or, do the following:

Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\strategy\projects
Similar to the above location, you will find Engineering and Research folders. Within each is every project that you can do in the game. Warning, there are a LOT of them! What we're specifically looking for here is the first line under "Parent", at the top of the file:
"Parent": { "$content": "xenonauts-:-Xenonauts.GameScreens.Strategy-::-masters/projects/engineering/engineering_duration6.json", "$type": "Common.Content.AssetReference`1[[Artitas.Template, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]" },
Each project uses one of the duration.json files to control how long it takes to complete. In the above example, you could change that 6 to a 0, and that project would complete much, much faster. Or slower, depending on whether or not you decided to edit the duration.json files!
Strategic Layer - Eng/Sci costs
Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\strategy\masters\actor\combatant\human\xenonauts

File: Scientist_master and Engineer_master.json
{ "_min": 50000.0, "_val": 50000.0, "_max": 50000.0, "$type": "Xenonauts.Strategy.Components.OperationPoints" },
and
{ "$content": 25000.0, "$type": "Xenonauts.Strategy.Systems.ExpenseComponent" },

These two sections control the purchase and monthly expense cost of Engineers and Scientists. Additionally in these files, you will find this:
{ "_min": 1.0, "_val": 1.0, "_max": 1.0, "$type": "Xenonauts.Strategy.Components.Ranges.ScientificRating" },
This, and the Engineer version, control how many points each one generates towards the project time (see above section on controlling project duration). If you don't want to bother changing the duration files/each individual project file, you could just bump this number to make research go faster.
Strategic Layer - Xenonauts Stats
Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\strategy\masters\actor\combatant\human\xenonauts

File: soldier_master.json
Inside this file, you'll find all of the stats and stat ranges for hired/new soldiers. Keep in mind, changing this requires you to start a new game to load the new edits.

Example:
{ "_min": 35.0, "_val": 50.0, "_max": 65.0, "$type": "Xenonauts.Common.Stats.HitPoints" },

Editing these three lines will modify the minimum and maximum stats a soldier will roll when they show up to get hired. I'm not entirely sure what the middle value does - I've tried changing it to several crazy numbers and left the min/max lines the same, and stats still roll normally.

I have noticed in testing that if you set all three numbers to the same number, the game will STILL occasionally roll a stat or two randomly, so it could be that some other file also has control over stat rolls that I don't currently know about.
Tactical Layer - Items/Weapons
Location: ~\Xenonauts2\Assets\Assets\xenonauts\template\groundcombat\item

Within this folder are the folders containing the relevant files for their respective types - e.g. Weapons in Weapons, Armour in Armour, etc. I won't go into details here as the code is mostly self-explanatory. If you don't know what something will change, then don't change it! For weapons you can edit just about everything here - damage, range, armour pierce, etc. If you're really confident in what you're doing, you can even add stats to weapons that don't have them. For example, Armour Pierce or Destruction to weapons that don't typically have them, by copying the code out of another weapon that does.
1 kommenttia
DEEP 31.5. klo 3.12 
THX