Pickboard - Lotto Type Item Picking

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
464
First Language
Lithuanian
Primarily Uses
Name: Pickboard


Version: 1.1


Author: Mr. Trivel


Created: 2016-02-16


 


What does it do?


Allows players to pick rewards from a board of tiles and costs some currency - be it gold or items.


 


Video:










 


Features:


Setting up multiple different sized boards.


Rewards ranging from nothing to items/weapons/armor or gold. Any amount of it.


Resetting the board without having to re add all rewards.


Saving is board completed state to a Switch for eventing use.


 


How to use?


Everything is set up using Plugin Calls.


We have the following ones:



Pickboard Start [Board ID] [X] [Y] - creates empty board with X Y dimensions


Pickboard Reset [Board ID] - resets board of ID to empty state


Pickboard IsComplete [Board ID] [Switch ID] - Saves answer to a switch


Pickboard AddReward [Board ID] [RewardType] [ID] [Amount] [Tiles] [IconID] - Adds rewards


Pickboard SetPrice [Board ID] [PriceType] [ID] [Amount] [IconID] - Picking isn't free, right?


Pickboard Enter [Board ID] - go the scene with pickboard of ID


Pickboard SetBackground [Board ID] [ImageName] - Changes background of pickboard
Pickboard OpenTiles [Board ID] [NumberOfTiles] - opens a number of tiles


 



[Board ID] - ID of the board you're changing


[X] - Width of the board


[Y] - Height of the board


[Switch ID] - ID of the switch to save board's state


[RewardType] - a, w, i, g, v - armor, weapon, item, gold, variable
[PriceType] - a, w, i, g, v - armor, weapon, item, gold, variable


[ID] - ID of item, if [Type] is gold -- then ID is irrelevant


[Amount] - How much should be reward if adding it or taken if setting price


[Tiles] - How many tiles on board has this reward


 


Example of calls:



Code:
Pickboard Start 3 5 5
Pickboard Reset 3
Pickboard IsComplete 3 173
Pickboard AddReward 3 a 4 1 5
Pickboard AddReward 3 g 0 1000 10
Pickboard AddReward 3 i 1 5 7
Pickboard SetPrice 3 i 5 1
Pickboard Enter 3

 


Sample pickboard setup from video:









 


Plugin: <GitHub>


How to download Plugin. Click the link above, there will be a button named Raw, press Right Click -> Save As.


Images:


Image files: <MediaFire>


 



Terms of Use:


Don't remove the header or claim that you wrote this plugin.


Credit Mr. Trivel if using this plugin in your project.


Free for non-commercial projects.


For commercial use contact Mr. Trivel.
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
532
Reaction score
107
First Language
English
Primarily Uses
N/A
This is a really slick plugin. :)


Would you be willing to add a new reward type that executes a common event?


It may need to immediately exit the scene in order to prevent repeated event queues from replacing each other. (Unless someone is using a Common event queue plugin)


edit: It would also need a means of assigning an icon for common event rewards. Since the icon is taken from the reward itself. Possibly assign the icon via an optional command that overrides the items icon.


Example: Pickboard AddReward [Board ID] [Type] [ID] [Amount] [Tiles] [IconIndex] - Adds rewards


Thanks for your time. :)


EDIT2:


Also. Would you be willing to add a command to check if all available rewards are already obtained? Otherwise a player might continue to play with no possible reward. :(


Note: This would require the picking end when the last reward is found. If a new reward is added later, or the board is reset, the board would be usable again


EDIT3:


One more thing! Would you be willing to add the possibility of using a variable for cost?


Example: [Type] - a, w, i, g, v - armor, weapon, item, gold, variable


Pickboard SetPrice 1 v 123 1 - deducts 1 point from $gameVariable 123


lol... This is such a useful little plugin, I am hoping to use it in a few ways. :D


EDIT4:


Oh my goodness... I really hope I am not driving you crazy. BD


Would you be willing to add the option of revealing random picks upon entry of the pickboard? Sorta like an advantage where the first time its accessed, a certain number of picks are auto revealed?


Example: Pickboard BonusPicks 1 5 - Reveals 5 picks for free upon first entry. (will reset if the board is reset)
 
Last edited by a moderator:

Khayalan

Mapping-Guru
Veteran
Joined
Dec 21, 2015
Messages
50
Reaction score
27
First Language
German
Primarily Uses
Really nice Plugin :)
 

Znikomek

Veteran
Veteran
Joined
Jan 18, 2016
Messages
56
Reaction score
4
Primarily Uses
Hi, great work ;)


do you plan to make popup what item it was won?


And it is possible to Enter the board without background image?
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
532
Reaction score
107
First Language
English
Primarily Uses
N/A
Hi, great work ;)


do you plan to make popup what item it was won?


And it is possible to Enter the board without background image?




FYI: The "Display Board Window" parameter will clear the background if set false.


.


@Mr. Trivel.


I understand if you are unwilling to add new features.


Though I really think that you should consider adding a means of preventing the player from playing on an empty board. (A board with no remaining rewards but still has playable selections)


As I stated in my first post. It is very possible that the player could luckily choose all possible rewards and still have choices left. (Which would all be empty)


If the player must clear the entire board to be sure they have collected all the rewards, it kind of destroys the 'gambling/lottory' aspect. And may leave the player feeling cheated.


The only alternative, is to design boards that have a limit to the possible picks, and reset each time the player exits the scene. Which again, sorta breaks half the options you've provided. (Unless I misunderstand them)


I will interpret further silence as refusal. In which case, I won't bother you about it again. :)
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
464
First Language
Lithuanian
Primarily Uses
@Roguedeus,


They are all valid suggestions. I'll definitely add the variables as cost and stopping player when there's no rewards left. Not sure about common events right now. As for free bonus tiles when starting a board, I'll probably add that, too.


But first gotta finish up with other plugins.


@killerfer,


Yup, that's a valid suggestion. It's going to be added.
 

Znikomek

Veteran
Veteran
Joined
Jan 18, 2016
Messages
56
Reaction score
4
Primarily Uses
FYI: The "Display Board Window" parameter will clear the background if set false.
Yea it's clear the the window backgrouund, and i want to clear the image 'pick_Background' and see the pick Board on tinted map or something like that

11.png


12.png


13.png
 
Last edited by a moderator:

Ignatios

Developer
Member
Joined
Feb 25, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I have an issue when this runs on an android...the game crashes and says it can't find the pictures, however the same exact version on the PC works just fine. Any help with that?
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
464
First Language
Lithuanian
Primarily Uses
@Ignatios,


Hmm, I don't have an Android,  so can't really troubleshoot that.


Version 1.1


- Variables added as reward choice or price choice.
- Able to change any item, gold or variable displayed icon ID for any board.
- Added transparency option for reward window background.
- Added command to add different backgrounds to different pickboards.
- Added option to not have a background by default.
- Now the board is revealed if there's no more rewards to pick.
- Added a new command to reveal X random tiles on the board.
 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
840
Reaction score
379
First Language
Dutch
I just finished implementing this plugin in my game 15 minutes ago and now I already have to update hehe //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif


Great updates! The plugin has anything I wished for now... Except, an option to show each item that is won in a pop-up or something. My question: Are you considering another update? If not, am I allowed to add this to the plugin myself?


Thanks for this awesome plugin, Trivel!
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
464
First Language
Lithuanian
Primarily Uses
@gRaViJa,


There's gonna be one more update with common events as rewards and popups for each item received, but probably not in couple of weeks. Feel free to edit the plugin.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
532
Reaction score
107
First Language
English
Primarily Uses
N/A
@Ignatios,


Hmm, I don't have an Android,  so can't really troubleshoot that.


Version 1.1


- Variables added as reward choice or price choice.
- Able to change any item, gold or variable displayed icon ID for any board.
- Added transparency option for reward window background.
- Added command to add different backgrounds to different pickboards.
- Added option to not have a background by default.
- Now the board is revealed if there's no more rewards to pick.
- Added a new command to reveal X random tiles on the board.

@gRaViJa,


There's gonna be one more update with common events as rewards and popups for each item received, but probably not in couple of weeks. Feel free to edit the plugin.


This is a great update! :D


Out of curiosity. Will the common event rewards be able to execute immediately?


Example: Starting a battle.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
532
Reaction score
107
First Language
English
Primarily Uses
N/A
@Roguedeus,


Yup, they will execute the moment they're rewarded.


Even if the common event runs a command that alters the current board?


Example: Reveals a few free choices?


This leads me to a new suggestion! //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif


Can you add a command that re-hides some already revealed tiles? The rewards under them won't change, but it adds to the 'memory' aspect of the board. Trying to remember which tiles were already empty can add complexity to a board/


Thanks again!


BTW:


Without a command to check to see if a board already exists, calling the reset board command causes an error.


I've resorted to calling:

Code:
if($gameSystem._pickboardData[1]) $gameSystem.resetPickboard(1);
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
464
First Language
Lithuanian
Primarily Uses
@Roguedeus,


If you try to reset before board exists, it'll crash, yup. I'll add failsafes for next version then.


Hiding specific tiles or hiding whole board? Well, sure to both. For now you can use this for it:

Code:
// Hide single tile:
$gameSystem._pickboardData[boardId].board[tileIndex].open = false;

// Hide all tiles:
for (var i = 0; i < $gameSystem._pickboardData[boardId].board.length; i++) {
	$gameSystem._pickboardData[boardId].board[i].open = false;
}
 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
840
Reaction score
379
First Language
Dutch
Can I add one more request? (or is this already doable now?): Thing is I want the pickboard to appear after "missions" and based on how good the player battled, they can choose more rewards. I figured out how, but I want the player to be unable to leave the pickboard untill all the picks are done. If i make an item "Picks" which is used as the cost for selecting items and the player get's 10, then the player can't leave untill the item "Picks" has 0 count again (aka the player picked 10 items from the board).
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
464
First Language
Lithuanian
Primarily Uses
You can't do that with the current version, but if you want it, just add this piece of code somewhere in the plugin.


Scene_Pickboard.prototype.popScene = function() {
var have = 0;
if (this._priceWindow._price.type === 'g')
have = $gameParty.gold();
else if (this._priceWindow._price.type === 'v')
have = $gameVariables.value(this._priceWindow._price.id);
else
have = $gameParty.numItems(this._priceWindow._item);
if (have === 0 || $gameSystem.allRewardsPicked(this._priceWindow._boardId))
Scene_Base.prototype.popScene.call(this);
else
this._pickboardWindow.activate();
};


E.g.:

 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
840
Reaction score
379
First Language
Dutch
You can't do that with the current version, but if you want it, just add this piece of code somewhere in the plugin.



Scene_Pickboard.prototype.popScene = function() {
var have = 0;
if (this._priceWindow._price.type === 'g')
have = $gameParty.gold();
else if (this._priceWindow._price.type === 'v')
have = $gameVariables.value(this._priceWindow._price.id);
else
have = $gameParty.numItems(this._priceWindow._item);
if (have === 0 || $gameSystem.allRewardsPicked(this._priceWindow._boardId))
Scene_Base.prototype.popScene.call(this);
else
this._pickboardWindow.activate();
};


E.g.:


Hidden Content
Gonna try it out right now. (Edit: it works, thank you for this)
 
Last edited by a moderator:

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
364
Reaction score
199
First Language
English
Primarily Uses
Am I strange, or does this no longer work with RPG MV 1.5.2? I get "Cannot set property '1' of undefined" when it starts up. I double-checked and everything seems fine with the formatting and all. The error seems to happen with the 'Pickboard Start' command based on the error console readout. Mine is 'Pickboard Start 1 5 5', which should work ok.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

The most rewarding part of making custom body character parts is absolutely not making the masks work. Somebody please put me out of my misery.
Any commercial devs here ever mess with Gamejolt? Been contemplating making my games available there but don't know if it's worth the effort or not.
Social distancing taught me of how much of not a loner I am. Dammit, I miss seeing my friends...
Happy 4th of July all. Anybody have plans? Mine here is staying home away from the virus. Still a nice 3 day weekend.
The project I am working on is going great at the moment. I'm hoping everyone is having as successful a time as I am. :)

Forum statistics

Threads
99,258
Messages
963,575
Members
130,849
Latest member
DuckGames
Top