Official Gacha Plugin Edit

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
Hello, I am currently attempting to use the official Gacha plugin included with the 1.1 Update which can be found here. Unfortunately, I seem to be even more inexperienced at JS than I thought, because after looking through the script I can't even seem to how it manages to randomly pull the items in the gacha at different rates for each level of rarity, as it seems to just randomly draw an item from the array based on length rather than rarity. Is there anyone who can help me learn to do the following:

-Edit the rate of each pull(Example: A 3 Star Item is more common than a 3 Star Weapon, which is in turn obviously more common than a 4 Star Weapon)
-Change what currency is used for the gacha, such as using an item in exchange instead of gold

I also have another question, but that one is of less importance compared to these two.
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Sissel Cabenala,
Hello, I am currently attempting to use the official Gacha plugin included with the 1.1 Update which can be found here.
Can you please be more specific with your link please?
  • Your link leads to a thread with 12 pages responses ....
  • You can link to a specific response like this:
upload_2017-12-6_17-10-9.png

I looked in my RPG Maker MV 1.5.1 js/plugins, and did not find any Gacha plugin there ...​

Thanks,

Joy Diamond
 

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Joy Diamond
My apologies, still very green to the forums. On that note, it turns out the link to the plugin is a huge 170MB file so I simply uploaded it to a pastebin temporarily instead, if that's alright.


Sorry about that.
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Sissel Cabanela,

We are all very new to the forums -- I've used them less than a month myself.

Can you still please give me a link to where you found Gacha links.
  • Please see my message above as to how to find the link.
  • If that is too confusing, please just say which thread # of the original message you linked above you found this in.
I'll want to see the original message for all sorts of extra details, like:
  • if it is linked to github;
  • what it's license is;
  • etc.
Thanks,

Joy Diamond
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Sissel Cabanela,

Er, well- https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-version-1-1-update-changelog.57859/
It's the the post it itself, #1. When I attempt to permalink it, that is what appears. Near the top of the initial post, there are 4 download links. It is apart of the 3rd link, "Plugins Download".

Thanks, I found it :) ... so I have a few concerns:
  • This is from RPG Maker version 1.1 from May, 2016 (one and a half years ago).
  • Gacha is not part of the current RPG Maker version 1.5.1.
There is this message which is interesting:

There is a Gacha script in the Kadokawa Plugins. Just in case :)
It's from May, 2017 (this year). So not clear if best to look at the Gacha from 1.1, or if the Kadokawa plugin's are using it. Have to research that.

Meanwhile that big 170 MB update is downloading on my computer ....
  • I'll post an update once I read the code.
Joy Diamond.

Updates:
First problem, this is a zip file & I have no window tool to extract zip files since winzip trial expired & wants way too much money for such a simple tool:
  • Removing Winzip;
  • Replacing with 7-Zip.
upload_2017-12-6_18-21-46.png
 
Last edited:

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Joy Diamond
The Plugin I posted/linked is the one from Kadokawa, I believe. At the top of the header it reads "(c)2016 KADOKAWA CORPORATION./YOJI OJIMA" and to my knowledge they have not released any variant nor update of this plugin, though the download does come with a 'demo' of sorts, I believe. I know I have a demo on my computer somewhere, so I'm gonna go on memory and say it was from that plugin zip.

Currently it seems to run fine as is on my current version of RPG Maker (1.5.1) so I think it should be fine as far as standard compatibility goes, non?
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Ok, so I found the sample game:

upload_2017-12-6_18-32-51.png

upload_2017-12-6_18-28-16.png

upload_2017-12-6_18-28-52.png

upload_2017-12-6_18-29-43.png

upload_2017-12-6_18-30-19.png

She looks like my long lost sister! Woot!
 
Last edited:

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Joy Diamond
Quite! So what you drew there was a 2 Star card, as you can tell by the indicator at the bottom of the card. There are a total of 5 stars corresponding to rarity, with 5 Star being the rarest and 1 Star being the most common. However- at the very least to my knowledge, the plugin currently does not differentiate 'rarity' in terms of rate. By that I mean you're just as likely to pull a 2 Star like you just got as often as you would pull a 5 Star card, which should not be the case.

Let's say we have 5 items we can pull from the gacha, each with a unique Tier of rarity(1,2,3,4,5). As it stands, you have a 20% chance to pull any of those cards, regardless of rarity. What I want is something akin to: A Rank 1 item has a 50% chance of being pulled, whereas a 5 Star Item has merely a 1% chance due to the rarity. Does that make sense?
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Sissel Cabanela,
@Joy Diamond
Quite! So what you drew there was a 2 Star card, as you can tell by the indicator at the bottom of the card.
Well, we've clearly found the first defect in this code:

Seriously, look carefully:

I mean that should definitely be a 5 star not a 2 star card!!!
  • I mean anyone that looks like my long lost sister has to be a 5 star card!
  • (I wonder what horrible fate befell her, that she was demoted to a 2 star card :confused:)
Don't you agree she has to be a five star card?
Playfully,

Joy Diamond.

P.S.: Ok, back to being serious, reading the code now ... (and yes, what you want makes sense).

UPDATES:
upload_2017-12-6_18-50-27.png
upload_2017-12-6_18-54-45.png
upload_2017-12-6_18-57-17.png
upload_2017-12-6_19-0-45.png
upload_2017-12-6_19-5-53.png
 
Last edited:

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Joy Diamond
Sometimes I wonder what happened to Trinity...SOMETIMES I WONDER WHAT HAPPENED TO JOEY WHEELER........

Anyway, I agree, but I've honestly never touched the Gachabook, which is probably a major oversight on my part if that has anything to do with pull rate, but at a glance it wasn't correlated. And I've seen said parameters, but they don't actually seem to affect the pull rate. They do make it so that you can distinguish what you pull with a different animation based on the Rank of the card, but don't change the pull rate. It seems to just push all the Gacha Items added with 'gacha add item x' into an array and pull 1 at random with no regard for rarity until AFTER the pull.
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
A real life friend just came over to visit, so we are going to work together on a plugin we are writing.
  • I'll look at this more tomorrow, and figure out how it is drawing items.
  • For an experiment, I'll make the chance to draw "my sister" at 50%.
  • That should then give you guidance on changing the rest of the code, so it does proper % that you want.
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Ok, my friend & I just found the code you want changed in Gacha.js:

upload_2017-12-6_19-18-54.png

This will be pretty easy to change:
  • As I wrote above, I can easily do this tomorrow.
  • I'll post a response or update this message once I do that.
 

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Joy Diamond
Ah yes, that is the line that I was looking over but I couldn't for the life of me deduce the rarity. Thank you very much, I can certainly wait until you are free as I had some more questions and strongly appreciate your time and help.
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Ok, so this seems pretty simple to understand the code now.

Going through it, there are a bunch of events on the main map:

upload_2017-12-6_22-2-2.png

Clicking on each of the events shows what they do:

upload_2017-12-6_22-3-24.png
upload_2017-12-6_22-4-41.png
upload_2017-12-6_22-6-3.png
upload_2017-12-6_22-7-25.png
upload_2017-12-6_22-8-13.png

Moving along, we clearly want to look at items 5-9:

upload_2017-12-6_22-11-14.png

The question then arises what is GachaRank & what does it affect?
  • For that we need to look at the code ...
Reading the code, the ranks having nothing to do with the value of the card, but are all about animations:

upload_2017-12-6_22-16-21.png

So at this point, we have determined how the system works & it doesn't have a way to do rarities ...
  • Obviously, the next step is to add rarities
Reading the code it already has rarities, which it calls gachaNumLot:

upload_2017-12-6_22-26-26.png

This seems to be the solution to your issues, just use gachaNumLot
upload_2017-12-6_22-41-55.png

And the result is quite clear:

upload_2017-12-6_22-44-32.png
This matches the items in game, it shows item #5 has a gachaNumLot of 5, and item #9 has a gachaNumLot of 1.
  • Problem solved :cool:
  • Do I get a gold star?
 
Last edited:

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Joy Diamond
You get 5, Ms. Joey Wheeler's Sister's actual Twin Sister. Let me also just say thank you for adding these images to help properly convey your points, they help out quite a lot(I'm actually curious as to what program you use for such).

If I can bother you for a bit more, while this does help modify the rarities immensely- is there a way to make it more precious? Unless my math is wrong, and it usually is, this current methods makes rare items become even more difficult to get as other items of lesser 'rarity' are added it, no? For instance, lets say I had 2 items in the gacha, Items A and B. Item A has numlot 1 and B has numlot 5. The odds of getting A are 1 in 6. If I add Item C with numlot 4, Item A now drops to a 1/10 chance, yeah?

Is there a way I can make it so that it rolls the rank/rarity of the Pull first, then the item? To elaborate, let's say I want 5 Star items to have 1% of being pulled. So in the gacha, if you manage to roll that 1%, it pulls a random 5 Star Item from the list of 5 Star Items in the gacha. Sorta like a double gacha, I guess, but all of the 5 Stars would have the same pull rate in this scenario. I understand I may have explained that poorly, however.
 

Joy Diamond

Talkative
Veteran
Joined
Nov 12, 2017
Messages
135
Reaction score
173
First Language
English
Primarily Uses
RMMV
Sissel Cabenala,

I'm gone for a few days:

Yes, you can do all that (the rarity questions) -- though would require programming it in JavaScript.
  • I'm gone for a few days (traveling to my niece's wedding :cool:)
Hopefully others can help you.
Gacha plugin & Licensing:

From what I can tell the Gacha plugin's are very nicely written, it would be great to get them support again:
  • One very important thing you might want to do, if you plan to use Gacha, is find out about the license.
  • They did not come with a license.
  • The copyright says:
    • (c)2016 KADOKAWA CORPORATION./YOJI OJIM
  • So, you could guess they are either licensed same as RPG Maker MV, or they are licensed same as RPG Maker MV Corescript (these are two different things):
  • The UI we purchased: RPG Maker MV is, appropriatly, closed source. This is what creates games.
  • Part of the core game: RPG Maker MV CoreScript is MIT licensed.
  • You can read this: RPG Maker MV Corescript for an explanation of what 'RPG Maker MV CoreScript' is.
  • However, he is, obviously, very busy -- and it might take a while to research this question.
If you just plan to use Gacha, then finding out the license is not critical; however, if you plan to modify it, then it becomes pretty important to find out the license.
  • Since, apparently, you do plan to modify it (or have someone modify it for you), then it would see to me, finding out the license is pretty important.
And as I wrote above "From what I can tell the Gacha plugin's are very nicely written" so this would probably be a worthwhile endeavor, to find out the licensing, get modifications done & see about having them supported more ...
About 1% probabilities:

Just one small point, giving something 1% probability is probably too low a probability for this kind of game:
  • It means a user could easily have to try 200 times (if they have bad luck) to try to get a five star card.
  • I suggest 5% as the lowest probability that is reasonable to give the user a challenge, but not make it too frustrating (if they have bad luck).
Also it's generally a good idea, when they fail to get the 5 star card, each time they try again the probability increases; so that eventually, say after 20 tries, they are guaranteed to get a 5 star card.
Best wishes,

Joy Diamond.

 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,099
Reaction score
15,404
First Language
Filipino
Primarily Uses
RMMZ
  • However, he is, obviously, very busy -- and it might take a while to research this question.
You can use it commercially or modify it. It's part of RPG Maker MV's default.
Also she*
 

Sissel Cabanela

Veteran
Veteran
Joined
Mar 28, 2016
Messages
110
Reaction score
21
First Language
English
Primarily Uses
@Archeia
Ah, that is what I thought I had read as well. You are the Plugin Creator then? Do you know why this plugin is not included with updated versions with RMMV? I had not noticed due to already having the plugin.
 

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

Latest Threads

Latest Profile Posts

I haven’t worked on my game in a while. Tomorrow might be the day.
*squeals* :kaoblush:


I've been experimenting with improved memory management again, which allowed me to include items to increase player path length. These are both 44 grid spaces long, and stable. :LZSexcite:
I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!
Stream will be live shortly! I am going to be playing some Among Us! Feel free to drop by!
Ami
tv program always get the ratings (it's the reason why drama series has 1000+ episode),also full and nonsense of censorship (weird blur, a scene getting cut because the unconvenient viewer,but it unconvenient to me either. you never see what the original is)

i know the reason is to take cover the viewer from the negative thing,but i just laughing and mocking of them that they're always suck :guffaw:

Forum statistics

Threads
104,461
Messages
1,006,454
Members
135,968
Latest member
PeFleming
Top