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 - episode 7 / Jeux: Ce qui vit Dessous / News: Quoi de neuf sur Oniromancie (...) / Sorties: Dread Mac Farlane - episode 6 / News: Quoi de neuf sur Oniromancie (...) / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

280 connectés actuellement

29352727 visiteurs
depuis l'ouverture

7951 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Kingdom Ultimate

Tashiroworld

Leo-Games

Guelnika & E-magination

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [VX] Plusieurs polices d'écriture en jeu


LittleGamer - posté le 02/09/2014 à 20:43:51 (414 messages postés)

❤ 0

Domaine concerné: Système
Logiciel utilisé: VX
Bonsoir,

Savez vous si il est possible d'avoir deux polices d'écriture en jeu ? Je voudrais utiliser un script qui va permettre de lire des livres en jeu (je l'ai et il est fonctionnel, je vais peut-être le mettre dans la rubrique script, il à été dur à trouver. C'est celui d'Omega7 si y en a qui connaissent), et je voudrais pouvoir mettre des polices d'écritures différentes du reste du jeu dans les livres.

Je suppose qu'il faudra les mettre dans les fichiers du jeu et/ou configurer un installeur, mais surtout, j'aimerais savoir comment indiquer au jeu quelle police il doit utiliser.

Éventuellement, serait-il possible d'afficher deux polices à la dans deux menus affichés en même temps ?

Le script des livres (au cas où) :

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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# =============================================================================
# Simple ReadBooks Scene
# Version: 1.0
# Author: Omegas7
# http://omegadev.biz or http://omegas7.blogspot.com
# -----------------------------------------------------------------------------
# Creates a book that may be called through an event script call.
# -----------------------------------------------------------------------------
# FEATURES:
#       > 1.0
#       > Independent book graphic for each book.
#       > Book sound effect.
#       > Unlimited books and pages allowed.
#       > Window telling the pages you are on.
#       > Displays two pages simulateously.
#       > Use script call for opening a book.
#       > Display pictures (also unlimited)
#       > Book title window.
# -----------------------------------------------------------------------------
# USAGE: Adding a book to your database.
#
# This is the basic code template for your book, which is placed below:
# Titles[ID] = "My Title"
# Pages[ID][PageNumber] = ["So this is this is a page." , "This is the second line"]
# Graphics[ID] = "Graphic file name for book located in Pictures folder"
# Sounds[ID] = "Sound file name for book located in Audio/SE/ folder"
#
# Where ID is the ID number of the book in this script. Note that the
# first book is 0, then the other is 1, then 2, and so on...
# Let's say you want your book's first page to have three lines of text:
# Pages[ID][0] = ["First line" , "Second line", "Third line"]
# That 0 means the first page. It is an array with three strings.
# What if I want to make two pages? Well, put
# Pages[ID][1] = ["This is the second page!!"]
# Note the 1 there. It means second page.
# Remember that each line is inside quotes " " and separated by a comma.
# See examples in demo!
#
# ADDING PICTURES:
#
# All your pictures for books must be in Graphics/Pictures/ folder.
# If a book needs a picture (let's say, book ID 5), on page 4, we put this line:
# Pictures[5][4] = [    ['ImageName',X,Y]       ]
# X and Y and screen coordinates.
# When thinking on X and Y, always think the page will be the left one.
# If the page is the second one (right half of the screen), the script should
# move the image automatically.
#
# OPENING A BOOK:
#
# Use the event script call command, and type:
# $scene = ReadBook.new(ID)
# Where ID is the ID number of the book in the script.
#
# IMPORTANT:
# When you add/remove a book, remember to update the
# HOW_MANY_BOOKS_EXIST
# number below.
# =============================================================================
 
module OmegaX
module ReadBookData
HOW_MANY_BOOKS_EXIST = 4        # Please update when you add a book
Titles = []     # <- Don't edit
Pages = []      # <- Don't edit
Graphics = []   # <- Don't edit
Sounds = []     # <- Don't edit
Pictures = []   # <- Don't edit
for i in 0...HOW_MANY_BOOKS_EXIST
Pages[i] = []
Pictures[i] = []
end # <- Don't edit
 
# PUT BOOK DATA BELOW HERE
 
Titles[0] = "Stupid's guide to glory"
Pages[0][0] = ["So you're reading this",
"because you're an idiot.","Well, this book with teach","you the path to glory!!"]
Pages[0][1] = ["First of all, you will need","lots of gold! How?",
"Very easy! Just go into an","epic quest and kill 200","dragons!!!"]
Pages[0][2] = ["Good! Now that you have","lots of money, you can",
"now go and buy your very","own castle in middle of",
"town! You will get lots of","respect! You are now","GLORIOUS!!","","End."]
Graphics[0] = "Book01"
Sounds[0] = "Book"
 
 
Titles[1] = "The one-page book"
Pages[1][0] = ["That's right, people!","this book only has ONE",
"PAGE!! BUT it is SUPER","heavy!! It is all thanks",
"to our new paper","compression system! Now",
"500 trees fit in one single","and compact book!","Umm... yeah. That's all."]
Graphics[1] = "Book01"
Sounds[1] = "Book"
 
 
Titles[2] = "Lots of pages book"
Pages[2][0] = ["Welcome to this test!","I will test a lot of","pages!"]
Pages[2][1] = ["This is page 2."]
Pages[2][2] = ["Page 3..."]
Pages[2][3] = ["This is the awesome","page 4!!"]
Pages[2][4] = ["This is page 5.","","END!"]
Graphics[2] = "Book01"
Sounds[2] = "Book"
 
 
Titles[3] = "The monster book"
Pages[3][0] = ["Below you can see a","terrible monster:"]
Pages[3][1] = ["And again:"]
Pages[3][2] = ["And again, but twice:"]
Graphics[3] = "Book01"
Sounds[3] = "Book"
Pictures[3][0] = [ ['MONSTER',85,120] ]
Pictures[3][1] = [ ['MONSTER',85,120] ]
Pictures[3][2] = [ ['MONSTER',85,120], ['MONSTER',85,160] ]
end
end
 
class ReadBook < Scene_Base
include OmegaX::ReadBookData
def initialize(id)
@id = id
@page = 0
end
def start
create_menu_background
Audio.se_play("Audio/SE/#{Sounds[@id]}")
@title = Window_Base.new(0,0,544,50)
@title.contents.font.size = 16
@title.contents.draw_text(0,0,500,17,"You're reading: #{Titles[@id]}")
@title.z = 500
@graphic = Sprite_Base.new
@graphic.bitmap = Cache.picture(Graphics[@id].to_s)
@graphic.z = 500
@page1 = Window_Base.new(72,70,210,250)
@page2 = Window_Base.new(272,70,210,250)
@page1.contents.font.size = @page2.contents.font.size = 14
@page1.z = @page2.z = 501
@page1.opacity = @page2.opacity = 0
@info = Window_Base.new(100,416 - 50,344,50)
@info.contents.font.size = 14
@info.z = 500
@pictures = []
draw_pages
end
def update
if Input.trigger?(Input:: B)
finish
end
if Input.trigger?(Input::RIGHT)
if Pages[@id].size > 1
if @page + 2 < Pages[@id].size
Audio.se_play("Audio/SE/#{Sounds[@id]}")
@page += 1
draw_pages
end
end
end
if Input.trigger?(Input::LEFT)
if Pages[@id].size > 1
if @page >= 1
Audio.se_play("Audio/SE/#{Sounds[@id]}")
@page -= 1
draw_pages
end
end
end
end
def draw_pages
for i in 0...@pictures.size
@pictures[i].dispose
@pictures[i] = nil
end
@pictures.compact!
@page1.contents.clear
@page2.contents.clear
reading = []
if Pages[@id][@page] != nil
for i in 0...Pages[@id][@page].size
@page1.contents.draw_text(0,i * 17,205,18,Pages[@id][@page][i].to_s)
end
if @page + 1 == 0
reading[0] = Pages[@id].size
else
reading[0] = @page + 1
end
if Pictures[@id][@page] != nil
for i in 0...Pictures[@id][@page].size
@pictures.push(Sprite_Base.new)
x = @pictures.size - 1
@pictures[x].bitmap = Cache.picture(Pictures[@id][@page][i][0])
@pictures[x].x = Pictures[@id][@page][i][1]
@pictures[x].y = Pictures[@id][@page][i][2]
@pictures[x].z = 501
end
end
end
if Pages[@id][@page + 1] != nil
for i in 0...Pages[@id][@page + 1].size
@page2.contents.draw_text(0,i * 17,205,18,Pages[@id][@page + 1][i].to_s)
end
if Pictures[@id][@page] != nil
for i in 0...Pictures[@id][@page + 1].size
@pictures.push(Sprite_Base.new)
x = @pictures.size - 1
@pictures[x].bitmap = Cache.picture(Pictures[@id][@page + 1][i][0])
@pictures[x].x = Pictures[@id][@page + 1][i][1] + @page2.x - 64
@pictures[x].y = Pictures[@id][@page + 1][i][2]
@pictures[x].z = 501
end
end
reading[1] = @page + 2
end
if @page + 1 == Pages[@id].size || @page + 1 == 0
@page2.contents.clear
reading[1] = nil
end
reading.compact!
@info.contents.clear
if reading.size > 1
@info.contents.draw_text(0,-2,322,15,"Reading pages #{reading[0]} and #{reading[1]}",1)
else
@info.contents.draw_text(0,-2,322,15,"Reading page #{reading[0]}",1)
end
end
def finish
Sound.play_cancel
@title.dispose
@graphic.dispose
@info.dispose
@page1.dispose
@page2.dispose
for i in 0...@pictures.size
@pictures[i].dispose
@pictures[i] = nil
end
@pictures.compact!
$scene = Scene_Map.new
end
end



Merci d'avance :)

Index du forum > Entraide > [VX] Plusieurs polices d'écriture en jeu

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