How to make a Go-fish game system

So in my game I have a 3 player game involving the MC and two other npcs as they play a round of Go-Fish (and other card games) but I have no idea how to code it, some help would be nice! The NPCs are Samuel and Myano

What I wrote so far:

*temp card1
*set card1 = 100
*temp players
*set players = 2
*page_break

Choose a player!

*choice
#Samuel
Samuel grins at this.
*goto label round1
#Myano
Myano meows excitedly to the jingle of the Meow-Mix cat-food ad.
*goto label round1

*label round1
if (myano_friendship = true)
elseif

That seems very complicated. I started thinking about it and then gave up, though I’m sure someone like @Szaal could come up with something.

I think your best bet would be to find another Choicescript game that includes a card game, open up the code, and learn from that.

I did find this thread that has some thoughts on the subject: Dumb questions from noobs like me

Alternatively, do you have to make the card game actually playable? You could absolutely write a scene that fakes it without going to the trouble of simulating the deck.

Even from your example, it seems like your intent is more the “hanging out with friends” angle than taking the player through an accurate rendition of Go Fish. You could still include actions like drawing cards, calling Go Fish, etc, and just prescript the outcomes, or predicate them on other stat checks.

Edit: Here’s a thread where Rachel made one, though the files are no longer available: Hit Me - Blackjack Dealer

I have experience in making card games in ChoiceScript if you want to hire me. Check out my game for samples of what I can do. :wink:

2 Likes

I was just about to suggest you actually. (Was really impressed with some of the games you made in Missing Wings. I can’t even begin to get my head around the amount of coding that must’ve gone into the Connect 4 game.) :blush:

2 Likes

Thank you, that means a lot! :heart_decoration:

1 Like

How does this script look?

*temp player_draw
*temp opponent_draw
*temp player_lock “”
*temp opponent_lock “”
*temp player_total 0
*temp opponent_total 0
*temp gofishTotalScore “”
*page_break

*label gofish
Choose a player!

*choice
#Samuel
Samuel grins at this.
*set npc1 true
*goto round1

*label round1
*page_break
As ${name} draws a card, you wait patiently for your rival to draw their next card…
*page_break
You click to pick up your next card…
*rand player_draw 1 21
*rand opponent_draw 1 21
*goto gofishTotalScore

*label gofishTotalScore
*if (player_draw >= 21)
Since you are at 21 you hold and wait for ${npc1}'s turn.
*page_break
*goto round2

*elseif (player_lock) true
Having stood at your [b]${player_total}[/b], you wait for ${npc1}'s move.
*goto round2

*set player_total + player_draw
You drew [b]${player_draw}[/b] in this round.
*line_break
*goto round2
Your current amount: [b]${player_total}[/b].

*if (player_draw <= 21)
Since you are at less than 21 you hold and wait for your opponent’s turn.
*set player_lock true
*page_break
*goto round2

*label round2
*if (opponent_draw >= 21)
Since ${npc1} is at 21, they hold and wait for ${name}'s turn.
*page_break
*goto round3

*elseif (opponent_lock) true
Since ${npc1} is at [b]less than 21[/b], ${npc1} wait for ${name}'s move.
*page_break
*set opponent_total + opponent_draw
${npc1} drew [b]${opponent_draw}[/b] in this round.
*page_break

*if (opponent_draw <= 21)
Since ${npc1} is at less than 21 they hold and wait for ${name}'s move.
*set opponent_lock true
*page_break
*goto round3

*label round3
${name}'s current amount: ${player_total}
*if (player_draw <= 21)
Since you are at less than 21 you hold and wait for your opponent’s turn.
*page_break
*goto finalround

*elseif (player_lock) true
Having stood at [b]${player_total}[/b], you wait for ${npc1}'s move.
*page_break
*set player_total + player_draw
You drew [b]${player_draw}[/b] in this round, ${name}! Your total is ${player_total}!
*goto finalround

*label finalround
*if (player_total >= opponent_total)
${name}: ${player_total}
${npc1}: ${opponent_total}
${name} has won the game!
*page_break
Would you like to try again, ${name}?

*choice
#Yes
Then let’s begin!
*goto gofish

#No
Ok, everyone’s tired of Gofish, ${name}…
*goto_scene dorms

*elseif (opponent_total >= player_total)
${name}: ${player_total}
${npc1}: ${opponent_total}
${npc1} has won the game!
*page_break
Would you like to try again, ${name}?

*choice
#Yes
Then let’s begin!
*goto gofish

#No
Ok, everyone’s tired of Gofish, ${name}…
*goto_scene dorms

But then it comes up with errors such as:

Since true is at less than 21 they hold and wait for Lance’s move.
Lance’s current amount : 0 Since you are at less than 21 you hold and wait for your opponent’s turn.
Lance: 0 true: 0 Lance has won the game!

Here are the rules of Go-Fish according to Bicycle playing cards:

Also, you sent me a private message saying “I’ll send you the code for my gofish card game and I’ll hire you.” but we never talked about payment or payment method, numbers of hours, price per hour, or if this was going to be billed per project (in this case it would be one project). I also don’t know if you are legally able to enter into a contractually binding relationship, in other words, are you over 18? With respect, too many red flags have been raised for me so I’m going to have to withdraw my offer, but I wish you luck. You can do it if you put your mind to it!

I am over 18+. That’s all I’ll say. And thank you for your reply.