XCOM 2
[WOTC] PGO: Custom Projects & Bridges
 This topic has been pinned, so it's probably important
Hotl3looded  [developer] 16 Oct, 2020 @ 7:28pm
CREATE PGO BRIDGE
All mod-added Experimental Items will be accessible through Experimental Projects by default.

However, if you want mod-added items to get unlocked after research, you will need to tweak some configs. Follow the steps and everything should work fine.

PRE-STEP
If the item you wish to unlock is created by a vanilla Experimental Project, you can skip this step. Otherwise, you need to add a new entry for the custom Experimental Project.

1 - go to modpath/Config/XComPGOverhaulExperimentalItems.ini
2 - add an entry for the custom Experimental Project, using "arrExperimentalProject"

Let's use Iridar's Rockets as an example:
+arrExperimentalProject=(TechName="IRI_ExperimentalRocket", RewardDeck="IRI_ExperimentalRocketRewards")

FIRST STEP (required for every item)
Now you need to create an entry for each Experimental Item that you wish to unlock upon research.

This is done in the same file as the pre-step but with "arrUnlockExperimentalItem".

Again, let's use one of Iridar's Rockets as an example:
+arrUnlockExperimentalItem=(ItemName="IRI_X2Rocket_Lockon", TechName="IRI_X2Rocket_LockonUnlockTech", TechImage="img:///IRI_RocketLaunchers.UI.PG_Experimental_Rocket")

TechName and TechImage are used to create a "tracking" tech that shows which item has been unlocked so far in the "Completed Projects" screen. You can use any unique name you want and any image from base game or from installed DLCs and mods.

SECOND STEP (optional)
The item is now unlockable upon research. This step is only used to add a Title and a Description to the tracking tech that we created in the first step. You will need to add localization to the tracking tech.

1- go to modpath/localization/XComGame.int*
* (.int is for English, choose the extension that corresponds with your language)
2- add localization to the tracking tech

For the example used, it would be:
[IRI_X2Rocket_LockonUnlockTech X2TechTemplate] DisplayName="Experimental Rocket: Lockon Rocket" Summary="This rocket uses a makeshift missile guidance system with repurposed GREMLIN AI algorithms to attack Holo-Targeted or robotic enemies. The guidance system occupies a lot of space, so we replaced most of the explosive yield with a shaped charge to focus damage on the primary target."

THIRD STEP (optional)
If the mod author did not add a cost to his new items, you will need to do so. Otherwise the unlocked items will be free to build.

If the item uses a base game item template (e.g. grenade, ammo, etc.) you can add a cost in the following config folders:

- go to modpath/Config/XComStrategyTuning.ini
OR
- go to modpath/Config/XComWeaponTuning.ini

*StrategyTuning is for techs and items that are not weapons like armors, vests, etc. It also includes ammo. WeaponTuning is for items that are considered weapons like grenades, skulljack, heavy weapons, etc.

Alternatively, you can use [WOTC] WSR - Configuration to add a cost to any item.

For our example, I will be using [WOTC] WSR - Configuration to add a cost:
+CHANGE_TEMPLATE=(TEMPLATE="IRI_X2Rocket_Lockon", RESOURCE_COSTS[0]=(ItemTemplateName="Supplies", Quantity=30), RESOURCE_COSTS[1]=(ItemTemplateName="AlienAlloy", Quantity=5), ARTIFACT_COSTS[0]=(ItemTemplateName="EleriumCore", Quantity=1))

With this code, the Lockon Rocket costs 30x supplies, 5x alloys and 1x Elerium Core in the Engineering Bay.

That's it! Now you have to repeat this process for all Experimental Items you wish to unlock. For more examples, see how I did for vanilla Experimental Items in the main mod.
Last edited by Hotl3looded; 17 Oct, 2020 @ 7:25am