Day.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / News: Quoi de neuf sur Oniromancie (...) / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

500 connectés actuellement

29385192 visiteurs
depuis l'ouverture

5 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

RPG Maker Détente

Offgame

RPG Maker VX

Zarok

Tous nos partenaires

Devenir
partenaire



Message Box Options 2.0.1

Permet de régler la largeur, la hauteur, et la position du windowskin dans les boîtes de dialogue.

Script pour RPG Maker VX Ace
Ecrit par Zerbu
Publié par Tata Monos (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Auteur : Zerbu
Logiciel : RPG Maker VX Ace
Nombre de scripts : 1
Source : http://www.rpgmakervxace.net/index.php?/topic/560-message-box-size-and-position-options-updated/

Fonctionnalités
Permet de régler la largeur, la hauteur, et la position du windowskin sur Rpg Maker Vxace.

Installation
A placer au-dessus de Main.

Utilisation
Il faut 4 variables. Par défaut (configurable en début de script) :
-Variable 2 pour la largeur de la boite de dialogue. (Ligne 18 dans le script pour modifier l'id de la variable)
-Variable 3 pour la hauteur. (Ligne 22)
-Variable 4 pour la position X (Ligne 26)
-Variable 5 pour la position Y (Ligne 31)

Si une variable à pour valeur 0, elle retour à ça fonction par défaut.
Exemple si la variable Y est égale 0, c'est l'option (Haut,Milieu, bas) qui reprend le dessus pour positionner tous ça.

Pour modifier ces variables en jeu, vous devez faire un appel de script depuis la commande événementielle, avec :

Portion de code : Tout sélectionner

1
message_box_options(width, height, x, y)


Les termes entre parenthèses devant correspondre aux valeurs des variables.
Vous pouvez également remettre toutes ces valeurs au point de départ avec :

Portion de code : Tout sélectionner

1
message_box_options_reset



Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#==============================================================================
# Message Box Options (version 2.0.1)
# NEW FEATURES:
# - You can now quickly set variables using a script call:
# -- message_box_options(width, height, x, y)
# - You can also reset the variables quickly as well
# -- message_box_options_reset
#------------------------------------------------------------------------------
# by Zerbu
#==============================================================================
module Message_Box_Options
 
  #--------------------------------------------------------------------------
  # Options
  #--------------------------------------------------------------------------
  # Variable with the message width
  # If the variable value is 0, the full width of the window will be used
  MESSAGE_WIDTH = 2
 
  # Variable with the message height
  # If the variable value is 0, the default height will be used
  MESSAGE_HEIGHT = 3
 
  # Variable with the X position
  # If the variable value is -1, it will be centred on the screen
  MESSAGE_X = 4
 
  # Variable with the Y position
  # If the variable value is 0, the position chosen in the editor
  # (Top, Middle, Bottom) will be used
  MESSAGE_Y = 5
 
end
 
#--------------------------------------------------------------------------
# DO NOT EDIT BELOW unless you know what you're doing!
# If you are not careful, editing below could cause chaos in your game
# world, and I don't mean something the player will enjoy!
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Window_Message
#--------------------------------------------------------------------------
class Window_Message < Window_Base
  include Message_Box_Options
 
  #--------------------------------------------------------------------------
  # alias method: window_width
  #--------------------------------------------------------------------------
  alias default_window_width window_width
  def window_width
    #---
    if $game_variables[MESSAGE_WIDTH] != 0
      $game_variables[MESSAGE_WIDTH]
    #---
    else
      default_window_width
    end
    #---
  end
 
  #--------------------------------------------------------------------------
  # alias method: window_height
  #--------------------------------------------------------------------------
  alias default_window_height window_height
  def window_height
    #---
    if $game_variables[MESSAGE_HEIGHT] != 0
      $game_variables[MESSAGE_HEIGHT]
    #---
    else
      default_window_height
    #---
    end
  end
 
  #--------------------------------------------------------------------------
  # alias method: update_placement
  #--------------------------------------------------------------------------
  alias default_placement update_placement
  #---
  def update_placement
    #---
    if (self.width != window_width || self.height != window_height)
      self.width = window_width
      self.height = window_height
      create_contents
    end
    #---
    default_placement
    #---
    if $game_variables[MESSAGE_X] == -1
      x_space = Graphics.width - window_width
      self.x = x_space-(x_space/2)
    #---
    else
      self.x = $game_variables[MESSAGE_X]
    #---
    end
    #---
    if $game_variables[5] != 0
      self.y = $game_variables[MESSAGE_Y]
    end
    #---
  end
 
end
 
#--------------------------------------------------------------------------
# >> Game_Interpreter
# Add message box option and message box option reset scripts
#--------------------------------------------------------------------------
class Game_Interpreter
  include Message_Box_Options
 
  #--------------------------------------------------------------------------
  # new method: message_box_options
  #--------------------------------------------------------------------------
  def message_box_options(width, height, x, y)
    $game_variables[MESSAGE_WIDTH] = width
    $game_variables[MESSAGE_HEIGHT] = height
    $game_variables[MESSAGE_X] = x
    $game_variables[MESSAGE_Y] = y
  end
 
  #--------------------------------------------------------------------------
  # new method: message_box_options_reset
  #--------------------------------------------------------------------------
  def message_box_options_reset
    $game_variables[MESSAGE_WIDTH] = 0
    $game_variables[MESSAGE_HEIGHT] = 0
    $game_variables[MESSAGE_X] = 0
    $game_variables[MESSAGE_Y] = 0
  end
 
end
 
#==============================================================================
# END SCRIPT
#==============================================================================




Mis à jour le 14 novembre 2020.






Danzaiver - posté le 31/01/2014 à 03:57:17 (364 messages postés)

❤ 0

Bonsoir, Script simple et intéressant remplissant sont rôle et c'est exactement se que je recherchait.

Mais , parce-qu’il y as un mais.

Bien que pour la largeur et la hauteur et le placement en coordonnée X fonctionne.

Les coordonnée en Y ne fonctionne pas, du coup que j'y mette une grosse valeur positive ou négative ou bien une petite valeur, rien ne se fait.
sa ne veut pas bouger ( et oui j'ai utiliser les bonnes variable. )

Ne m'y connaissant pas trop en codage je me suis quand même permis de le Bidouiller.

En gros j'ai reprit se que ta fait pour la coordonnée X, copier/coller remplacer les X par des Y et remplacer largeur par hauteur ( width par height ) Et Hop sa marche j'ai même l'alignement au centre comme pour X sauf qu'ici sa sert a rien puisqu’on a centrer dans les options de message ... Sa fait juste un autre moyen de le configurer.

Voici :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#==============================================================================
# Message Box Options (version 2.0.1)
# NEW FEATURES:
# - You can now quickly set variables using a script call:
# -- message_box_options(width, height, x, y)
# - You can also reset the variables quickly as well
# -- message_box_options_reset
#------------------------------------------------------------------------------
# by Zerbu
#==============================================================================
module Message_Box_Options
 
  #--------------------------------------------------------------------------
  # Options
  #--------------------------------------------------------------------------
  # Variable with the message width
  # If the variable value is 0, the full width of the window will be used
  MESSAGE_WIDTH = 85
 
  # Variable with the message height
  # If the variable value is 0, the default height will be used
  MESSAGE_HEIGHT = 86
 
  # Variable with the X position
  # If the variable value is -1, it will be centred on the screen
  MESSAGE_X = 87
 
  # Variable with the Y position
  # If the variable value is 0, the position chosen in the editor
  # (Top, Middle, Bottom) will be used
  MESSAGE_Y = 88
 
end
 
#--------------------------------------------------------------------------
# DO NOT EDIT BELOW unless you know what you're doing!
# If you are not careful, editing below could cause chaos in your game
# world, and I don't mean something the player will enjoy!
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Window_Message
#--------------------------------------------------------------------------
class Window_Message < Window_Base
  include Message_Box_Options
 
  #--------------------------------------------------------------------------
  # alias method: window_width
  #--------------------------------------------------------------------------
  alias default_window_width window_width
  def window_width
    #---
    if $game_variables[MESSAGE_WIDTH] != 0
      $game_variables[MESSAGE_WIDTH]
    #---
    else
      default_window_width
    end
    #---
  end
 
  #--------------------------------------------------------------------------
  # alias method: window_height
  #--------------------------------------------------------------------------
  alias default_window_height window_height
  def window_height
    #---
    if $game_variables[MESSAGE_HEIGHT] != 0
      $game_variables[MESSAGE_HEIGHT]
    #---
    else
      default_window_height
    #---
    end
  end
 
  #--------------------------------------------------------------------------
  # alias method: update_placement
  #--------------------------------------------------------------------------
  alias default_placement update_placement
  #---
  def update_placement
    #---
    if (self.width != window_width || self.height != window_height)
      self.width = window_width
      self.height = window_height
      create_contents
    end
    #---
    default_placement
    #---
    if $game_variables[MESSAGE_X] == -1
      x_space = Graphics.width - window_width
      self.x = x_space-(x_space/2)
    #---
    else
      self.x = $game_variables[MESSAGE_X]
    #---
    end
    #---
        if $game_variables[MESSAGE_Y] == -1
      y_space = Graphics.height - window_height
        self.y = y_space-(y_space/2)
       #---
        else
          self.y = $game_variables[MESSAGE_Y]
    #---
    end
    #---  
  end
 
end
 
#--------------------------------------------------------------------------
# >> Game_Interpreter
# Add message box option and message box option reset scripts
#--------------------------------------------------------------------------
class Game_Interpreter
  include Message_Box_Options
 
  #--------------------------------------------------------------------------
  # new method: message_box_options
  #--------------------------------------------------------------------------
  def message_box_options(width, height, x, y)
    $game_variables[MESSAGE_WIDTH] = width
    $game_variables[MESSAGE_HEIGHT] = height
    $game_variables[MESSAGE_X] = x
    $game_variables[MESSAGE_Y] = y
  end
 
  #--------------------------------------------------------------------------
  # new method: message_box_options_reset
  #--------------------------------------------------------------------------
  def message_box_options_reset
    $game_variables[MESSAGE_WIDTH] = 0
    $game_variables[MESSAGE_HEIGHT] = 0
    $game_variables[MESSAGE_X] = 0
    $game_variables[MESSAGE_Y] = 0
  end
 
end
 
#==============================================================================
# END SCRIPT
#==============================================================================




sriden - posté le 16/03/2014 à 19:28:58 (16578 messages postés)

❤ 0

Citation:

Danzaiver


Le dernier dinosaure ? =>[]

 

Escapade | La 7e porte | Vader Ou La Fin des Haricots | Ketsuro | Polaris 03 | Blog ciné/jv | Mes albums de zyk : Diaphanous Horizons & Retranchements

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers