Card Collection Sidequest

IndigoAir

Veteran
Veteran
Joined
Mar 13, 2012
Messages
63
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Hello everyone, I apologize if something like this has been covered previously. I tried looking through the forums but didn't even really know what kind of specific topic I should be searching for that would help me with my issue. Hopefully I can explain this in a way that makes sense.

As the title implies, I want to incorporate a card collecting sidequest into my game. Creating the cards and setting it so enemies randomly drop their cards is easy enough, but it's the reward aspect I'm having trouble with. I want to have npc's that only give a reward once they have been shown the entire set of cards for X area or Y dungeon but I can't figure out how to do that without a ton of switches and event pages.

The only way I've  thought of so far to accomplish this is to make it so you're forced to show the npc the cards in a specific order, example once the npc is shown the Goblin card I turn on a switch and then they start asking for the Slime card. Is there an easy way to make it so players can show them the cards in any order?

Also this isn't really important other than a matter of personal preference, but if I have the cards randomly dropped by enemies is there a way I can make it so the player can only carry 1 of each card? It really doesn't effect anything gameplay-wise because the npc won't be TAKING the cards, but it just makes things tidier to look at in the menu if there is only 1 of each.

Thanks for reading! I hope I explained everything properly but if you have any questions please ask!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Most of it can be done using Script event commands, with a variable dedicated to each NPC to keep track of what cards they've seen. In fact, if you only want to know when you've shown them the whole lot, you don't even need a variable.


It sounds like you don't necessarily WANT the NPCs to ask for cards in a certain order. Do you want them to ask for cards at all? Or will they just look at what you've got and "register" that there are cards there they haven't seen before and keep track of what you've shown them? Will the dialogue change depending on how many they've seen altogether, or how many new ones you bring them each time? Can you bring several new cards at a time, or do they just want to see them one at a time?


Maybe just walk me through how you WANT it to work, from the player's point of view, so I can get a better understanding, then I'll be able to give you a more useful solution.


You COULD make it so the enemies will only drop cards you haven't already collected, but that would take a little scripting magic. Though, if you don't want the player to collect a card more than once, that will take some scripting magic too, as well as explaining to the player why they "got" something from battle that they can't see in their items.
 
Last edited by a moderator:

IndigoAir

Veteran
Veteran
Joined
Mar 13, 2012
Messages
63
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Most of it can be done using Script event commands, with a variable dedicated to each NPC to keep track of what cards they've seen. In fact, if you only want to know when you've shown them the whole lot, you don't even need a variable.

It sounds like you don't necessarily WANT the NPCs to ask for cards in a certain order. Do you want them to ask for cards at all? Or will they just look at what you've got and "register" that there are cards there they haven't seen before and keep track of what you've shown them? Will the dialogue change depending on how many they've seen altogether, or how many new ones you bring them each time? Can you bring several new cards at a time, or do they just want to see them one at a time?

Maybe just walk me through how you WANT it to work, from the player's point of view, so I can get a better understanding, then I'll be able to give you a more useful solution.

You COULD make it so the enemies will only drop cards you haven't already collected, but that would take a little scripting magic. Though, if you don't want the player to collect a card more than once, that will take some scripting magic too, as well as explaining to the player why they "got" something from battle that they can't see in their items.
Oh yes, I suppose that would be pretty important. I feel dumb admitting I didn't really decide how I wanted it to work without having to show the cards in a certain order, I was mostly just focused on finding out if there was a less restrictive way to implement the sidequest. One possible method I thought of was to have a book (or sign post, etc) next to the npc that would say something like;

Monsters in Cave Dungeon

1. -

2. -

3. -

So when you talk to them, they say somehting like "do you have any cards from the Cave Dungeon? Can you show me one of the monsters that lives there?" And when you show the npc a card the space would be filled out like

1. -

2. Slime

3. -

Etc, but I think adding a second item (the book) would make it kind of a big hassle. Maybe I should go with one of the other possibilities you mentioned and just have the npc ackowledge when all the necessary cards are present; "Sometimes the enemies in Cave Dungeon drop cards. Bring me a full set and I'll give you something, too!" - how would that work?

Originally I was going to have the cards be consumed, so the npc would reject cards they had been given before, but I thought players might want to hold onto them and collect a full set. I think I would, but maybe I just feel that way because it's my game :p

I'm not really sure what would work best. Maybe some feedback on that point would be useful, too >.<
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
For the full set you would only need to do this:

Conditional branch: IF card 1 is in the inventory, then conditional branch, if card two is in the inventory, etc...

Just keep nesting the branches until all of the cards are checked for, if none are missing then give the reward. If something is missing, under the else part have the NPC say something appropriate to which one is missing.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yes, but then if you have 30 cards, that's 30 nested conditional branches, and 30 "else" parts where you have to put dialogue.

I'm not sure of the syntax, and I'm just about to shut down my computer, but I was thinking something along these lines ... let's assume your cards are all sequential items - say you have 60 cards, and they are items 31-90:

Code:
Conditional Branch: Script: (31..90).select{|i| $game_party.has_item?($data_items[i])}.size = 60  have all cards - do stuffElse  don't have all cardsBranch End
So the conditional branch is checking to see if you have at least one of items 31 through 90 in your inventory.
 
Last edited by a moderator:

IndigoAir

Veteran
Veteran
Joined
Mar 13, 2012
Messages
63
Reaction score
8
First Language
English
Primarily Uses
RMVXA
I think the method bgillisp suggested wouldn't be too much trouble for me, since the npc's won't need to check the entire card collection. They will be just checking 3-6 cards from monsters that are found in a particular dungeon/outside a certain town etc. But wouldn't that method still require the players to acquire the cards in a particular order, since it won't move to the next branch if the current card is not present? At the very least if I do have to go the route of having the cards collected in order this will prevent me from having to create a ton of switches, so thanks!  :)
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
My method would not require them to be acquired in a particular order, but without some tweaking you cannot give cards until you have the full set (as it checks each one at a time, then if all are present, lets you give the full set). The else part can be where you put the line about which one you are missing. So if card 2 of the set of 5 is missing, put a prompt in that else telling them they are missing card 2. Granted, they might be missing card 4 too, and that would never be stated, but this gives them a nudge in the right direction at least.

Now granted, I've not used it for more than checking for 3 items present to do a ritual to release a summoned monster, but it worked well there. And yes, if you have more than say 5 or 6, I'd go Shaz's route, otherwise all of the if/elses will be a nightmare to keep track of.
 

IndigoAir

Veteran
Veteran
Joined
Mar 13, 2012
Messages
63
Reaction score
8
First Language
English
Primarily Uses
RMVXA
My method would not require them to be acquired in a particular order, but without some tweaking you cannot give cards until you have the full set (as it checks each one at a time, then if all are present, lets you give the full set). The else part can be where you put the line about which one you are missing. So if card 2 of the set of 5 is missing, put a prompt in that else telling them they are missing card 2. Granted, they might be missing card 4 too, and that would never be stated, but this gives them a nudge in the right direction at least.

Now granted, I've not used it for more than checking for 3 items present to do a ritual to release a summoned monster, but it worked well there. And yes, if you have more than say 5 or 6, I'd go Shaz's route, otherwise all of the if/elses will be a nightmare to keep track of.
Oh, alright. I haven't used any conditional branches yet so I didn't understand how it worked. So my event page should look like this?

conditional.png
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Looks like it should work to me!
 

IndigoAir

Veteran
Veteran
Joined
Mar 13, 2012
Messages
63
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Several days later, but I finally got around to doing a playtest and everything seems to be working :) I don't know what I was thinking about when I said I didn't want the players to have to collect the cards in a certain order, because the reward won't be given until they collect all the cards in a particular set anyway. Note to self: This is why you should not make forum topics at 4am.

Anyway, thank you very much to both people who replied :) In the end I decided to simplify matters and just make the cards regular items that the player can obtain multiple copies of, and when you possess the whole set the npc will take them from the player's inventory and give them the reward. Not what I was originally aiming for, but seems to work well.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Sounds like you could use the Triple Triad script by Raizen (then Malagar, then Sixth) to perfectly fit your card collecting sidequests.
 

Mako Star

Ex-Crisis Avenger
Veteran
Joined
Jul 21, 2014
Messages
98
Reaction score
81
First Language
English
Primarily Uses
If you don't want the player to be able to acquire the same card more than once, you can set up Battle Events in the troop to make sure they don't get more than once.

It wouldn't take much. Once you have the Battle Event set up, you could just copy and paste the Commands to the next Troop and just change out the Card.

You'll need a Variable for the %Chance of receiving the Card.

Condition to start would be when the Monster/s are dead.

Set the Chance Variable to a random number between 2 numbers.

If the Chance Variable is (desired chance)

  :Also If the Card is in the inventory

   -Do nothing

  :Else Add Card

:Else

This is just off the top of my head. I don't really code, but I'm sure there's a way to do that with Coding instead of Eventing.

So basically, if the Chance is a Success, and they have the Card already, nothing happens.

But if the Chance is a success and they don't have the card, they get the Card.

That should clean up the inventory like you were talking about before. Hope this helps.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top