DarkEchoFF

Villager
Member
Joined
Nov 6, 2020
Messages
10
Reaction score
6
First Language
English
Primarily Uses
N/A
Well not quite, I had a little trouble doing that hahah, but I might have a solution if it does work for you.
Download the script again from itch.

On the lines 611 through 618 on you have the rules definitions, you can simply swap for example.

this.plusRule = JSON.parse(this.enemy_configuration[$dataTripleTriad.enemy_id])['Plus'] == "true" ? true : false;

for

this.plusRule = $gameSwitches.value(switchId);
How does this work exactly? My 'Enemy Creation Parameter' still shows true/false.
And even if I set it to a switch, how does it know what switch?
And even if it knows what switch, what value is on and what value is off?
I'm sorry, but I have so many questions around this :p
 
Last edited:

KRash92

Villager
Member
Joined
Jun 5, 2020
Messages
12
Reaction score
6
First Language
French
Primarily Uses
RMMV
Absolutely love this plugin! Loved it so much, I went and bought it on itch.io. I know it could technically be free, but I loved this game as a kid, and I'm overjoyed to be able to use it in my own game, so it's only normal I put a price on the effort : ) I even went and made my own cards, over 120 new ones taking aekashics' monster sprites as a base + the resources provided by Raizen.
However, I have been scratching my head over a little issue I have. Not actually a bug with the plugin itself, everything works fine even with the new cards I made, but I was wondering if there was a way to make the game remember whether you have won a duel or not? I want the player to be able to match with stronger players as they win, and maybe even create a tournament to win rare cards. But right now, I have absolutely no idea how to do that. I checked every parameter to try and find a little something I could use, but I found nothing. I anyone had a potential solution, that would help alot :)
Also, any way to have the winner only get a pre-selected card, instead of choosing one, getting them all or getting all the card with the same color?
Thanks!
Edit: Okay, I figured out how to make the game remember the outcome. I only tested the plugin on my own game, and I missed the NPC with the "remember score" variable on the demo version. My bad.
Still, since I want players to be able to get one particular card I set up beforhand if they won, without them being able to choose (since they'll most likely only go for the strongest card which would make their deck too strong too fast), would there be anyway to be able to set loss/win/draw as having no effect on your deck at the end of the party?
 
Last edited:

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
438
Reaction score
770
First Language
Portuguese
Primarily Uses
RMMV
Absolutely love this plugin! Loved it so much, I went and bought it on itch.io. I know it could technically be free, but I loved this game as a kid, and I'm overjoyed to be able to use it in my own game, so it's only normal I put a price on the effort : ) I even went and made my own cards, over 120 new ones taking aekashics' monster sprites as a base + the resources provided by Raizen.
However, I have been scratching my head over a little issue I have. Not actually a bug with the plugin itself, everything works fine even with the new cards I made, but I was wondering if there was a way to make the game remember whether you have won a duel or not? I want the player to be able to match with stronger players as they win, and maybe even create a tournament to win rare cards. But right now, I have absolutely no idea how to do that. I checked every parameter to try and find a little something I could use, but I found nothing. I anyone had a potential solution, that would help alot :)
Also, any way to have the winner only get a pre-selected card, instead of choosing one, getting them all or getting all the card with the same color?
Thanks!
Edit: Okay, I figured out how to make the game remember the outcome. I only tested the plugin on my own game, and I missed the NPC with the "remember score" variable on the demo version. My bad.
Still, since I want players to be able to get one particular card I set up beforhand if they won, without them being able to choose (since they'll most likely only go for the strongest card which would make their deck too strong too fast), would there be anyway to be able to set loss/win/draw as having no effect on your deck at the end of the party?
Thanks for the positive input friend :)!

Also, any way to have the winner only get a pre-selected card, instead of choosing one, getting them all or getting all the card with the same color?

yes there is friend! I think you need to configure a parameter called winCodition on the enemy creation. It has the options there.

I think I didn't separateif you win lose or draw codition :(. That one I think there is a need to edit the plugin to make, the other things you asked are already done on the plugin!


I didn't miss anything right? I think I answered all questions haha
 

KRash92

Villager
Member
Joined
Jun 5, 2020
Messages
12
Reaction score
6
First Language
French
Primarily Uses
RMMV
Thanks for the positive input friend :)!

Also, any way to have the winner only get a pre-selected card, instead of choosing one, getting them all or getting all the card with the same color?

yes there is friend! I think you need to configure a parameter called winCodition on the enemy creation. It has the options there.

I think I didn't separateif you win lose or draw codition :(. That one I think there is a need to edit the plugin to make, the other things you asked are already done on the plugin!


I didn't miss anything right? I think I answered all questions haha
Thank you for the answer!
Sorry, I think you misunderstood my question. That's my fault, I realized it wasn't really clear.

I have seen the three victory conditions in the enemy creation box, but those are either:
-Let the victor choose one card they want
-Take all cards your color
-Take all the cards of the other player

What I wanted to know was if there was a way for the developer to choose what card the winner of the duel gets, instead of the players themselves? Or maybe easier to do, to make sure that the winner gets nothing? That way, the developer (me), can create an event afterwards where the losing NPC gives a card to the player, but the player doesn't get to decide what card. That way, I can control the player's deck more easily, and avoid them getting too strong too fast.
Then again, I'm pretty sure you'd have to modify the plugin for it to work the way I asked, which would be a little too much to ask at this point.
 

falken14

Veteran
Veteran
Joined
Dec 6, 2016
Messages
79
Reaction score
49
First Language
English
Primarily Uses
Hey @Raizen, I was talking about this idea with another poster on the forum and I thought we should post this here:

Is there an easy method to link card IDs with database item IDs?

That way, you could handle trading, selling, even using the cards in-battle etc. as you would for database items. It could remove the need to set up a card shop function as well. I tried adding a function where you can return the number of a specific card, and have a common event set [Item ID x = Card ID x], but this got messy because I couldn't figure out how to make sure the reverse was true (i.e. setting the number of the card to match the number of the card item when the item quantity changed).
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.

What I wanted to know was if there was a way for the developer to choose what card the winner of the duel gets, instead of the players themselves? Or maybe easier to do, to make sure that the winner gets nothing?
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.)
 

KRash92

Villager
Member
Joined
Jun 5, 2020
Messages
12
Reaction score
6
First Language
French
Primarily Uses
RMMV
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.)
Thanks a lot for that, it'll help a lot. Up until now, I would simply remove all the cards in the MC's inventory and added back only the ones I wanted them to have, which was quite a convoluted way to make sure no one could just snatch the strongest cards from their opponents and get too strong, too fast.
To be honest, I just took a look at how FF8 and F14 did it, and it seems they have a rule that you can only have a certain amount of x rarity cards (like only one 5 stars cards per match), which is also a good way to ensure that a certain balance is kept for every game, instead of just spamming 5 star cards every time. But to get that working in the current, it'd probably require a relatively experienced dev.^^
Anyway, I'll try and test your updated plugin later.
Thanks again!
 

jenga

Villager
Member
Joined
Dec 1, 2021
Messages
7
Reaction score
2
First Language
German
Primarily Uses
RMMV
I seem to be having a hard time getting this off the ground in my project. I have a few cards already made and am in the process of adding a card album to the player inventory as well as a few starter cards.

If I do "tripleTriadAddCard(0)", the card album cannot and will not open. I tried making an NPC who opens the album instead and it also does nothing. I then changed the event's script command to "tripleTriadAddCard(1)" and the gallery opens without any issue at all, but when I try to select the card with 1 as its ID, which is the second card down, I get this error:
View attachment 197039
Anyone else get this, or know what might be going on?
Have you ever figured this one out? I'm having the same problem when changing to a certain card in the prebattle screen. None of my cards have any text in the rarity column either.

Any help would be appreciated, great plugin btw :)
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
209
Reaction score
128
First Language
French
Primarily Uses
RMMV
hello there, great plugin so far

Is it possible to change the BGM volume as well ?
 

Okralord

Veteran
Veteran
Joined
Sep 4, 2016
Messages
48
Reaction score
6
First Language
English
Primarily Uses
Card creation isn't working for me...I've tested it in the demo and it's not working there either. Any help? I'm getting an unexpected token error.
 

falken14

Veteran
Veteran
Joined
Dec 6, 2016
Messages
79
Reaction score
49
First Language
English
Primarily Uses
Card creation isn't working for me...I've tested it in the demo and it's not working there either. Any help? I'm getting an unexpected token error.
Have you ever figured this one out? I'm having the same problem when changing to a certain card in the prebattle screen. None of my cards have any text in the rarity column either.

Any help would be appreciated, great plugin btw :)
Weirdly, I did have this issue a few times but I can't even replicate it now. I thought it couldn't handle text, but I have text in my entries now as well, and they all work fine. Are you copying existing card entries and modifying them?
 

Okralord

Veteran
Veteran
Joined
Sep 4, 2016
Messages
48
Reaction score
6
First Language
English
Primarily Uses
Weirdly, I did have this issue a few times but I can't even replicate it now. I thought it couldn't handle text, but I have text in my entries now as well, and they all work fine. Are you copying existing card entries and modifying them?
Yeah I tried copying an existing card and just changing the name and it doesn't like it.
 

Okralord

Veteran
Veteran
Joined
Sep 4, 2016
Messages
48
Reaction score
6
First Language
English
Primarily Uses
Yeah I tried copying an existing card and just changing the name and it doesn't like it.
Ok, figured it out...the script counts starting from 0, but the plugin input starts from 1. So I was telling it to use card 13 but there isn't a card 13, there is a card 12. Anyone with questions feel free to message me.
 

jenga

Villager
Member
Joined
Dec 1, 2021
Messages
7
Reaction score
2
First Language
German
Primarily Uses
RMMV
Weirdly, I did have this issue a few times but I can't even replicate it now. I thought it couldn't handle text, but I have text in my entries now as well, and they all work fine. Are you copying existing card entries and modifying them?
I used to get this when scrolling over certain cards in the prebattle screen. I figured it out though, apparently every card needs a description aswell. So after adding that, everything works for now.
 

Attachments

  • TripleTriad.png
    TripleTriad.png
    193.1 KB · Views: 5
Last edited:

ultraed

Villager
Member
Joined
Jun 15, 2022
Messages
9
Reaction score
0
First Language
español
Primarily Uses
RMMV
esto es genial
 
Last edited:

Erviyo

Silent Reader
Member
Joined
Aug 29, 2019
Messages
12
Reaction score
2
First Language
Indonesian
Primarily Uses
RMMV
error_tripletriad.png
I got this error when I tried to adding a card. Could anyone help me?

EDIT:
I've got this solved, my fault is adding this script in the middle of an almost completed game, and I tried it using a saved game. it works when I try it using new game. Great script, thanks.
 
Last edited:

Latest Threads

Latest Profile Posts

Trailer is almost done for the game i can't wait to show it to everyone
I've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.

Forum statistics

Threads
129,856
Messages
1,205,750
Members
171,032
Latest member
RoyKerry
Top