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

Sorties: "Dread Mac Farlane", (...) / Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

551 connectés actuellement

29441668 visiteurs
depuis l'ouverture

7746 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

RPG Maker - La Communauté

Zarok

Guelnika & E-magination

Lunae - le bazar d'Emz0

Hellsoft

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [VX ACE] Police d'écriture des combats


Onchmemath - posté le 29/08/2014 à 02:49:31 (23 messages postés)

❤ 0

Domaine concerné: Police
Logiciel utilisé: VX ACE
Salut à tous,


Voilà j'ai chercher sur internet pour modifier la police d'écriture du jeu, mais ça ne correspond pas totalement à ce que je cherche.

Je voudrais changer la police d'écriture du nom des Battlers pour qu'elle corresponde à celle du nom de mes personnages ( police "Georgia" ).

La police de base pour les dialogues resterait la même.

Une idée ?


Estheone - posté le 29/08/2014 à 11:43:35 (312 messages postés)

❤ 0

Juste le nom des persos ?
Dans ce cas ceci devrait faire l'affaire :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
class Window_Base < Window
  def draw_actor_name(actor, x, y, width = 112)
    change_color(hp_color(actor))
    contents.font.name = "Georgia"
    draw_text(x, y, width, line_height, actor.name)
    contents.font.name = Font.default_name
  end
end



Wandering Souls : Jeu complet / Topic sur Oniro


Onchmemath - posté le 29/08/2014 à 18:02:55 (23 messages postés)

❤ 0

Merci, je dois le placer où ?
Faire un nouveau script ou le mettre dans un déjà existant ?

image


Je voudrais que la police du nom "Vampire" soit la même que celle du nom de mes persos en dessous (qui eux ont la police Georgia avec le script du battle HUD)


:flaco


Immudelki - posté le 29/08/2014 à 18:09:27 (3648 messages postés) - staff -

❤ 0

Xnivurognien souriant

tu peut le mettre dans la liste material, et le nommer window_custom par exemple
lors de l'execution du jeu, la fonction draw_actor_name de la classe window_base sera automatiquement remplaçée par celle de ce script ci.
(ainsi tu garde le code d'origine propre, et tu peut changer celui ci à ta guise).

Mein Topic sur Oniro/Mein site pro/Mein Tumblr/Mein jeu Code Lyoko développé h24 7/7 - "Donnez des oeufs au peuple, il fera des oeufs brouillés" Réu Oniro 12/01/2022


Onchmemath - posté le 29/08/2014 à 18:16:28 (23 messages postés)

❤ 0

J'ai fait un nouveau script que j'ai placé dans "Materials" et j'ai copié ce que Estheone m'a donné.

Et il ne ce passe rien l'écriture reste la même que sur l'image que j'ai mis au dessus.

[EDIT] Je viens de penser, l'affichage de la barre de PV/PM et du nom des ennemis viens d'un script, mais j'ai déjà cherché dedans et je ne trouve aucunes ligne parlant d'une font


Estheone - posté le 29/08/2014 à 19:04:34 (312 messages postés)

❤ 0

Ok c'est le nom des monstres que tu veux modifier, et en plus tu utilises d'autres scripts, ça change tout.

Si tu donnes pas le code de tes scripts, personne pourra t'aider.

Wandering Souls : Jeu complet / Topic sur Oniro


Onchmemath - posté le 29/08/2014 à 19:11:06 (23 messages postés)

❤ 0

D'accord je comprend, désolé.

Voici le script en question :

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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
#--# Basic Enemy HP Bars Lite v 1.1
#
# Adds options for hp/mp bars, enemy name, state icons, and even targetting icon
#  to appear over the enemy in battle.
#
# Usage: Plug and play, customize as needed.
#       New Notetag: <BOSS> determines if enemy is a boss or not.
#                    <HIDE NAME> name displays as ???
#
#------#
#-- Script by: V.M of D.T
#
#- Questions or comments can be:
#    posted on the thread for the script
#    given by email: sumptuaryspade@live.ca
#    provided on facebook: http://www.facebook.com/DaimoniousTailsGames
#
#--- Free to use in any project, commercial or non-commercial, with credit given
#--Though a donation's always a nice way to say thank you~ (I also accept actual thank you's)
 
module DTP_HP
  #Whether to include the hp bar or not
  USE_HP_BAR = true
  #Whether to include an mp bar or not
  USE_MP_BAR = true
  #Whether or not to include state icons
  USE_STATES = true
  #Whether to display enemy name or not
  USE_TEXT = true
  #Icon to be displayed over current target, set to 0 to disable
  DISPLAY_ICON = 325
 
  #Display hp bar above the enemy, false for below
  ABOVE_MONSTER = false
  #Offset the hp bar along the x-axis(left,right)
  BAR_OFFSET_X = 0
  #Offset the hp bar along the y-axis(up,down)
  BAR_OFFSET_Y = -100
 
  #First color for the mp bar gradient
  MP_COLOR_BAR_1 = Color.new(0,175,255)
  #Second color fot the mp bar gradient
  MP_COLOR_BAR_2 = Color.new(0,0,255)
 
  #Show bars only when specific actor in party. Array format. Example: [8,7]
  #Set to [] to not use actor only
  SPECIFIC_ACTOR = []
  #Show enemy hp bar only if certain state is applied (like a scan state)
  #Set to 0 to not use state only
  SCAN_STATE = 0
  #Enemies will show hp bar as long as they have been affected by scan state
  #at least once before
  SCAN_ONCE = false
  #Hp bars will only show when you are targetting a monster
  ONLY_ON_TARGET = true
end
 
class Sprite_Battler
  alias hpbar_update update
  alias hpbar_dispose dispose
  def update
    hpbar_update
    return unless @battler.is_a?(Game_Enemy)
    if @battler
      update_hp_bar
    end
  end
  def update_hp_bar
    setup_bar if @hp_bar.nil?
    determine_visible
    return unless @hp_bar.visible
    @hp_bar.update
    if @hp_bar.contents_opacity != self.opacity
      @hp_bar.contents_opacity = self.opacity
    end
    @hp_bar.y = self.y + DTP_HP::BAR_OFFSET_Y - self.height - @hp_bar.height
    @hp_bar.y = self.y + DTP_HP::BAR_OFFSET_Y unless DTP_HP::ABOVE_MONSTER
    @hp_bar.y = 0 if @hp_bar.y < 0
    @hp_bar.y = -12 if @battler.boss?
    @hp_bar.contents.clear
    width = @hp_bar.contents.width - @hp_bar.padding
    hp_width = @battler.hp_rate
    yy = 0
    if DTP_HP::DISPLAY_ICON > 0
      if SceneManager.scene.is_a?(Scene_Battle) &&
        SceneManager.scene.enemy_window &&
        SceneManager.scene.enemy_window.active &&
        SceneManager.scene.target_window_index == @battler.index
          @hp_bar.draw_icon(DTP_HP::DISPLAY_ICON,@hp_bar.contents.width/2,yy)
      end
      yy += 24
    end
    if DTP_HP::USE_TEXT and !@battler.boss?
      if @battler.hide_name
        @hp_bar.draw_text(0,yy,width,24,"???",2)
      else
        @hp_bar.draw_text(0,yy,width,24,@battler.name,2)
      end
      yy += 24
    end
    if DTP_HP::USE_HP_BAR
      height = @battler.boss? ? 16 : 8
      if @special
        @hp_bar.draw_actor_hp(@battler, @hp_bar.padding/2, yy, width, height, @battler.boss?)
      else
        @hp_bar.draw_actor_hp(@battler, @hp_bar.padding/2, yy, width)
      end
      yy += 12
    end
    if DTP_HP::USE_TEXT and @battler.boss?
      if @battler.hide_name
        @hp_bar.draw_text(0,12,width,24,"???",2)
      else
        @hp_bar.draw_text(0,12,width,24,@battler.name,2)
      end
      if @special
        @hp_bar.change_color(@hp_bar.system_color)
        @hp_bar.draw_text(0,24,width,24,Vocab::hp_a)
        @hp_bar.change_color(@hp_bar.normal_color)
      end
    end
    if DTP_HP::USE_MP_BAR and !@battler.boss?
      mp_width = @battler.mp_rate * width
      @hp_bar.draw_gauge(@hp_bar.padding/2,yy,width,@battler.mp_rate,DTP_HP::MP_COLOR_BAR_1,DTP_HP::MP_COLOR_BAR_2)
      yy += 24
    end
    if DTP_HP::USE_STATES
      xx = 2
      yy += 12 if @battler.boss?
      @battler.states.each do |state|
        @hp_bar.draw_icon(state.icon_index,xx,yy)
        xx += 24
      end
    end
  end
  def setup_bar
    @special = Module.const_defined?(:SPECIAL_GAUGES)
    if @battler.boss?
      @hp_bar = Window_Base.new(0,-12,Graphics.width,96)
    else
      height = 24
      height += 24 if DTP_HP::DISPLAY_ICON > 0
      height += 24 if DTP_HP::USE_TEXT
      height += 24 if DTP_HP::USE_HP_BAR
      height += 24 if DTP_HP::USE_MP_BAR
      height += 24 if DTP_HP::USE_STATES
      @hp_bar = Window_Base.new(0,0,120,height)
      @hp_bar.x = self.x - @hp_bar.width / 2 + DTP_HP::BAR_OFFSET_X
      @hp_bar.y = self.y + DTP_HP::BAR_OFFSET_Y - self.height - @hp_bar.height
      @hp_bar.y = self.y + DTP_HP::BAR_OFFSET_Y unless DTP_HP::ABOVE_MONSTER
      @hp_bar.x = 0 if @hp_bar.x < 0
      @hp_bar.y = 0 if @hp_bar.y < 0
    end
    @hp_bar.opacity = 0
    @hp_bar.z = self.z + 1
    @hp_bar.viewport = self.viewport
  end
  def determine_visible
    if !@battler.alive?
      @hp_bar.visible = false
      if DTP_HP::SCAN_ONCE and DTP_HP::SCAN_STATE == 1
        $game_party.monster_scans[@battler.enemy_id] = true
      end
      return if !@battler.alive?
    end
    @hp_bar.visible = true
    if DTP_HP::SCAN_STATE != 0
      @hp_bar.visible = false
      @hp_bar.visible = true if @battler.state?(DTP_HP::SCAN_STATE)
      if DTP_HP::SCAN_ONCE
        @hp_bar.visible = true if $game_party.monster_scans[@battler.enemy_id] == true
        $game_party.monster_scans[@battler.enemy_id] = true if @hp_bar.visible
      end
    end
    if !DTP_HP::SPECIFIC_ACTOR.empty?
      @hp_bar.visible = false unless DTP_HP::SCAN_STATE != 0
      DTP_HP::SPECIFIC_ACTOR.each do |i|
        next unless $game_party.battle_members.include?($game_actors[i])
        @hp_bar.visible = true
      end
    end
    if DTP_HP::ONLY_ON_TARGET
      return unless SceneManager.scene.is_a?(Scene_Battle)
      return unless SceneManager.scene.enemy_window
      @hp_bar.visible = SceneManager.scene.target_window_index == @battler.index
      @hp_bar.visible = false if !SceneManager.scene.enemy_window.active
    end
  end
  def dispose
    @hp_bar.dispose if @hp_bar
    hpbar_dispose
  end
end
 
class Scene_Battle
  attr_reader  :enemy_window
  def target_window_index
    begin
    @enemy_window.enemy.index
    rescue
      return -1
    end
  end
end
 
class Game_Party
  alias hp_bar_init initialize
  attr_accessor  :monster_scans
  def initialize
    hp_bar_init
    @monster_scans = []
  end
end
 
class Game_Enemy
  def boss?
    self.enemy.note =~ /<BOSS>/
  end
  def hide_name
    self.enemy.note =~ /<HIDE NAME>/
  end
end






De plus dans ce script je cherche le moyen de décalé la position du nom des Boss de quelques centimètres vers la gauche :-/ le nom des monstres simple est parfaitement mis, alors que le nom des Boss chevauche les chiffres des PV


Estheone - posté le 29/08/2014 à 19:21:55 (312 messages postés)

❤ 0

Il fait peur ton script. :surpris3

Après la ligne 147

Portion de code : Tout sélectionner

1
      @hp_bar = Window_Base.new(0,0,120,height)


tu rajoutes ça :

Portion de code : Tout sélectionner

1
2
      @hp_bar.contents.font.name = "Georgia"
      @hp_bar.contents.font.italic = true



Si tu veux les mêmes effets d'ombre que sur l'autre script, il me faut son code aussi pour voir comment ils s'y sont pris exactement. Là tout au plus je peux faire qu'une imitation.


EDIT :
Pour le nom des boss va voir lignes 111 à 115 :

Portion de code : Tout sélectionner

1
2
3
4
5
      if @battler.hide_name
        @hp_bar.draw_text(0,12,width,24,"???",2)
      else
        @hp_bar.draw_text(0,12,width,24,@battler.name,2)
      end


Je te propose soit de remplacer les 2 par des 1 pour centrer le nom du boss au lieu de l'aligner vers la droite, soit de remplacer les 12 par 0 pour mettre le nom plus haut.

Wandering Souls : Jeu complet / Topic sur Oniro


Onchmemath - posté le 30/08/2014 à 03:52:40 (23 messages postés)

❤ 0

Ahh je te remercie ça fonctionne niquel, et doublement merci pour le centrage du nom des boss qui me facilite la vie !

Sinon en quoi il fait peur le script ? :3


Par contre le nom du boss est toujours en police de base alors que les monstres standard sont bien en Georgia. Donc je me suis dis que je devais surement coller la même portion de code que tu ma indiqué dans une ligne spécifique au Boss, mais ou :o

Édit : j'ai trouvé par moi meme pour le boss, c'était juste au dessus!


Estheone - posté le 30/08/2014 à 06:24:15 (312 messages postés)

❤ 0

Disons juste que le mec qui l'a fait a encore beaucoup à apprendre. :p

Et pour les lignes à rajouter en fait tu ferais mieux de les mettre après le bloc if else (avec @hp_bar.opacity et les autres) plutôt que de les dupliquer, ça fonctionnera aussi bien.

Wandering Souls : Jeu complet / Topic sur Oniro

Index du forum > Entraide > [VX ACE] Police d'écriture des combats

repondre up

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