random items for vxa

anikarises

Villager
Member
Joined
Jul 21, 2014
Messages
19
Reaction score
0
First Language
english
Primarily Uses
im trying to program a fishing event without having to use script i have to pay for to use commercially. i can program everything but i cannot figure out how to randomize the item pay out. if some one can tell me how to do it with events or script it for me as a "script for dummy" i would be much appreciative. if you need more info contact me and i will see if i can provide more details. thanks in advance. ps. i ony use plug and play script or script that is so easy to alter a baby could do it.
 

SoulPour777

Crownless King
Veteran
Joined
Aug 15, 2012
Messages
1,093
Reaction score
104
First Language
English
Primarily Uses
N/A
What do you mean Randomize Item payout? You mean the items you want to get? You can easily do it by making a random variable from the Control Variables section, then make a conditional branch that checks whether which number the variable would be, and assign which item you would get.

For the script version, you can try this:

module Fishing_Dummy def self.create_fishing_event fishing_item = rand(5) + 1 # from the range of 1 to 5 case fishing_item when 1 # when the variable is 1 then get item id 1 return $game_party.gain_item($data_items[1],1) when 2 # when the variable is 2 then get item id 2 return $game_party.gain_item($data_items[2],1) when 3 # when the variable is 3 then get item id 3 return $game_party.gain_item($data_items[3],1) when 4 # when the variable is 4 then get item id 4 return $game_party.gain_item($data_items[4],1) when 5 # when the variable is 5 then get item id 5 return $game_party.gain_item($data_items[5],1) end end endin an event do this on a script call:

Fishing_Dummy.create_fishing_eventBut of course this is just a dummy that you requested, nothing special, very simple, really.
 

anikarises

Villager
Member
Joined
Jul 21, 2014
Messages
19
Reaction score
0
First Language
english
Primarily Uses
so it will randomize the fish you get from a fishing event?

i personally do not understand variables.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You could do it through an event.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
i personally do not understand variables.
Then follow the link in my signature and look for the variables guide linked there.
Variables are the most important part of any structure that goes beyond a simple "go to XY" quest, and you NEED to understand them if you want to achieve anything more complex.
 

anikarises

Villager
Member
Joined
Jul 21, 2014
Messages
19
Reaction score
0
First Language
english
Primarily Uses
. thank you. @ shaz. i couldn't figure out the event for it but figured it has to to with variables. @andar i will look at it asap. btw where do i place a game im working on. funnily enough it is a game about the last arcitect who can fix the world via scripting :p
 

SoulPour777

Crownless King
Veteran
Joined
Aug 15, 2012
Messages
1,093
Reaction score
104
First Language
English
Primarily Uses
N/A
Yes it would give you random items. Basically though, you can do this via an event easier.
 

anikarises

Villager
Member
Joined
Jul 21, 2014
Messages
19
Reaction score
0
First Language
english
Primarily Uses
I'll have to try again after reading up on variables. i understand about 80% of the program just by playing with it and what my friend had shown me. in about a week i had the first chapter of one of my favorite books about 3/4ths of the way finished. i just never understood variables. i thank all of you once again and should be able to figure it out now.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top