Update: I have found a possible workaround method to link cards with items. I have uploaded a demo of this working
here. It involved modding Raizen's plugin a bit, and using Aloe Guvner's
Sync Variables to Items plugin as well.
Disclaimer: I'm not a coder, this obviously isn't pretty, and I haven't thoroughly tested it, but it seems to work for most applications. If a plugin developer looks at this and can see better methods to achieve this, I would be thrilled.
Details:
- I couldn't figure out a direct way to link database item IDs with card IDs in the plugin, but I came up with a new function that returned the number of a specific card looking at some of the existing functions. This new function is on line 467 of the TripleTriadCore.js file in the demo.
- I made individual item entries for each card in the database and linked them to their own variable using Aloe's plugin;
- I made two common events:
- one that compares the item variable ID with the number of the respective card, and keeps adding or removing the card using the existing add/remove functions until they're the same;
- an inverse event that counts the number of each card and sets the respective item ID variable to that number (which automatically updates the number of that item);
- Inserted code at 3280* and 3313* to run the first common event after modifying the player's hand in the album scene so that items decrease if the card is inaccessible in the hand, and return when the player takes the card out of their hand;
- Inserted the same code to run after battle (2701*);
- For other uses (like an NPC giving the player an item, or buying/selling in a shop), I manually added the common event after the transaction in the event list.
Through this you can buy/sell cards through shops, or give them item effects (like healing)**. Using YEP plugins, you can put them in their own item category and use the card picture as the item picture, which would look cool. Also, Aloe's plugin allows you to sync not just items to variables, but weapons and armors too. I haven't tested this in the demo but it potentially means you could have cards as weapons or armor.
* You need to put your own common event value in these spots to get this to work. I tried creating a new plugin parameter for this but it didn't like it, or I was doing it wrong. If someone else knows how to do this, please feel free to do so.
** You might also like a plugin that stops the game quitting to the map when you run a common event from using an item for presentation. I included EISMenuCommonEvent plugin for this as well as Aloe's in the demo. This will stop the Card Album Common Event working correctly; I have used YEP_MainMenuManager to directly add the album scene to a menu command, which seems to circumvent this issue.
Hey
@KRash92, I also modified the plugin to have a 'None' trading rule because I was interested in exactly what you mentioned (i.e. not letting the player easily acquire Lv10 Character cards before they even leave the first town!).
I added a new win condition (None) and just made the plugin check if that rule is in effect before any trading happens at line 1980. If so, it boots you to the map. You can try the first player on the left (evil mercenary) in the demo, who has the None rule on. There's event commands following the game that produce different outcomes if you win, lose, or draw.
I hope it works as intended, it's just a quick fix that isn't fully tested so I might have missed something. (If you don't want to use the item =o= card link I described above, just comment out the common event code at 2701, 3280, and 3313 so your common event #3 doesn't run at those points.)