-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamline NumUpgradeSlots for X2ItemTemplates #93
Comments
Most errors that come up as a result of attaching a weapon upgrade to something that doesn’t have an X2WeaponTemplate are cosmetic in nature - UI pictures not appearing because the picture is based on the item you’re equipping to, for example - and most, if not all, are in UIArmory_WeaponUpgrade, UIArmory_WeaponUpgradeItem, UIArmory_LoadoutItem, and UIArmory_LoadoutItemTooltip. May want to leave this up to modders to assign their own pictures and icons, but some catch-all conditions should be added to avoid bad formatting in item descriptions. UIArmory_WeaponUpgrade also contains the Armory function that checks how many upgrade slots to let the player fill. Grimy’s Loot Mod currently overrides this, but placing an event there that can be hooked into would improve compatibility between it and other future mods that may add different ways of handling NumUpgradeSlots. (e.g. Loot Mod, which stores and handles individual NumUpgradeSlots on a per-GameState basis) |
Finally getting around to this, almost a year later. What a ride. Will be adding
Everything that checks weapon templates for upgrade slots already checks for breakthroughs immediately thereafter, so the breakthrough check can be skipped. |
FWIW, I'm not a huge fan of passing "override booleans" -- just pass a single integer as the first tuple element that contains the result of |
Implements Issue X2CommunityCore#289 changes
@GingerAvalanche any chance you gonna submit a PR for this? If not I might give this a go sometime. |
Yeah, I got distracted by yet another thing. The entire branch of changes I was looking to do isn’t done yet (and may never be if I keep getting distracted for years) but this issue can finally be done with. |
Implements Issue X2CommunityCore#289 changes Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis.
Implements Issue X2CommunityCore#289 changes Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis.
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Item upgrade improvements (X2CommunityCore#93 & X2CommunityCore#289) Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289 Docs: Fix crash when ref provides event spec Fake rebase.
Item upgrade improvements (X2CommunityCore#93 & X2CommunityCore#289) Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289 Docs: Fix crash when ref provides event spec Fake rebase. Add new files to CHL source.
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289
Item upgrade improvements (X2CommunityCore#93 & X2CommunityCore#289) Allows any item type to be upgraded, and allows for upgrade slot handling on a per-state basis. Implements issue X2CommunityCore#93 Implements issue X2CommunityCore#289 Added event docs and made minor adjustments to code. Added event docs and made minor adjustments to code. Fixed event docs. Fixed event docs again. Another fix. More fixes. Really hard to please. More docs fixes. Fixed typo. Removed commit messages.
To extend upgrade slots to items other then weapons and make them accessible to modders
add
GetNumWeaponUpgradeSlots()
toX2ItemTemplate
and use it in all places that currently access
X2WeaponTemplate(Template).NumUpgradeSlots
.GetNumWeaponUpgradeSlots
returnsNumUpgradeSlots
if set (in case ofX2WeaponTemplate
) or reads the value from a helper config array.Also add a function
GetNumWeaponUpgradeSlots
inXComGameState_Item
that considers breakthroughs, and adds a way for mods to modify the output.Pitfalls: Lookout for code that relies on weapons be the only items that use attachements.
The text was updated successfully, but these errors were encountered: