Triple Triad Custom Booster
Descrizione
Che emozione sto pubblicando il mio primo script! Questo script è un add-on per lo script di Triple Triad di Raizen, uno script che implementa il famoso minigioco di FF8.
Il mio script permette di creare booster pack personalizzati scegliendo il loro contenuto.
Autore
Zocchina
Allegati
Qui il link per lo script di Raizen => https://www.rpgmaker...-ff8-mini-game/
Qui il link per la demo => http://www.mediafire...Add-on.rar/file
Istruzioni per l'uso
Istruzioni all'interno dello script
Script
Spoiler
Pack = { =begin ============================================================================== ________ __ /\_____ \ /\ \ __ \/____//'/' ___ ___ ___\ \ \___ /\_\ ___ __ //'/' / __`\ /'___\ /'___\ \ _ `\/\ \ /' _ `\ /'__`\ //'/'___ /\ \L\ \/\ \__//\ \__/\ \ \ \ \ \ \/\ \/\ \/\ \L\.\_ /\_______\ \____/\ \____\ \____\\ \_\ \_\ \_\ \_\ \_\ \__/.\_\ \/_______/\/___/ \/____/\/____/ \/_/\/_/\/_/\/_/\/_/\/__/\/_/ ____ __ /\ _`\ __ /\ \__ \ \,\L\_\ ___ _ __ /\_\ _____\ \ ,_\ \/_\__ \ /'___\/\`'__\/\ \/\ '__`\ \ \/ /\ \L\ \/\ \__/\ \ \/ \ \ \ \ \L\ \ \ \_ \ `\____\ \____\\ \_\ \ \_\ \ ,__/\ \__\ \/_____/\/____/ \/_/ \/_/\ \ \/ \/__/ \ \_\ \/_/ ============================================================================== ■ Triple Triad Custom Booster by Zocchina Rpg Maker Version : Vx Ace Version 1.0 Script Difficulty : (•ᴗ•) Easy This script allows you to create custom booster for the Triple Triad Script by Raizen. You can find the script here: https://www.rpgmakercentral.com/topic/21183-triple-triad-ff8-mini-game/ ============================================================================== ■ Terms of Use When using any Zocchina script, you agree with the following terms: ● You must give credit to Zocchina; ● All Zocchina scripts are licensed under a Creative Commons license; ● You can’t give credit to yourself for posting any Zocchina script; ============================================================================== ■ How to use ● To install this script, open up your script editor and copy/paste this script to an open slot below ? Materials/?? but above ? Main. Remember to save. ● Config your costum booster below following the instructions. ● Commands: => Open pack <= Simply open a selected pack pack(id, card) => id = The id of your pack => card = Number of cards in a booser (Default 5) => Random pack <= Open a random pack. random_pack ============================================================================== =end #==============================================================================# # ■ Configuration # #==============================================================================# #==============================================================================# # Template # #==============================================================================# # ID Cards's IDs you can find in the pack # # 1 => ["Booster name",number,number,number], # # # # Pay attention to the comma after the bracket. # # You must write it after every booster but NOT after the last one # #==============================================================================# #==============================================================================# # Booster 01 # #==============================================================================# # ID Booster name Cards you can find 1 => ["Cavalcatori di ascelle",4,8,3,23,11,23,54,12,65], #==============================================================================# # Booster 02 # #==============================================================================# # ID Booster name Cards you can find 2 => ["Dolore al piede",1,2,3,4,5,6,7,8,9,10] } =begin #==============================================================================# # ■ Rarity and General Pack Settings # #==============================================================================# Here you can set the probability to find a card of a determinate rarity. Default: Pr_common= 55 Pr_rare= 24 Pr_super= 15 Pr_ultra= 5 Pr_extra= 1 =end Pr_common= 55 Pr_rare= 24 Pr_super= 15 Pr_ultra= 5 Pr_extra= 1 #Set the default number of cards that there are in a generic booster? Cards_per_pack = 5 #Do you want to memorize in a game variable how many packs the player has opened #during the game? Booster_opened_Game_Variable = 0 =begin #==============================================================================# # ■ Copies # #==============================================================================# Do you wish the player can find duplicates of the same card in a single booster? ● Yes = true ● No = false If you set false be sure you've set at least 5 different cards in the booster config =end Card_duplicates = false =begin #==============================================================================# # ■ Animation # #==============================================================================# Create a new folder Graphics/Booster. In this folder add the booster pack images which will be used for the animation. Boosters' name MUST follow this specification: ● Name = The name must be Booster_ID Example If I want to add an animation for the booster 1, the name of the picture must be : Booster_1 In the same folder there must be a file called "Taglio" which will be used for the animation. Play the Demo to understand what it is used for. In the folder there must be a pic "Default" that will be used when there isn't the image of the booster. =end #==============================================================================# # Animation Settings # #==============================================================================# #Do you want to turn on the animation system? Booster_Animation = true #Do you want to use the default image for every booster? Use_Default_Image = false #How fast is the animation? # 1: Slow , 2: Normal, 3: Fast, 4: Really fast... Booster_Animation_Speed = 3 #Set the position of the image Booster_Animation_X = 270 Booster_Animation_Y = 210 =begin #==============================================================================# # If you don't wanna cry, don't edit anything after this point # #==============================================================================# .ed"""" """$$$$be. -" ^""**$$$e. ." '$$$c / "4$$b d 3 $$$$ $ * .$$$$$$ .$ ^c $$$$$e$$$$$$$$. d$L 4. 4$$$$$$$$$$$$$$b $$$$b ^ceeeee. 4$$ECL.F*$$$$$$$ e$""=. $$$$P d$$$$F $ $$$$$$$$$- $$$$$$ z$$b. ^c 3$$$F "$$$$b $"$$$$$$$ $$$$*" .=""$c 4$$$$L $$P" "$$b .$ $$$$$...e$$ .= e$$$. ^*$$$$$c %.. *c .. $$ 3$$$$$$$$$$eF zP d$$$$$ "**$$$ec " %ce"" $$$ $$$$$$$$$$* .r" =$$$$P"" "*$b. "c *$e. *** d$$$$$"L$$ .d" e$$***" ^*$$c ^$c $$$ 4J$$$$$% $$$ .e*".eeP" "$$$$$$"'$=e....$*$$**$cz$$" "..d$*" "*$$$ *=%4.$ L L$ P3$$$F $$$P" "$ "%*ebJLzb$e$$$$$b $P" %.. 4$$$$$$$$$$ " $$$e z$$$$$$$$$$% "*$c "$$$$$$$P" ."""*$$$$$$$$bc .-" .$***$$$"""*e. .-" .e$" "*$c ^*b. .=*"""" .e$*" "*bc "*$e.. .$" .z*" ^*$e. "*****e. $$ee$c .d" "*$. 3. ^*$E")$..$" * .ee==d% $.d$$$* * J$$$e* """"" "$$$" #==============================================================================# # If you don't wanna cry, don't edit anything after this point # #==============================================================================# =end module Config_Triple_Triad_Booster #==============================================================================# # Genero la rarità della carta # #==============================================================================# def self.rarity_gen(n) loop=true #Loop fino a quando non mi da un risultato while loop==true random_num=rand(Pr_common+Pr_rare+Pr_super+Pr_ultra+Pr_extra)+1 if random_num < Pr_common return 1 end if random_num < Pr_common+Pr_rare && n>1 return 2 end if random_num < Pr_common+Pr_rare+Pr_super && n>2 return 3 end if random_num < Pr_common+Pr_rare+Pr_super+Pr_ultra && n>3 return 4 end if random_num < Pr_common+Pr_rare+Pr_super+Pr_ultra+Pr_extra && n>4 return 5 end end #chiudo while end #Chiudo def #==============================================================================# # Creo un animazione # #==============================================================================# #Cose da fare => Non compare la grafica default se non c'é la grafica di quel #booster def self.auto_pack(id) if Use_Default_Image == false booster_name="Graphics/Booster/booster_" + (id).to_s else booster_name="Graphics/Booster/default" end if File.exist?(booster_name) == true booster_name="Graphics/Booster/default" pack_image=Bitmap.new(booster_name) else pack_image=Bitmap.new(booster_name) end image=Sprite.new image.bitmap=pack_image image.x=Booster_Animation_X image.y=Booster_Animation_Y cut_image=Bitmap.new("Graphics/Booster/Taglio") cut=Sprite.new cut.bitmap=cut_image cut.x=image.x cut.y=image.y-cut.height Audio.se_play("Audio/SE/Slash12.ogg", 100, 100) c=Booster_Animation_Y while c>Booster_Animation_Y-20 Graphics.wait(1) c-=Booster_Animation_Speed cut.y=c end c=Booster_Animation_X Graphics.wait(15) while c<640 Graphics.wait(1) c+=2*Booster_Animation_Speed cut.x=c end flash_color=Color.new(255,255,255) image.opacity=0 end#Chiudo autopack end # Chiudo il modulo #==============================================================================# # Calcolo l'array di nomi dei booster # #==============================================================================# def self.booster_array_calc c=0 if Pack.has_key?(0)== false c+=1 end num = 0 array=[] for num in c..Pack.size array.push(Pack[c][0]) end #Chiudo il for return array end #==============================================================================# # Aggiungo il comando # #==============================================================================# class Game_Interpreter def pack(id, n=Cards_per_pack) copia_pack=[] copia_pack=Pack[id] #Cancello il nome del pacchetto se c'è if copia_pack[0].class != "Fixnum" copia_pack.delete_at(0) end duplicates=[] $game_variables[Booster_opened_Game_Variable]+=1 # Trovo la rarità massima max=Config_Triple_Triad::Card[copia_pack[0]]['Rarity'] for i in 0..copia_pack.size-1 if(Config_Triple_Triad::Card[copia_pack[i]]['Rarity']>max) max=Config_Triple_Triad::Card[copia_pack[i]]['Rarity'] end #Chiudo if end# chiudo il for # Genero il pacchetto if Booster_Animation==true Config_Triple_Triad_Booster::auto_pack(id) end var=0 i=0 while i<n rarita=Config_Triple_Triad_Booster::rarity_gen(max) trovata=false while trovata==false var+=1 if var > 200 #Evito che il gioco si blocchi nel caso l'utente non metta #una carta di una certa rarità var=0 rarita=Config_Triple_Triad_Booster::rarity_gen(max) end prima_carta=copia_pack.shuffle[0] if Config_Triple_Triad::Card[prima_carta]["Rarity"]==rarita if Card_duplicates == false if duplicates.include?(prima_carta)==false gain_triad_card(prima_carta,1) trovata=true i+=1 duplicates.push(prima_carta) end #Chiudo if else gain_triad_card(prima_carta,1) trovata=true i+=1 end #Chiudo if dei duplicati end #Chiudo if end #chiudo while end #chiudo while end #chiudo pack #==============================================================================# # Crea un pacco casuale # #==============================================================================# def random_pack num=0 if Pack.has_key?(0)== false num+=1 end pack(rand(Pack.size)+num) end #chiudo random pack end #chiudo G_I
Bugs e Conflitti Noti
N/A
Altri dettagli
N/A
Modificato da Zocchina, 04 September 2018 - 12:52 PM.