Menu
Eclipso logo
Merry Christmas !
26/04/2024 10:49:01

Merci du partage + des pouains - RitoJS

Marché de Biward [ouvert]

Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


mar. 20 août 2013 - 15h42

[img]http://r18.imgfast.net/users/1813/44/57/76/smiles/681892.gif[/img] Alors voilà, j'ouvre mon marché de script sur Eclipso! Ici, vous pourrez me demander de vous faire un script [b]en remplissant un formulaire et en me l'envoyant (de préférence par MP)[/b]. Il est impératif de remplir ce formulaire si vous voulez recevoir la meilleure des aides et surtout, la plus rapide. De plus, postez vos idées de script si vous en avez, je suis preneur ! [code][b]Pseudo[/b] : Votre pseudo [b]Projet[/b] : Nom de votre projet [b]Secteurs[/b] : A quel secteurs touches vos script (choix, compétences, objet, héros, etc...) [b]Script[/b] : Les script que vous voulez avec toute les explications possibles. [b]Images[/b] : Images représentant votre idée ! [b]Démo[/b] : Mettez une démo si modification de script ![/code] Toutes les demandes sont prises en compte lorsque les règles sont respectées. Toutefois, je ne réalise pas les demandes lorsque mon marché est fermé (souvent en semaine en période scolaire) [color=#FF8000][size=25][b][u]# Mes réalisations (36) [/u][/b][/size][/color] [color=#BF0040][size=20][b][u]~ RPG Maker XP [/u][/b][/size][/color] :> Buy&Sell Counter : [[url=http://forum.eclipso.fr/viewtopic.php?f=36&t=1338]lien[/url]] :> SaveVariable : [[url=http://forum.eclipso.fr/viewtopic.php?f=36&t=1334]lien[/url]] :> MapVar : [[url=http://forum.eclipso.fr/viewtopic.php?f=60&t=1385]lien[/url]] :> ItemMax [[url=http://forum.eclipso.fr/viewtopic.php?f=36&p=34368]lien[/url]] [color=#BF0040][size=20][b][u]~ RPG Maker VX [/u][/b][/size][/color] :> Choix du personnage et de la difficulté du jeu [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1064]lien[/url]] :> Patch Menu Options & NeoMessage [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1070]lien[/url]] :> Sauvegarde Automatique [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1071]lien[/url]] :> HUD Actor [[url=http://forum.eclipso.fr/viewtopic.php?f=61&t=1250]lien[/url]] :> AnimFace [[url=http://forum.eclipso.fr/viewtopic.php?f=61&t=1232]lien[/url]] :> Mémorisation d'objet [[url=http://forum.eclipso.fr/viewtopic.php?f=61&t=1075]lien[/url]] :> Menu Amélioré [[url=http://forum.eclipso.fr/viewtopic.php?f=39&t=1063]lien[/url]] :> Modification du PHS [[url=http://forum.eclipso.fr/viewtopic.php?f=39&t=1072]lien[/url]] :> Retirer de manière récurrente un personnage avant le combat [[url=http://forum.eclipso.fr/viewtopic.php?f=37&t=1073]lien[/url]] :> Différentes musiques de combat [[url=http://forum.eclipso.fr/viewtopic.php?f=37&t=1074]lien[/url]] :> BattleBack [[url=http://forum.eclipso.fr/viewtopic.php?f=37&t=1177]lien[/url]] :> Trophy [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1263]lien[/url]] :> Buy&Sell Counter [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1336]lien[/url]] :> SaveVariable [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1333]lien[/url] :> ItemsColor [[url=http://forum.eclipso.fr/viewtopic.php?f=43&t=1798]lien[/url]] :> ItemMax [[url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1803]lien[/url]] :> Ambi++ [[url=http://forum.eclipso.fr/viewtopic.php?f=39&t=1889]lien[/url]] [color=#BF0040][size=20][b][u]~ RPG Maker VXAce [/u][/b][/size][/color] :> ImageMenu [[url=http://forum.eclipso.fr/viewtopic.php?f=43&t=1246]lien[/url]] :> MapVar [[url=http://forum.eclipso.fr/viewtopic.php?f=62&t=1256]lien[/url]] :> HUDActor [[url=http://forum.eclipso.fr/viewtopic.php?f=62&t=1251]lien[/url]] :> BigFace [[url=http://forum.eclipso.fr/viewtopic.php?f=62&t=1236]lien[/url]] :> AnimFace [[url=http://forum.eclipso.fr/viewtopic.php?f=62&t=1231]lien[/url]] :> MessageSound [[url=http://forum.eclipso.fr/viewtopic.php?f=44&t=1264]lien[/url]] :> KouettMenu [[url=http://forum.eclipso.fr/viewtopic.php?f=43&t=1267]lien[/url]] :> MapInfo [[url=http://forum.eclipso.fr/viewtopic.php?f=62&t=1312]lien[/url]] :> Ajisaive [[url=http://forum.eclipso.fr/viewtopic.php?f=44&t=1381]lien[/url]] :> SaveVariable [[url=http://forum.eclipso.fr/viewtopic.php?f=44&t=1324]lien[/url]] :> Pause [[url=http://forum.eclipso.fr/viewtopic.php?f=62&t=1281]lien[/url]] :> Désactiver la musique de victoire [[url=http://forum.eclipso.fr/viewtopic.php?f=44&t=1384]lien[/url]] :> Drop Spécifique [[url=http://forum.eclipso.fr/viewtopic.php?f=41&t=1781]lien[/url]] :> ItemsColor [[url=http://forum.eclipso.fr/viewtopic.php?f=43&t=1798]lien[/url]] :> ItemMax [[url=http://forum.eclipso.fr/viewtopic.php?f=25&t=1802]lien[/url]] [color=#008040]#>[/color] Modification du script de Temps [[url=http://forum.eclipso.fr/viewtopic.php?f=11&t=1259&p=22728#p22728]lien[/url]] [color=#008040]#>[/color] Modification du GBS Skills Ring [[url=http://forum.eclipso.fr/viewtopic.php?f=11&t=1259&p=22830#p22830]lien[/url]] [color=#BF0040][size=20][b][u]~ Réalisations en cours[/u][/b][/size][/color] - [url=http://forum.eclipso.fr/viewtopic.php?f=37&t=1068]Tactical Battle System[/url] [color=#FF8000](en pause)[/color] Contactez-moi en cas de lien mort ou autre soucis d'utilisation de script! Je suis très ouvert aux critiques [b]construites[/b] alors je vous invite à me faire part de vos avis/envies quand vous le désirez (j'aime mieux recevoir des trucs assez "personnel" par [b]MP[/b])


Chaos17

Apprenti
Chaos17
  • Messages : 197

Marché de Biward [ouvert]


mar. 20 août 2013 - 21h50

Intéressant, si j'arrive à animer mes facesets je prendrai ton script.


[url=https://twitter.com/Chaos173][img]https://blogofchaos17.files.wordpress.com/2016/02/b_twitter.png[/img][/url] [url=http://chaoss17.deviantart.com/][img]https://blogofchaos17.files.wordpress.com/2016/02/b_deviant.png[/img][/url] [url=https://fanofrpgmakermv.wordpress.com/][img]https://fanofrpgmakermv.files.wordpress.com/2016/02/b_fofmv.png[/img][/url]

Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


mar. 20 août 2013 - 23h01

[quote="Chaos17"]Intéressant, si j'arrive à animer mes facesets je prendrai ton script. [/quote] Oh cool, ça fait plaisir ! Sinon ben j'ai rajouté un de mes nouveaux scripts, [url=http://forum.eclipso.fr/viewtopic.php?f=40&t=1263]Trophy[/url] ! :3 [b]Edit :[/b] et encore un autre, [url=http://forum.eclipso.fr/viewtopic.php?f=44&t=1264]MessageSound[/url] !


Nana

Expert
Nana
  • Messages : 1066

Marché de Biward [ouvert]


mer. 21 août 2013 - 09h59

Vraiment cool ! Merci de proposer tes services Bibi !

Lutie

Apprenti
Lutie
  • Messages : 196

Marché de Biward [ouvert]


mer. 21 août 2013 - 14h37

[quote]Une demande de modification du Battle Symphony de Nanouche[/quote] Tu peux m'en dire plus °° ? Après une grosse sélection j'en suis encore à l'utilisation de ce script, donc selon la modification ça peut m'intéresser je dois dire ^^

Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


mer. 21 août 2013 - 14h44

[quote="Nana"]Vraiment cool ! Merci de proposer tes services Bibi ! [/quote] De nada Nana ! [quote="Lutie"]Tu peux m'en dire plus °° ? Après une grosse sélection j'en suis encore à l'utilisation de ce script, donc selon la modification ça peut m'intéresser je dois dire ^^[/quote] Disons qu'elle aimerait que le personnage avance quand il est en "défense" et qu'un bouclier s'affiche au dessus de sa tête! ^^ (enfin, si j'arrive bien à relire notre conversation XD)


Lutie

Apprenti
Lutie
  • Messages : 196

Marché de Biward [ouvert]


mer. 21 août 2013 - 14h55

Je garde un oeil sur l'évolution de cette modification alors. Pas tellement pour le coup du bouclier, mais avec un peu de chance si plus tard j'ai besoin d'un truc concernant ce système... tu seras déjà bien calé sur le sujet et tu pourras m'y aider °3° !

Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


jeu. 22 août 2013 - 00h12

[quote="Lutie"]Je garde un oeil sur l'évolution de cette modification alors. Pas tellement pour le coup du bouclier, mais avec un peu de chance si plus tard j'ai besoin d'un truc concernant ce système... tu seras déjà bien calé sur le sujet et tu pourras m'y aider °3° ! [/quote] Ca devrait être possible oui Sinon ben je viens de rajouter un nouveau script tout frais : [url=http://forum.eclipso.fr/viewtopic.php?f=43&t=1267]KouettMenu[/url] ! :3


Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


jeu. 22 août 2013 - 13h46

[u][color=#BF0040][b][size=20]La demande : [/size][/b][/color][/u] Coucou Biw' voilà la demande (un peu plus tôt que prévu) Pseudo : Gelarto Projet : Aldrya Secteurs : Beaucoup mais mon problème viens de l'heure (script de temps) Script : tout d'abord voici le script : [spoiler][code] =begin ======================================================================= ☆ ajout de la fonction calendrier par 白雪レイカ (reika neige blanche) ☆ traduction et légère modification par zibroph (Le Palais Du Making => shin) ------------------------------------------------------------------------------- ajout du temps pendant le jeu. Les musique (BGM) ainssi que la teinte de l'ecrant change en fonction de l'heure de la journer et de la meteo. La méteo change de facons aleatoire et en fonction de la saisons. L'ensemble des principles donnée sont enregistré dans des variable. vous pouvez donc les utiliser dans des event. ------------------------------------------------------------------------------- ◆manuel présentation de certain réglage de base. Fuseau horaire 3:00 ~ 5:59 => tôt le matin (:early_morning) 6:00 ~ 10:59 => matin (:morning) 11:00 ~ 15:59 => jour (:noon) 16:00 ~ 18:59 => soirée (:evening) 19:00 ~ 22:59 => nuit (:night) 23:00 ~ 2:59 => minuit (:midnight) est devenue (j'ai pas compris la trad me parait bizard ^^) changement de BGM en fonction du fuseau horaire ne marche que lorsque la case "BGM natif" est coché mettre ce qui suit dans la parti commentaire de la map (j'ai galéré a trouver ça avec le traducteur tout les mots sont melanger et pareil pour la ponctuation) on peut aussi remplacer early par : morning, noon, evening, night, mid; en fonction du moment de la journer ou las musique doit etre joué (on peut mettre 6 musique par map c'est trop puissant ^^) il n'est pas nécessaire de mettre l'extention du BGM ○ réglage avec évent à utiliser avec la commande script set_time(hour, min) # régler les heures et les minutes set_date(month, date, day) # régle la date (mois,jour) et le jour (samedi, dimanche ...) # le jour est difinie par : # dimanche => :Sun lundi => :Mon mardi => :Tue # mercredi => :Wed jeudi => :Thr vendredi => :Fri # samedi => :Sat set_year(year) # permet de régler l'année。 shift_date(date) # pérmet d'avancer d'un ou plusieur jour en fonction de ce qu'on a mis entre parenthèse。 shift_month(month) # pareil que ci-dessus mais pour les mois shift_year(year) # pareil que ci-dessus mais pour les années shift_date_to(month, date[, year]) # avance jusqu'à la date spécifiée # si vous ne mettez pas l'année ça restera à l'année en cours. # vous pouvez spécifié une date anterieur set_weather(weather) # modifier la météo # la méteo est définie par : # ensolellé => :fine pluis => :rain neige => :snow # tonnerre => :thunder tempette => :storm nuageux (nuit) => :star (pas compris a quoi il sert il mets juste l'icon de nuit) # blizzard => :s_storm =end #============================================================================== # ■ paramètres #============================================================================== module WhiteSnow # ↓↓réglage initial↓↓ INITAL_MIN = 20 # minutes en debut de jeu INITAL_HOUR = 15 # heure en debut de jeu INITAL_DATE = 9 # jour en debut de jeu INITAL_DAY = :Sun # jour en debut de jeu INITAL_MONTH = 1 # mois en debut de jeu INITAL_YEAR = 1352 # année en debut de jeu # ↑↑fin reglage initial↑↑ TIME_COUNT_FORBID_SID = 1 # id de l'interupteur permettant d'arreter le temps TONE_CHANGE_FORBID_SID = 2 # id de l'interupteur permettant d'empecher le changement de couleur de l'ecran (utile pour les maisons) WEATHER_EFFECT_FORBID_SID = 3 # id de l'interupteur permettant d'empecher la météo (utile pour les maisons) CALENDER_WINDOW_HIDE_SID = 4 #id de l'interupteur permettant d'enlever la fenetre du calendrier #le temps continue de défiler quand elle est pas affiché INSIDE_FLAG_SID = 5 # id de l'interupteur permetant d'empecher la teinte de l'écran # permet de mettre le drapeux a l'interieur(pas trop compris(je croit qu'il permet d'activer le INSIDE_BGS_TYPE)) WEATHER_BGS_ENABLE = true # true = activer les bruitage météo # false = désactive bruitage météo INSIDE_BGS_TYPE = 1 # 0 = désctive les bruitage météo # 1 = réduit le volume des BGS à 60% # 2 = bruitage météo à 100% WEATHER_BGS_DISABLE = 6 # id de l'interupteur permettant de désactiver le temps, la météo, et les BGS. # il est indiqué qu'il sert surtout pour de court moment perso j'ai pas trop trouvée d'utiliter (peut-être au moment de rentrer dans un batiment) MIN_STORE_VID = 2 # id variable contenant les minutes HOUR_STORE_VID = 3 # id variable contenant les heurs TIME_ZONE_STORE_VID = 4 # id variable des "time zone" # 0 tot le matin 1 matin 2 midi 3 soir 4 nuit 5 minuit DATE_STORE_VID = 999 # id variable contenant le jour DAY_STORE_VID = 5 # id variable contenant le jour # 0 dimanche 1 lundi 2 mardi 3 mercredi 4 jeudi 5 vendredi 6 samedi MONTH_STORE_VID = 6 # id variable contenant le mois SEASON_STORE_VID = 7 # id variable contenant la saison # 0 printemps 1 été 2 autumne 3 hiver WEATHER_STORE_VID = 8 # id variable contenant la météo # 0 soleil 1 pluie 2 neige 3 tonnerre 4 tempete 5 nuageux 6 blizzard YEAR_STORE_VID = 9 # id variable contenant l'année EARLY_MORNING_SCREEN_TONE = [15, 10, 0, 0] # couleur ecrant tot le matin # R, G, B, obscurité MORNING_SCREEN_TONE = [0, 0, 0, 0] # couleur ecrant le matin # R, G, B, obscurité NOON_SCREEN_TONE = [15, 15, 15, 0] # couleur ecrant le midi # R, G, B, obscuriter AFTERNOON_SCREEN_TONE = [32, -8, -32, 16] # couleur ecrant soir # R, G, B, obscuriter NIGHT_SCREEN_TONE = [-64, -64, -16, 32] # couleur ecrant nuit # R, G, B, obscuriter MIDNIGHT_SCREEN_TONE = [-72, -72, -20, 48] # couleur ecrant minuit # R, G, B, obscuriter DAYS_TABLE = {0 => 31, 1 => 31, 2 => 28, 3 => 31, 4 => 30, 5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 31, 11 => 30, 12 => 31} # tableau nombre de jours par mois (je ne sais pas pourquois il a mis un mois 0 il ne l'utilise pas dans le script) # liste condition météo # exemple config # WEATHER = {:icon => n° dans l'iconset # :weather => [effet, force]}, # :bgs => ["nom_BGS", volume, vitesse](si la vitesse n'est pas spécifier elle sera normale), # # effet météo :none = rien :rain = pluie # :storm = tempete :snow = neige FINE = {:icon => 1, :weather => [:none, 0], :bgs => nil} # beau temps RAIN = {:icon => 2, :weather => [:rain, 5], :bgs => ["Rain", 50, 90]} # pluie SNOW = {:icon => 3, :weather => [:snow, 4], :bgs => nil} # neige THUNDER = {:icon => 4, :weather => [:storm, 4], :bgs => ["Storm", 60, 75], :flash => [255, 255, 200, 180, 12], :se => ["Thunder9", 80, 95]} # tonnerre # réglage effet tonnerre # :flash => [(couleur)R, G, B, Alpha, longuer du flash] # :se => BGS qui suit le flash se config comme les autres BGS STORM = {:icon => 5, :weather => [:storm, 8], :bgs => ["Storm", 70, 100]} # tempette STAR = {:icon => 6, :weather => [:none, 0], :bgs => nil} # nuageux (nuit) S_STORM = {:icon => 7, :weather => [:snow, 9], :bgs => ["Wind", 70, 95]} # blizzard end #============================================================================== # ■ Calender #------------------------------------------------------------------------------ #  class du calendrier #============================================================================== class Calender #-------------------------------------------------------------------------- # ● instance public #-------------------------------------------------------------------------- attr_accessor :count attr_accessor :min attr_accessor :hour attr_accessor :date attr_accessor :day attr_accessor :month attr_accessor :season attr_accessor :year attr_accessor :weather attr_accessor :weather_count attr_accessor :time_zone attr_reader :interpreter attr_accessor :thunder_count #-------------------------------------------------------------------------- # ● initialisation objet #-------------------------------------------------------------------------- def initialize @count = 0 @weather = :fine @interpreter = Game_Interpreter.new init_calender change_weather end #-------------------------------------------------------------------------- # ● initialisation calendrier #-------------------------------------------------------------------------- def init_calender @min = WhiteSnow::INITAL_MIN @hour = WhiteSnow::INITAL_HOUR @date = WhiteSnow::INITAL_DATE @day = WhiteSnow::INITAL_DAY @month = WhiteSnow::INITAL_MONTH @year = WhiteSnow::INITAL_YEAR get_time_zone $game_variables[WhiteSnow::MIN_STORE_VID] = @min $game_variables[WhiteSnow::HOUR_STORE_VID] = @hour $game_variables[WhiteSnow::DATE_STORE_VID] = @date case @month when 1..2 @season = :Winter $game_variables[WhiteSnow::SEASON_STORE_VID] = 3 when 3..5 @season = :Spring $game_variables[WhiteSnow::SEASON_STORE_VID] = 0 when 6..8 @season = :Summer $game_variables[WhiteSnow::SEASON_STORE_VID] = 1 when 9..11 @season = :Autumn $game_variables[WhiteSnow::SEASON_STORE_VID] = 2 when 12 @season = :Winter $game_variables[WhiteSnow::SEASON_STORE_VID] = 3 end case @day when :Sun $game_variables[WhiteSnow::DAY_STORE_VID] = 0 when :Mon $game_variables[WhiteSnow::DAY_STORE_VID] = 1 when :Tue $game_variables[WhiteSnow::DAY_STORE_VID] = 2 when :Wed $game_variables[WhiteSnow::DAY_STORE_VID] = 3 when :Thr $game_variables[WhiteSnow::DAY_STORE_VID] = 4 when :Fri $game_variables[WhiteSnow::DAY_STORE_VID] = 5 when :Sat $game_variables[WhiteSnow::DAY_STORE_VID] = 6 end $game_variables[WhiteSnow::MONTH_STORE_VID] = @month $game_variables[WhiteSnow::YEAR_STORE_VID] = @year change_tone_by_calender end #-------------------------------------------------------------------------- # ● fuseau horaire #-------------------------------------------------------------------------- def get_time_zone case @hour when 0..2 @time_zone = :midnight $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 5 when 3..5 @time_zone = :early_morning $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 0 when 6..10 @time_zone = :morning $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 1 when 11..15 @time_zone = :noon $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 2 when 16..18 @time_zone = :evening $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 3 when 19..22 @time_zone = :night $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 4 when 23..24 @time_zone = :midnight $game_variables[WhiteSnow::TIME_ZONE_STORE_VID] = 5 end end #-------------------------------------------------------------------------- # ● aleatoire de la météo #-------------------------------------------------------------------------- def randomize_weather_count @weather_count = p_ex_rand(40, 100) + (109 - p_ex_rand(40, 110)) + 90 end #-------------------------------------------------------------------------- # ● changement de la couleur de l'écrant #-------------------------------------------------------------------------- def change_tone_by_calender(dur = 60) return if $game_switches[WhiteSnow::TONE_CHANGE_FORBID_SID] return if $game_switches[WhiteSnow::INSIDE_FLAG_SID] case @time_zone when :early_morning tone = WhiteSnow::EARLY_MORNING_SCREEN_TONE @interpreter.change_tone(tone[0], tone[1], tone[2], tone[3], dur) when :morning tone = WhiteSnow::MORNING_SCREEN_TONE @interpreter.change_tone(tone[0], tone[1], tone[2], tone[3], dur) when :noon tone = WhiteSnow::NOON_SCREEN_TONE @interpreter.change_tone(tone[0], tone[1], tone[2], tone[3], dur) when :evening tone = WhiteSnow::AFTERNOON_SCREEN_TONE @interpreter.change_tone(tone[0], tone[1], tone[2], tone[3], dur) when :night tone = WhiteSnow::NIGHT_SCREEN_TONE @interpreter.change_tone(tone[0], tone[1], tone[2], tone[3], dur) when :midnight tone = WhiteSnow::MIDNIGHT_SCREEN_TONE @interpreter.change_tone(tone[0], tone[1], tone[2], tone[3], dur) end end #-------------------------------------------------------------------------- # ● changement condition météo #-------------------------------------------------------------------------- def change_weather srand p_weather = @weather case @month when 1 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 2 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 3..4 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 5 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 6 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 7..8 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 9..10 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end when 11 if @date < 25 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end else case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end end when 12 case rand when 0...0.4 if @hour >= 3 and @hour < 18 @weather = :fine else @weather = :star end when 0.4...0.8 @weather = :rain when 0.8...0.9 @weather = :thunder when 0.9...1 @weather = :storm end end if @weather != p_weather RPG::BGS.fade(10) perform_weather_effect end randomize_weather_count end #-------------------------------------------------------------------------- # ● effet météo #-------------------------------------------------------------------------- def perform_weather_effect(dur = 30) return unless SceneManager.scene_is?(Scene_Map) return if $game_switches[WhiteSnow::WEATHER_EFFECT_FORBID_SID] return if $game_switches[WhiteSnow::INSIDE_FLAG_SID] case @weather when :fine weather = WhiteSnow::FINE @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 0 when :rain weather = WhiteSnow::RAIN @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 1 when :snow weather = WhiteSnow::SNOW @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 2 when :thunder weather = WhiteSnow::THUNDER @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 3 when :storm weather = WhiteSnow::STORM @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 4 when :star weather = WhiteSnow::STAR @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 5 when :s_storm weather = WhiteSnow::S_STORM @interpreter.change_weather(weather[:weather][0], weather[:weather][1], dur) if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1], weather[:bgs][2]) bgs.play end $game_variables[WhiteSnow::WEATHER_STORE_VID] = 6 end end #-------------------------------------------------------------------------- # ● éxecution BGS interieur #-------------------------------------------------------------------------- def play_inside_bgs case @weather when :fine weather = WhiteSnow::FINE if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.6, weather[:bgs][2]) bgs.play end when :rain weather = WhiteSnow::RAIN if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.7, weather[:bgs][2]) bgs.play end when :snow weather = WhiteSnow::SNOW if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.7, weather[:bgs][2]) bgs.play end when :thunder weather = WhiteSnow::THUNDER if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.7, weather[:bgs][2]) bgs.play end when :storm weather = WhiteSnow::STORM if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.7, weather[:bgs][2]) bgs.play end when :star weather = WhiteSnow::STAR if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.7, weather[:bgs][2]) bgs.play end when :s_storm weather = WhiteSnow::S_STORM if weather[:bgs] and WhiteSnow::WEATHER_BGS_ENABLE and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] bgs = RPG::BGS.new(weather[:bgs][0], weather[:bgs][1] * 0.7, weather[:bgs][2]) bgs.play end end end #-------------------------------------------------------------------------- # ● effet tonnerre #-------------------------------------------------------------------------- def perform_thunder_effect(r, g, b, alpha, dur) @interpreter.perform_flash(r, g, b, alpha, dur) end #-------------------------------------------------------------------------- # ● MAJ jour de la semaine #-------------------------------------------------------------------------- def shift_day case @day when :Sun @day = :Mon $game_variables[WhiteSnow::DAY_STORE_VID] = 1 when :Mon @day = :Tue $game_variables[WhiteSnow::DAY_STORE_VID] = 2 when :Tue @day = :Wed $game_variables[WhiteSnow::DAY_STORE_VID] = 3 when :Wed @day = :Thr $game_variables[WhiteSnow::DAY_STORE_VID] = 4 when :Thr @day = :Fri $game_variables[WhiteSnow::DAY_STORE_VID] = 5 when :Fri @day = :Sat $game_variables[WhiteSnow::DAY_STORE_VID] = 6 when :Sat @day = :Sun $game_variables[WhiteSnow::DAY_STORE_VID] = 0 end end #-------------------------------------------------------------------------- # ● retour jour de la semaine #-------------------------------------------------------------------------- def back_day case @day when :Sun @day = :Sat $game_variables[WhiteSnow::DAY_STORE_VID] = 1 when :Sat @day = :Fri $game_variables[WhiteSnow::DAY_STORE_VID] = 2 when :Fri @day = :Thr $game_variables[WhiteSnow::DAY_STORE_VID] = 3 when :Thr @day = :Wed $game_variables[WhiteSnow::DAY_STORE_VID] = 4 when :Wed @day = :Tue $game_variables[WhiteSnow::DAY_STORE_VID] = 5 when :Tue @day = :Mon $game_variables[WhiteSnow::DAY_STORE_VID] = 6 when :Mon @day = :Sun $game_variables[WhiteSnow::DAY_STORE_VID] = 0 end end #-------------------------------------------------------------------------- # ● Maj du mois #-------------------------------------------------------------------------- def shift_month case @month when 1 return unless @date > 31 @month += 1 @date = 1 when 2 return unless @date > 28 @month += 1 @season = :Spring @date = 1 $game_variables[WhiteSnow::SEASON_STORE_VID] = 0 when 3 return unless @date > 31 @month += 1 @date = 1 when 4 return unless @date > 30 @month += 1 @date = 1 when 5 return unless @date > 31 @month += 1 @season = :Summer @date = 1 $game_variables[WhiteSnow::SEASON_STORE_VID] = 1 when 6 return unless @date > 30 @month += 1 @date = 1 when 7 return unless @date > 31 @month += 1 @date = 1 when 8 return unless @date > 31 @month += 1 @season = :Autumn @date = 1 $game_variables[WhiteSnow::SEASON_STORE_VID] = 2 when 9 return unless @date > 30 @month += 1 @date = 1 when 10 return unless @date > 31 @month += 1 @date = 1 when 11 return unless @date > 30 @month += 1 @season = :Winter @date = 1 $game_variables[WhiteSnow::SEASON_STORE_VID] = 3 when 12 return unless @date > 31 @year += 1 @month = 1 @date = 1 $game_variables[WhiteSnow::YEAR_STORE_VID] = @year end $game_variables[WhiteSnow::DATE_STORE_VID] = @date $game_variables[WhiteSnow::MONTH_STORE_VID] = @month end #-------------------------------------------------------------------------- # ● retour du mois #-------------------------------------------------------------------------- def back_month return unless @date < 1 case @month when 1 @month = 12 @date = 31 @year -= 1 $game_variables[WhiteSnow::YEAR_STORE_VID] = @year when 2 @month -= 1 @date = 31 when 3 @month -= 1 @date = 28 @season = :Winter $game_variables[WhiteSnow::SEASON_STORE_VID] = 3 when 4 @month -= 1 @date = 31 when 5 @month -= 1 @date = 30 when 6 @month -= 1 @date = 31 @season = :Spring $game_variables[WhiteSnow::SEASON_STORE_VID] = 0 when 7 @month -= 1 @date = 30 when 8 @month -= 1 @date = 31 when 9 @month -= 1 @date = 31 @season = :Summer $game_variables[WhiteSnow::SEASON_STORE_VID] = 1 when 10 @month -= 1 @date = 30 when 11 @month -= 1 @date = 31 when 12 @month -= 1 @date = 30 @season = :Autumn $game_variables[WhiteSnow::SEASON_STORE_VID] = 2 end $game_variables[WhiteSnow::DATE_STORE_VID] = @date $game_variables[WhiteSnow::MONTH_STORE_VID] = @month end #-------------------------------------------------------------------------- # ● avancer date #-------------------------------------------------------------------------- def shift_date @date += 1 shift_day shift_month $game_variables[WhiteSnow::HOUR_STORE_VID] = @hour $game_variables[WhiteSnow::DATE_STORE_VID] = @date end #-------------------------------------------------------------------------- # ● retour date #-------------------------------------------------------------------------- def back_date @date += 1 back_day back_month $game_variables[WhiteSnow::HOUR_STORE_VID] = @hour $game_variables[WhiteSnow::DATE_STORE_VID] = @date end #-------------------------------------------------------------------------- # ● calcule heure/date #-------------------------------------------------------------------------- def days_dif(y, m, d) table = WhiteSnow::DAYS_TABLE dy_n = (@year - 1) * 365 dy_s = (y - 1) * 365 dm_n = 0 ; 1.upto(@month - 1){|n| dm_n += table[n]} unless @month == 1 dm_s = 0 ; 1.upto(m - 1){|n| dm_s += table[n]} unless m == 1 d_n = @date - 1 d_s = d - 1 n = dy_n + dm_n + d_n s = dy_s + dm_s + d_s return s - n end end #============================================================================== # ■ Window_Calender #------------------------------------------------------------------------------ #  affichage calendrier #============================================================================== class Window_Calender < Window_Base #-------------------------------------------------------------------------- # ● initialisation objet #-------------------------------------------------------------------------- def initialize(x = Graphics.width - 250, y = 0, w = 250) super(x, y, w, fitting_height(2)) refresh end #-------------------------------------------------------------------------- # ● MAJ fenetre #-------------------------------------------------------------------------- def update if $game_switches[WhiteSnow::CALENDER_WINDOW_HIDE_SID] == true self.visible = true else self.visible = false end super refresh if $calender.count == 0 end #-------------------------------------------------------------------------- # ● MAJ #-------------------------------------------------------------------------- def refresh contents.clear draw_year draw_date draw_time draw_weather_icon end #-------------------------------------------------------------------------- # ● affichage année saison #-------------------------------------------------------------------------- def draw_year season = $calender.season.to_s season.gsub!("Spring"){"Printemps"} season.gsub!("Summer"){"Eté"} season.gsub!("Autumn"){"Autumne"} season.gsub!("Winter"){"Hiver"} draw_text(0, 0, contents_width, line_height, "Année " + "#{$calender.year}") draw_text(40, 0, contents_width, line_height, season, 1) end #-------------------------------------------------------------------------- # ● affichage date mois jour #-------------------------------------------------------------------------- def draw_date w = contents_width h = line_height month = $calender.month.to_s month.gsub! ("1"){"Janvier"} month.gsub! ("2"){"Fevrier"} month.gsub! ("3"){"Mars"} month.gsub! ("4"){"Avril"} month.gsub! ("5"){"Mai"} month.gsub! ("6"){"Juin"} month.gsub! ("7"){"Juillet"} month.gsub! ("8"){"Aout"} month.gsub! ("9"){"Septembre"} month.gsub! ("10"){"Octobre"} month.gsub! ("11"){"Novembre"} month.gsub! ("12"){"Decembre"} date = $calender.date.to_s day = $calender.day.to_s day.gsub!("Sun"){"Dim"} day.gsub!("Mon"){"Lun"} day.gsub!("Tue"){"Mar"} day.gsub!("Wed"){"Mer"} day.gsub!("Thr"){"Jeu"} day.gsub!("Fri"){"Ven"} day.gsub!("Sat"){"Sam"} draw_text_ex(0, h, date + " " + month + "(" + day + ")") end #-------------------------------------------------------------------------- # ● affichage heure minute #-------------------------------------------------------------------------- def draw_time w = contents_width - 6 h = line_height hour = "#{$calender.hour}" min = $calender.min if (0..9).to_a.include?(min) min = "0" + min.to_s else min = min.to_s end draw_text(0, h, w, h, hour + ":" + min, 2) end #-------------------------------------------------------------------------- # ● affichage icon météo #-------------------------------------------------------------------------- def draw_weather_icon case $calender.weather when :fine icon_index = WhiteSnow::FINE[:icon] when :rain icon_index = WhiteSnow::RAIN[:icon] when :snow icon_index = WhiteSnow::SNOW[:icon] when :thunder icon_index = WhiteSnow::THUNDER[:icon] when :storm icon_index = WhiteSnow::STORM[:icon] when :star icon_index = WhiteSnow::STAR[:icon] when :s_storm icon_index = WhiteSnow::S_STORM[:icon] end draw_icon(icon_index, contents_width - 30, 0) end end #============================================================================== # ■ Window_MenuCalender #------------------------------------------------------------------------------ #  affichage calendrier dans le menu #============================================================================== class Window_MenuCalender < Window_Base #-------------------------------------------------------------------------- # ● initialisation objet #-------------------------------------------------------------------------- def initialize(x = Graphics.width - 250, y = 0, w = 250) super(x, y, w, fitting_height(3)) refresh end #-------------------------------------------------------------------------- # ● MAJ #-------------------------------------------------------------------------- def refresh contents.clear draw_year draw_date draw_time draw_weather_icon end #-------------------------------------------------------------------------- # ● affichage année saison #-------------------------------------------------------------------------- def draw_year h = line_height season = $calender.season.to_s season.gsub!("Spring"){"Pri"} season.gsub!("Summer"){"Eté"} season.gsub!("Autumn"){"Aut"} season.gsub!("Winter"){"Hiv"} draw_text(0, 0, contents_width, line_height, "A " + "#{$calender.year}") draw_text(10, 0, contents_width + 12, line_height, season, 1) end #-------------------------------------------------------------------------- # ● affichage date mois jour #-------------------------------------------------------------------------- def draw_date w = contents_width h = line_height month = $calender.month.to_s month.gsub! ("1"){"Janv"} month.gsub! ("2"){"Fevr"} month.gsub! ("3"){"Mars"} month.gsub! ("4"){"Avr"} month.gsub! ("5"){"Mai"} month.gsub! ("6"){"Juin"} month.gsub! ("7"){"Juil"} month.gsub! ("8"){"Aout"} month.gsub! ("9"){"Sept"} month.gsub! ("10"){"Octo"} month.gsub! ("11"){"Nove"} month.gsub! ("12"){"Dece"} date = $calender.date.to_s day = $calender.day.to_s day.gsub!("Sun"){"Dim"} day.gsub!("Mon"){"Lun"} day.gsub!("Tue"){"Mar"} day.gsub!("Wed"){"Mer"} day.gsub!("Thr"){"Jeu"} day.gsub!("Fri"){"Ven"} day.gsub!("Sat"){"Sam"} draw_text_ex(0, h, date + " " + month + " (" + day + ")") end #-------------------------------------------------------------------------- # ● affichage heure minute #-------------------------------------------------------------------------- def draw_time w = contents_width - 12 h = line_height hour = "#{$calender.hour}" min = $calender.min if (0..9).to_a.include?(min) min = "0" + min.to_s else min = min.to_s end draw_text(0, h * 2, w, h, hour + ":" + min, 2) end #-------------------------------------------------------------------------- # ● affichge icon météo #-------------------------------------------------------------------------- def draw_weather_icon case $calender.weather when :fine icon_index = WhiteSnow::FINE[:icon] when :rain icon_index = WhiteSnow::RAIN[:icon] when :snow icon_index = WhiteSnow::SNOW[:icon] when :thunder icon_index = WhiteSnow::THUNDER[:icon] when :storm icon_index = WhiteSnow::STORM[:icon] when :star icon_index = WhiteSnow::STAR[:icon] when :s_storm icon_index = WhiteSnow::S_STORM[:icon] end draw_icon(icon_index, contents_width - 30, 0) end end #============================================================================== # ■ Scene_Map #------------------------------------------------------------------------------ #  class érant carte #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # ● creation des fenetre #-------------------------------------------------------------------------- alias calender_create_all_windows create_all_windows def create_all_windows calender_create_all_windows create_calender_window end #-------------------------------------------------------------------------- # ● cretaion fenetre affichage de la date #-------------------------------------------------------------------------- def create_calender_window @calender_window = Window_Calender.new end end #============================================================================== # ■ Scene_Base #------------------------------------------------------------------------------ #  superclass toute les scene du jeu #============================================================================== class Scene_Base #-------------------------------------------------------------------------- # ● MAJ cadre base #-------------------------------------------------------------------------- alias calender_update_basic update_basic def update_basic calender_update_basic update_calender end #-------------------------------------------------------------------------- # ● MAJ temps #-------------------------------------------------------------------------- def update_calender return unless SceneManager.scene_is?(Scene_Map) return if $game_switches[WhiteSnow::TIME_COUNT_FORBID_SID] $calender.count += 1 if $calender.weather == :thunder and !($game_switches[WhiteSnow::WEATHER_EFFECT_FORBID_SID] or $game_switches[WhiteSnow::INSIDE_FLAG_SID]) $calender.thunder_count ||= [Graphics.frame_rate * 5 + (rand * Graphics.frame_rate * 10).floor, false] $calender.thunder_count[0] -= 1 if $calender.thunder_count[1] if $calender.thunder_count[0] == 0 se = RPG::SE.new(WhiteSnow::THUNDER[:se][0], WhiteSnow::THUNDER[:se][1], WhiteSnow::THUNDER[:se][2]) se.play $calender.thunder_count = nil end elsif $calender.thunder_count[0] < 12 + rand(43) flash = WhiteSnow::THUNDER[:flash] $calender.perform_thunder_effect(flash[0], flash[1], flash[2], flash[3], flash[4]) $calender.thunder_count[1] = true end else $calender.thunder_count = nil end if $calender.count % Graphics.frame_rate == 0 $calender.min += 1 $calender.count = 0 $game_variables[WhiteSnow::MIN_STORE_VID] = $calender.min $calender.weather_count -= 1 $calender.change_weather if $calender.weather_count <= 0 end if $calender.min == 60 $calender.hour += 1 $calender.min = 0 if $calender.hour >= 3 and $calender.hour < 19 $calender.weather = :fine if $calender.weather == :star else $calender.weather = :star if $calender.weather == :fine end $calender.get_time_zone $calender.change_tone_by_calender $game_map.autoplay $game_variables[WhiteSnow::MIN_STORE_VID] = $calender.min $game_variables[WhiteSnow::HOUR_STORE_VID] = $calender.hour end if $calender.hour == 24 $calender.hour = 0 $calender.shift_date end end end #============================================================================== # ■ Scene_Menu #------------------------------------------------------------------------------ #  class de traitement de l'ecrant menu #============================================================================== class Scene_Menu #-------------------------------------------------------------------------- # ● debut traitement #-------------------------------------------------------------------------- alias calender_start start def start calender_start create_calender_window end #-------------------------------------------------------------------------- # ● creation fenetre #-------------------------------------------------------------------------- def create_calender_window x = 0 w = @gold_window.width @calender_window = Window_MenuCalender.new(x, 0, w) @calender_window.y = Graphics.height - @gold_window.height - @calender_window.height end end #============================================================================== # ■ DataManager #------------------------------------------------------------------------------ #  medule de gestion des objet #============================================================================== module DataManager #-------------------------------------------------------------------------- # ● methode specifique pour alias #-------------------------------------------------------------------------- class << self alias :calender_create_game_objects :create_game_objects alias :calender_extract_save_contents :extract_save_contents end #-------------------------------------------------------------------------- # ● creation d'objet divers du jeu #-------------------------------------------------------------------------- def self.create_game_objects calender_create_game_objects $calender = Calender.new end #-------------------------------------------------------------------------- # ● sauvegarde de la reation de contenu #-------------------------------------------------------------------------- def self.make_save_contents contents = {} contents[:system] = $game_system contents[:timer] = $game_timer contents[:message] = $game_message contents[:switches] = $game_switches contents[:variables] = $game_variables contents[:self_switches] = $game_self_switches contents[:actors] = $game_actors contents[:party] = $game_party contents[:troop] = $game_troop contents[:map] = $game_map contents[:player] = $game_player contents[:calender] = $calender contents end #-------------------------------------------------------------------------- # ● creation contenue economiser #-------------------------------------------------------------------------- def self.extract_save_contents(contents) calender_extract_save_contents(contents) $calender = contents[:calender] end end #============================================================================== # ■ Game_Interpreter #------------------------------------------------------------------------------ #  interpreteur d'event #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ● changer couleur écran #-------------------------------------------------------------------------- def change_tone(r, g, b, gray = 0, dur = 60) tone = Tone.new(r, g, b, gray) screen.start_tone_change(tone, dur) end #-------------------------------------------------------------------------- # ● changement condition météo #-------------------------------------------------------------------------- def change_weather(type, power, dur = 30) return if $game_party.in_battle screen.change_weather(type, power, dur) end #-------------------------------------------------------------------------- # ● réglage heure #-------------------------------------------------------------------------- def set_time(hour, min) hour = 23 if hour > 23 hour = 0 if hour < 0 min = 59 if min > 59 min = 0 if min < 0 $calender.hour = hour $calender.min = min $calender.get_time_zone $game_variables[WhiteSnow::MIN_STORE_VID] = $calender.min $game_variables[WhiteSnow::HOUR_STORE_VID] = $calender.hour $game_variables[WhiteSnow::DATE_STORE_VID] = $calender.date $game_map.autoplay $calender.change_weather $calender.change_tone_by_calender if $calender.hour >= 3 and $calender.hour < 19 $calender.weather = :fine if $calender.weather == :star else $calender.weather = :star if $calender.weather == :fine end end #-------------------------------------------------------------------------- # ● réglage date #-------------------------------------------------------------------------- def set_date(month, date, day) $calender.month = month $calender.date = date $calender.day = day $game_variables[WhiteSnow::MIN_STORE_VID] = $calender.month $game_variables[WhiteSnow::DATE_STORE_VID] = $calender.date case $calender.day when :Sun $game_variables[WhiteSnow::DAY_STORE_VID] = 0 when :Mon $game_variables[WhiteSnow::DAY_STORE_VID] = 1 when :Tue $game_variables[WhiteSnow::DAY_STORE_VID] = 2 when :Wed $game_variables[WhiteSnow::DAY_STORE_VID] = 3 when :Thr $game_variables[WhiteSnow::DAY_STORE_VID] = 4 when :Fri $game_variables[WhiteSnow::DAY_STORE_VID] = 5 when :Sat $game_variables[WhiteSnow::DAY_STORE_VID] = 6 end case $calender.month when 1..2 $calender.season = :Winter $game_variables[WhiteSnow::SEASON_STORE_VID] = 3 when 3..5 $calender.season = :Spring $game_variables[WhiteSnow::SEASON_STORE_VID] = 0 when 6..8 $calender.season = :Summer $game_variables[WhiteSnow::SEASON_STORE_VID] = 1 when 9..11 $calender.season = :Autumn $game_variables[WhiteSnow::SEASON_STORE_VID] = 2 when 12 $calender.season = :Winter $game_variables[WhiteSnow::SEASON_STORE_VID] = 3 end $calender.change_weather end #-------------------------------------------------------------------------- # ● réglage année #-------------------------------------------------------------------------- def set_year(year) $calender.year = year $game_variables[WhiteSnow::YEAR_STORE_VID] = year $calender.change_weather end #-------------------------------------------------------------------------- # ● réglage temps #-------------------------------------------------------------------------- def set_weather(weather) $calender.weather = weather $calender.randomize_weather_count $calender.perform_weather_effect case weather when :fine $game_variables[WhiteSnow::WEATHER_STORE_VID] = 0 when :rain $game_variables[WhiteSnow::WEATHER_STORE_VID] = 1 when :snow $game_variables[WhiteSnow::WEATHER_STORE_VID] = 2 when :thunder $game_variables[WhiteSnow::WEATHER_STORE_VID] = 3 when :storm $game_variables[WhiteSnow::WEATHER_STORE_VID] = 4 when :star $game_variables[WhiteSnow::WEATHER_STORE_VID] = 5 when :s_storm $game_variables[WhiteSnow::WEATHER_STORE_VID] = 6 end end #-------------------------------------------------------------------------- # ● activation effet météo #-------------------------------------------------------------------------- def perform_weather_effect $calender.perform_weather_effect end #-------------------------------------------------------------------------- # ● flash écran #-------------------------------------------------------------------------- def perform_flash(r, g, b, alpha, dur = 12) color = Color.new(r, g, b, alpha) screen.start_flash(color, dur) end #-------------------------------------------------------------------------- # ● avancer date #-------------------------------------------------------------------------- def shift_date(num) num.times{$calender.shift_date} $calender.change_weather end #-------------------------------------------------------------------------- # ● avancer mois #-------------------------------------------------------------------------- def shift_month(num) table = WhiteSnow::DAYS_TABLE days = table[$calender.month] - $calender.date + 1 for i in 1..num days += table[($calender.month + i) % 12] end days.times{$calender.shift_date} $calender.change_weather end #-------------------------------------------------------------------------- # ● avancer année #-------------------------------------------------------------------------- def shift_year(num) (num * 365).times{$calender.shift_date} $calender.change_weather end #-------------------------------------------------------------------------- # ● avancer jusqu'à date spécifique #-------------------------------------------------------------------------- def shift_date_to(m, d, y = -1) y = $calender.year if y == -1 if $calender.days_dif(y, m, d) > 0 $calender.days_dif(y, m, d).times{$calender.shift_date} else $calender.days_dif(y, m, d).abs.times{$calender.back_date} end $calender.change_weather end end #============================================================================== # ■ SceneManager #------------------------------------------------------------------------------ #  module de transition #============================================================================== module SceneManager #-------------------------------------------------------------------------- # ● méthode spécifique pour les alias #-------------------------------------------------------------------------- class << self alias :calender_goto :goto alias :calender_call :call alias :calender_return :return end #-------------------------------------------------------------------------- # ● transition directe #-------------------------------------------------------------------------- def self.goto(scene_class) calender_goto(scene_class) if scene_class == Scene_Map $calender.perform_weather_effect $calender.change_tone_by_calender end end #-------------------------------------------------------------------------- # ● appel #-------------------------------------------------------------------------- def self.call(scene_class) calender_call(scene_class) if scene_class == Scene_Map $calender.perform_weather_effect $calender.change_tone_by_calender end end #-------------------------------------------------------------------------- # ● retour appel #-------------------------------------------------------------------------- def self.return calender_return if @scene.class == Scene_Map $calender.perform_weather_effect $calender.change_tone_by_calender end end end #============================================================================== # ■ Game_Switches #------------------------------------------------------------------------------ # class gerant les interrupteur #============================================================================== class Game_Switches #-------------------------------------------------------------------------- # ● réglage interupteur # value : ON (true) / OFF (false) #-------------------------------------------------------------------------- def []=(switch_id, value) @data[switch_id] = value on_change if switch_id == WhiteSnow::TONE_CHANGE_FORBID_SID or switch_id == WhiteSnow::INSIDE_FLAG_SID case value when true $calender.interpreter.change_tone(0, 0, 0, 0, 0) when false $calender.change_tone_by_calender(0) end end if switch_id == WhiteSnow::WEATHER_EFFECT_FORBID_SID or switch_id == WhiteSnow::INSIDE_FLAG_SID case value when true $calender.interpreter.change_weather(:none, 0, 0) RPG::BGS.stop if (WhiteSnow::WEATHER_BGS_ENABLE and [0, 1].include?(WhiteSnow::INSIDE_BGS_TYPE)) or $game_switches[WhiteSnow::WEATHER_BGS_DISABLE] $calender.play_inside_bgs if WhiteSnow::WEATHER_BGS_ENABLE and WhiteSnow::INSIDE_BGS_TYPE == 1 and !$game_switches[WhiteSnow::WEATHER_BGS_DISABLE] when false $calender.perform_weather_effect(0) end end end end #============================================================================== # ■ Game_Player #------------------------------------------------------------------------------ #  class gerant le calendrier en foncton du joueur #============================================================================== class Game_Player #-------------------------------------------------------------------------- # ● deplacement à l'execution (pas compris) #-------------------------------------------------------------------------- alias calender_perform_transfer perform_transfer def perform_transfer if transfer? $calender.perform_weather_effect(0) $calender.change_tone_by_calender(0) end calender_perform_transfer end end #============================================================================== # ■ RPG::Map #------------------------------------------------------------------------------ #  class de donné de la carte #============================================================================== class RPG::Map #-------------------------------------------------------------------------- # ● carte BGM #-------------------------------------------------------------------------- def bgm bgm = Hash.new(@bgm) @note.each_line do |line| case line when /<(?:早朝|early)\s*(.+)\s*\,\s*(\d+)\s*\,\s*(\d+)>/ bgm[:early_morning] = RPG::BGM.new($1, $2.to_i, $3.to_i) when /<(?:朝|morning)\s*(.+)\s*\,\s*(\d+)\s*\,\s*(\d+)>/ bgm[:morning] = RPG::BGM.new($1, $2.to_i, $3.to_i) when /<(?:昼|noon)\s*(.+)\s*\,\s*(\d+)\s*\,\s*(\d+)>/ bgm[:noon] = RPG::BGM.new($1, $2.to_i, $3.to_i) when /<(?:夕方|evening)\s*(.+)\s*\,\s*(\d+)\s*\,\s*(\d+)>/ bgm[:evening] = RPG::BGM.new($1, $2.to_i, $3.to_i) when /<(?:夜|night)\s*(.+)\s*\,\s*(\d+)\s*\,\s*(\d+)>/ bgm[:night] = RPG::BGM.new($1, $


RitoJS

6307
RitoJS
  • Messages : 6307

Marché de Biward [ouvert]


jeu. 22 août 2013 - 13h49

[color=#FF8000]Et voilà 3 pouains pour la modif'[/color]


[center] [img]http://img110.xooimage.com/files/f/d/5/0e2426866e07bf44d...7488d760-4d48c77.png[/img] [/center] [center]Merci à [b]Maki[/b] et [b]KuroFidy[/b] pour ces cadeaux: [spoiler][img]http://img15.hostingpics.net/pics/165256cadeaurito.png[/img] [img]https://pbs.twimg.com/media/BuCFKirIYAATs9d.jpg[/img][/spoiler][/center] [url=https://lunarito.wordpress.com/][img]http://img110.xooimage.com/files/a/c/7/cropped-logo-2-4abdef1.png[/img][/url]

Gelarto

Vétéran
Gelarto
  • Messages : 781

Marché de Biward [ouvert]


jeu. 22 août 2013 - 14h58

C'est génial ! Merci beaucoup Biw

Nana

Expert
Nana
  • Messages : 1066

Marché de Biward [ouvert]


jeu. 22 août 2013 - 21h23

Beau boulot Bibi !

Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


ven. 23 août 2013 - 15h07

[quote="Gelarto"]C'est génial ! Merci beaucoup Biw [/quote] De rien c'est normal ! [quote="Nanouche"]Beau boulot Bibi ! [/quote]Merci mais j'ai encore beaucoup à apprendre de Ace avant de pouvoir faire autant de trucs dessus que sur VX.. [u][color=#BF0040][b][size=20]La demande : [/size][/b][/color][/u] J'espère que tu auras le temps d'accéder à ma demande [b]Pseudo :[/b] Kirah [b]Projet :[/b] Last Legacy [b]Secteurs :[/b] Compétences, héros [b]Démo :[/b] Bon voici, la démo regroupant les scripts que j'utilise mais faut prendre en conscience que je n'utilise dans mon projet que les scripts ( Yem skill overhault et GBP skill ring) les deux autres ne sont pas présents dans mon projet. Voici ma demande, j'aimerais juste que tu puisse régler les images ring 0 à ring 3 de manière à ce que leurs résolutions soient à 544x416 et leur taille actuel (à l'intérieur du script le règlage) car lorsque je mets une image de taille 544x416, elle n'apparaît pas totalement, test tu verra x) Il faut aussi que je puisse mettre un background derrière avec la possibilité de le faire défiler mais ça c'est une option bonus, si tu le fais pas c'est pas grave, le plus important pour moi c'est la résolution des images :> Oui j'ai eu le temps et j'ai fait les deux [u][color=#BF0040][b][size=20]La réalisation : [/size][/b][/color][/u] [spoiler][code]=begin #=============================================================================== GBP Skills Rings #=============================================================================== By GB Production http://gbproduction.wordpress.com/ Last date updated : 03/09/2011 Version 1.0 This script was a good challenge for me and I hope you like it. Your characters unlock skills rings that allow him to equip skill into. The rings can rotate and skill chain can be realised to unlock new skills. I have made a lot of script and I am a bit tired to recreate new notetags for skills, enemies,... each times. So I have decide to use all the tags that are always define in YEM Skill Overhaul for my script. Features : , - New way to gain skills - Infinite possibilities of customizations - A system that use the creativity of the player PLEASE READ INSTRUCTION AND COMPATIBILITY SECTION BEFORE USING THIS SCRIPT ! I accept suggestions. Report bugs please ! Credit : GB Production #=============================================================================== Version history #=============================================================================== 01/09/2011 - begin the script #=============================================================================== Instruction and compatibility #=============================================================================== - Place this script under YEM scripts - Comptibility with 640x480 resolution #=============================================================================== Tag for skills #=============================================================================== <sr_passive_id: x> Use this tag say that the skill is a passive skill. x is the ID of the state Skill with this tag are automatically hidden of the skill list. <sr_chain: x, x, x, x> This tag means that you can unlock this skill if the chain x, x, x, x is realised in the skill rings. x is skill id x, x, x has no limit, you can choose the size of the chain you want. <sr_popup: text> Use this tag to change the text that popup when a skill chain is unlocked. If the skill doesn't have this tag, the popup is the name of the skill. #=============================================================================== Dev section #=============================================================================== pouvoir choisir le bitmap du skill slot ajouter un tag <remove_skill_jp_cost: x> cout a ajouter a coter de (remove) dans skill selection window trouver un moyen pour pouvoir parcourir tous les skill équipé dans les rings faire les mtehode pour debloquer des ring en fonction du nombre skill appris =end $imported = {} if $imported == nil $imported["GBP_SkillsRings"] = true module GBP module SKILLS_RINGS #The index of the scene in the main menu MAIN_MENU_ROW_INDEX = 4 #true : Use black background #false : Use basic map background # "nomimage" : pour mettre l'image que vous voulez en fond (dossier system) # si vous voulez mettre plusieurs images qui vont défiler, faites comme ceci # BLACK_BACKGROUND = [frame, image1, image2] # avec frame le temps entre chaque image (60 frames = 1sec) BLACK_BACKGROUND = [60, "Back1", "Back2"] #The opacity of the rings window (0-255) RINGS_WINDOW_OPACITY = 0 #Set to true or false to change the rotation sens when player input left or right arrow INVERSE_SPIN_SENS = true #The button to deploye skills datas DEPLOYED_SKILLDATA_WINDOW_INPUT = Input::A #The button to view the equiped skill list VIEW_SKILL_LIST_INPUT = Input::A #The sound when the rings rotate SOUND_RINGS_SPIN = RPG::SE.new("Cursor", 80, 100) #The sound when skill chain are activated SOUND_SKILL_CHAIN_ACTIVATED = RPG::SE.new("Magic", 100, 100) #Some vocab you can find in the scene VOCAB = { :spin_cost => "Spin Cost", :skill_equiped => "Equiped", :remove_skill => "(Remove)", :help_text_view_skill_list => "A: Skills List", } #Don't delete this. #Here you can configure the rings and create new ones. RINGS = { #Ring id => [radius, spin_speed, ring_filename, ring_skills_slots_filename], 0 => [40, 36, "ring0" ,"skillSlot_ring0"], 1 => [80, 25, "ring1", "skillSlot_ring1"], 2 => [120, 18, "ring2", "skillSlot_ring2"], 3 => [160, 10, "ring3", "skillSlot_ring3"], } #don't delete this. #CLASSES CONFIGURATION #Never delete class_id 0, it's the default template when a class_id is not define in hashs #The only way to unlock new rings currently CLASSES_UNLOCK_NEWRINGS_LEVELING_METHOD = { #class_id => [level_needed_for_ring1, level_needed_for_ring2, level_needed_for_ring3......] 0 => [0, 10,20,30], 1 => [9, 10,20,30], 3 => [9, 10,20], } #The number of skill for each rings. CLASSES_SKILLS_PER_RINGS = { #class_id => { # ring_number => number_of_skill_slot, # ring_number => number_of_skill_slot, # ring_number => number_of_skill_slot, #} 0 => { 0 => 4, 1 => 8, 2 => 12, 3 => 16, }, 1 => { 0 => 4, 1 => 8, 2 => 12, 3 => 16, }, 2 => { 0 => 3, 1 => 6, 2 => 9, 3 => 12, }, 3 => { 0 => 4, 1 => 2, 2 => 6, }, } #don't delete this. #Spin a ring can cost jp. CLASSES_SPIN_RINGS_JP_COST = { #class_id => { # ring_number => jp_cost_to_spin, # ring_number => jp_cost_to_spin, #} 0 => { 0 => 0, 1 => 0, 2 => 0, 3 => 0, }, 1 => { 0 => 0, 1 => 0, 2 => 0, 3 => 0, }, } #don't delete this. #The available skills list for each rings of each classes CLASSES_SKILLS_RINGS = { #actor_id = { # ring_number => [skill_id, skill_id, ...], # ring_number => [skill_id, skill_id, ...], #} 0 => { 0 => [1,2,3,4], 1 => [5,6,7,8,9,10,11,12], 2 => [13,14,15,16,17,18,19,20,21,22,23,24], 3 => [25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40], }, 1 => { 0 => [1,2,3,4,42,43], 1 => [5,6,7,8,9,10,11,12,44], 2 => [13,14,15,16,17,18,19,20,21,22,23,24], 3 => [25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40], }, } #don't delete this. #Here the most complex part of this script, read the FAQ to understand how to configure chains. CLASSES_SKILLS_CHAINS = { 0 => [ [0,4], [4,12], [12, 24], [0,4,12], [4,12,24], [0,4,12,24], [1,6], [6,15], [15,28], [1,6, 15], [6,15,28], [1,6,15,28], [3,10], [2,8], [5, 13, 14, 25, 27], ], 1 => [ [0,4], [4,12], [12, 24], [0,4,12], [4,12,24], [0,4,12,24], [1,6], [6,15], [15,28], [1,6, 15], [6,15,28], [1,6,15,28], [3,10], [2,8], [5, 13, 14, 25, 27], ], 2 => [ [0,3,9,18], [1,5,12,22], [2,7,15,26], [4,20], [6,24], [8,28], ], 3 => [ [0,4], [0,4,6], [4,6], [1,8,7], [2,5], [2,5,9], [5,9], [3,10,11], ], } #don't delete this. end #module end #module #============================================================================== # ** Cache #============================================================================== module Cache def self.skills_rings(filename) load_bitmap("Graphics/System/SkillsRings/", filename) end end # module Cache #=============================================================================== # RPG::Skill #=============================================================================== class RPG::Skill < RPG::UsableItem attr_accessor :passive_id attr_accessor :sr_chains attr_accessor :sr_popup attr_accessor :sr_combinaison def gbp_sr_rpg_skill_cache @passive_id = 0 @sr_chains = [] @sr_popup = "" self.note.split(/[\r\n]+/).each { |line| case line #--- when /<sr_passive_id:[ ]*(\d+)>/i @passive_id = $1.to_i when /<sr_chain:[ ]*(\d+(?:\s*,\s*\d+)*)>/i array = [] $1.scan(/\d+/).each { |num| array.push(num.to_i) if num.to_i > 0 } @sr_chains.push(array) @sr_combinaison = [] when /<sr_popup: (.*)>/i @sr_popup = $1 end #case } end def passive? return @passive_id != 0 end def sr_chain_skill? return !@sr_chains.empty? end end #class RPG::SKILL #=============================================================================== # Scene_Title #=============================================================================== class Scene_Title < Scene_Base alias gbp_sr_st_lbtd load_bt_database unless $@ def load_bt_database gbp_sr_st_lbtd load_gbp_sr_cache end alias gbp_sr_st_ld load_database unless $@ def load_database gbp_sr_st_ld load_gbp_sr_cache end def load_gbp_sr_cache for skill in $data_skills next if skill.nil? skill.gbp_sr_rpg_skill_cache end end end # Scene_Title #============================================================================== # ** Game_Actor #============================================================================== class Game_Actor < Game_Battler attr_reader :actor_id attr_accessor :current_rings_number attr_accessor :rings_index attr_accessor :rings_skills_junctions attr_accessor :rs_skills_learned attr_accessor :skills_chain_bonus alias gbp_sr_ga_s setup unless $@ def setup(actor_id) actor = $data_actors[actor_id] @class_id = actor.class_id @level = actor.initial_level @current_rings_number = {} @rs_setup_class_list = [] @rings_index = {} @rings_skills_junctions = {} @rs_skills_learned = [] @skills_chain_bonus = [] setup_current_class check_current_class_rings_number gbp_sr_ga_s(actor_id) end def setup_current_class return if @rs_setup_class_list.include?(@class_id) @rs_setup_class_list.push(@class_id) if GBP::SKILLS_RINGS::CLASSES_SKILLS_PER_RINGS.keys.include?(@class_id) hash = GBP::SKILLS_RINGS::CLASSES_SKILLS_PER_RINGS[@class_id] else hash = GBP::SKILLS_RINGS::CLASSES_SKILLS_PER_RINGS[0] return if @rs_setup_class_list.include?(0) @rs_setup_class_list.push(0) end @rings_index[@class_id] = {} @rings_skills_junctions[@class_id] = {} for i in 0...hash.keys.size @rings_index[@class_id][i] = 0 @rings_skills_junctions[@class_id][i] = {} for j in 0...hash[i] @rings_skills_junctions[@class_id][i][j] = nil end end end def check_current_class_rings_number if GBP::SKILLS_RINGS::CLASSES_UNLOCK_NEWRINGS_LEVELING_METHOD.include?(@class_id) array = GBP::SKILLS_RINGS::CLASSES_UNLOCK_NEWRINGS_LEVELING_METHOD[@class_id] else array = GBP::SKILLS_RINGS::CLASSES_UNLOCK_NEWRINGS_LEVELING_METHOD[0] end number = 0 for level in array if @level >= level number += 1 end end @current_rings_number[@class_id] = number end def ring_spin_cost(ring_index) if GBP::SKILLS_RINGS::CLASSES_SPIN_RINGS_JP_COST.keys.include?(@class_id) return GBP::SKILLS_RINGS::CLASSES_SPIN_RINGS_JP_COST[@class_id][ring_index] else return GBP::SKILLS_RINGS::CLASSES_SPIN_RINGS_JP_COST[0][ring_index] end end def skill_equiped?(ring_index, skill_id) for equiped_skill_id in @rings_skills_junctions[@class_id][ring_index].values if equiped_skill_id == skill_id return true end end return false end #-------------------------------------------------------------------------- # * Get Skill Object Array #-------------------------------------------------------------------------- alias gbp_sr_ga_sk skills unless $@ def skills result = gbp_sr_ga_sk for ring_i in 0...@current_rings_number[@class_id] for equiped_skill_id in @rings_skills_junctions[@class_id][ring_i].values if equiped_skill_id != nil skill = $data_skills[equiped_skill_id] result.push(skill) unless skill.passive? end end end #----- for bonus_skill_id in @skills_chain_bonus skill = $data_skills[bonus_skill_id] result.push(skill) unless skill.passive? end #----- return result end #-------------------------------------------------------------------------- # new method: passives #-------------------------------------------------------------------------- alias gbp_sr_ga_pa passives unless $@ def passives result = gbp_sr_ga_pa for ring_i in 0...@current_rings_number[@class_id] for equiped_skill_id in @rings_skills_junctions[@class_id][ring_i].values if equiped_skill_id != nil skill = $data_skills[equiped_skill_id] if skill.passive? state = $data_states[skill.passive_id] result.push(state) end end end end #----- for bonus_skill_id in @skills_chain_bonus skill = $data_skills[bonus_skill_id] if skill.passive? state = $data_states[skill.passive_id] result.push(state) end end #----- return result end end #Game_Actor #============================================================================== # ** Game_Party #============================================================================== class Game_Party < Game_Unit attr_accessor :memo_skillRing_skillsDatasWindows_deployed attr_accessor :sr_chains_list alias gbp_sr_gp_i initialize unless $@ def initialize gbp_sr_gp_i @memo_skillRing_skillsDatasWindows_deployed = false create_sr_chains_list end def create_sr_chains_list @sr_chains_list = {} for skill in $data_skills next if skill.nil? if skill.sr_chain_skill? for sr_chain in skill.sr_chains @sr_chains_list[sr_chain] = skill.id end end end end end #class #=============================================================================== # Window_SkillRing_Actor_Status #=============================================================================== class Window_SkillRing_Actor_Status < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 128, 272) @actor = actor refresh end def update super if $scene.view_skill_list_window.active self.x = [self.x-15, -self.width].max else self.x = [self.x + 15, 0].min end end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_face(@actor, 0, 0) dx = 0; dy = 96 draw_actor_name(@actor, dx, dy) draw_actor_class(@actor, dx, dy + WLH * 1) draw_actor_level(@actor, dx, dy + WLH * 2) draw_actor_jp(@actor, dx, dy + WLH * 3) draw_actor_state(@actor, dx, dy + WLH * 4) self.contents.draw_text(0, dy + WLH * 5, contents.width, WLH, GBP::SKILLS_RINGS::VOCAB[:help_text_view_skill_list]) end def refresh_jp_amount rect = Rect.new(0, 96+WLH * 3, contents.width, WLH) self.contents.clear_rect(rect) draw_actor_jp(@actor, 0, 96 + WLH * 3) end #-------------------------------------------------------------------------- # draw_actor_jp #-------------------------------------------------------------------------- def draw_actor_jp(actor, dx, dy) return if YEM::SKILL::HIDE_JP self.contents.font.color = system_color self.contents.draw_text(dx, dy, 96, WLH, Vocab.jp) draw_icon(Icon.jp, dx+contents.width-24, dy) jp = actor.jp(actor.class_id) self.contents.font.color = normal_color self.contents.draw_text(30, dy, contents.width-54, WLH, jp, 2) end end #Window_SkillRing_Actor_Status #============================================================================== # ** Window_SkillRing_SkillSelection #============================================================================== class Window_SkillRing_SkillSelection < Window_Selectable def initialize super(Graphics.width, 0, 350, 128) self.active = false self.index = 0 self.back_opacity = 200 @data = [] end def setup(actor, selected_ring) @actor = actor @ring_index = selected_ring refresh end def skill return nil if @data[self.index].nil? return $data_skills[@data[self.index]] end def update super if self.active self.x = [self.x - 20, Graphics.width-self.width].max else self.x = [self.x + 20, Graphics.width].min end end def refresh self.contents.clear return if @actor.nil? @data = [] if GBP::SKILLS_RINGS::CLASSES_SKILLS_RINGS.keys.include?(@actor.class_id) @data = GBP::SKILLS_RINGS::CLASSES_SKILLS_RINGS[@actor.class_id][@ring_index].clone else @data = GBP::SKILLS_RINGS::CLASSES_SKILLS_RINGS[0][@ring_index].clone end @data.insert(0, nil) #remove skill command @item_max = @data.size create_contents self.index = 0 if @data[self.index].nil? for i in 0...@item_max draw_skill(i) end end #-------------------------------------------------------------------------- # * draw_skill #-------------------------------------------------------------------------- def draw_skill(index) rect = item_rect(index) self.contents.clear_rect(rect) rect.x += 2 #----- if index == 0 #remove skill command text = GBP::SKILLS_RINGS::VOCAB[:remove_skill] self.contents.draw_text(rect.x+24 , rect.y, contents.width, WLH, text) return end #----- return if @data[index].nil? skill = $data_skills[@data[index]] enabled = enable?(skill) draw_item_name(skill, rect.x, rect.y, enabled) self.contents.font.size = 15 rect.x -= 4 if @actor.rs_skills_learned.include?(skill.id) text = YEM::SKILL::LEARNED_TEXT text = GBP::SKILLS_RINGS::VOCAB[:skill_equiped] if @actor.skill_equiped?($scene.skillsRings_window.ring_index, skill.id) self.contents.draw_text(rect.x , rect.y, contents.width, WLH, text, 2) else draw_jp_cost(skill, rect.x, rect.y) end self.contents.font.size = Font.default_size end #-------------------------------------------------------------------------- # draw_jp_cost #-------------------------------------------------------------------------- def draw_jp_cost(skill, x, y) self.contents.font.color = system_color draw_icon(Icon.jp, contents.width-24, y) text = skill.jp_cost enabled = @actor.jp(@actor.class_id) >= skill.jp_cost self.contents.font.color = enabled ? normal_color : power_down_color self.contents.draw_text(-24, y, contents.width, WLH, text, 2) end #-------------------------------------------------------------------------- # * enable? #-------------------------------------------------------------------------- def enable?(skill) return false if skill == nil return false if @actor.skill_equiped?($scene.skillsRings_window.ring_index, skill.id) #le skill est équipé return true if @actor.rs_skills_learned.include?(skill.id) #--- if skill.jp_require[:level] != nil return false if skill.jp_require[:level][0] > @actor.level end #--- if skill.jp_require[:skills] != nil for skill_id in skill.jp_require[:skills] next if $data_skills[skill_id] == nil return false unless @actor.skill_learn?($data_skills[skill_id]) end end #--- if skill.jp_require[:passives] != nil for state_id in skill.jp_require[:passives] next if $data_states[state_id] == nil return false unless @actor.passive_learn?($data_states[state_id]) end end #--- return @actor.jp(@actor.class_id) >= skill.jp_cost end end #class Window_SkillRing_SkillSelection #============================================================================== # ** Window_SkillRing_ViewSkillsList #============================================================================== class Window_SkillRing_ViewSkillsList < Window_Selectable def initialize(actor) super(0, 0, 240, 174) @actor = actor self.x = -self.width self.active = false self.index = 0 self.back_opacity = 200 @last_index = nil @selected_sprite = [] @data = [] @flash_duration = 0 @memo_bonus_skill_begin_index = 99999 end def skill return nil if @data[self.index].nil? return $data_skills[@data[self.index]] end def update super if self.active self.x = [self.x + 15, 0].min else self.x = [self.x - 15, -self.width].max @last_index = nil for sprite in @selected_sprite sprite.update if sprite != nil && !sprite.disposed? end return end #---- @flash_duration -= 1 if @flash_duration <= 0 determine_selected_sprite @flash_duration = 20 for sprite in @selected_sprite sprite.flash(text_color(0), 20) if sprite != nil && !sprite.disposed? end end #--- for sprite in @selected_sprite sprite.update if sprite != nil && !sprite.disposed? end end def refresh self.contents.clear return if @actor.nil? @data = [] for ring_i in 0...@actor.current_rings_number[@actor.class_id] for slot_id in @actor.rings_skills_junctions[@actor.class_id][ring_i].keys.sort skill_id = @actor.rings_skills_junctions[@actor.class_id][ring_i][slot_id] @data.push(skill_id) if skill_id != nil end end @memo_bonus_skill_begin_index = @data.size for bonus_skill_id in @actor.skills_chain_bonus @data.push(bonus_skill_id) end @item_max = @data.size create_contents for i in 0...@item_max draw_skill(i) end end #-------------------------------------------------------------------------- # * draw_skill #-------------------------------------------------------------------------- def draw_skill(index) rect = item_rect(index) self.contents.clear_rect(rect) rect.x += 2 #----- skill = $data_skills[@data[index]] if index >= @memo_bonus_skill_begin_index draw_skill_bonus(skill, rect.x, rect.y) else draw_item_name(skill, rect.x, rect.y) end end def draw_skill_bonus(item, x, y) if item != nil draw_icon(item.icon_index, x, y) self.contents.font.color = power_down_color self.contents.draw_text(x + 24, y, 172, WLH, item.name) end end def determine_selected_sprite @selected_sprite.clear skill_slot_sprites = $scene.skillsRings_window.get_slots_sprites skill_sprites = $scene.skillsRings_window.get_skills_sprites #---- if self.index >= @memo_bonus_skill_begin_index return if skill.nil? searching_id = skill.sr_combinaison else searching_id = [@data[self.index]] end #---- for ring_i in 0...@actor.current_rings_number[@actor.class_id] for slot_id in @actor.rings_skills_junctions[@actor.class_id][ring_i].keys.sort skill_id = @actor.rings_skills_junctions[@actor.class_id][ring_i][slot_id] for id in searching_id if skill_id == id @selected_sprite.push(skill_slot_sprites[ring_i][slot_id]) @selected_sprite.push(skill_sprites[ring_i][slot_id]) end end end end end end #class Window_SkillRing_ViewSkillsList #=============================================================================== # Window_LearnData #=============================================================================== class Window_LearnData < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(actor, main_window) @actor = actor @class_id = @actor.class_id @main_window = main_window if $scene.is_a?(Scene_Skill) super(@main_window.width, @main_window.y, 240, @main_window.height) elsif @main_window.is_a?(Window_SkillRing_SkillSelection) super(Graphics.width, @main_window.height, 240, Graphics.height-@main_window.height) if $game_party.memo_skillRing_skillsDatasWindows_deployed self.height = Graphics.height-@main_window.height else self.height = 56 end self.back_opacity = 200 elsif @main_window.is_a?(Window_SkillRing_ViewSkillsList) super(0, @main_window.height, 240, Graphics.height-@main_window.height) self.x = - self.width self.back_opacity = 200 end refresh end #-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- def update super refresh if @skill != @main_window.skill and !@anti_update return if $scene.is_a?(Scene_Skill) #---- if @main_window.is_a?(Window_SkillRing_SkillSelection) if @main_window.active self.x = [self.x - 15, Graphics.width-self.width].max else self.x = [self.x + 15, Graphics.width].min end #---- if $game_party.memo_skillRing_skillsDatasWindows_deployed self.height = [self.height + 20, Graphics.height-@main_window.height].min else self.height = [self.height - 20, 56].max end elsif @main_window.is_a?(Window_SkillRing_ViewSkillsList) if @main_window.active self.x = [self.x + 15, 0].min else self.x = [self.x - 15, -self.width].max end end #---- end alias gbp_sr_wld_dr draw_requirements unless $@ def draw_requirements(dy) return dy if @main_window.is_a?(Window_SkillRing_ViewSkillsList) gbp_sr_wld_dr(dy) end end #class Window_LearnData #=============================================================================== # Window_SkillRing_SpinCost #=============================================================================== class Window_SkillRing_SpinCost < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(actor) super(0, Graphics.height-56-56, 150, 56) self.x = -self.width self.back_opacity = 200 @spin_cost = 0 @actor = actor end def spin_cost=(new_spin_cost) @spin_cost = new_spin_cost refresh end def update if @spin_cost > 0 && !$scene.view_skill_list_window.active self.x = [self.x+20, 0].min else self.x = [self.x-20, -self.width].max end end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color text = GBP::SKILLS_RINGS::VOCAB[:spin_cost] self.contents.draw_text(0, 0, contents.width/2, WLH, text) draw_icon(Icon.jp, contents.width-24, 0) text = @spin_cost enabled = @actor.jp(@actor.class_id) >= @spin_cost self.contents.font.color = enabled ? normal_color : power_down_color self.contents.draw_text(-24, 0, contents.width, WLH, text, 2) self.contents.font.color = normal_color end end #Window_SkillRing_SpinCost #=============================================================================== # Window_SkillRing_SelectedSkillRing #=============================================================================== class Window_SkillRing_SelectedSkillRing < Window_Base #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize super(-210, Graphics.height-56, 210, 56) self.back_opacity = 200 end #-------------------------------------------------------------------------- # actor= #-------------------------------------------------------------------------- def skill=(new_skill_id) if new_skill_id.nil? @skill = nil else @skill = $data_skills[new_skill_id] end refresh end def update super if @skill.nil? || $scene.view_skill_list_window.active self.x = [self.x-20, -self.width].max else self.x = [self.x+20, 0].min end end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh self.contents.clear return if @skill.nil? draw_item_name(@skill, 0, 0) end end #Window_SkillRing_SelectedSkillRing #=============================================================================== # Window_SkillRing_SillChainPopup #=============================================================================== class Window_SkillRing_SillChainPopup < Window_Base attr_reader :popup_finish #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(skill_id, x, y) super(x, y, 204, 56) self.opacity = 0 @skill = $data_skills[skill_id] @pre_popup_duration = 30 @wait_popup_duration = 120 @disappear_popup_duration = 60 @popup_finish = false if @skill.sr_popup == "" self.width = self.contents.text_size(@skill.name).width + 24 + 32 else self.width = self.contents.text_size(@skill.sr_popup).width + 32 end create_contents self.x -= self.width/2 refresh end def update if @pre_popup_duration > 0 @pre_popup_duration -= 1 self.y -= 1 end return if @pre_popup_duration > 0 #---- if @wait_popup_duration > 0 @wait_popup_duration -= 1 end return if @wait_popup_duration > 0 #--- if @disappear_popup_duration > 0 @disappear_popup_duration -= 1 self.y -= 1 self.contents_opacity -= 5 end return if @disappear_popup_duration > 0 @popup_finish = true end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh self.contents.clear return if @skill.nil? self.contents.font.color = normal_color if @skill.sr_popup == "" draw_item_name(@skill, 0, 0) else text = @skill.sr_popup self.contents.draw_text(0, 0, contents.width, WLH, text) end end end #Window_SkillRing_SillChainPopup #=============================================================================== # Window_SkillsRings #=============================================================================== class Window_SkillsRings < Window_Base attr_reader :ring_index #-------------------------------------------------------------------------- # initialize #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, Graphics.width, Graphics.height) self.opacity = GBP::SKILLS_RINGS::RINGS_WINDOW_OPACITY self.z = 0 @actor = actor @actor.setup_current_class create_cursor @skill_sprites = {} @skill_slots_sprites = {} create_skills_slots_sprite create_skills_sprite create_background #--- @item_max = 0 self.active = true @ring_index = 0 #--- @spin_duration = {} @spin_right = true setup_ring #--- refresh end_command end def dispose super @cursor_sprite.dispose dispose_skills_slots_sprites dispose_skills_sprites end def dispose_skills_slots_sprites for sprites_array in @skill_slot_sprites.values for sprite in sprites_array sprite.dispose end end end def dispose_skills_sprites for sprites_array in @skill_sprites.values for sprite in sprites_array next if sprite.nil? sprite.dispose end end end def create_cursor @cursor_transform_cycle_end = false @cursor_transform_minus = false @default_cursor_transform_duration = 10 @default_transform_wait_duration = 60 @cursor_transform_duration = @default_cursor_transform_duration @transform_wait_duration = @default_transform_wait_duration @cursor_move_y = 0 @cursor_moveY_duration = 0 @final_cursor_Y_destination = 0 #--- viewport_sprite = Viewport.new(self.x+16, self.y+16, self.width-32, self.height-32) viewport_sprite.z = 50 @cursor_sprite = Sprite.new(viewport_sprite) bitmap = Cache.skills_rings("cursor") @cursor_sprite.bitmap = bitmap @cursor_sprite.ox = bitmap.width/2 @cursor_sprite.oy = bitmap.height/2 @cursor_sprite.x = center_x @cursor_sprite.y = center_y end def get_slots_sprites return @skill_slot_sprites end def get_skills_sprites return @skill_sprites end def create_skills_slots_sprite @skill_slot_sprites = {} dispose_skills_slots_sprites viewport_sprite = Viewport.new(self.x+16, self.y+16, self.width-32, self.height-32) viewport_sprite.z = 40 for ring_i in 0...@actor.current_rings_number[@actor.class_id] @skill_slot_sprites[ring_i] = [] for equiped_skill_id in @actor.rings_skills_junctions[@actor.class_id][ring_i].values #kaka (attention a l'orde ici values) sprite = Sprite.new(viewport_sprite) slot_bitmap = Cache.skills_rings(GBP::SKILLS_RINGS::RINGS[ring_i][3]) sprite.bitmap = slot_bitmap sprite.ox = sprite.width/2 sprite.oy = sprite.height/2 @skill_slot_sprites[ring_i].push(sprite) end end end def create_skills_sprite dispose_skills_sprites @skill_sprites = {} viewport_sprite = Viewport.new(self.x+16, self.y+16, self.width-32, self.height-32) viewport_sprite.z = 41 for ring_i in 0...@actor.current_rings_number[@actor.class_id] @skill_sprites[ring_i] = [] for slot_id in @actor.rings_skills_junctions[@actor.class_id][ring_i].keys.sort equiped_skill_id = @actor.rings_skills_junctions[@actor.class_id][ring_i][slot_id] if equiped_skill_id.nil? @skill_sprites[ring_i].push(nil) next end slot_bitmap = Cache.skills_rings(GBP::SKILLS_RINGS::RINGS[ring_i][3]) skill = $data_skills[equiped_skill_id] rect = Rect.new(skill.icon_index % 16 * 24, skill.icon_index / 16 * 24, 24, 24) enable = true sprite2 = Sprite.new(viewport_sprite) sprite2.bitmap = Bitmap.new(slot_bitmap.width, slot_bitmap.height) sprite2.bitmap.blt(slot_bitmap.width/2-12, slot_bitmap.height/2-12, Cache.system("Iconset"), rect, enable ? 255 : 128) sprite2.ox = sprite2.width/2 sprite2.oy = sprite2.height/2 @skill_sprites[ring_i].push(sprite2) end end @selected_slot_wait_duration = 300 end def create_background for ring_number in 0...@actor.current_rings_number[@actor.class_id] bitmap = Cache.skills_rings(GBP::SKILLS_RINGS::RINGS[ring_number][2]) rect = Rect.new(0, 0, bitmap.width, bitmap.height) x = 0 y = 0 self.contents.blt(x, y, bitmap, rect) end end #-------------------------------------------------------------------------- # actor= #-------------------------------------------------------------------------- def actor=(new_actor) @actor = new_actor refresh end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh for ring_i in 0...@actor.current_rings_number[@actor.class_id] @data = @actor.rings_skills_junctions[@actor.class_id][ring_i] @item_max = @data.size setup_ring(ring_i) angle = 0 for i in 0...@item_max n = (i - @actor.rings_index[@actor.class_id][ring_i]) * angle_size(ring_i) + angle cx = - @radius * Math.sin(n)+ center_x cy = @radius * Math.cos(n) + center_y #---- sprite = @skill_slot_sprites[ring_i][i] sprite2 = @skill_sprites[ring_i][i] if sprite2.nil? sprite.x = cx sprite.y = cy else sprite.x = sprite2.x = cx sprite.y = sprite2.y = cy end end end setup_ring end #-------------------------------------------------------------------------- # new method: enabled? #-------------------------------------------------------------------------- def enabled?(obj = nil) #~ return false unless @actor.actor? #~ if @actor.auto_battle #~ return true if obj == :equip and @actor.equip_cooldown.to_i <= 0 #~ return true if obj == :escape and $game_troop.can_escape #~ return false #~ end #~ return false unless @actor.inputable? #~ return false if obj == nil #~ return false if obj == :equip and @actor.equip_cooldown.to_i > 0 #~ if @disable_empty_commands #~ return false if obj == :skill and @actor.skills.size <= 0 #~ return false if obj == :item and $game_party.battle_item_size <= 0 #~ end #~ if @skills.include?(obj) #~ skill = $data_skills[@skills[obj]] #~ return @actor.skill_can_use?(skill) #~ end return true end #-------------------------------------------------------------------------- # center_x #-------------------------------------------------------------------------- def center_x return contents.width / 2 + 64 end #-------------------------------------------------------------------------- # center_y #-------------------------------------------------------------------------- def center_y return contents.height / 2 end def create_cursor_moveY @cursor_moveY_duration = 10 @final_cursor_Y_destination = center_y + @radius @cursor_move_y = (@final_cursor_Y_destination - @cursor_sprite.y ) / @cursor_moveY_duration end #-------------------------------------------------------------------------- # update_cursor #-------------------------------------------------------------------------- def update_cursor @cursor_sprite.update #---- if @cursor_moveY_duration != 0 @cursor_moveY_duration -= 1 @cursor_sprite.y += @cursor_move_y if @cursor_moveY_duration == 0 @cursor_moveY_duration = 0 @cursor_move_y = 0 @cursor_sprite.y = @final_cursor_Y_destination end end #--- if @transform_wait_duration <= 0 @cursor_transform_duration -= 1 if @cursor_transform_minus @cursor_sprite.zoom_x -= 0.05 @cursor_sprite.zoom_y -= 0.05 @cursor_transform_cycle_end = true else @cursor_sprite.flash(text_color(0),10) @cursor_sprite.zoom_x += 0.05 @cursor_sprite.zoom_y += 0.05 end if @cursor_transform_duration <= 0 if @cursor_transform_minus @cursor_transform_minus = false else @cursor_transform_minus = true end if @cursor_transform_cycle_end @transform_wait_duration = @default_transform_wait_duration @cursor_transform_cycle_end = false else @cursor_transform_duration = @default_cursor_transform_duration end end end #---- return if spin? return if !self.active if @transform_wait_duration <= 0; return; end @transform_wait_duration -= 1 if @transform_wait_duration <= 0 @transform_wait_duration = 0 @cursor_transform_duration = @default_cursor_transform_duration end #---- end #-------------------------------------------------------------------------- # angle_size #-------------------------------------------------------------------------- def angle_size(ring_i) return (Math::PI * 2 / @actor.rings_skills_junctions[@actor.class_id][ring_i].values.size ) end def setup_ring(ring_i = nil) if ring_i.nil? ring_config_array = GBP::SKILLS_RINGS::RINGS[@ring_index] else ring_config_array = GBP::SKILLS_RINGS::RINGS[ring_i] end @radius = ring_config_array[0] @speed = ring_config_array[1] if ring_i.nil? create_cursor_moveY @data = @actor.rings_skills_junctions[@actor.class_id][@ring_index] @item_max = @data.size end end #-------------------------------------------------------------------------- # set_spin_duration #-------------------------------------------------------------------------- def set_spin_duration for ring_i in 0...@actor.current_rings_number[@actor.class_id] if ring_i == @ring_index @spin_duration[ring_i] = angle_size(ring_i) * 360 / GBP::SKILLS_RINGS::RINGS[(ring_i)][1] else @spin_duration[ring_i] = 0 end end set_spin(true) end #-------------------------------------------------------------------------- # set_spin #-------------------------------------------------------------------------- def set_spin(spin = false) setup_ring angle = spin ? @speed * @spin_duration[@ring_index] / 360 : 0 angle = @spin_right ? angle : -angle for i in 0...@item_max n = (i - @actor.rings_index[@actor.class_id][@ring_index]) * angle_size(@ring_index) + angle cx = - @radius * Math.sin(n)+ center_x cy = @radius * Math.cos(n) + center_y #---- sprite = @skill_slot_sprites[@ring_index][i] sprite2 = @skill_sprites[@ring_index][i] if sprite2.nil? sprite.x = cx sprite.y = cy else sprite.x = sprite2.x = cx sprite.y = sprite2.y = cy end end end #-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- def update super update_cursor #~ update_selected_sprites if !active; return; end #--- for ring_i in 0...@actor.current_rings_number[@actor.class_id] @spin_duration[ring_i] = 0 if @spin_duration[ring_i].nil? if @spin_duration[ring_i] > 0 @spin_duration[ring_i] -= 1 set_spin(@spin_duration[ring_i] >= 1) return end end #--- if Input.repeat?(Input::RIGHT) if GBP::SKILLS_RINGS::INVERSE_SPIN_SENS command_left else command_right end elsif Input.repeat?(Input::LEFT) if GBP::SKILLS_RINGS::INVERSE_SPIN_SENS command_right else command_left end elsif Input.repeat?(Input::UP) command_up elsif Input.repeat?(Input::DOWN) command_down end end #-------------------------------------------------------------------------- # command_movable? #-------------------------------------------------------------------------- def command_movable? return false if spin? return false if (not visible or not active) #return false if (index < 0 or index > item_max or item_max == 0) return false if @item_max == 1 return false if (@opening or @closing) return false if @cursor_move_y != 0 return true end def spin? for ring_i in 0...@actor.current_rings_number[@actor.class_id] @spin_duration[ring_i] = 0 if @spin_duration[ring_i].nil? if @spin_duration[ring_i] > 0 return true end end return false end def jp_cost_spin_enable? spin_cost = @actor.ring_spin_cost(@ring_index) if @actor.jp(@actor.class_id) >= spin_cost @actor.change_jp(@actor.class_id, -spin_cost) $scene.status_window.refresh_jp_amount return true end Sound.play_buzzer return false end #-------------------------------------------------------------------------- # command_right #-------------------------------------------------------------------------- def command_right return if !command_movable? return if !jp_cost_spin_enable? GBP::SKILLS_RINGS::SOUND_RINGS_SPIN.play @actor.rings_index[@actor.class_id][@ring_index] = (@actor.rings_index[@actor.class_id][@ring_index] + 1) % @item_max @spin_right = true set_spin_duration end_command $scene.recreate_sr_chains end #-------------------------------------------------------------------------- # command_left #-------------------------------------------------------------------------- def command_left return if !command_movable? return if !jp_cost_spin_enable? GBP::SKILLS_RINGS::SOUND_RINGS_SPIN.play @actor.rings_index[@actor.class_id][@ring_index] = (@actor.rings_index[@actor.class_id][@ring_index] - 1 + @item_max) % @item_max @spin_right = false set_spin_duration end_command $scene.recreate_sr_chains end def command_up return if !command_movable? Sound.play_cursor if @ring_index == 0 @ring_index = @actor.current_rings_number[@actor.class_id] - 1 else @ring_index -= 1 end setup_ring end_command end def command_down return if !command_movable? Sound.play_cursor if @ring_index == @actor.current_rings_number[@actor.class_id]- 1 @ring_index = 0 else @ring_index += 1 end setup_ring end_command end def end_command $scene.selected_skill_window.skill = get_selected_skill_id $scene.skillCost_window.spin_cost = @actor.ring_spin_cost(@ring_index) end def get_selected_skill_id ring_index = @actor.rings_index[@actor.class_id][@ring_index] return @actor.rings_skills_junctions[@actor.class_id][@ring_index][ring_index] end end #Window_SkillsRings #=============================================================================== # Scene_SkillRing #=============================================================================== class Scene_SkillRing < Scene_Base attr_accessor :selected_skill_window attr_accessor :skillCost_window attr_accessor :status_window attr_accessor :skill_window attr_accessor :skillsRings_window attr_accessor :view_skill_list_window def initialize(actor_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # overwrite method: start #-------------------------------------------------------------------------- def start super @play_chain_sprites_animations = [] @popup_windows = [] if GBP::SKILLS_RINGS::BLACK_BACKGROUND if GBP::SKILLS_RINGS::BLACK_BACKGROUND.is_a?(String) @background = Sprite.new @background.bitmap = Cache.system(GBP::SKILLS_RINGS::BLACK_BACKGROUND.to_s) elsif GBP::SKILLS_RINGS::BLACK_BACKGROUND.is_a?(Array) @background ||= [] index = 1 GBP::SKILLS_RINGS::BLACK_BACKGROUND.each do |i| if i.is_a?(String) && i @background[index] = Sprite.new @background[index].bitmap = Cache.system(i) @background[index].visible = false index += 1 end end @index_back = 1 draw_background @update_background_diap = true else create_menu_background end end @actor = $game_party.members[@actor_index] @actor.check_current_class_rings_number @view_skill_list_window = Window_SkillRing_ViewSkillsList.new(@actor) @skillCost_window = Window_SkillRing_SpinCost.new(@actor) @selected_skill_window = Window_SkillRing_SelectedSkillRing.new @skillsRings_window = Window_SkillsRings.new(@actor) @status_window = Window_SkillRing_Actor_Status.new(@actor) @skill_window = Window_SkillRing_SkillSelection.new @learn_data_window = Window_LearnData.new(@actor, @skill_window) @view_data_window = Window_LearnData.new(@actor, @view_skill_list_window) @windows = [] @windows.push(@skillCost_window) @windows.push(@selected_skill_window) @windows.push(@status_window) @windows.push(@skillsRings_window) @windows.push(@learn_data_window) @windows.push(@view_data_window) @windows.push(@skill_window) @windows.push(@view_skill_list_window) @selected_skill_window.skill = @skillsRings_window.get_selected_skill_id recreate_sr_chains end def terminate super dispose_menu_background if !GBP::SKILLS_RINGS::BLACK_BACKGROUND for popup_window in @popup_windows popup_window.dispose end for window in @windows window.dispose end end def return_scene $scene = Scene_Menu.new(GBP::SKILLS_RINGS::MAIN_MENU_ROW_INDEX) end #-------------------------------------------------------------------------- # overwrite method: next_actor #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size set_new_actor end #-------------------------------------------------------------------------- # overwrite method: prev_actor #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size set_new_actor end #-------------------------------------------------------------------------- # new method: set_new_actor #-------------------------------------------------------------------------- def set_new_actor $game_party.last_actor_index = @actor_index $scene = Scene_SkillRing.new(@actor_index) end def update super update_background if @update_background_diap if @actor.current_rings_number[@actor.class_id] == 0 update_no_ring_actor return end #----- update_play_chain_sprites_animations for popup_window in @popup_windows if popup_window.popup_finish @popup_windows.delete_at(@popup_windows.index(popup_window)) popup_window.dispose popup_window = nil next end popup_window.update end #---- for window in @windows window.update end if @skillsRings_window.active update_skillsRings_selection elsif @skill_window.active update_skill_selection elsif @view_skill_list_window.active update_view_skill_list_selection end end def update_background @count ||= 0 @count += 1 if @count == GBP::SKILLS_RINGS::BLACK_BACKGROUND[0] @index_back += 1 @index_back = 1 if @index_back == GBP::SKILLS_RINGS::BLACK_BACKGROUND.size draw_background @count = 0 end end def draw_background @background.each do |i| i.visible = false if i end @background[ @index_back].visible = true end def update_no_ring_actor if Input.trigger?(Input::B) Sound.play_cancel return_scene elsif Input.repeat?(Input::R) Sound.play_cursor next_actor elsif Input.repeat?(Input::L) Sound.play_cursor prev_actor elsif Input.trigger?(Input::C) Sound.play_buzzer end end def update_skillsRings_selection if Input.trigger?(Input::B) Sound.play_cancel return_scene elsif Input.repeat?(Input::R) Sound.play_cursor next_actor elsif Input.repeat?(Input::L) Sound.play_cursor prev_actor elsif Input.trigger?(GBP::SKILLS_RINGS::VIEW_SKILL_LIST_INPUT) Sound.play_decision @view_skill_list_window.active = true @skillsRings_window.active = false @view_skill_list_window.refresh elsif Input.trigger?(Input::C) return if !@skillsRings_window.command_movable? Sound.play_decision @skill_window.setup(@actor, @skillsRings_window.ring_index) @skillsRings_window.active = false @skill_window.active = true end end def update_view_skill_list_selection if Input.trigger?(Input::B) Sound.play_cancel @skillsRings_window.active = true @view_skill_list_window.active = false end end def update_skill_selection if Input.trigger?(Input::B) Sound.play_cancel @skillsRings_window.active = true @skill_window.active = false elsif Input.trigger?(GBP::SKILLS_RINGS::DEPLOYED_SKILLDATA_WINDOW_INPUT) if $game_party.memo_skillRing_skillsDatasWindows_deployed $game_party.memo_skillRing_skillsDatasWindows_deployed = false else $game_party.memo_skillRing_skillsDatasWindows_deployed = true end #--- Debug Commands --- elsif $TEST and Input.repeat?(Input::F8) # Increase JP Sound.play_equip var = YEM::SKILL::MAXIMUM_JP / 10 jp = Input.press?(Input::SHIFT) ? rand(var) + var : rand(100) +100 @actor.change_jp(@actor.class_id, jp) @status_window.refresh_jp_amount @skill_window.refresh elsif $TEST and Input.repeat?(Input::F7) # Decrease JP Sound.play_equip var = YEM::SKILL::MAXIMUM_JP / 10 jp = Input.press?(Input::SHIFT) ? rand(var) + var : rand(100) +100 @actor.chan


Kirah

Adepte
Kirah
  • Messages : 268

Marché de Biward [ouvert]


ven. 23 août 2013 - 19h57

Merci bien Biw'


[url=http://www.hostingpics.net/viewer.php?id=848601Joke.png][img]http://img15.hostingpics.net/pics/848601Joke.png[/img][/url]

Ssozi

Expert
Ssozi
  • Messages : 1166

Marché de Biward [ouvert]


jeu. 12 sept. 2013 - 21h28

[quote="Kirah"]Merci bien Biw' [/quote] De rien en retard J'ai mis la liste de mes scripts à jour, et j'ai ajouté 2 nouvelles demandes ! Je me pencherais sur tout ça ce week-end. J'ai ré-ouvert mon marché à l'approche de la fin de semaine, j'ai presque rien à faire la semaine pro. Donc les demandes de script sont les bienvenues !