X2CommunityCore / X2ModBuildCommon

An improved XCOM 2 mod build system
MIT License
5 stars 5 forks source link

Cease usage of SDK/XComGame/Config/DefaultEngine.ini #61

Closed Xymanek closed 2 years ago

Xymanek commented 3 years ago

https://discord.com/channels/165245941664710656/599593118169432075/874943488817504286

found a less destructive way of overriding Engine.ini for cooker - -CONFIGSUBDIR=[something] (actually it probably works for all editor invocations, but I tested only the cooker) e.g. -CONFIGSUBDIR=Test will cause it to read/write from/to SDK\XComGame\Config\Test instead of SDK\XComGame\Config or you can override paths to individual files using -DEFENGINEINI (default) and -ENGINEINI (the XCom version) I'm not sure which exact one is better right now I guess the latter has the advantage that it can live in BuildCache, but I'm not sure how BasedOn=..\Engine\Config\BaseEngine.ini will work in that case can probably always string replace it with full path

robojumper commented 3 years ago

This is also sort of interesting for the make commandlets, which will load configs from other mods in the Mods directory, which will cause it to mess up script compilation order, dependencies and also fail to delete some scripts, necessitating the AddToClean function. We might be able to just remove that function and make things Just Work.

Xymanek commented 3 years ago

Another use for make commandlets would be making mod assets reference-able in script by modifying [Core.System] Paths. Currently, the script compiler can't see non-SDK packages:

local Object obj;
obj = Texture2D'CI_InventoryImages.Inv_Facility_Lead_Unlocked';
Warning, Unresolved reference to Texture2D 'CI_InventoryImages.Inv_Facility_Lead_Unlocked'
Xymanek commented 3 years ago

Another potential use is for opening the editor with the mod's content added to Paths (as above) so that it shows up in the content browser right away (no need to open packages one by one) and stops complaining about references to external packages