The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: modern algebra on April 30, 2007, 05:23:12 PM

Title: More than 50 pictures
Post by: modern algebra on April 30, 2007, 05:23:12 PM
Does anybody know a way to display more than 50 pictures?
Title: Re: More than 50 pictures
Post by: Irock on April 30, 2007, 05:28:05 PM
You'd need a script. I don't know of any, nor have I seen any.

Look around. ;)
Title: Re: More than 50 pictures
Post by: Zeriab on April 30, 2007, 08:20:59 PM
You can't display more than 50 pics simultaneously without resorting to scripting.
I'm more interested in why you would want so many pictures displayed at the same time.
Must be so you can do like I did in the project I have attached :V

Sorry... Was bored. What are you planning?
Title: Re: More than 50 pictures
Post by: Irock on April 30, 2007, 08:24:28 PM
LOL ZERIAB!

That's the only reason to display more than 50 pictures. xD

Title: Re: More than 50 pictures
Post by: Zeriab on April 30, 2007, 08:57:40 PM
Sounds like it gave you a laugh ;D

Anyway I just remember something...
Is this about a card game?

Assuming it is... I know there are 52 different cards in a game, but it's only really if you have to display more than 50 cards that you will have any problem.
After all. It's just about changing what the pictures contain ^_^
Title: Re: More than 50 pictures
Post by: modern algebra on April 30, 2007, 09:16:33 PM
Lol at Demo

Yeah, it's something like that. It's for the Blackjack system I submitted to the Resource Add-ON. The way I had it set up was that it runs through the same loop for each draw. I want to represent each picture with a different label because I didn't want the event to look like this:

If First Draw,
If Suit = 1
If Value = 2
Show Picture (1, "2 of Clubs")
If Suit = 1
If Value = 3
Show Picture (1, "3 of Clubs")
.
.
.
If Suit = 4
If Value = 13
Show Picture (1, "King of Hearts")
If Suit = 4
If Value = 14
Show Picture (1, "Ace of Hearts").
.
.
.
If Second Draw,
If Suit = 1
If Value = 2
Show Picture (2, "2 of Clubs")
If Suit = 1
If Value = 3
Show Picture (2, "3 of Clubs")
.
.
.
If Suit = 4
If Value = 14
Show Picture (2, "King of Hearts")
If Suit = 4
If Value = 14
Show Picture (2, "Ace of Hearts").

Maybe I'm missing some easy way to resolve the problem,  but I would much prefer if it could run through the same loop 10 times then run through something like that, which has like 500 additional lines. It'd be easy if you could set the label to be a variable :) It doesn't make much of a difference in that case, since only 3 cards are missing, but it'd be nice. Also, it'd be easy to make a window that displays player score, but it'd take 3 additional pictures, and so it's be a 46 card deck.

You can look at the system if you like. I'm directing you to the original simply because the one I submitted has names like Temp Variable X, and it might be harder to trace. Blackjack (http://rmrk.net/index.php/topic,12516.0.html)
Title: Re: More than 50 pictures
Post by: Zeriab on May 01, 2007, 09:38:42 AM
You have up to 10 pictures showing at any given time.
You can do by making a common event for each picture, that is 10 common events. (You have a max of 999 common events, so the amount shouldn't be any trouble)
Use 1 variable for each card holding information about which card is in there.
That would be 54 different values. 52 for the cards, 1 for backside and 1 for no card shown.
Then it's just to change the variable and call the common event.
Title: Re: More than 50 pictures
Post by: modern algebra on May 01, 2007, 02:47:42 PM
Yeah, I know, but that's so messy. I think I prefer to have a small event with a 49 card deck then 10 events that are almost the same size for just the 3 extra cards. That's actually the way I first did the event, but it was so big that I just scrapped it. I might take the time to add those if I get around to making my casino event system. Either that or I guess I could give some cards the same label and just implement a check so that both cannot be picked.

Plus, I made my Blackjack a local event, so it wouldn't take any common events to make it  ;D
In my system, I actually do it by suit and value, but it'd be just as easy I suppose to do it 2-14, 16-28, etc.. and just mod by 14 to obtain the score to be added to the player score (check 11, 12, 13, 14 and reduce or add appropriately). They are all temporary variables though, so it doesn't make much of a difference how many I use.

Thanks for the help though.

(P.S. And what do you mean by one value storing the backside? That card still needs to be one of the others, I just made it so that the backside is picture 50 and I placed it over the first dealer card. How would it work if you were storing it as a value?)

Title: Re: More than 50 pictures
Post by: Zeriab on May 01, 2007, 04:49:08 PM
With 53 different graphics to be accounted for it will no matter what get messy.
The reason I want part of it in a common event is because you can call the common event. (The event command)
That way you can easily call blocks of event-code with one event command.
About the one value for storing the backside. It's simply because you have the graphics for the 52 different cards and the backside graphics.

I haven't really dwelled deeper into the matter as I thought: "What a bother, I would make it with scripts instead"
Title: Re: More than 50 pictures
Post by: modern algebra on May 01, 2007, 06:39:35 PM
meh. I'm going to keep it the way it is anyway. It took about 2 hours to make it the way I did, and I think adding in all the common events would take another 2 hours, so it's not really worth it in my opinion.

Thanks for the help  ;D

Do you think that I could just use a Script command like this to draw the picture?

self.contents.blt($game_variables[223], $game_variables[224], RPG::Cache.picture("Ace of Diamonds"), Rect.new (0,0,96,96), 255)

It won't work because I don't think it's a valid command outside of the Window Class, but is there a way for me to do something similar? I'm not really a scripter, so I don't know