# [Plugin] Gashapon

### » Fri Sep 02, 2016 10:44 pm

i'm not really sure what this plugin is I was looking for a pattern generator but as far as i can see this is more like a shufflebag than a pattern generator, since pattern generator should have "a pattern" to follow, like
3,6,4 means that if i start at 1, then 4, then 10, then 14, then 17, etc...
and this looks like i can asign a number to a letter and then shuffle like a deck of cards or a bag of tokens. and it's cool but the name confuse me, OR maybe, the translation to spanish of "Pattern" is not as expected xD
B
24
S
4
Posts: 111
Reputation: 1,442

### » Fri Sep 02, 2016 11:38 pm

@kingpirux

You are right, the name is not exactly matching the behavior of this plugin, it is a kind of random value generator.
I will edit the title of this thread, but I could not edit the display name of this plugin, because that this plugin had been published in my friend's book.

What behavior do you expect in a "pattern generator"?
Goodbye
B
111
S
28
G
295
Posts: 4,549
Reputation: 164,228

### » Sat Sep 03, 2016 9:17 pm

lol well in a pattern generator i'm expecting a procedural logic.
As i tryed to explain in the example, let's say that my "procedural logic" will be 3,6,4,-5, the ecuation is "+" and the starting is "1"
Then this in a loop starting at 1 may return:
1,
(1+3)= 4,
(4+6) = 10,
(10+4)=14,
(14+-5)= 9,
(9+3)=12,
(12+6)=18,
22,
17.... and so on

A pattern is some kind mathematic or logic that you can follow or find.
So this plugin should:
Based on a premade or Generated seed : 3,6,4,-5
Using a conector or ecuation: +
Create a loop, and
Find a result in X position: Example, in the 6th node = 12

Also, this is not necesary matematical, in the same way you did in this pluggin, a number can be a Letter, so if the seed is: A,C,H and the ecuation is "-"
then in this phrase "Hello i am Emmanuel Cesar and im talking too much", the result is
Node1: "Hello i m Emmanuel Cesar and im talking too much"
Node2: "Hello i m Emmnuel esar and im talking too much"
Node3: "ello i m Emmnuel esar and im talking too muc"
because the letters are substracted in that order, so if you give me only those nodes i can find the pattern by just looking at what is being deleted, and by logic i can say "The letters are substracted in the order A-C-H"

i don't know if you understand my point
Last edited by kingpirux on Sat Sep 03, 2016 9:29 pm, edited 1 time in total.
B
24
S
4
Posts: 111
Reputation: 1,442

### » Sat Sep 03, 2016 9:21 pm

and no, this is not a random generator, this is a ShuffleBag, in many game lenguages (and i think in C) the shufflebag is this wonderfull plugin that allows you to pick "numbers" in random but in order without repeating, its perfect to create a deck of cards, this plugin with array is wonderfull for board games.

EDIT: Gashapon is a good name for this xD
B
24
S
4
Posts: 111
Reputation: 1,442

### » Sun Sep 04, 2016 1:26 am

@kingpirux

Thanks for this explanation, now I understand the "pattern generator". It might be too general to make a plugin, a sequence of events might be a more better solution.

And yes, I changed the plugin name to "Gashapon", but I could not change the folder name of this plugin right now.
Goodbye
B
111
S
28
G
295
Posts: 4,549
Reputation: 164,228

### » Tue Nov 01, 2016 3:21 pm

Hi @rexrainbow

Is there a way to get categories for the patterns? I want to use diffrent kind of patterns for my game.

For instance

Add Pattern "enemy_1" with count 2 in category "Enemies".

Thank you!
iTunes: Match3 | Google Play: Match3
B
114
S
42
G
31
Posts: 1,191
Reputation: 29,823

### » Tue Nov 01, 2016 3:34 pm

@AndreasR

Put multiple rex_patterngen objects (Gashapon plugin) into projects, each gashapon is a kind of category, like

- "chartboost" x 4

Gashapon "Enemies" has
- "enemy_1" x 2
Goodbye
B
111
S
28
G
295
Posts: 4,549
Reputation: 164,228

### » Tue Nov 01, 2016 3:35 pm

rexrainbow wrote:@AndreasR

Put multiple rex_patterngen objects (Gashapon plugin) into projects, each gashapon is a kind of category, like

- "chartboost" x 4

Gashapon "Enemies" has
- "enemy_1" x 2

Thank you! I didn't know that I can add more of those objects Thank you!
iTunes: Match3 | Google Play: Match3
B
114
S
42
G
31
Posts: 1,191
Reputation: 29,823

Previous