The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Event Systems => Topic started by: modern algebra on February 12, 2007, 03:51:47 AM

Title: [XP] BlackJack [RMRK+]
Post by: modern algebra on February 12, 2007, 03:51:47 AM
BlackJack
Version: 2.0
Author: modern algebra
Date: November 10, 2007

Version History




Description


This event system allows you to play BlackJack. To replace the default card set with your own, save over each card with the new graphic.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg215.imageshack.us%2Fimg215%2F200%2Fblackjackscreenap8.png&hash=f36e78b246450eb305a96aad73859605862ec2eb)

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg180.imageshack.us%2Fimg180%2F7968%2Fblackjackscreen3sq9.png&hash=59fa3297b2f89c15672405f8db501bffd4a38aa1)

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg215.imageshack.us%2Fimg215%2F5372%2Fblackjackscreen2gp6.png&hash=19488bd710c9e8e656f320e2dce69b39442188c0)

Instructions

Download the demo. Make sure you have your maximum variable count in your project to greater then 546. Then, all you have to do is paste the event from the demo into your game at all the places you want to play BlackJack. You can also set the Self-Switch D to determine whether you want to black the screen out or not

Credit



Support


I will provide support here. Be sure to tell me of any bugs and I will fix them for the next release. I may not add a function, even if you request it.

Author's Notes

This is actually a very old script. Having to go through it for the purpose of converting it to RMRK+ Format, I changed a few things here and there, but was too lazy to fix the rather clumsy-ish structure. It still works very well though. It was my first event system that I released I believe.

RMRK+ Format

This script is RMRK+ Format (http://rmrk.net/index.php/topic,22340.0.html).

Variables Used


Demo


Attached
Title: Re: Blackjack
Post by: :) on February 12, 2007, 03:53:55 AM
i THINK it looks kick ass! sweet idea for a battle system with events!
Title: Re: Blackjack
Post by: ShellShocked on February 12, 2007, 06:50:46 AM
Nice job! Btw, the game got stuck, I got 20 and the dealer used 5 cards and then nothing happened, but my character in the background could move around O_o
Title: Re: Blackjack v. 1.1
Post by: Nightwolf on February 13, 2007, 03:46:27 PM
Very good algebric eventing! :P

lol, nice job man.
Title: Re: Blackjack v. 1.1
Post by: Snailer on February 13, 2007, 03:57:10 PM
Lol is this normall to happen ?

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi108.photobucket.com%2Falbums%2Fn10%2FSnailerFreak%2Ferror.jpg&hash=4aa77c0d723778f74c48d7eb493aaf3244ca3f93)


But anyways its really nice !
Title: Re: Blackjack v. 1.1
Post by: modern algebra on February 13, 2007, 10:16:12 PM
It looks all right Snailer. I'm not quite sure what the problem is... Did it get stuck there?

I noticed a few glitches on my own so V. 1.2 is out now. Remember to post if you encounter any problems  :)
Title: Re: Blackjack v. 1.1
Post by: Irock on February 13, 2007, 10:18:59 PM
You should have a counter to count what your number is, so that the player won't have to keep counting.

Lol is this normall to happen ?

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi108.photobucket.com%2Falbums%2Fn10%2FSnailerFreak%2Ferror.jpg&hash=4aa77c0d723778f74c48d7eb493aaf3244ca3f93)


You won  19 to 18
Title: Re: Blackjack v. 1.2
Post by: modern algebra on February 13, 2007, 10:32:15 PM
That's a good idea. But, because of the Ace, it wouldn't be as simple as just displaying the variable which contains the Player Score. I'd have to change the way it counts aces, so I'll include it if I decide to make a version 2.0, since I'd have to change some stuff around to include the Split function anyway. It's a good idea though and I'll definitely do it if I can find the time.
Title: Re: Blackjack v. 1.2
Post by: Sigma on September 18, 2007, 06:07:50 AM
Sorry to revive this, but how would this be used in RM2k3? Sorry for the silly question if it is one.
Title: Re: Blackjack v. 1.2
Post by: modern algebra on September 18, 2007, 06:20:51 AM
In the same way, though you would have to translate the event. Do they have labels in 2k3? I may consider making a version in 2k3, but my experience with 2k3 is lousy, at best, so we'll see :P
Title: Re: Blackjack v. 1.2
Post by: Sigma on September 26, 2007, 05:55:30 AM
Can you run through it in RM2k3 for me?
I'm really happy with my work so far, and I believe some minigames will make it even better.
Title: Re: Blackjack v. 1.2
Post by: Qig on September 27, 2007, 10:18:08 PM
In the same way, though you would have to translate the event. Do they have labels in 2k3? I may consider making a version in 2k3, but my experience with 2k3 is lousy, at best, so we'll see :P
Labels are in rm2k3
Title: Re: Blackjack v. 1.2
Post by: Forty on October 16, 2007, 03:07:47 PM
If you are still having the problem where you don't have those two cards, you could do this.
Make all the number cards, then make a spade, clubs, diamonds, and hearts card back. Then make a king, queen and jack. What this will do is that all the kings queens and jacks will looks the same but all the cards will be there.
Title: Re: Blackjack v. 1.2
Post by: modern algebra on October 17, 2007, 01:21:51 AM
That would involve doing a check to see which draw you are on though
Title: Re: Blackjack v. 1.2
Post by: Forty on October 18, 2007, 02:24:30 AM
That is understandable, but couldn't you tell it to produce both images? And doesn't it check for draw anyway?
Title: Re: Blackjack v. 1.2
Post by: modern algebra on October 18, 2007, 03:36:56 AM
You can tell it to use both images yes, but the thing is that when you show picture, you give it a label. If you show any picture after it with the same label, then the first picture is erased. Right now, the system is:

If Ace of Hearts
Show Picture 1: Ace of Hearts
If 2 of Hearts
Show Picture 2: 2 of Hearts
etc...

The way you are suggesting would be like this:

If Ace of Hearts
   If First Draw
      Show Picture 1: Heart Card Back
      Show Picture 2: Ace Card
   If Second Draw
      Show Picture 3: Heart Card Back
      Show Picture 4: Ace Card
   If Third Draw
      Show Picture 5: Heart Card Back
      Show Picture 6: Ace Card
   If Fourth Draw
      Show Picture 7: Heart Card Back
      Show Picture 8: Ace Card
   If Fifth Draw
      Show Picture 9: Heart Card Back
      Show Picture 10: Ace Card
   If Sixth Draw
      Show Picture 11: Heart Card Back
      Show Picture 12: Ace Card
   If Seventh Draw
      Show Picture 13: Heart Card Back
      Show Picture 14: Ace Card
   If Eighth Draw
      Show Picture 15: Heart Card Back
      Show Picture 16: Ace Card
   If Ninth Draw
      Show Picture 17: Heart Card Back
      Show Picture 18: Ace Card
   If Tenth Draw
      Show Picture 19: Heart Card Back
      Show Picture 20: Ace Card
   End
etc...

While that would work, and allow for all cards, it is the problem I was specifically trying to avoid when I first designed my system. In any case, if I were to work on this system again I would either script it or hybrid it to add in the extra cards. Thanks for the suggestion though.
Title: Re: Blackjack v. 1.2
Post by: Forty on November 10, 2007, 03:11:14 PM
Im not trying to be a pain in the butt, but what about different labels, is that possible? And only do it for a few, you know what I mean?
Title: Re: Blackjack v. 1.2
Post by: modern algebra on November 10, 2007, 03:49:27 PM
Not really. I was talking about the labels. If you mean give a few of the cards different possible labels based on what cards are already out there, that would be somewhat annoying and result in about 9 extra conditional branches for each card that I give two possible labels to the picture. Even then, it may not work. The fact is, I don't really give a shit about three cards. It doesn't effect the game in any significant way.
Title: Re: Blackjack v. 1.2
Post by: Forty on November 13, 2007, 03:32:03 PM
Thats cool.

As an alternative, just make like one card appear twice
Like if your missing a king, make one king appear twice
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on November 16, 2007, 05:11:37 AM
I'm not sure I understand. Anyway:

New version is up. The main difference is I converted the system to RMRK+ Format and commented it.
Title: Re: BlackJack [RMRK+]
Post by: Forty on November 20, 2007, 04:14:22 AM
Here, I'll look at the event and fix it up.
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on November 20, 2007, 01:09:10 PM
knock yourself out  ;D
Title: Re: BlackJack [RMRK+]
Post by: Tsunokiette on December 01, 2007, 07:50:18 PM
This looks cool, but shouldn't the dealer's cards be hidden? That's half the game of blackjack, you don't know if you cards are higher than theirs and vice versa.
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on December 01, 2007, 08:02:38 PM
Whenever I've played Blackjack, it's always been one card up one card down ... Maybe there are different variations?
Title: Re: BlackJack [RMRK+]
Post by: Tsunokiette on December 03, 2007, 10:50:30 PM
Whenever I've played Blackjack, it's always been one card up one card down ... Maybe there are different variations?

Nm, you're right. For some reason I thought that card that was face down was right side up. -_- My bad. Great event! :D
Title: Re: BlackJack [RMRK+]
Post by: Sigma on December 13, 2007, 02:02:31 AM
Do you have a screencap of the event system in RM2k3 perhaps?
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on December 13, 2007, 02:57:15 AM
Well, I've not done the event system in 2k3, so no. But the event is almost entirely translatable. Just look at it in RMXP, and you should be able to translate it entirely, it's all just conditional branches and variables, or fork conditions I guess in 2k3. The only event command I used that is not in 2k3 (at least, to my recollection, is Control Self-Switch, and you can just exchange those for regular switches. I do not particularly want to write the entire event out in 2k3, but try to translate it to 2k3 and if you see any event commands you do not recognize, just ask me and I will tell you what the equivalent is in 2k3.
Title: Re: BlackJack [RMRK+]
Post by: Demonic Blade on December 21, 2007, 01:46:40 PM
Rox, simply does! Too good to be true! I have some things to say though:
1: Would it be possible to do so that you win twice the amount of gold you bet? 'cuz isn't that kinda like how it really is (I don't know, I'm not even 13 yet, so plz don't laugh at this lil' question... :[
2: Could you post the code, because I can't just copy and paste from the Demo- for some reason I got a wrong version of RMXP...?
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on December 22, 2007, 09:42:24 PM
Well, posting the code wouldn't make too much sense, since you cannot paste text into the event editor. Is it really not working to just Ctrl C the little guy from the demo and Ctrl V into your project?

Also, no, in real life you only win what you bet. But, if you want to make it that way in your game, then in the victory page (3rd page in the event) you can just multiply the bet variable by 2 before adding it to player gold.
Title: Re: BlackJack [RMRK+]
Post by: Kokowam on December 23, 2007, 12:30:16 AM
Ahaha, Blackjack. I wonder if I tried to make it, if it'd turn out the way yours is. I haven't looked at yours, mind you.
Title: Re: BlackJack [RMRK+]
Post by: Demonic Blade on December 23, 2007, 08:31:35 AM
Well, posting the code wouldn't make too much sense, since you cannot paste text into the event editor. Is it really not working to just Ctrl C the little guy from the demo and Ctrl V into your project?

Also, no, in real life you only win what you bet. But, if you want to make it that way in your game, then in the victory page (3rd page in the event) you can just multiply the bet variable by 2 before adding it to player gold.

I can't open the demo, only play it... :(
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on December 23, 2007, 02:06:48 PM
Err... why not? It's not encrypted or anything... Just double click on the RPGXP project.
Title: Re: BlackJack [RMRK+]
Post by: Demonic Blade on December 23, 2007, 02:29:29 PM
It says they are too different versions. I use the Postality Knights Enchanced version (no SDK). But I also have the full french version of the game- w/o PK, SDK or anything else. The french version is version 2 of rmxp...
Title: Re: BlackJack [RMRK+]
Post by: Demonic Blade on December 23, 2007, 02:35:09 PM
Plz help, this has happened to all other demos on this site except about two of them (2 out of... what, 10 demos?) :(
Title: Re: BlackJack [RMRK+]
Post by: modern algebra on December 23, 2007, 05:22:44 PM
I don't get what you mean by no SDK, as SDK is not part of the program but is just a script. In any case, I don't have PK so I don't know how to help you. Try downloading the trial version from enterbrain and running it in that? I'm sorry, but I don't know how to help you with this.
Title: Re: BlackJack [RMRK+]
Post by: Demonic Blade on December 23, 2007, 05:34:28 PM
I don't get what you mean by no SDK, as SDK is not part of the program but is just a script. In any case, I don't have PK so I don't know how to help you. Try downloading the trial version from enterbrain and running it in that? I'm sorry, but I don't know how to help you with this.
I never put in SDK, and I can't download the trial version, as I already used up the 30 day trial... but I'll ask somewhere in some help section. Thx anyway! ;)