• Anmelden

Kitsu

Rekrut

  • »Kitsu« ist der Autor dieses Themas

Motto: Jeder Tag an dem es Kekse gibt ist ein guter Tag

  • Nachricht senden

1

Freitag, 1. August 2008, 01:16

Variaben anzeigen & scriptübersetung

Ja ich bräuchte wol ein kleines *husthust* script *husthust* dass mir eine variable am bildschirmrand anzeigt und es wre nett wenn mir jemand das folgende script (,welches ich mal aufwww.rmxp.org gefunden habe,) so umschreiben könnte dass es für den xp nutzbar wird:
Spoiler: VX Mapname Popup

Quellcode

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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
#==============================================================================
# ** Map Name Popup
#------------------------------------------------------------------------------
#  © Dargor, 2008
#  11/05/08
#  Version 1.5
#------------------------------------------------------------------------------
#  VERSION HISTORY:
#   - 1.0 (06/03/08), Initial release
#   - 1.1 (19/03/08), Added support for areas
#   - 1.2 (26/04/08), Added revert exclusion option
#   - 1.3 (11/05/08), Script restructuration
#   - 1.4 (11/05/08), Added support for enabling/disabling popups
#   - 1.5 (11/05/08), Added 'show' functions
#------------------------------------------------------------------------------
#  INSTRUCTIONS:
#   - Paste this above main
#   - Edit the Exclude_Maps array in the Map_Name_Popup module
#   - Edit the Exclude_Areas array in the Map_Name_Popup module
#==============================================================================
 
#==============================================================================
#  ** Map Name Popup Configuration
#==============================================================================
 
module Map_Name_Popup
  # These maps will not popup the name window
  Exclude_Maps = []
  # These areas will not popup the name window
  Exclude_Areas = []
  # Revert exclusion
  Revert_Exclusion = false
end
 
#==============================================================================
# ** RPG::Area
#------------------------------------------------------------------------------
#  Data class for areas.
#==============================================================================
 
class RPG::Area
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :show_name
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_vx_area_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    dargor_vx_area_initialize
    @show_name = false
  end
end
 
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================
 
class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :map_name_disabled
  attr_accessor :area_name_disabled
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_vx_map_name_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    dargor_vx_map_name_initialize
    @map_name_disabled = false
    @area_name_disabled = false
  end
end
 
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles maps. It includes event starting determinants and map
# scrolling functions. The instance of this class is referenced by $game_map.
#==============================================================================
 
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Area ID
  #--------------------------------------------------------------------------
  def area_id
    for area in $data_areas.values
      return area.id if in_area?(area)
    end
  end
end
 
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================
 
class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :show_name
  #--------------------------------------------------------------------------
  # Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_map_name_window_setup setup
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  def setup(map_id)
    dargor_map_name_window_setup(map_id)
    @show_name = true
  end
  #--------------------------------------------------------------------------
  # * Get Map ID
  #--------------------------------------------------------------------------
  def name
    map_infos = load_data("Data/MapInfos.rvdata")
    name = map_infos[@map_id].name
    name.gsub!(/\\N\[([0-9]+)\]/i) { $game_actors[$1.to_i].name }
    return name
  end
end
 
class Scene_Map < Scene_Base
  def show_map_name(forced=false)
    $game_map.show_name = true
    @spriteset.show_map_name(forced=false)
  end
  def show_area_name(forced=false)
    @spriteset.show_area_name(forced=false)
  end
end
 
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================
 
class Spriteset_Map
  #--------------------------------------------------------------------------
  # Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_spriteset_name_window_initialize initialize
  alias dargor_spriteset_name_window_update update
  alias dargor_spriteset_name_window_dispose dispose
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    create_windows
    dargor_spriteset_name_window_initialize
    update
  end
  #--------------------------------------------------------------------------
  # * Create Windows
  #--------------------------------------------------------------------------
  def create_windows
    @map_name_window = Window_MapName.new
    @area_name_window = Window_MapName.new
  end
  #--------------------------------------------------------------------------
  # * Show Map Name
  #--------------------------------------------------------------------------
  def show_map_name(forced=false)
    unless forced
      return if $game_system.map_name_disabled
    end
    if $game_map.show_name
      @map_name_window.show_name($game_map.name, 128)
    end
  end
  #--------------------------------------------------------------------------
  # * Show Area Name
  #--------------------------------------------------------------------------
  def show_area_name(forced=false)
    unless forced
      return if $game_system.area_name_disabled
    end
    for area in $data_areas.values
      if $game_player.in_area?(area) and area.show_name
        if Map_Name_Popup::Revert_Exclusion
          return unless Map_Name_Popup::Exclude_Areas.include?(area.id)
        else
          return if Map_Name_Popup::Exclude_Areas.include?(area.id)
        end
        @area_name_window.show_name(area.name, 128, true)
        area.show_name = false
      else
        area.show_name = true unless $game_player.in_area?(area)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    dargor_spriteset_name_window_update
    show_map_name
    show_area_name
    @map_name_window.update
    @area_name_window.update
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    dargor_spriteset_name_window_dispose
    @map_name_window.dispose
    @area_name_window.dispose
  end
end
 
#==============================================================================
# ** Window_MapName
#------------------------------------------------------------------------------
#  This window shows the map name when the player is transfered.
#==============================================================================
 
class Window_MapName < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(name="", count=128)
    super(0, 0, 544, 64)
    self.visible = false
    self.openness = 0
    @name = name
    @count = count
    @in_area = false
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #return unless $game_map.display_name
    self.visible = true
    self.contents.clear
    self.contents.font.color = normal_color
    align = @in_area ? 0 : 1
    self.contents.draw_text(0,0,504,32,@name,align)
    gw = contents.text_size(@name).width
    gc1 = Color.new(255,255,255)
    gc2 = Color.new(0,0,0,0)
    self.contents.gradient_fill_rect(0, WLH, gw, 2, gc1, gc2) if @in_area
    $game_map.show_name = false
  end
  #--------------------------------------------------------------------------
  # * Show Name
  #--------------------------------------------------------------------------
  def show_name(name=@name, count=@count, in_area=false)
    unless in_area
      return if $game_map.show_name == false
    end
    if Map_Name_Popup::Revert_Exclusion
      return unless Map_Name_Popup::Exclude_Maps.include?($game_map.map_id)
    else
      return if Map_Name_Popup::Exclude_Maps.include?($game_map.map_id)
    end
    @name = name
    @count = count
    @in_area = in_area
    if @in_area
      self.openness = 255
      self.opacity = 0
      self.contents_opacity = 0
      self.y = 352
    else
      self.openness = 0
      self.opacity = 255
      self.contents_opacity = 255
      self.y = 0
    end
    refresh
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    unless $scene.is_a?(Scene_Map) 
      self.visible = false
      return
    end
    if self.visible
      if @count == 0
        if @in_area
          self.contents_opacity -= 24
          self.visible = false if self.contents_opacity == 0
          return
        else
          self.openness -= 24
          self.visible = false if self.openness == 0
          return
        end
      end
      if @in_area
        self.contents_opacity += 24
      else
        self.openness += 24
      end
      @count -= 1
    end
  end
end

zum Lesen den Text mit der Maus markieren

Edit OK nett war untertrieben: wer das für mich macht dem werde ich sämtliche effekte überarbeiten.. Beispiele :
Attachment 3286Attachment 3287 Attachment 3288

Credits eintrag sicher
& schonmal danke im vorraus
~ Ezelo
~Kitsu

mein Leben fängt jetzt endlich richtig an - und es wird wunderschön :3
möchte wer Kekse? ^-^

Social Bookmarks