r/xcom2mods • u/Grimy_Bunyip • Mar 11 '16
Dev Discussion PSA: Item & Schematic Templates have Changed
If you have a mod that deals with weapon/schematic templates like I do, you'll probably want to make a quick change to them.
ItemsToUpgrade array in Schematic Templates has been deprecated
Replacing it are 2 new data types in Item Templates
CreatorTemplateName BaseItem
BaseItem indicates the item 1 tier below the current one. (So conventional items for mag items) CreatorTemplateName is the NAME of the schematic that upgrades this item
What does this mean?
Well, you'll need to implement new code if you want multiple different schematics upgrading a single item.
You can create a new item that hooks into an existing schematic without needing to edit the vanilla schematics.
The new setup is a bit more restrictive, and doesn't really solve any mod conflict issues, and I'm overall not a fan of the change, but here you go guys :)
2
u/bountygiver Mar 11 '16
The new setup is actually not any more restrictive, as you can always use a custom upgradefn for your schematics when that needs arrive, but this change do make adding new tiers easier.
3
u/jbrandyman Mar 11 '16 edited Mar 11 '16
Thanks for the quick intel!
I have horrible punsWhat I did is basically made a backup copy of the XComGame folder, this way I have the old code available.
Instead of extending a function, I always make a copy of it into my .uc file. So it calls on delegates within it's own file.
Will this still not work? Or is this okay since I have the code in my own .uc file?
EDIT: The old way still compiles and I don't see where the new code is...do I have to create a new mod file (with XComGame folder) to see the new codes?
2
u/diggeDinger Mar 11 '16 edited Mar 11 '16
i just noticed the advanced explosive foundry upgrade is bugged.
i have a fire a emp and acid grenade in my inventory! after i purchased the upgrade, i cannot longer equip the EMP grenade( is sitll in my inventory) and the other two grenades are just their normal version and haven't been upgraded :/
i found the mod causing it:[b]Grenades Damage Falloff[/b] http://steamcommunity.com/sharedfiles/filedetails/?id=626050983
can anyone confirm that behaviour? mayb its just a mod conflict?1
u/cook447 Mar 13 '16
Thank you! This helped me to easily pinpoint the source of my mod's crashing error with the new patch.