davidlallen Posted May 12, 2016 Share Posted May 12, 2016 (edited) Let's consolidate everything we learn about the changes we have to make in this thread. I have pointed from /r/xcom2mods and a few other places to here. I'll keep a summary in this post, and the next post. May 13 9 am (California): the dev team has given a short list of the changes here: https://www.reddit.com/r/xcom2mods/comments/4j6gn7/patch_changes_for_modders/ If possible, let's keep the discussion on this nexus thread, which is easier to read and search. Some key points: * For weapon/item templates, bIsInfiniteItem is now false by default. This results in weapons/items added to the inventory which are supposed to be infinite, but instead now only one weapon is added. The ExampleWeapon mod doesn't set this, so many mods which started with that mod need to add the line "Template.bIsInfinite = true". * Support has been added for class-specific armor. The game does not set any default value, so many custom classes are now unable to equip any armor. In your XComGameData_Character.ini file, in the section for your class, add the line "+AllowArmors=soldier". (You will see this recommendation both with, and without the +.) Edited May 16, 2016 by davidlallen Link to comment Share on other sites More sharing options...
davidlallen Posted May 12, 2016 Author Share Posted May 12, 2016 reserved Link to comment Share on other sites More sharing options...
Zyxpsilon Posted May 12, 2016 Share Posted May 12, 2016 (edited) I feel one simple good advice is for Modders to not try upgrading their stuff (while the update feed is happening) without a clear & stable installation structure. When a patch with such extensive changes is "processing" & "verifying" the whole game (at least once, as recommended by Firaxis, btw), there's a very high risk of corrupted "Cache resources". And thus, please follow these minimal steps; 1) Once download is fully completed, Exit Steam2) Log again.. you might receive a popup stating that XCom2 is being processed.3) Before playing.. empty (as in - deactivation of the "Boxes") your entire list of active MODS (even the referenced Locals in XCom2) from whatever Launcher you use4) Start a fresh gameplay5) Play at least one entire "Gate Crasher" mission and visit the Geoscape5a) I'd suggest to keep the freshly made Saves for future reference6) Exit everything once more!! Done... ready & solid. :D Edited May 12, 2016 by Zyxpsilon Link to comment Share on other sites More sharing options...
Amineri Posted May 12, 2016 Share Posted May 12, 2016 So a common thing that may affect any mod that adds new abilities ... In X2Effect_Persistent.GetAttackingDamageModifier, the prototype has changed from : function int GetAttackingDamageModifier(XComGameState_Effect EffectState, XComGameState_Unit Attacker, Damageable TargetDamageable, XComGameState_Ability AbilityState, const out EffectAppliedData AppliedData, const int CurrentDamage) { return 0; } to function int GetAttackingDamageModifier(XComGameState_Effect EffectState, XComGameState_Unit Attacker, Damageable TargetDamageable, XComGameState_Ability AbilityState, const out EffectAppliedData AppliedData, const int CurrentDamage, optional XComGameState NewGameState) { return 0; } This will result in compile-time errors when building the mod against the new SDK. For mods that haven't been updated, I think this results in a CTD since there is a call in X2Effect_ApplyWeaponDamage where the NewGameState parameter is passed, and mods built under previous SDK won't be able to handle them. --------------------------------------- In terms of new functionality, some of the nicest is a series of new additions to X2DownloadableContentInfo. This includes : OnLoadedSavedGameToStrategyThis method is run when the player loads a saved game directly into Strategy while this DLC is installedOnPreMissionCalled just before the player launches into a tactical mission while this DLC / Mod is installedOnPostMissionCalled when the player completes a mission while this DLC / Mod is installedOnExitPostMissionSequenceCalled after the player exits the post-mission sequence while this DLC / Mod is installedOnPostTemplatesCreatedCalled after the Templates have been created (but before they are validated) while this DLC / Mod is active --------------------------------- One of the other nice changes in X2DownloadableContentInfo is that exec functions can now be created. For those not up-to-date on this : https://udn.epicgames.com/Three/ExecFunctions.html . This basically allows a modder to create her own console commands. Handy for testing out that big mod! :smile: Link to comment Share on other sites More sharing options...
xylthixlm Posted May 12, 2016 Share Posted May 12, 2016 (edited) From the patch notes: "Game state classes can now be overridden" Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay! Edit: Also, we can now override 'static' functions. Double yay! Edited May 12, 2016 by xylthixlm Link to comment Share on other sites More sharing options...
GrimyBunyip Posted May 12, 2016 Share Posted May 12, 2016 From the patch notes: "Game state classes can now be overridden" Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay!we already knew that, but the question is how they're overridden. because if it's done in the same way as other overrides, where any time old code would create the old game state instead of the override state, then it might not be that useful. Link to comment Share on other sites More sharing options...
Zyxpsilon Posted May 12, 2016 Share Posted May 12, 2016 (edited) Wow... XC2 = 1.7GB & SDK = 2.1GB worth of new files. That latest Launch-Trailer really is perfecto video stuff, AFAIC. The Vipers cavern entrance with Bradford looking in has this wild cinematic feel.I think i'm gonna enjoy these three new gameplay conditions as they are more in-line with the Guerilla Warfare basic concept(s) of the original. Anarchy was a fun aesthetic set of cool addons but Hunters crosses the path of tough'er TBS mechanics while stacking the odds above the Tactical Layer like a coat of burning acid flow! Should be crazily fun to play with.. Edited May 12, 2016 by Zyxpsilon Link to comment Share on other sites More sharing options...
xylthixlm Posted May 12, 2016 Share Posted May 12, 2016 From the patch notes: "Game state classes can now be overridden" Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay!we already knew that, but the question is how they're overridden.because if it's done in the same way as other overrides, where any time old code would create the old game state instead of the override state, then it might not be that useful. If they've allowed overriding 'static' methods, that means they've messed with method dispatch. I'm going to guess that they handle overrides of game state classes the same way: the actual state objects are the old class, but method calls get magically routed to the override method. Link to comment Share on other sites More sharing options...
xylthixlm Posted May 12, 2016 Share Posted May 12, 2016 Looking through XComGameState_Unit changes, they've changed all the hardcoded references to things like 'PsiOperative' and 'Cyberus' to use callbacks or similar instead. This update has everything on my wishlist. Link to comment Share on other sites More sharing options...
SteelRook Posted May 12, 2016 Share Posted May 12, 2016 I'd really love to know how overriding static functions works. My one finished mod (the sword damage varying by tech level) relies on overriding the ability template for Bladestorm. Currently, I'm doing something I know I shouldn't be, which is just overriding it anyway, because it works through some trick of load order - my override loads after the default function, I think. If that's changed then I'm going to need to fix my mod or risk either non-function or crashes to desktop. I ended up not really comprehending gamestates back in the day, so overriding gamestates doesn't excite me AS much, but I know it's very important for proper mod support. That's good to hear. Link to comment Share on other sites More sharing options...
Recommended Posts