Krazyguy75 Posted September 3, 2013 Share Posted September 3, 2013 I've noticed that many of the stats in the TGC class are in DCG.ini, and I was wondering: if you meddle with TGC's stats after forcing the game to load DCG, do they still affect anything? Can I repurpose the stats and arrays in there if the game loads from DCG? Also, I'm not even sure if the TGC class is where the game loads from prior to the change, I just made the change before testing that. Link to comment Share on other sites More sharing options...
johnnylump Posted September 4, 2013 Share Posted September 4, 2013 While there are a few stats in DGC.ini that do nothing, I have always observed the DGC settings take precedence. Link to comment Share on other sites More sharing options...
Krazyguy75 Posted September 4, 2013 Author Share Posted September 4, 2013 Thank you! So wouldn't it be fairly easy, then, to convert the character arrays in the TGC into a longer array of alien subtypes? Link to comment Share on other sites More sharing options...
Amineri Posted September 4, 2013 Share Posted September 4, 2013 Many of the arrays defined in the XGTacticalGameCore and filled out via the DGC.ini are actually dynamic arrays, which means that extra fields can be very easily added. The trick usually is re-jiggering the code that processes the array to make sure it is reading them properly. We added additional entries for newly created items to both the Weapons and ItemBalance arrays, and that code is robust enough to handle the extra entries for the most part. I did have to fiddle with the mesh loadout process to get the items to work properly in the tactical game. It would definitely be possible to add new entries to the character DGC.ini array, and that would create a larger array loaded into the game, but getting the AI, meshes and animations to all work is a pretty big task. In Enemy Within I expect that the Character array will be made bigger (along with the CharacterType enum) to handle the new aliens being added. Link to comment Share on other sites More sharing options...
Krazyguy75 Posted September 4, 2013 Author Share Posted September 4, 2013 So the DCG.ini replaces the values in XGTGC, but those variables in the file are still used? I assume this means that if I tried to use said arrays for storing anything else they'd get overwritten. Also, is it possible to add new variables to the DCG arrays or do you just have to stick with the existing ones? Link to comment Share on other sites More sharing options...
Amineri Posted September 4, 2013 Share Posted September 4, 2013 The arrays are all dynamic arrays, which require some extra commands to add items to. I'm not all that familiar with UE programming (honestly, XCOM modding is the only time I've ever touched it, as I'm more of a strategy genre fan), but the dynamic arrays really seem to be more like linked lists with the ability to reference a member of the list via array-like syntax. I assume that you are referring the the structures that are filled out for each dynamic array entry in the DGC.ini, such as : Weapons=(iType=eItem_BlasterLauncher,ABILITIES[0]=eAbility_ShredderRocket,ABILITIES[1]=eAbility_RocketLauncher,ABILITIES[2]=0,ABILITIES[3]=0,ABILITIES[4]=0,ABILITIES[5]=0,Properties[0]=eWP_Explosive,Properties[1]=eWP_Secondary,Properties[2]=eWP_NoReload,Properties[3]=eWP_Heavy,Properties[4]=eWP_UnlimitedAmmo,Properties[5]=0,iDamage=5,iEnvironmentDamage=500,iRange=18,iReactionRange=-1,iReactionAngle=200,iRadius=336,iCritical=0,iOffenseBonus=0,iSuppression=0,iSize=eItemSize_Large,iHPBonus=0,iWillBonus=0) I've not figured out any way to add additional entries to an existing structure, though I've had some limited success with changing one variable to another in a structure (for the ammo mod I had to switch the savegame structure to save a different variable than originally defined). If you are instead referring to adding additional dynamic array entries in the DGC.ini, I've been able to accomplish that very easily with ResourceHacker by simply adding additional lines. For example, the new line : Weapons=(iType=74,ABILITIES[0]=0,ABILITIES[1]=0,ABILITIES[2]=0,ABILITIES[3]=0,ABILITIES[4]=0,ABILITIES[5]=0,Properties[0]=eWP_AnyClass,Properties[1]=eWP_Backpack,Properties[2]=eWP_Encumber,Properties[3]=0,Properties[4]=0,Properties[5]=0,iDamage=0,iEnvironmentDamage=0,iRange=0,iReactionRange=-1,iReactionAngle=-1,iRadius=0,iCritical=0,iOffenseBonus=0,iSuppression=0,iSize=eItemSize_Small,iHPBonus=0,iWillBonus=0) In Long War is what configures the Alloy Jacketed Rounds to the game. Link to comment Share on other sites More sharing options...
Krazyguy75 Posted September 5, 2013 Author Share Posted September 5, 2013 (edited) So, can I add a whole new type of arrays to it? Such as CharSubtype=(iSubType=0,iName=0,iHP=0,iAim=0,iDefense=0,iMobility=0,iDR=0,iRegen=0,iWill=0,iPsionics=0,iDamage=0,iSightRadius=0,iCritHitChance=0,iCritWoundChance=0,iFlightFuel=0,iReaction=0)New stats I'm attempting to add are as follows:iSubType - Keeps track of which subtype it is.iName - The name of the subtype that is displayed by the unitiDR - Damage ReductioniRegen - RegenerationiPsionics - Different from original psionics, Will boost for offensive psionics only (Not implemented yet; Is the existing Psionics stat actually used anywhere?) Also, can I add additional arrays to other config files (such as DefaultMPGame's perk templates)? Edited September 5, 2013 by Krazyguy75 Link to comment Share on other sites More sharing options...
Amineri Posted September 8, 2013 Share Posted September 8, 2013 To do this would require the ability to add new variables the definition of XGTCG, which I don't know how to do. The existing Psionics stat is not currently used in vanilla, but in the DR/Regen mods I've released the Psionics stat stores each unit's Regeneration amount. Link to comment Share on other sites More sharing options...
Recommended Posts