MV HELP with Shaz´s Dynamic Traits.

Hi all!
I asked this to Shaz directly and she told me that she will be off the forums for a while, but that there are users here that knows about her plug in. so this is the convo I had with her:

Hi Shaz!

Im using said plug in:

https://forums.rpgmakerweb.com/index.php?threads/dynamic-traits-and-effects.51533/
​

Now, I have 2 issues.
1. I need to add a trait via scriptcall. (I think i got his one)
2. Adding the trait is not working.

So, when I add the trait (ELEMENT ATTACK) to my weapon directly into the database, (element Alchemy ID 23)
1.JPG


23.JPG


And then I launch the game. Then I check in the console for that weapon traits, and it shows it without an issue:
2.JPG



The enemy who is weak to that element reacts with a weakness property, no problem.
3.png




So now, i remove the trait (ELEMENT ATTACK) from the data base and launch the game. I add the trait via plug in command

AddTrait WEAPON 24 TRAIT_ATTACK_ELEMENT 23 1
OR via scriptcall using this code:
addTrait = {code: 31, dataId: 23, value: 1} $dataWeapons[24].traits.push(addTrait)

and now I check the weapons traits via console. and yes , it is there.
5.JPG


And now when i go to battle and attack the enemy, it does not comes with the weakness outcome.
6.png



Like the trait wasn't there, but like I showed you, the trait is listed in the weapons trait and it is showed as when I placed the trait directly on the data base.
So, Do I am missing something? I know your plug in works because I add and remove an Stype all the time with no problem.
Would you have any idea why the trait element added via plug in or scriptcall is not working/ taking any effect.

thank you in advance, this is a long post =/
I see things with JPG and PNG in your post, but there are no pictures attached.

Are you using any other item-related plugins? Specifically Yanfly's Item core, with independent items enabled?
Hi!! I can see the images files, maybe because Its on my cache? If you want to see them, I can repost them.

And yes, I am actually using item core with independent items enabled, you think that is my problem here?
And yes, I am actually using item core with independent items enabled, you think that is my problem here?
That's the whole point of independent items - once an item is created as an object in the game, it is no longer connected to its database entry. So adding traits to the base weapon ID will only affect copies of that weapon sold/given after that change.

In order to affect a specific, existing weapon, you would need to find that weapon's unique ID (or some other reference to it) and apply the trait changes to it.
You are absolutely right, how I missed something that obvious, independent? Hello? Ha, yeah, if i get the new id and not the base id of the weapon, it works.

Thank you . BTW how on earth you knew what plug in was giving me the problem is beyond me, kudos sir =)
Well, because if you're modifying the database info but the item isn't reflecting that change, it can only logically be because the item is no longer referencing its database entry. Only one plugin I know of that does that 😉

Glad you got it working.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-shaz-s-dynamic-traits.161963/