SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
375
Reaction score
202
First Language
English
Primarily Uses
I mean...it's cool, but if you have no way of telling who won and who lost and rewarding them, sorta loses a bit of the point, eh? Is there a quick way to at least store something in a variable if the player wins?
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@SimProse Since the player is allowed to play again if they want to (rather than the minigame closing out) I thought it'd be kinda pointless to keep track of winning or losing. If you want to do it though you can.

Either add 1 to a variable or switch in these lines (~887)

Code:
    if (this._shouldProcessEnd) {
        var score = this._matchHistory.getScore();
        var c = score[1], p = score[0];

        if (p > c) {
//player wins
//$gameSwitches.setValue(ID, true/false);
//$gameVariables.setValue(ID, value);
            this._log.setText(victoryText[0], victoryText[1]);
        } else if (p < c) {
//player loses
//$gameSwitches.setValue(ID, true/false);
//$gameVariables.setValue(ID, value);
            this._log.setText(lossText[0], lossText[1]);
        } else {
//player ties
//$gameSwitches.setValue(ID, true/false);
//$gameVariables.setValue(ID, value);
            this._log.setText(tieText[0], tieText[1]);
        }

        this._replayCmd.open();
        this._replayCmd.activate();

        this._shouldProcessEnd = false;
    }
 

IssaMeMino

Living in a Peculiar World
Veteran
Joined
Apr 11, 2017
Messages
54
Reaction score
26
First Language
English
Primarily Uses
RMMV
Thank you, Mjshi!

So, I made my attempt at:

if (this._shouldProcessEnd) {
var score = this._matchHistory.getScore();
var c = score[1], p = score[0];

if (p > c) {
//player wins
//$gameSwitches.setValue(ID, true/false);
//$gameVariables.setValue(12, $gameVariables.value(12)+1);
this._log.setText(victoryText[0], victoryText[1]);
} else if (p < c) {
//player loses
//$gameSwitches.setValue(ID, true/false);
//$gameVariables.setValue(ID, value);
this._log.setText(lossText[0], lossText[1]);
} else {
//player ties
//$gameSwitches.setValue(ID, true/false);
//$gameVariables.setValue(ID, value);
this._log.setText(tieText[0], tieText[1]);
}

this._replayCmd.open();
this._replayCmd.activate();

this._shouldProcessEnd = false;

And I'm not good at code... so needless to say, it didn't work.
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@IssaMeMino No, you're right!
You see the "//"? Those are "comments". So you need to uncomment them by removing the // in front of the lines you changed, otherwise, the code won't even run.
 

IssaMeMino

Living in a Peculiar World
Veteran
Joined
Apr 11, 2017
Messages
54
Reaction score
26
First Language
English
Primarily Uses
RMMV
Oh! Thank you so much! Is it okay if the rest of the (ID, value) are left blank? Sorry for holding my hand through this- I'm not code savvy.
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@IssaMeMino It's alright, don't worry xD
Yeah, you can actually delete the rest of those commented lines. You don't really need them, they don't really do anything.
 

IssaMeMino

Living in a Peculiar World
Veteran
Joined
Apr 11, 2017
Messages
54
Reaction score
26
First Language
English
Primarily Uses
RMMV
@mjshi Thanks!

So I think I might swap that variable code to have the player receive a token with $game_party.gain_item($data_items[id], amount).

Now I just need to figure out how to make playing cost one ticket and keep them from playing if they don't have one. I'm making a speakeasy style tavern in my game with your match card lottery, wuxing and Galv's spinning wheel.

But, that's something to figure out in the morning!

Update: I've got it altered so the game gives the player a token if they win! I can't seem to find script that just closes the game or find where it's located in the plugin file.
 
Last edited:

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
375
Reaction score
202
First Language
English
Primarily Uses
Works great, thanks!
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@SimProse You're welcome ^^

@IssaMeMino The start/quit game things are here:

Start game
Scene_WuxingMG.prototype.initVariables = function() {
this._currentRound = 1;
this._totalRounds = WuxingMG.rounds;
this._shouldProcessResults = false;
this._shouldProcessEnd = false;
(... you get the point xD)

Quit game
Scene_WuxingMG.prototype.cancelCommand = function() {
//add stuff here
this.popScene();
};

Also, here, if you add a condition to check:

Window_WXCommand.prototype.makeCommandList = function () {
this.addCommand(replayText.again, 'ok', condition);
this.addCommand(replayText.quit, 'cancel');
};

The ok command will only be enabled if that condition is true (ex. # of tokens in inventory is > 0).
 

IssaMeMino

Living in a Peculiar World
Veteran
Joined
Apr 11, 2017
Messages
54
Reaction score
26
First Language
English
Primarily Uses
RMMV
Thank you so much! I'll take a stab at it tomorrow - my fragile newbie skills might take some time. Your mini-game plugins are fantastic. I'm making some custom art (for the mini game) for my game and I'll be sure to post a preview when I have it all finished up.

You know what game is still missing? Dice. *wink wink*
 

Lionheart_84

Veteran
Veteran
Joined
Oct 27, 2015
Messages
592
Reaction score
51
First Language
Italian
Primarily Uses
good job!!! is there a prize system ???:wink:
 

brunsnaes

Warper
Member
Joined
Apr 23, 2018
Messages
1
Reaction score
3
First Language
Danish
Primarily Uses
RMMV
Hi Mjshi, thanks for a really good plugin. Very well made and extremely easy to install.

For those who are asking how to build rewards into the system:
You can easily just add the variables as Mjishi suggested earlier in the threat. This will allow you to make a "points" or a "coin" variable which the Wuxing game can control. This can be the same unit of credit you use inside your casino or whatever you are building. This works great if you want to incorporate several different mini games.

You can also connect this variable directly to your characters wallet/gold. This is easily done under events. See example in this photo: Skærmbillede 2018-05-08 kl. 19.16.13.png
This way the character can only start the game if he has enough money to play. I had set the minimum bet to 5 gold (the same amount I had instructed the variable in the plugin to deduct from my gold in case I lost the game). If the came is won it will add 5 gold to my wallet.
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@B34RxJ3W I'll be available the 21st of May, but you shouldn't post commission request stuff here on a plugin thread. PM me?
 

Galaxyglow

Villager
Member
Joined
Nov 26, 2015
Messages
16
Reaction score
6
First Language
English
Hi mjshi! I love your plugins! This wuxing one will actually play really well into my game as I am implementing this elemental structure. But I was wondering, how can I change the script so that the game doesn't ask if you want to replay? If I can't, that's OK. Thanks!! And you're awesome!
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@Galaxyglow Hey, glad you liked the plugin!
Short answer: yes, go ahead!

Long(er) answer--

My terms on my site/GitHub state that
You are free to use, modify and redistribute my resources wherever and for whatever you please so long as you credit me (mjshi) as the original author.
 

TenTranVN

Veteran
Veteran
Joined
Apr 13, 2017
Messages
179
Reaction score
19
First Language
Vietnam
Primarily Uses
RMMV
plugin mouse in video ?
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
995
Reaction score
846
First Language
English
Primarily Uses
N/A
@TenTranVN Correct me if I'm not understanding you correctly, but no, the plugin doesn't include the mouse that's in the video xD
 

Panthus

Warper
Member
Joined
Feb 17, 2019
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey @mjshi ! Is there a way to limit the elements to be just 3 elements? Permanently. There is an option to choose how many you start with, which makes the rest of the elements greyed out. I want it to be literally more like ROCK, PAPER, SCISSORS, if its possible?
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm making Toilet in Wonderland 2. and tell vinny about it lol
WE ARE THE BORG. YOUR BIOLOGICAL AND TECHNOLOGICAL DISTINCTIVENESS WILL BE ADDED TO OUR OWN. RESISTANCE IS FUTILE.
D2R save files are so broken. how was the beta test better then the full release. blizzard's last hope crashed and burned.
they're getting no more chances from me.
Anyone going to talk about Chris Pratt Mario?

Forum statistics

Threads
115,333
Messages
1,089,096
Members
150,007
Latest member
Jay_
Top