Closed J-Caju closed 4 months ago
Hello! The "upgrade" condition unfortunately does not current check affixes, for technical reasons: each unit has a list of "individual upgrades", but affixes are kept track of separately, and are not added to the item's list of "individual upgrades". I've changed this now with this commit, since this seems like a good change, to do things like you mean:
https://github.com/Andrettin/Wyrmgus/commit/44e9c267506ac3234fc280775675987c219dd280
[...] The "upgrade" condition unfortunately does not current check affixes, for technical reasons: each unit has a list of "individual upgrades", but affixes are kept track of separately [...] - Andrettin/Wyrmgus@44e9c26
Thanks you much, Andrettin! I imagined something like this could be the case!
IIRC new Custom [Personality] Traits are automatically added to the available pool. While new Custom Affixes need to be added for each Item Type, before they're available to roll there.
I feel this idea was pushing the limits on how Variations work with items. They mostly feel meant for "Unit-Units" - despite Items being tecnically an Unit Type, right?
A cool bonus: This funtionally should enable "Items with Elemental Colors". I would like to make this addition later, so we can have things like a Red Amulet with Bonus Fire Damage / Resistance:
amulet = {
[...] variations = {
amulet_red_1 = {
icon = light_red_amulet
weight = 4
conditions = {
or = {
upgrade_prefix_fiery
upgrade_prefix_flaming [...]
}
[...] amulet_red_2 = {
icon = dark_red_amulet
weight = 2 [...]
Hey, Andrettin! It's John here.
I have been experimenting with dynamic Custom Items. In this case, an Oil Lamp, with two pairs of variations: a "Normal" and a "Mystic" variation sets.
The variations should change icons to make the lamp appear lit if equipped, or even display blue flames if the item has magical properties:
Despite all my tries, I couldn't make the "Mystic Variants" work, while the "Normal Variants" function just fine.
Looking at how variations are coded for Gryphon Riders, I noticed certains Traits / "Upgrades" function as conditions. That made me believe Affixes could be conditions for item related coding - but this doesn't seem to be the case.
I feel this might be because an Unit cannot be spawn w/o Traits. But an item can spawn w/o Affixes, as they are applied later and can bypass the conditions check(?).
So, I'd appreciate your help to know if there is any coding error from me, or if this function is not supported by the game.
P.S.: Mystic Oil Lamps actually require the "of Ethereal Vision" suffix, which I already partially converted from .Lua to C++ in my mod files. But I am citing the "Fiery" prefix here for easiness.